redsys-easy 5.0.0 → 5.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.
package/lib/client.d.ts CHANGED
@@ -36,36 +36,53 @@ export interface RedsysConfig {
36
36
  }
37
37
  /**
38
38
  * Sends a iniciaPeticion request using REST interface
39
+ *
40
+ * @public
39
41
  */
40
42
  export type RestIniciaPeticion = (paramsInput: RestIniciaPeticionInputParams) => Promise<RestIniciaPeticionOutputParams>;
41
43
  /**
42
44
  * Sends a trataPeticion request using REST interface
45
+ *
46
+ * @public
43
47
  */
44
48
  export type RestTrataPeticion = (paramsInput: RestTrataPeticionInputParams) => Promise<RestTrataPeticionOutputParams>;
45
49
  /**
46
50
  * Creates the parameters needed for a redirect form
51
+ *
52
+ * @public
47
53
  */
48
54
  export type CreateRedirectForm = (paramsInput: RedirectInputParams) => RedirectForm;
49
55
  /**
50
56
  * Processes a JSON REST notification
57
+ *
58
+ * @public
51
59
  */
52
60
  export type ProcessRestNotification = (
53
61
  /** Body of JSON notification, as a POJO (Plain Old Javascript Object) */
54
62
  body: ResponseJSONSuccess) => RestNotificationOutputParams;
55
63
  /**
56
64
  * Parses and verifies the body of a SOAP notification
65
+ *
66
+ * @public
57
67
  */
58
68
  export type ProcessSoapNotification = (
59
69
  /** SOAP notification as a XML string */
60
70
  xml: string) => SoapNotificationOutputParams;
61
71
  /**
62
72
  * Creates an answer for a SOAP notification, serializes and signs it
73
+ *
74
+ * @public
63
75
  */
64
76
  export type CreateSoapNotificationAnswer = (
65
77
  /** Order identifier */
66
78
  order: string,
67
79
  /** Indicates if the payment is allowed to proceed */
68
80
  allow: boolean) => string;
81
+ /**
82
+ * Redsys API
83
+ *
84
+ * @public
85
+ */
69
86
  export interface RedsysAPI {
70
87
  restIniciaPeticion: RestIniciaPeticion;
71
88
  restTrataPeticion: RestTrataPeticion;
package/lib/errors.d.ts CHANGED
@@ -25,12 +25,12 @@ export declare class ParseError extends RedsysError {
25
25
  value: unknown;
26
26
  location: unknown | undefined;
27
27
  description: string | undefined;
28
- constructor(message: string, value?: unknown, location?: unknown);
28
+ constructor(message: string, value?: unknown | undefined, location?: unknown | undefined);
29
29
  }
30
30
  interface HTTPErrorOptions {
31
- message?: string;
31
+ message?: string | undefined;
32
32
  code: number;
33
- response?: unknown;
33
+ response?: unknown | undefined;
34
34
  }
35
35
  /**
36
36
  * HTTP Error
@@ -43,9 +43,9 @@ export declare class HTTPError extends RedsysError {
43
43
  constructor({ message, code, response }: HTTPErrorOptions);
44
44
  }
45
45
  interface GatewayErrorOptions {
46
- message?: string;
46
+ message?: string | undefined;
47
47
  code: string;
48
- response?: unknown;
48
+ response?: unknown | undefined;
49
49
  }
50
50
  /**
51
51
  * Request could not be processed by Redsys
@@ -58,9 +58,9 @@ export declare class GatewayError extends RedsysError {
58
58
  constructor({ message, code, response }: GatewayErrorOptions);
59
59
  }
60
60
  interface ResponseErrorOptions {
61
- message?: string;
61
+ message?: string | undefined;
62
62
  code: number;
63
- response?: unknown;
63
+ response?: unknown | undefined;
64
64
  }
65
65
  /**
66
66
  * Response contained an error code
@@ -31,77 +31,77 @@ export interface BaseFormatterInput<RawInputParams extends Partial<BaseInputPara
31
31
  * @remarks
32
32
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_AMOUNT}
33
33
  */
34
- amount?: string;
34
+ amount?: string | undefined;
35
35
  /**
36
36
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_CURRENCY}
37
37
  */
38
- currency?: Currency;
38
+ currency?: Currency | undefined;
39
39
  /**
40
40
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_PAN}
41
41
  */
42
- pan?: string;
42
+ pan?: string | undefined;
43
43
  /**
44
44
  * Card expiry year, YY
45
45
  *
46
46
  * @remarks
47
47
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_EXPIRYDATE}
48
48
  */
49
- expiryYear?: string;
49
+ expiryYear?: string | undefined;
50
50
  /**
51
51
  * Card expiry month, MM
52
52
  *
53
53
  * @remarks
54
54
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_EXPIRYDATE}
55
55
  */
56
- expiryMonth?: string;
56
+ expiryMonth?: string | undefined;
57
57
  /**
58
58
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_CVV2}
59
59
  */
60
- cvv?: string;
60
+ cvv?: string | undefined;
61
61
  /**
62
62
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_MERCHANTNAME}
63
63
  */
64
- merchantName?: string;
64
+ merchantName?: string | undefined;
65
65
  /**
66
66
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_IDENTIFIER}
67
67
  */
68
- identifier?: string;
68
+ identifier?: string | undefined;
69
69
  /**
70
70
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_GROUP}
71
71
  */
72
- group?: string;
72
+ group?: string | undefined;
73
73
  /**
74
74
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_DIRECTPAYMENT}
75
75
  */
76
- directPayment?: BaseInputParams['DS_MERCHANT_DIRECTPAYMENT'];
76
+ directPayment?: BaseInputParams['DS_MERCHANT_DIRECTPAYMENT'] | undefined;
77
77
  /**
78
78
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_MERCHANTDATA}
79
79
  */
80
- merchantData?: string;
80
+ merchantData?: string | undefined;
81
81
  /**
82
82
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_IDOPER}
83
83
  */
84
- operationId?: string;
84
+ operationId?: string | undefined;
85
85
  /**
86
86
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_PRODUCTDESCRIPTION}
87
87
  */
88
- productDescription?: string;
88
+ productDescription?: string | undefined;
89
89
  /**
90
90
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_TAX_REFERENCE}
91
91
  */
92
- taxReference?: string;
92
+ taxReference?: string | undefined;
93
93
  /**
94
94
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_TRANSACTIONDATE}
95
95
  */
96
- transactionDate?: string;
96
+ transactionDate?: string | undefined;
97
97
  /**
98
98
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_TITULAR}
99
99
  */
100
- cardHolder?: string;
100
+ cardHolder?: string | undefined;
101
101
  /**
102
102
  * @see {@link RestTrataPeticionInputParams}
103
103
  */
104
- raw?: RawInputParams;
104
+ raw?: RawInputParams | undefined;
105
105
  }
106
106
  /**
107
107
  * Input parameters for the redirect input formatter
@@ -112,37 +112,37 @@ export interface RedirectFormatterInput<RawInputParams extends Partial<RedirectI
112
112
  /**
113
113
  * @see {@link RedirectInputParams.DS_MERCHANT_MERCHANTURL}
114
114
  */
115
- merchantURL?: string;
115
+ merchantURL?: string | undefined;
116
116
  /**
117
117
  * @see {@link RedirectInputParams.DS_MERCHANT_URLOK}
118
118
  */
119
- successURL?: string;
119
+ successURL?: string | undefined;
120
120
  /**
121
121
  * @see {@link RedirectInputParams.DS_MERCHANT_URLKO}
122
122
  */
123
- errorURL?: string;
123
+ errorURL?: string | undefined;
124
124
  /**
125
125
  * @see {@link RedirectInputParams.DS_MERCHANT_PAYMETHODS}
126
126
  */
127
- payMethods?: string;
127
+ payMethods?: string | undefined;
128
128
  /**
129
129
  * @see {@link RedirectInputParams.DS_MERCHANT_CONSUMERLANGUAGE}
130
130
  */
131
- lang?: Language;
131
+ lang?: Language | undefined;
132
132
  }
133
133
  export interface RequestFormatterInput<RawInputParams extends Partial<RequestInputParams>> extends BaseFormatterInput<RawInputParams> {
134
134
  /**
135
135
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_CUSTOMER_MOBILE}
136
136
  */
137
- customerMobile?: string;
137
+ customerMobile?: string | undefined;
138
138
  /**
139
139
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_CUSTOMER_MAIL}
140
140
  */
141
- customerMail?: string;
141
+ customerMail?: string | undefined;
142
142
  /**
143
143
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_CUSTOMER_SMS_TEXT}
144
144
  */
145
- smsTemplate?: string;
145
+ smsTemplate?: string | undefined;
146
146
  }
147
147
  /**
148
148
  * Input parameters for the REST iniciaPeticion input formatter
@@ -153,7 +153,7 @@ export interface RestIniciaPeticionFormatterInput<RawInputParams extends Partial
153
153
  /**
154
154
  * @see {@link RestIniciaPeticionInputParams.DS_MERCHANT_EMV3DS}
155
155
  */
156
- emv3ds?: RestIniciaPeticionInputParams['DS_MERCHANT_EMV3DS'];
156
+ emv3ds?: RestIniciaPeticionInputParams['DS_MERCHANT_EMV3DS'] | undefined;
157
157
  }
158
158
  /**
159
159
  * Input parameters for the REST trataPeticion input formatter
@@ -164,7 +164,7 @@ export interface RestTrataPeticionFormatterInput<RawInputParams extends Partial<
164
164
  /**
165
165
  * @see {@link RestTrataPeticionInputParams.DS_MERCHANT_EMV3DS}
166
166
  */
167
- emv3ds?: RestTrataPeticionInputParams['DS_MERCHANT_EMV3DS'];
167
+ emv3ds?: RestTrataPeticionInputParams['DS_MERCHANT_EMV3DS'] | undefined;
168
168
  }
169
169
  export interface BaseFormatterOutput<RawOutputParams extends BaseOutputParams> {
170
170
  /**
@@ -186,31 +186,31 @@ export interface BaseFormatterOutput<RawOutputParams extends BaseOutputParams> {
186
186
  /**
187
187
  * @see {@link RestTrataPeticionOutputParams.Ds_SecurePayment}
188
188
  */
189
- securePayment?: boolean;
189
+ securePayment?: boolean | undefined;
190
190
  /**
191
191
  * @see {@link RestTrataPeticionOutputParams.Ds_Card_Country}
192
192
  */
193
- cardCountry?: Country;
193
+ cardCountry?: Country | undefined;
194
194
  /**
195
195
  * @see {@link RestTrataPeticionOutputParams.Ds_Card_Brand}
196
196
  */
197
- cardBrand?: CardBrand;
197
+ cardBrand?: CardBrand | undefined;
198
198
  /**
199
199
  * @see {@link RestTrataPeticionOutputParams.Ds_Card_PSD2}
200
200
  */
201
- cardPSD2?: boolean;
201
+ cardPSD2?: boolean | undefined;
202
202
  /**
203
203
  * @see {@link RestTrataPeticionOutputParams.Ds_MerchantData}
204
204
  */
205
- merchantData?: string;
205
+ merchantData?: string | undefined;
206
206
  /**
207
207
  * @see {@link RestTrataPeticionOutputParams.Ds_AuthorisationCode}
208
208
  */
209
- authorisationCode?: string;
209
+ authorisationCode?: string | undefined;
210
210
  /**
211
211
  * @see {@link RestTrataPeticionOutputParams.Ds_Card_Type}
212
212
  */
213
- cardType?: BaseOutputParams['Ds_Card_Type'];
213
+ cardType?: BaseOutputParams['Ds_Card_Type'] | undefined;
214
214
  raw: RawOutputParams;
215
215
  }
216
216
  export interface ResolvedTransactionTraitFormatterOutput {
@@ -254,39 +254,39 @@ export interface NotificationFormatterOutput<RawOutputParams extends Notificatio
254
254
  /**
255
255
  * @see {@link RestNotificationOutputParams.Ds_ConsumerLanguage}
256
256
  */
257
- lang?: Language;
257
+ lang?: Language | undefined;
258
258
  }
259
259
  export interface RequestFormatterOutput<RawOutputParams extends RequestOutputParams> extends BaseFormatterOutput<RawOutputParams> {
260
260
  /**
261
261
  * @see {@link RestTrataPeticionOutputParams.Ds_Merchant_Identifier}
262
262
  */
263
- identifier?: string;
263
+ identifier?: string | undefined;
264
264
  /**
265
265
  * @see {@link RestTrataPeticionOutputParams.Ds_Card_Number}
266
266
  */
267
- cardNumber?: string;
267
+ cardNumber?: string | undefined;
268
268
  /**
269
269
  * @see {@link RestTrataPeticionOutputParams.Ds_UrlPago2Fases}
270
270
  */
271
- payURL?: string;
271
+ payURL?: string | undefined;
272
272
  /**
273
273
  * Card expiry year, YY
274
274
  *
275
275
  * @remarks
276
276
  * @see {@link RestTrataPeticionOutputParams.Ds_ExpiryDate}
277
277
  */
278
- expiryYear?: string;
278
+ expiryYear?: string | undefined;
279
279
  /**
280
280
  * Card expiry month, MM
281
281
  *
282
282
  * @remarks
283
283
  * @see {@link RestTrataPeticionOutputParams.Ds_ExpiryDate}
284
284
  */
285
- expiryMonth?: string;
285
+ expiryMonth?: string | undefined;
286
286
  /**
287
287
  * @see {@link RestTrataPeticionOutputParams.Ds_Language}
288
288
  */
289
- lang?: Language;
289
+ lang?: Language | undefined;
290
290
  }
291
291
  /**
292
292
  * Ouput parameters for the REST iniciaPeticion output formatter
@@ -297,7 +297,7 @@ export interface RestIniciaPeticionFormatterOutput<RawOutputParams extends RestI
297
297
  /**
298
298
  * @see {@link RestIniciaPeticionOutputParams.Ds_EMV3DS}
299
299
  */
300
- emv3ds?: RestIniciaPeticionOutputParams['Ds_EMV3DS'];
300
+ emv3ds?: RestIniciaPeticionOutputParams['Ds_EMV3DS'] | undefined;
301
301
  }
302
302
  /**
303
303
  * Ouput parameters for the REST trataPeticion output formatter
@@ -308,9 +308,9 @@ export interface RestTrataPeticionFormatterOutput<RawOutputParams extends RestTr
308
308
  /**
309
309
  * @see {@link RestTrataPeticionOutputParams.Ds_Response}
310
310
  */
311
- response?: number;
311
+ response?: number | undefined;
312
312
  /**
313
313
  * @see {@link RestTrataPeticionOutputParams.Ds_EMV3DS}
314
314
  */
315
- emv3ds?: RestTrataPeticionOutputParams['Ds_EMV3DS'];
315
+ emv3ds?: RestTrataPeticionOutputParams['Ds_EMV3DS'] | undefined;
316
316
  }
package/lib/index.esm.js CHANGED
@@ -1779,6 +1779,18 @@ class RedsysError extends Error {
1779
1779
  class ValidationError extends RedsysError {
1780
1780
  constructor(message, parameters) {
1781
1781
  super(message);
1782
+ Object.defineProperty(this, "value", {
1783
+ enumerable: true,
1784
+ configurable: true,
1785
+ writable: true,
1786
+ value: void 0
1787
+ });
1788
+ Object.defineProperty(this, "parameters", {
1789
+ enumerable: true,
1790
+ configurable: true,
1791
+ writable: true,
1792
+ value: void 0
1793
+ });
1782
1794
  this.name = 'RedsysValidationError';
1783
1795
  this.parameters = parameters;
1784
1796
  }
@@ -1791,6 +1803,24 @@ class ValidationError extends RedsysError {
1791
1803
  class ParseError extends RedsysError {
1792
1804
  constructor(message, value, location) {
1793
1805
  super(message);
1806
+ Object.defineProperty(this, "value", {
1807
+ enumerable: true,
1808
+ configurable: true,
1809
+ writable: true,
1810
+ value: void 0
1811
+ });
1812
+ Object.defineProperty(this, "location", {
1813
+ enumerable: true,
1814
+ configurable: true,
1815
+ writable: true,
1816
+ value: void 0
1817
+ });
1818
+ Object.defineProperty(this, "description", {
1819
+ enumerable: true,
1820
+ configurable: true,
1821
+ writable: true,
1822
+ value: void 0
1823
+ });
1794
1824
  this.name = 'RedsysParseError';
1795
1825
  this.value = value;
1796
1826
  this.location = location;
@@ -1810,6 +1840,18 @@ class HTTPError extends RedsysError {
1810
1840
  const augmentationLine = message != null && message ? `\n${message}` : '';
1811
1841
  const augmentedMessage = `HTTP error${codeInfo}${augmentationLine}`;
1812
1842
  super(augmentedMessage);
1843
+ Object.defineProperty(this, "code", {
1844
+ enumerable: true,
1845
+ configurable: true,
1846
+ writable: true,
1847
+ value: void 0
1848
+ });
1849
+ Object.defineProperty(this, "response", {
1850
+ enumerable: true,
1851
+ configurable: true,
1852
+ writable: true,
1853
+ value: void 0
1854
+ });
1813
1855
  this.name = 'RedsysHTTPError';
1814
1856
  this.code = code;
1815
1857
  this.response = response;
@@ -1829,6 +1871,18 @@ class GatewayError extends RedsysError {
1829
1871
  const augmentationLine = message != null && message ? `\n${message}` : '';
1830
1872
  const augmentedMessage = `Gateway error${codeInfo}${augmentationLine}`;
1831
1873
  super(augmentedMessage);
1874
+ Object.defineProperty(this, "code", {
1875
+ enumerable: true,
1876
+ configurable: true,
1877
+ writable: true,
1878
+ value: void 0
1879
+ });
1880
+ Object.defineProperty(this, "response", {
1881
+ enumerable: true,
1882
+ configurable: true,
1883
+ writable: true,
1884
+ value: void 0
1885
+ });
1832
1886
  this.name = 'RedsysGatewayError';
1833
1887
  this.code = code;
1834
1888
  this.response = response;
@@ -1848,6 +1902,18 @@ class ResponseError extends RedsysError {
1848
1902
  const augmentationLine = message != null && message ? `\n${message}` : '';
1849
1903
  const augmentedMessage = `Response error${codeInfo}${augmentationLine}`;
1850
1904
  super(augmentedMessage);
1905
+ Object.defineProperty(this, "code", {
1906
+ enumerable: true,
1907
+ configurable: true,
1908
+ writable: true,
1909
+ value: void 0
1910
+ });
1911
+ Object.defineProperty(this, "response", {
1912
+ enumerable: true,
1913
+ configurable: true,
1914
+ writable: true,
1915
+ value: void 0
1916
+ });
1851
1917
  this.name = 'RedsysResponseError';
1852
1918
  this.code = code;
1853
1919
  this.response = response;
package/lib/index.js CHANGED
@@ -1781,6 +1781,18 @@ class RedsysError extends Error {
1781
1781
  class ValidationError extends RedsysError {
1782
1782
  constructor(message, parameters) {
1783
1783
  super(message);
1784
+ Object.defineProperty(this, "value", {
1785
+ enumerable: true,
1786
+ configurable: true,
1787
+ writable: true,
1788
+ value: void 0
1789
+ });
1790
+ Object.defineProperty(this, "parameters", {
1791
+ enumerable: true,
1792
+ configurable: true,
1793
+ writable: true,
1794
+ value: void 0
1795
+ });
1784
1796
  this.name = 'RedsysValidationError';
1785
1797
  this.parameters = parameters;
1786
1798
  }
@@ -1793,6 +1805,24 @@ class ValidationError extends RedsysError {
1793
1805
  class ParseError extends RedsysError {
1794
1806
  constructor(message, value, location) {
1795
1807
  super(message);
1808
+ Object.defineProperty(this, "value", {
1809
+ enumerable: true,
1810
+ configurable: true,
1811
+ writable: true,
1812
+ value: void 0
1813
+ });
1814
+ Object.defineProperty(this, "location", {
1815
+ enumerable: true,
1816
+ configurable: true,
1817
+ writable: true,
1818
+ value: void 0
1819
+ });
1820
+ Object.defineProperty(this, "description", {
1821
+ enumerable: true,
1822
+ configurable: true,
1823
+ writable: true,
1824
+ value: void 0
1825
+ });
1796
1826
  this.name = 'RedsysParseError';
1797
1827
  this.value = value;
1798
1828
  this.location = location;
@@ -1812,6 +1842,18 @@ class HTTPError extends RedsysError {
1812
1842
  const augmentationLine = message != null && message ? `\n${message}` : '';
1813
1843
  const augmentedMessage = `HTTP error${codeInfo}${augmentationLine}`;
1814
1844
  super(augmentedMessage);
1845
+ Object.defineProperty(this, "code", {
1846
+ enumerable: true,
1847
+ configurable: true,
1848
+ writable: true,
1849
+ value: void 0
1850
+ });
1851
+ Object.defineProperty(this, "response", {
1852
+ enumerable: true,
1853
+ configurable: true,
1854
+ writable: true,
1855
+ value: void 0
1856
+ });
1815
1857
  this.name = 'RedsysHTTPError';
1816
1858
  this.code = code;
1817
1859
  this.response = response;
@@ -1831,6 +1873,18 @@ class GatewayError extends RedsysError {
1831
1873
  const augmentationLine = message != null && message ? `\n${message}` : '';
1832
1874
  const augmentedMessage = `Gateway error${codeInfo}${augmentationLine}`;
1833
1875
  super(augmentedMessage);
1876
+ Object.defineProperty(this, "code", {
1877
+ enumerable: true,
1878
+ configurable: true,
1879
+ writable: true,
1880
+ value: void 0
1881
+ });
1882
+ Object.defineProperty(this, "response", {
1883
+ enumerable: true,
1884
+ configurable: true,
1885
+ writable: true,
1886
+ value: void 0
1887
+ });
1834
1888
  this.name = 'RedsysGatewayError';
1835
1889
  this.code = code;
1836
1890
  this.response = response;
@@ -1850,6 +1904,18 @@ class ResponseError extends RedsysError {
1850
1904
  const augmentationLine = message != null && message ? `\n${message}` : '';
1851
1905
  const augmentedMessage = `Response error${codeInfo}${augmentationLine}`;
1852
1906
  super(augmentedMessage);
1907
+ Object.defineProperty(this, "code", {
1908
+ enumerable: true,
1909
+ configurable: true,
1910
+ writable: true,
1911
+ value: void 0
1912
+ });
1913
+ Object.defineProperty(this, "response", {
1914
+ enumerable: true,
1915
+ configurable: true,
1916
+ writable: true,
1917
+ value: void 0
1918
+ });
1853
1919
  this.name = 'RedsysResponseError';
1854
1920
  this.code = code;
1855
1921
  this.response = response;
@@ -2,9 +2,9 @@ export declare const unescapeXML: (str: string) => string;
2
2
  export declare const escapeXML: (str: string) => string;
3
3
  type SoapRequest = {
4
4
  headers: Record<string, string>;
5
- body?: string;
5
+ body?: string | undefined;
6
6
  } | {
7
- headers?: Record<string, string>;
7
+ headers?: Record<string, string> | undefined;
8
8
  body: string;
9
9
  };
10
10
  /**
@@ -14,11 +14,11 @@ export interface ThreeDSRequestorAuthenticationInfo {
14
14
  }
15
15
  export interface ThreeDSRequestorPriorAuthenticationInfo {
16
16
  /** Reference */
17
- threeDSReqPriorRef?: string;
17
+ threeDSReqPriorRef?: string | undefined;
18
18
  /** Authentication method code */
19
- threeDSReqPriorAuthMethod?: string;
19
+ threeDSReqPriorAuthMethod?: string | undefined;
20
20
  /** Authentication timestamp, yyyymmddHHMM */
21
- threeDSReqPriorAuthTimestamp?: string;
21
+ threeDSReqPriorAuthTimestamp?: string | undefined;
22
22
  }
23
23
  export interface BaseThreeDSAuthenticationDataParams {
24
24
  /** 3DSecure protocol version */
@@ -80,117 +80,117 @@ export interface BaseThreeDSAuthenticationDataParams {
80
80
  /** Browser Accept Header */
81
81
  browserAcceptHeader: string;
82
82
  /** Browser IP Address, ipv4 or ipv6 */
83
- browserIP?: string;
83
+ browserIP?: string | undefined;
84
84
  /** Additional account information, max 64 characters */
85
- acctID?: string;
85
+ acctID?: string | undefined;
86
86
  /** Account information, json */
87
87
  acctInfo?: {
88
88
  /** Account creation ellapsed time code */
89
- chAccAgeInd?: '01' | '02' | '03' | '04' | '05';
89
+ chAccAgeInd?: '01' | '02' | '03' | '04' | '05' | undefined;
90
90
  /** Account modification date, yyyymmdd */
91
- chAccChange?: string;
91
+ chAccChange?: string | undefined;
92
92
  /** Account modification ellapsed time code */
93
- chAccChangeInd?: '01' | '02' | '03' | '04';
93
+ chAccChangeInd?: '01' | '02' | '03' | '04' | undefined;
94
94
  /** Account creation date, yyyymmdd */
95
- chAccDate?: string;
95
+ chAccDate?: string | undefined;
96
96
  /** Last password change date, yyyymmdd */
97
- chAccPwChange?: string;
97
+ chAccPwChange?: string | undefined;
98
98
  /** Password change ellapsed time code */
99
- chAccPwChangeInd?: '01' | '02' | '03' | '04' | '05';
99
+ chAccPwChangeInd?: '01' | '02' | '03' | '04' | '05' | undefined;
100
100
  /** Number of purchases during the last 6 months */
101
- nbPurchaseAccount?: string;
101
+ nbPurchaseAccount?: string | undefined;
102
102
  /** Attemps to add a card during the last 24 hours */
103
- provisionAttemptsDay?: string;
103
+ provisionAttemptsDay?: string | undefined;
104
104
  /** Number of transactions attempted during the last 24 hours */
105
- txnActivityDay?: string;
105
+ txnActivityDay?: string | undefined;
106
106
  /** Number of transactions attempted last year */
107
- txnActivityYear?: string;
107
+ txnActivityYear?: string | undefined;
108
108
  /** Card registration date, yyyymmdd */
109
- paymentAccAge?: string;
109
+ paymentAccAge?: string | undefined;
110
110
  /** Card registration ellapsed time code */
111
- paymentAccInd?: '01' | '02' | '03' | '04' | '05';
111
+ paymentAccInd?: '01' | '02' | '03' | '04' | '05' | undefined;
112
112
  /** First usage of shipping address date, yyyymmdd */
113
- shipAddressUsage?: string;
113
+ shipAddressUsage?: string | undefined;
114
114
  /** First usage of shipping address ellapsed time code */
115
- shipAddressUsageInd?: '01' | '02' | '03' | '04' | '05';
115
+ shipAddressUsageInd?: '01' | '02' | '03' | '04' | '05' | undefined;
116
116
  /** Cardholder shipping name indicator code */
117
- shipNameIndicator?: '01' | '02';
117
+ shipNameIndicator?: '01' | '02' | undefined;
118
118
  /** Suspicious activity code */
119
- suspiciousAccActivity?: '01' | '02';
120
- };
119
+ suspiciousAccActivity?: '01' | '02' | undefined;
120
+ } | undefined;
121
121
  /** Matching shipping and billing addresses indicator */
122
- addrMatch?: 'Y' | 'N';
122
+ addrMatch?: 'Y' | 'N' | undefined;
123
123
  /** Billing address city */
124
- billAddrCity?: string;
124
+ billAddrCity?: string | undefined;
125
125
  /** Billing address line 1 */
126
- billAddrLine1?: string;
126
+ billAddrLine1?: string | undefined;
127
127
  /** Billing address line 2 */
128
- billAddrLine2?: string;
128
+ billAddrLine2?: string | undefined;
129
129
  /** Billing address line 3 */
130
- billAddrLine3?: string;
130
+ billAddrLine3?: string | undefined;
131
131
  /** Billing address postal code */
132
- billAddrPostCode?: string;
132
+ billAddrPostCode?: string | undefined;
133
133
  /** Billing address state code, ISO 3166-2 */
134
- billAddrState?: string;
134
+ billAddrState?: string | undefined;
135
135
  /** Billing address country code, ISO 3166-1 */
136
- billAddrCountry?: string;
136
+ billAddrCountry?: string | undefined;
137
137
  /** Cardholder name */
138
- cardholderName?: string;
138
+ cardholderName?: string | undefined;
139
139
  /** Challenge window size */
140
- challengeWindowSize?: string;
140
+ challengeWindowSize?: string | undefined;
141
141
  /** Account email address */
142
- email?: string;
142
+ email?: string | undefined;
143
143
  /** Account landline phone number */
144
- homePhone?: ThreeDSPhone;
144
+ homePhone?: ThreeDSPhone | undefined;
145
145
  /** Account mobile phone number */
146
- mobilePhone?: ThreeDSPhone;
146
+ mobilePhone?: ThreeDSPhone | undefined;
147
147
  /** Account work phone number */
148
- workPhone?: ThreeDSPhone;
148
+ workPhone?: ThreeDSPhone | undefined;
149
149
  /** Merchant risk indicator, json */
150
150
  merchantRiskIndicator?: {
151
151
  /** Delivery email address */
152
- deliveryEmailAddress?: string;
152
+ deliveryEmailAddress?: string | undefined;
153
153
  /** Delivery time code */
154
- deliveryTimeframe?: '01' | '02' | '03' | '04';
154
+ deliveryTimeframe?: '01' | '02' | '03' | '04' | undefined;
155
155
  /** Gift card amount */
156
- giftCardAmount?: string;
156
+ giftCardAmount?: string | undefined;
157
157
  /** Count of gift cards used */
158
- giftCardCount?: string;
158
+ giftCardCount?: string | undefined;
159
159
  /** Gift card currency number, ISO-4217 */
160
- giftCardCurr?: string;
160
+ giftCardCurr?: string | undefined;
161
161
  /** Preorder availability date, yyyymmdd */
162
- preOrderDate?: string;
162
+ preOrderDate?: string | undefined;
163
163
  /** Preorder availability indicator code */
164
- preOrderPurchaseInd?: '01' | '02';
164
+ preOrderPurchaseInd?: '01' | '02' | undefined;
165
165
  /** Reorder indicator code */
166
- reorderItemsInd?: '01' | '02';
166
+ reorderItemsInd?: '01' | '02' | undefined;
167
167
  /** Shipping indicator code */
168
- shipIndicator?: '01' | '02' | '03' | '04' | '05' | '06' | '07';
169
- };
168
+ shipIndicator?: '01' | '02' | '03' | '04' | '05' | '06' | '07' | undefined;
169
+ } | undefined;
170
170
  /** Number of purchase installments */
171
- purchaseInstalData?: string;
171
+ purchaseInstalData?: string | undefined;
172
172
  /** Recurring payments expiration date, yyyymmdd */
173
- recurringExpiry?: string;
173
+ recurringExpiry?: string | undefined;
174
174
  /** Minimum number of days between recurring payments */
175
- recurringFrequency?: string;
175
+ recurringFrequency?: string | undefined;
176
176
  /** Shipping address city */
177
- shipAddrCity?: string;
177
+ shipAddrCity?: string | undefined;
178
178
  /** Shipping address line 1 */
179
- shipAddrLine1?: string;
179
+ shipAddrLine1?: string | undefined;
180
180
  /** Shipping address line 2 */
181
- shipAddrLine2?: string;
181
+ shipAddrLine2?: string | undefined;
182
182
  /** Shipping address line 3 */
183
- shipAddrLine3?: string;
183
+ shipAddrLine3?: string | undefined;
184
184
  /** Shipping address postal code */
185
- shipAddrPostCode?: string;
185
+ shipAddrPostCode?: string | undefined;
186
186
  /** Shipping address state code, ISO 3166-2 */
187
- shipAddrState?: string;
187
+ shipAddrState?: string | undefined;
188
188
  /** Shipping address country code, ISO 3166-1 */
189
- shipAddrCountry?: string;
189
+ shipAddrCountry?: string | undefined;
190
190
  /** Authentication information, json */
191
- threeDSRequestorAuthenticationInfo?: ThreeDSRequestorAuthenticationInfo;
191
+ threeDSRequestorAuthenticationInfo?: ThreeDSRequestorAuthenticationInfo | undefined;
192
192
  /** Previous authentication information, json */
193
- threeDSRequestorPriorAuthenticationInfo?: ThreeDSRequestorPriorAuthenticationInfo;
193
+ threeDSRequestorPriorAuthenticationInfo?: ThreeDSRequestorPriorAuthenticationInfo | undefined;
194
194
  }
195
195
  /**
196
196
  * Browser information required by 3DS
@@ -15,52 +15,52 @@ export interface BaseInputParams {
15
15
  /** Terminal number */
16
16
  DS_MERCHANT_TERMINAL: string;
17
17
  /** Stored payment method reference number */
18
- DS_MERCHANT_IDENTIFIER?: string;
18
+ DS_MERCHANT_IDENTIFIER?: string | undefined;
19
19
  /** Merchant group number */
20
- DS_MERCHANT_GROUP?: string;
20
+ DS_MERCHANT_GROUP?: string | undefined;
21
21
  /**
22
22
  * Amount designated as an integer in the smallest currency division
23
23
  *
24
24
  * @example
25
25
  * `'199'` (1.99 EUR)
26
26
  */
27
- DS_MERCHANT_AMOUNT?: string;
27
+ DS_MERCHANT_AMOUNT?: string | undefined;
28
28
  /** Currency number, ISO-4217 */
29
- DS_MERCHANT_CURRENCY?: CurrencyNum;
29
+ DS_MERCHANT_CURRENCY?: CurrencyNum | undefined;
30
30
  /** Card PAN, number */
31
- DS_MERCHANT_PAN?: string;
31
+ DS_MERCHANT_PAN?: string | undefined;
32
32
  /** Card expiry date, YYMM */
33
- DS_MERCHANT_EXPIRYDATE?: string;
33
+ DS_MERCHANT_EXPIRYDATE?: string | undefined;
34
34
  /** Card CVV2 code */
35
- DS_MERCHANT_CVV2?: string;
35
+ DS_MERCHANT_CVV2?: string | undefined;
36
36
  /** PDS2 exemptions */
37
- DS_MERCHANT_EXCEP_SCA?: string;
37
+ DS_MERCHANT_EXCEP_SCA?: string | undefined;
38
38
  /** Merchant data */
39
- DS_MERCHANT_MERCHANTDATA?: string;
39
+ DS_MERCHANT_MERCHANTDATA?: string | undefined;
40
40
  /** Merchant name */
41
- DS_MERCHANT_MERCHANTNAME?: string;
41
+ DS_MERCHANT_MERCHANTNAME?: string | undefined;
42
42
  /** Product description */
43
- DS_MERCHANT_PRODUCTDESCRIPTION?: string;
43
+ DS_MERCHANT_PRODUCTDESCRIPTION?: string | undefined;
44
44
  /** Cardholder name and surname */
45
- DS_MERCHANT_TITULAR?: string;
45
+ DS_MERCHANT_TITULAR?: string | undefined;
46
46
  /** Authorization transaction code, refunds */
47
- DS_MERCHANT_AUTHORISATIONCODE?: string;
47
+ DS_MERCHANT_AUTHORISATIONCODE?: string | undefined;
48
48
  /** Transaction date, YYYY-MM-DD */
49
- DS_MERCHANT_TRANSACTIONDATE?: string;
49
+ DS_MERCHANT_TRANSACTIONDATE?: string | undefined;
50
50
  /** Direct payment */
51
- DS_MERCHANT_DIRECTPAYMENT?: 'true' | 'moto';
51
+ DS_MERCHANT_DIRECTPAYMENT?: 'true' | 'moto' | undefined;
52
52
  /** INSITE operation identifier */
53
- DS_MERCHANT_IDOPER?: string;
53
+ DS_MERCHANT_IDOPER?: string | undefined;
54
54
  /** Tax code number */
55
- DS_MERCHANT_TAX_REFERENCE?: string;
55
+ DS_MERCHANT_TAX_REFERENCE?: string | undefined;
56
56
  /** Online Travel Agency indicator */
57
- DS_MERCHANT_OTA?: 'S';
57
+ DS_MERCHANT_OTA?: 'S' | undefined;
58
58
  /** Initial Credential On File transaction indicator */
59
- DS_MERCHANT_COF_INI?: 'S' | 'N';
59
+ DS_MERCHANT_COF_INI?: 'S' | 'N' | undefined;
60
60
  /** Credential On File transaction identifier */
61
- DS_MERCHANT_COF_TXNID?: string;
61
+ DS_MERCHANT_COF_TXNID?: string | undefined;
62
62
  /** Credential On File transaction type */
63
- DS_MERCHANT_COF_TYPE?: 'I' | 'R' | 'H' | 'E' | 'D' | 'M' | 'N' | 'C';
63
+ DS_MERCHANT_COF_TYPE?: 'I' | 'R' | 'H' | 'E' | 'D' | 'M' | 'N' | 'C' | undefined;
64
64
  }
65
65
  /**
66
66
  * Input parameters for a redsys redirect request
@@ -69,21 +69,21 @@ export interface BaseInputParams {
69
69
  */
70
70
  export interface RedirectInputParams extends BaseInputParams {
71
71
  /** EMV3DS data in json format */
72
- DS_MERCHANT_EMV3DS?: ThreeDSRedirectInputParams;
72
+ DS_MERCHANT_EMV3DS?: ThreeDSRedirectInputParams | undefined;
73
73
  /** Notification url */
74
- DS_MERCHANT_MERCHANTURL?: string;
74
+ DS_MERCHANT_MERCHANTURL?: string | undefined;
75
75
  /** Success redirection url */
76
- DS_MERCHANT_URLOK?: string;
76
+ DS_MERCHANT_URLOK?: string | undefined;
77
77
  /** Failure redirection url */
78
- DS_MERCHANT_URLKO?: string;
78
+ DS_MERCHANT_URLKO?: string | undefined;
79
79
  /** Language */
80
- DS_MERCHANT_CONSUMERLANGUAGE?: LanguageNum;
80
+ DS_MERCHANT_CONSUMERLANGUAGE?: LanguageNum | undefined;
81
81
  /** Payment methods */
82
- DS_MERCHANT_PAYMETHODS?: string;
82
+ DS_MERCHANT_PAYMETHODS?: string | undefined;
83
83
  /** Customization code number */
84
- DS_MERCHANT_PERSOCODE?: string;
84
+ DS_MERCHANT_PERSOCODE?: string | undefined;
85
85
  /** Obtain paypal address */
86
- DS_MERCHANT_SHIPPINGADDRESSPYP?: 'S' | 'N';
86
+ DS_MERCHANT_SHIPPINGADDRESSPYP?: 'S' | 'N' | undefined;
87
87
  }
88
88
  /**
89
89
  * Common input parameters for redsys request
@@ -92,33 +92,33 @@ export interface RedirectInputParams extends BaseInputParams {
92
92
  */
93
93
  export interface RequestInputParams extends BaseInputParams {
94
94
  /** xPay data, hex */
95
- DS_XPAYDATA?: string;
95
+ DS_XPAYDATA?: string | undefined;
96
96
  /** xPay origin */
97
- DS_XPAYORIGEN?: 'Google' | 'Apple';
97
+ DS_XPAYORIGEN?: 'Google' | 'Apple' | undefined;
98
98
  /** xPay type */
99
- DS_XPAYTYPE?: 'WEB' | 'InApp';
99
+ DS_XPAYTYPE?: 'WEB' | 'InApp' | undefined;
100
100
  /** PUC identifier, number */
101
- DS_ACQUIRER_IDENTIFIER?: string;
101
+ DS_ACQUIRER_IDENTIFIER?: string | undefined;
102
102
  /** Matching data */
103
- DS_MERCHANT_MATCHINGDATA?: string;
103
+ DS_MERCHANT_MATCHINGDATA?: string | undefined;
104
104
  /** Customer phone, paygold */
105
- DS_MERCHANT_CUSTOMER_MOBILE?: string;
105
+ DS_MERCHANT_CUSTOMER_MOBILE?: string | undefined;
106
106
  /** Customer email address, paygold */
107
- DS_MERCHANT_CUSTOMER_MAIL?: string;
107
+ DS_MERCHANT_CUSTOMER_MAIL?: string | undefined;
108
108
  /** Expiration date for paygold links, YYYY-MM-DD-hh:mm:ss.sss or number of minutes */
109
- DS_MERCHANT_P2F_EXPIRYDATE?: string;
109
+ DS_MERCHANT_P2F_EXPIRYDATE?: string | undefined;
110
110
  /**
111
111
  * SMS text content, paygold
112
112
  *
113
113
  * Parameters: @URL@, @COMERCIO@, @IMPORTE@ and @MONEDA@
114
114
  */
115
- DS_MERCHANT_CUSTOMER_SMS_TEXT?: string;
115
+ DS_MERCHANT_CUSTOMER_SMS_TEXT?: string | undefined;
116
116
  /**
117
117
  * Email text content, paygold
118
118
  *
119
119
  * Parameters: nombreComprador, direccionComprador and textoLibre1.
120
120
  */
121
- DS_MERCHANT_P2F_XMLDATA?: string;
121
+ DS_MERCHANT_P2F_XMLDATA?: string | undefined;
122
122
  }
123
123
  export interface CommonRestInputParams extends RequestInputParams {
124
124
  /** MPI External parameters, json */
@@ -145,7 +145,7 @@ export interface CommonRestInputParams extends RequestInputParams {
145
145
  authenticationType: string;
146
146
  /** Authentication flow */
147
147
  authenticationFlow: 'F' | 'C';
148
- };
148
+ } | undefined;
149
149
  }
150
150
  /**
151
151
  * Input parameters for a IniciaPeticion HTTP request
@@ -154,9 +154,9 @@ export interface CommonRestInputParams extends RequestInputParams {
154
154
  */
155
155
  export interface RestIniciaPeticionInputParams extends CommonRestInputParams {
156
156
  /** EMV3DS data in json format */
157
- DS_MERCHANT_EMV3DS?: ThreeDSPreAuthInputParams;
157
+ DS_MERCHANT_EMV3DS?: ThreeDSPreAuthInputParams | undefined;
158
158
  /** Dynamic Currency Conversion data, json */
159
- DS_MERCHANT_DCC?: 'Y' | 'N';
159
+ DS_MERCHANT_DCC?: 'Y' | 'N' | undefined;
160
160
  }
161
161
  /**
162
162
  * Input parameters for a TrataPeticion Peticion HTTP request
@@ -165,12 +165,12 @@ export interface RestIniciaPeticionInputParams extends CommonRestInputParams {
165
165
  */
166
166
  export interface RestTrataPeticionInputParams extends CommonRestInputParams {
167
167
  /** EMV3DS data in json format */
168
- DS_MERCHANT_EMV3DS?: ThreeDSv1AuthDataInputParams | ThreeDSv2AuthDataInputParams | ThreeDSv1ChallengeResponseInputParams | ThreeDSv2ChallengeResponseInputParams;
168
+ DS_MERCHANT_EMV3DS?: ThreeDSv1AuthDataInputParams | ThreeDSv2AuthDataInputParams | ThreeDSv1ChallengeResponseInputParams | ThreeDSv2ChallengeResponseInputParams | undefined;
169
169
  /** Dynamic Currency Conversion data, json */
170
170
  DS_MERCHANT_DCC?: {
171
171
  /** Card currency number, ISO-4217 */
172
172
  monedaDCC: string;
173
173
  /** Amount in card currency, decimal number */
174
174
  importeDCC: string;
175
- };
175
+ } | undefined;
176
176
  }
@@ -17,41 +17,41 @@ export interface BaseOutputParams {
17
17
  /** Transaction type */
18
18
  Ds_TransactionType: TransactionType;
19
19
  /** Secure payment indicator */
20
- Ds_SecurePayment?: '0' | '1' | '2';
20
+ Ds_SecurePayment?: '0' | '1' | '2' | undefined;
21
21
  /** Card country */
22
- Ds_Card_Country?: CountryNum;
22
+ Ds_Card_Country?: CountryNum | undefined;
23
23
  /** Authorization transaction code, refunds */
24
- Ds_AuthorisationCode?: string;
24
+ Ds_AuthorisationCode?: string | undefined;
25
25
  /** Card type */
26
- Ds_Card_Type?: 'C' | 'D';
26
+ Ds_Card_Type?: 'C' | 'D' | undefined;
27
27
  /** Merchant data */
28
- Ds_MerchantData?: string;
28
+ Ds_MerchantData?: string | undefined;
29
29
  /** Card brand */
30
- Ds_Card_Brand?: CardBrandNum;
30
+ Ds_Card_Brand?: CardBrandNum | undefined;
31
31
  /** Card is under PSD2 */
32
- Ds_Card_PSD2?: 'Y' | 'N';
32
+ Ds_Card_PSD2?: 'Y' | 'N' | undefined;
33
33
  /**
34
34
  * PDS2 exemptions
35
35
  *
36
36
  * @example
37
37
  * `'LWV;TRA[30.0];COR;MIT;ATD;WHL'`
38
38
  */
39
- Ds_Excep_SCA?: string;
39
+ Ds_Excep_SCA?: string | undefined;
40
40
  /** Payment method number */
41
- Ds_ProcessedPayMethod?: string;
41
+ Ds_ProcessedPayMethod?: string | undefined;
42
42
  /** Credential On File transaction identifier */
43
- Ds_Merchant_Cof_Txnid?: string;
43
+ Ds_Merchant_Cof_Txnid?: string | undefined;
44
44
  /**
45
45
  * Card number with some digits replaced with asterisks
46
46
  * @deprecated
47
47
  */
48
- Ds_CardNumber?: string;
48
+ Ds_CardNumber?: string | undefined;
49
49
  /** Card number with some digits replaced with asterisks */
50
- Ds_Card_Number?: string;
50
+ Ds_Card_Number?: string | undefined;
51
51
  /** Card expiry date, YYmm */
52
- Ds_ExpiryDate?: string;
52
+ Ds_ExpiryDate?: string | undefined;
53
53
  /** Stored payment method reference number */
54
- Ds_Merchant_Identifier?: string;
54
+ Ds_Merchant_Identifier?: string | undefined;
55
55
  }
56
56
  /**
57
57
  * Common output parameters of resolved requests or notifications
@@ -74,9 +74,9 @@ export interface ResolvedTransactionTrait {
74
74
  */
75
75
  export interface RequestOutputParams extends BaseOutputParams {
76
76
  /** Payment link, paygold */
77
- Ds_UrlPago2Fases?: string;
77
+ Ds_UrlPago2Fases?: string | undefined;
78
78
  /** Language */
79
- Ds_Language?: LanguageNum;
79
+ Ds_Language?: LanguageNum | undefined;
80
80
  }
81
81
  /**
82
82
  * Output parameters of a IniciaPeticion HTTP request
@@ -85,7 +85,7 @@ export interface RequestOutputParams extends BaseOutputParams {
85
85
  */
86
86
  export interface RestIniciaPeticionOutputParams extends RequestOutputParams {
87
87
  /** EMV3DS data in json format */
88
- Ds_EMV3DS?: ThreeDSv1PreAuthOutputParams | ThreeDSv2PreAuthOutputParams;
88
+ Ds_EMV3DS?: ThreeDSv1PreAuthOutputParams | ThreeDSv2PreAuthOutputParams | undefined;
89
89
  /** Dynamic Currency Conversion data, json */
90
90
  Ds_DCC?: {
91
91
  InfoMonedaTarjeta: {
@@ -112,7 +112,7 @@ export interface RestIniciaPeticionOutputParams extends RequestOutputParams {
112
112
  /** Amount, decimal number */
113
113
  importeCome: string;
114
114
  };
115
- };
115
+ } | undefined;
116
116
  }
117
117
  /**
118
118
  * Output parameters of a TrataPeticion HTTP request
@@ -121,18 +121,18 @@ export interface RestIniciaPeticionOutputParams extends RequestOutputParams {
121
121
  */
122
122
  export interface RestTrataPeticionOutputParams extends RequestOutputParams, Omit<ResolvedTransactionTrait, 'Ds_Response'> {
123
123
  /** Response code */
124
- Ds_Response?: ResolvedTransactionTrait['Ds_Response'];
124
+ Ds_Response?: ResolvedTransactionTrait['Ds_Response'] | undefined;
125
125
  /** EMV3DS data in json format */
126
- Ds_EMV3DS?: ThreeDSv1ChallengeOutputParams | ThreeDSv2ChallengeOutputParams;
126
+ Ds_EMV3DS?: ThreeDSv1ChallengeOutputParams | ThreeDSv2ChallengeOutputParams | undefined;
127
127
  }
128
128
  /**
129
129
  * Common parameters for notifications
130
130
  */
131
131
  export interface NotificationOutputParams extends BaseOutputParams, ResolvedTransactionTrait {
132
132
  /** Language */
133
- Ds_ConsumerLanguage?: LanguageNum;
133
+ Ds_ConsumerLanguage?: LanguageNum | undefined;
134
134
  /** Error code */
135
- Ds_ErrorCode?: string;
135
+ Ds_ErrorCode?: string | undefined;
136
136
  }
137
137
  /**
138
138
  * Parameters of a redsys REST notification
@@ -25,6 +25,6 @@ export declare const assertSuccessfulResponseCode: (responseCode: string | numbe
25
25
  * @public
26
26
  */
27
27
  export declare const assertSuccessfulResponse: (responseParams: {
28
- Ds_Response?: string;
28
+ Ds_Response?: string | undefined;
29
29
  }) => void;
30
30
  export declare const isStringNotEmpty: <T extends string>(str: T | undefined) => str is T;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "redsys-easy",
3
3
  "description": "Node JS interface for Redsys payment gateway",
4
- "version": "5.0.0",
4
+ "version": "5.1.0",
5
5
  "author": "Javier Garcia <javiertury@gmail.com>",
6
6
  "license": "MIT",
7
7
  "keywords": [