@enfuce/nextgen-sdk 0.0.1 → 0.0.3
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 +44 -0
- package/dist/authorisation-control/api.d.ts +0 -302
- package/dist/authorisation-control/api.js +10 -28
- package/dist/authorisation-control/base.d.ts +0 -24
- package/dist/authorisation-control/base.js +0 -19
- package/dist/authorisation-control/common.d.ts +4 -35
- package/dist/authorisation-control/common.js +16 -38
- package/dist/authorisation-control/configuration.d.ts +24 -17
- package/dist/authorisation-control/configuration.js +3 -3
- package/dist/card/api.d.ts +41 -740
- package/dist/card/api.js +38 -105
- package/dist/card/base.d.ts +0 -24
- package/dist/card/base.js +0 -19
- package/dist/card/common.d.ts +4 -35
- package/dist/card/common.js +16 -38
- package/dist/card/configuration.d.ts +24 -17
- package/dist/card/configuration.js +3 -3
- package/dist/cardholder/api.d.ts +959 -686
- package/dist/cardholder/api.js +783 -73
- package/dist/cardholder/base.d.ts +0 -24
- package/dist/cardholder/base.js +0 -19
- package/dist/cardholder/common.d.ts +4 -35
- package/dist/cardholder/common.js +16 -38
- package/dist/cardholder/configuration.d.ts +24 -17
- package/dist/cardholder/configuration.js +3 -3
- package/dist/cards/api.d.ts +0 -7
- package/dist/cards/api.js +2 -9
- package/dist/cards/base.d.ts +0 -24
- package/dist/cards/base.js +0 -19
- package/dist/cards/common.d.ts +4 -35
- package/dist/cards/common.js +16 -38
- package/dist/cards/configuration.d.ts +24 -17
- package/dist/cards/configuration.js +3 -3
- package/dist/clearing-file-copy/api.d.ts +0 -497
- package/dist/clearing-file-copy/api.js +12 -26
- package/dist/clearing-file-copy/base.d.ts +0 -24
- package/dist/clearing-file-copy/base.js +0 -19
- package/dist/clearing-file-copy/common.d.ts +4 -35
- package/dist/clearing-file-copy/common.js +16 -38
- package/dist/clearing-file-copy/configuration.d.ts +24 -17
- package/dist/clearing-file-copy/configuration.js +3 -3
- package/dist/esm/authorisation-control/api.d.ts +0 -302
- package/dist/esm/authorisation-control/api.js +10 -28
- package/dist/esm/authorisation-control/base.d.ts +0 -24
- package/dist/esm/authorisation-control/base.js +0 -19
- package/dist/esm/authorisation-control/common.d.ts +4 -35
- package/dist/esm/authorisation-control/common.js +14 -37
- package/dist/esm/authorisation-control/configuration.d.ts +24 -17
- package/dist/esm/authorisation-control/configuration.js +3 -3
- package/dist/esm/card/api.d.ts +41 -740
- package/dist/esm/card/api.js +38 -105
- package/dist/esm/card/base.d.ts +0 -24
- package/dist/esm/card/base.js +0 -19
- package/dist/esm/card/common.d.ts +4 -35
- package/dist/esm/card/common.js +14 -37
- package/dist/esm/card/configuration.d.ts +24 -17
- package/dist/esm/card/configuration.js +3 -3
- package/dist/esm/cardholder/api.d.ts +959 -686
- package/dist/esm/cardholder/api.js +782 -72
- package/dist/esm/cardholder/base.d.ts +0 -24
- package/dist/esm/cardholder/base.js +0 -19
- package/dist/esm/cardholder/common.d.ts +4 -35
- package/dist/esm/cardholder/common.js +14 -37
- package/dist/esm/cardholder/configuration.d.ts +24 -17
- package/dist/esm/cardholder/configuration.js +3 -3
- package/dist/esm/cards/api.d.ts +0 -7
- package/dist/esm/cards/api.js +2 -9
- package/dist/esm/cards/base.d.ts +0 -24
- package/dist/esm/cards/base.js +0 -19
- package/dist/esm/cards/common.d.ts +4 -35
- package/dist/esm/cards/common.js +14 -37
- package/dist/esm/cards/configuration.d.ts +24 -17
- package/dist/esm/cards/configuration.js +3 -3
- package/dist/esm/clearing-file-copy/api.d.ts +0 -497
- package/dist/esm/clearing-file-copy/api.js +12 -26
- package/dist/esm/clearing-file-copy/base.d.ts +0 -24
- package/dist/esm/clearing-file-copy/base.js +0 -19
- package/dist/esm/clearing-file-copy/common.d.ts +4 -35
- package/dist/esm/clearing-file-copy/common.js +14 -37
- package/dist/esm/clearing-file-copy/configuration.d.ts +24 -17
- package/dist/esm/clearing-file-copy/configuration.js +3 -3
- package/dist/esm/issuer-events/api.d.ts +639 -601
- package/dist/esm/issuer-events/api.js +520 -54
- package/dist/esm/issuer-events/base.d.ts +0 -24
- package/dist/esm/issuer-events/base.js +0 -19
- package/dist/esm/issuer-events/common.d.ts +4 -35
- package/dist/esm/issuer-events/common.js +14 -37
- package/dist/esm/issuer-events/configuration.d.ts +24 -17
- package/dist/esm/issuer-events/configuration.js +3 -3
- package/dist/esm/pin/api.d.ts +0 -76
- package/dist/esm/pin/api.js +3 -15
- package/dist/esm/pin/base.d.ts +0 -24
- package/dist/esm/pin/base.js +0 -19
- package/dist/esm/pin/common.d.ts +4 -35
- package/dist/esm/pin/common.js +14 -37
- package/dist/esm/pin/configuration.d.ts +24 -17
- package/dist/esm/pin/configuration.js +3 -3
- package/dist/esm/threeds/api.d.ts +0 -18
- package/dist/esm/threeds/api.js +1 -8
- package/dist/esm/threeds/base.d.ts +0 -24
- package/dist/esm/threeds/base.js +0 -19
- package/dist/esm/threeds/common.d.ts +4 -35
- package/dist/esm/threeds/common.js +14 -37
- package/dist/esm/threeds/configuration.d.ts +24 -17
- package/dist/esm/threeds/configuration.js +3 -3
- package/dist/esm/threeds-oob/api.d.ts +0 -90
- package/dist/esm/threeds-oob/api.js +2 -9
- package/dist/esm/threeds-oob/base.d.ts +0 -24
- package/dist/esm/threeds-oob/base.js +0 -19
- package/dist/esm/threeds-oob/common.d.ts +4 -35
- package/dist/esm/threeds-oob/common.js +14 -37
- package/dist/esm/threeds-oob/configuration.d.ts +24 -17
- package/dist/esm/threeds-oob/configuration.js +3 -3
- package/dist/esm/transaction-event/api.d.ts +2 -453
- package/dist/esm/transaction-event/api.js +13 -28
- package/dist/esm/transaction-event/base.d.ts +0 -24
- package/dist/esm/transaction-event/base.js +0 -19
- package/dist/esm/transaction-event/common.d.ts +4 -35
- package/dist/esm/transaction-event/common.js +14 -37
- package/dist/esm/transaction-event/configuration.d.ts +24 -17
- package/dist/esm/transaction-event/configuration.js +3 -3
- package/dist/esm/wallet/api.d.ts +0 -342
- package/dist/esm/wallet/api.js +29 -83
- package/dist/esm/wallet/base.d.ts +0 -24
- package/dist/esm/wallet/base.js +0 -19
- package/dist/esm/wallet/common.d.ts +4 -35
- package/dist/esm/wallet/common.js +14 -37
- package/dist/esm/wallet/configuration.d.ts +24 -17
- package/dist/esm/wallet/configuration.js +3 -3
- package/dist/issuer-events/api.d.ts +639 -601
- package/dist/issuer-events/api.js +521 -55
- package/dist/issuer-events/base.d.ts +0 -24
- package/dist/issuer-events/base.js +0 -19
- package/dist/issuer-events/common.d.ts +4 -35
- package/dist/issuer-events/common.js +16 -38
- package/dist/issuer-events/configuration.d.ts +24 -17
- package/dist/issuer-events/configuration.js +3 -3
- package/dist/pin/api.d.ts +0 -76
- package/dist/pin/api.js +3 -15
- package/dist/pin/base.d.ts +0 -24
- package/dist/pin/base.js +0 -19
- package/dist/pin/common.d.ts +4 -35
- package/dist/pin/common.js +16 -38
- package/dist/pin/configuration.d.ts +24 -17
- package/dist/pin/configuration.js +3 -3
- package/dist/threeds/api.d.ts +0 -18
- package/dist/threeds/api.js +1 -8
- package/dist/threeds/base.d.ts +0 -24
- package/dist/threeds/base.js +0 -19
- package/dist/threeds/common.d.ts +4 -35
- package/dist/threeds/common.js +16 -38
- package/dist/threeds/configuration.d.ts +24 -17
- package/dist/threeds/configuration.js +3 -3
- package/dist/threeds-oob/api.d.ts +0 -90
- package/dist/threeds-oob/api.js +2 -9
- package/dist/threeds-oob/base.d.ts +0 -24
- package/dist/threeds-oob/base.js +0 -19
- package/dist/threeds-oob/common.d.ts +4 -35
- package/dist/threeds-oob/common.js +16 -38
- package/dist/threeds-oob/configuration.d.ts +24 -17
- package/dist/threeds-oob/configuration.js +3 -3
- package/dist/transaction-event/api.d.ts +2 -453
- package/dist/transaction-event/api.js +13 -28
- package/dist/transaction-event/base.d.ts +0 -24
- package/dist/transaction-event/base.js +0 -19
- package/dist/transaction-event/common.d.ts +4 -35
- package/dist/transaction-event/common.js +16 -38
- package/dist/transaction-event/configuration.d.ts +24 -17
- package/dist/transaction-event/configuration.js +3 -3
- package/dist/wallet/api.d.ts +0 -342
- package/dist/wallet/api.js +29 -83
- package/dist/wallet/base.d.ts +0 -24
- package/dist/wallet/base.js +0 -19
- package/dist/wallet/common.d.ts +4 -35
- package/dist/wallet/common.js +16 -38
- package/dist/wallet/configuration.d.ts +24 -17
- package/dist/wallet/configuration.js +3 -3
- package/package.json +5 -2
- package/src/authorisation-control/api.ts +11 -314
- package/src/authorisation-control/base.ts +0 -24
- package/src/authorisation-control/common.ts +15 -38
- package/src/authorisation-control/configuration.ts +26 -20
- package/src/card/api.ts +80 -786
- package/src/card/base.ts +0 -24
- package/src/card/common.ts +15 -38
- package/src/card/configuration.ts +26 -20
- package/src/cardholder/api.ts +987 -714
- package/src/cardholder/base.ts +0 -24
- package/src/cardholder/common.ts +15 -38
- package/src/cardholder/configuration.ts +26 -20
- package/src/cards/api.ts +3 -11
- package/src/cards/base.ts +0 -24
- package/src/cards/common.ts +15 -38
- package/src/cards/configuration.ts +26 -20
- package/src/clearing-file-copy/api.ts +13 -510
- package/src/clearing-file-copy/base.ts +0 -24
- package/src/clearing-file-copy/common.ts +15 -38
- package/src/clearing-file-copy/configuration.ts +26 -20
- package/src/issuer-events/api.ts +661 -628
- package/src/issuer-events/base.ts +0 -24
- package/src/issuer-events/common.ts +15 -38
- package/src/issuer-events/configuration.ts +26 -20
- package/src/pin/api.ts +4 -83
- package/src/pin/base.ts +0 -24
- package/src/pin/common.ts +15 -38
- package/src/pin/configuration.ts +26 -20
- package/src/threeds/api.ts +2 -22
- package/src/threeds/base.ts +0 -24
- package/src/threeds/common.ts +15 -38
- package/src/threeds/configuration.ts +26 -20
- package/src/threeds-oob/api.ts +3 -95
- package/src/threeds-oob/base.ts +0 -24
- package/src/threeds-oob/common.ts +15 -38
- package/src/threeds-oob/configuration.ts +26 -20
- package/src/transaction-event/api.ts +14 -465
- package/src/transaction-event/base.ts +0 -24
- package/src/transaction-event/common.ts +15 -38
- package/src/transaction-event/configuration.ts +26 -20
- package/src/wallet/api.ts +30 -377
- package/src/wallet/base.ts +0 -24
- package/src/wallet/common.ts +15 -38
- package/src/wallet/configuration.ts +26 -20
package/src/threeds-oob/api.ts
CHANGED
|
@@ -18,178 +18,95 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
|
18
18
|
import globalAxios from 'axios';
|
|
19
19
|
// Some imports not used depending on template conditions
|
|
20
20
|
// @ts-ignore
|
|
21
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from './common';
|
|
22
22
|
import type { RequestArgs } from './base';
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
25
25
|
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @export
|
|
29
|
-
* @interface InitiateAuthenticationChallengeBody
|
|
30
|
-
*/
|
|
31
26
|
export interface InitiateAuthenticationChallengeBody {
|
|
32
27
|
/**
|
|
33
28
|
* Unique identifier of the authentication request.
|
|
34
|
-
* @type {string}
|
|
35
|
-
* @memberof InitiateAuthenticationChallengeBody
|
|
36
29
|
*/
|
|
37
30
|
'authenticationId': string;
|
|
38
31
|
/**
|
|
39
32
|
* Unique challenge identifier of this authentication step.
|
|
40
|
-
* @type {any}
|
|
41
|
-
* @memberof InitiateAuthenticationChallengeBody
|
|
42
33
|
*/
|
|
43
34
|
'challengeId': any;
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* @type {InitiateAuthenticationChallengeBodyCardholder}
|
|
47
|
-
* @memberof InitiateAuthenticationChallengeBody
|
|
48
|
-
*/
|
|
49
35
|
'cardholder': InitiateAuthenticationChallengeBodyCardholder;
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
* @type {InitiateAuthenticationChallengeBodyCard}
|
|
53
|
-
* @memberof InitiateAuthenticationChallengeBody
|
|
54
|
-
*/
|
|
55
36
|
'card': InitiateAuthenticationChallengeBodyCard;
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
* @type {ThreeDsTransaction}
|
|
59
|
-
* @memberof InitiateAuthenticationChallengeBody
|
|
60
|
-
*/
|
|
61
37
|
'threeDsTransaction'?: ThreeDsTransaction;
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* @type {Merchant}
|
|
65
|
-
* @memberof InitiateAuthenticationChallengeBody
|
|
66
|
-
*/
|
|
67
38
|
'merchant'?: Merchant;
|
|
68
39
|
}
|
|
69
|
-
/**
|
|
70
|
-
*
|
|
71
|
-
* @export
|
|
72
|
-
* @interface InitiateAuthenticationChallengeBodyCard
|
|
73
|
-
*/
|
|
74
40
|
export interface InitiateAuthenticationChallengeBodyCard {
|
|
75
41
|
/**
|
|
76
42
|
* Unique identification number of the card.
|
|
77
|
-
* @type {string}
|
|
78
|
-
* @memberof InitiateAuthenticationChallengeBodyCard
|
|
79
43
|
*/
|
|
80
44
|
'id': string;
|
|
81
45
|
/**
|
|
82
46
|
* Truncated card number.
|
|
83
|
-
* @type {string}
|
|
84
|
-
* @memberof InitiateAuthenticationChallengeBodyCard
|
|
85
47
|
*/
|
|
86
48
|
'maskedPan': string;
|
|
87
49
|
}
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* @export
|
|
91
|
-
* @interface InitiateAuthenticationChallengeBodyCardholder
|
|
92
|
-
*/
|
|
93
50
|
export interface InitiateAuthenticationChallengeBodyCardholder {
|
|
94
51
|
/**
|
|
95
52
|
* Unique identification number of the cardholder.
|
|
96
|
-
* @type {string}
|
|
97
|
-
* @memberof InitiateAuthenticationChallengeBodyCardholder
|
|
98
53
|
*/
|
|
99
54
|
'id': string;
|
|
100
55
|
/**
|
|
101
56
|
* Unique identifier of the cardholder in other parts of the Enfuce API.
|
|
102
|
-
* @type {string}
|
|
103
|
-
* @memberof InitiateAuthenticationChallengeBodyCardholder
|
|
104
57
|
*/
|
|
105
58
|
'customerNumber': string;
|
|
106
59
|
}
|
|
107
|
-
/**
|
|
108
|
-
*
|
|
109
|
-
* @export
|
|
110
|
-
* @interface Merchant
|
|
111
|
-
*/
|
|
112
60
|
export interface Merchant {
|
|
113
61
|
/**
|
|
114
62
|
* Merchant name
|
|
115
|
-
* @type {string}
|
|
116
|
-
* @memberof Merchant
|
|
117
63
|
*/
|
|
118
64
|
'name'?: string;
|
|
119
65
|
/**
|
|
120
66
|
* The country where the transaction or withdrawal has occurred, or where the merchant is registered.
|
|
121
|
-
* @type {string}
|
|
122
|
-
* @memberof Merchant
|
|
123
67
|
*/
|
|
124
68
|
'country'?: string;
|
|
125
69
|
/**
|
|
126
70
|
* Merchant URL
|
|
127
|
-
* @type {string}
|
|
128
|
-
* @memberof Merchant
|
|
129
71
|
*/
|
|
130
72
|
'url'?: string;
|
|
131
73
|
}
|
|
132
74
|
/**
|
|
133
75
|
* Amount including currency
|
|
134
|
-
* @export
|
|
135
|
-
* @interface Money
|
|
136
76
|
*/
|
|
137
77
|
export interface Money {
|
|
138
|
-
/**
|
|
139
|
-
*
|
|
140
|
-
* @type {number}
|
|
141
|
-
* @memberof Money
|
|
142
|
-
*/
|
|
143
78
|
'amount': number;
|
|
144
79
|
/**
|
|
145
80
|
* A valid ISO 4217 currency code
|
|
146
|
-
* @type {string}
|
|
147
|
-
* @memberof Money
|
|
148
81
|
*/
|
|
149
82
|
'currency': string;
|
|
150
83
|
}
|
|
151
|
-
/**
|
|
152
|
-
*
|
|
153
|
-
* @export
|
|
154
|
-
* @interface ThreeDsTransaction
|
|
155
|
-
*/
|
|
156
84
|
export interface ThreeDsTransaction {
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
159
|
-
* @type {Money}
|
|
160
|
-
* @memberof ThreeDsTransaction
|
|
161
|
-
*/
|
|
162
85
|
'transactionAmount'?: Money;
|
|
163
86
|
/**
|
|
164
87
|
* Transaction category: - `PAYMENT` — Payment authentication - `NON_PAYMENT` — Non-payment authentication
|
|
165
|
-
* @type {string}
|
|
166
|
-
* @memberof ThreeDsTransaction
|
|
167
88
|
*/
|
|
168
89
|
'category'?: ThreeDsTransactionCategoryEnum;
|
|
169
90
|
/**
|
|
170
91
|
* Channel where the transaction is initiated: - `APP` — App-based - `BROWSER` — Browser-based - `REQUESTOR_INITIATED` — 3DS Requestor Initiated
|
|
171
|
-
* @type {string}
|
|
172
|
-
* @memberof ThreeDsTransaction
|
|
173
92
|
*/
|
|
174
93
|
'deviceChannel': ThreeDsTransactionDeviceChannelEnum;
|
|
175
94
|
/**
|
|
176
95
|
* Time when the transaction is processed by Enfuce.
|
|
177
|
-
* @type {string}
|
|
178
|
-
* @memberof ThreeDsTransaction
|
|
179
96
|
*/
|
|
180
97
|
'processedDateTime': string;
|
|
181
98
|
}
|
|
182
99
|
|
|
183
100
|
export const ThreeDsTransactionCategoryEnum = {
|
|
184
101
|
Payment: 'PAYMENT',
|
|
185
|
-
NonPayment: 'NON_PAYMENT'
|
|
102
|
+
NonPayment: 'NON_PAYMENT',
|
|
186
103
|
} as const;
|
|
187
104
|
|
|
188
105
|
export type ThreeDsTransactionCategoryEnum = typeof ThreeDsTransactionCategoryEnum[keyof typeof ThreeDsTransactionCategoryEnum];
|
|
189
106
|
export const ThreeDsTransactionDeviceChannelEnum = {
|
|
190
107
|
App: 'APP',
|
|
191
108
|
Browser: 'BROWSER',
|
|
192
|
-
RequestorInitiated: 'REQUESTOR_INITIATED'
|
|
109
|
+
RequestorInitiated: 'REQUESTOR_INITIATED',
|
|
193
110
|
} as const;
|
|
194
111
|
|
|
195
112
|
export type ThreeDsTransactionDeviceChannelEnum = typeof ThreeDsTransactionDeviceChannelEnum[keyof typeof ThreeDsTransactionDeviceChannelEnum];
|
|
@@ -197,7 +114,6 @@ export type ThreeDsTransactionDeviceChannelEnum = typeof ThreeDsTransactionDevic
|
|
|
197
114
|
|
|
198
115
|
/**
|
|
199
116
|
* OOBAuthenticationChallengeWebhookNotificationApi - axios parameter creator
|
|
200
|
-
* @export
|
|
201
117
|
*/
|
|
202
118
|
export const OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
203
119
|
return {
|
|
@@ -227,8 +143,6 @@ export const OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator =
|
|
|
227
143
|
// http basic authentication required
|
|
228
144
|
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
229
145
|
|
|
230
|
-
|
|
231
|
-
|
|
232
146
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
233
147
|
|
|
234
148
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -246,7 +160,6 @@ export const OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator =
|
|
|
246
160
|
|
|
247
161
|
/**
|
|
248
162
|
* OOBAuthenticationChallengeWebhookNotificationApi - functional programming interface
|
|
249
|
-
* @export
|
|
250
163
|
*/
|
|
251
164
|
export const OOBAuthenticationChallengeWebhookNotificationApiFp = function(configuration?: Configuration) {
|
|
252
165
|
const localVarAxiosParamCreator = OOBAuthenticationChallengeWebhookNotificationApiAxiosParamCreator(configuration)
|
|
@@ -269,7 +182,6 @@ export const OOBAuthenticationChallengeWebhookNotificationApiFp = function(confi
|
|
|
269
182
|
|
|
270
183
|
/**
|
|
271
184
|
* OOBAuthenticationChallengeWebhookNotificationApi - factory interface
|
|
272
|
-
* @export
|
|
273
185
|
*/
|
|
274
186
|
export const OOBAuthenticationChallengeWebhookNotificationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
275
187
|
const localVarFp = OOBAuthenticationChallengeWebhookNotificationApiFp(configuration)
|
|
@@ -289,9 +201,6 @@ export const OOBAuthenticationChallengeWebhookNotificationApiFactory = function
|
|
|
289
201
|
|
|
290
202
|
/**
|
|
291
203
|
* OOBAuthenticationChallengeWebhookNotificationApi - object-oriented interface
|
|
292
|
-
* @export
|
|
293
|
-
* @class OOBAuthenticationChallengeWebhookNotificationApi
|
|
294
|
-
* @extends {BaseAPI}
|
|
295
204
|
*/
|
|
296
205
|
export class OOBAuthenticationChallengeWebhookNotificationApi extends BaseAPI {
|
|
297
206
|
/**
|
|
@@ -300,7 +209,6 @@ export class OOBAuthenticationChallengeWebhookNotificationApi extends BaseAPI {
|
|
|
300
209
|
* @param {InitiateAuthenticationChallengeBody} initiateAuthenticationChallengeBody
|
|
301
210
|
* @param {*} [options] Override http request option.
|
|
302
211
|
* @throws {RequiredError}
|
|
303
|
-
* @memberof OOBAuthenticationChallengeWebhookNotificationApi
|
|
304
212
|
*/
|
|
305
213
|
public initiateAuthenticationChallenge(initiateAuthenticationChallengeBody: InitiateAuthenticationChallengeBody, options?: RawAxiosRequestConfig) {
|
|
306
214
|
return OOBAuthenticationChallengeWebhookNotificationApiFp(this.configuration).initiateAuthenticationChallenge(initiateAuthenticationChallengeBody, options).then((request) => request(this.axios, this.basePath));
|
package/src/threeds-oob/base.ts
CHANGED
|
@@ -21,10 +21,6 @@ import globalAxios from 'axios';
|
|
|
21
21
|
|
|
22
22
|
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @export
|
|
27
|
-
*/
|
|
28
24
|
export const COLLECTION_FORMATS = {
|
|
29
25
|
csv: ",",
|
|
30
26
|
ssv: " ",
|
|
@@ -32,21 +28,11 @@ export const COLLECTION_FORMATS = {
|
|
|
32
28
|
pipes: "|",
|
|
33
29
|
};
|
|
34
30
|
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @export
|
|
38
|
-
* @interface RequestArgs
|
|
39
|
-
*/
|
|
40
31
|
export interface RequestArgs {
|
|
41
32
|
url: string;
|
|
42
33
|
options: RawAxiosRequestConfig;
|
|
43
34
|
}
|
|
44
35
|
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @export
|
|
48
|
-
* @class BaseAPI
|
|
49
|
-
*/
|
|
50
36
|
export class BaseAPI {
|
|
51
37
|
protected configuration: Configuration | undefined;
|
|
52
38
|
|
|
@@ -58,12 +44,6 @@ export class BaseAPI {
|
|
|
58
44
|
}
|
|
59
45
|
};
|
|
60
46
|
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @export
|
|
64
|
-
* @class RequiredError
|
|
65
|
-
* @extends {Error}
|
|
66
|
-
*/
|
|
67
47
|
export class RequiredError extends Error {
|
|
68
48
|
constructor(public field: string, msg?: string) {
|
|
69
49
|
super(msg);
|
|
@@ -78,9 +58,5 @@ interface ServerMap {
|
|
|
78
58
|
}[];
|
|
79
59
|
}
|
|
80
60
|
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @export
|
|
84
|
-
*/
|
|
85
61
|
export const operationServerMap: ServerMap = {
|
|
86
62
|
}
|
|
@@ -12,22 +12,16 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
import type { Configuration } from "./configuration";
|
|
17
16
|
import type { RequestArgs } from "./base";
|
|
18
17
|
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
19
18
|
import { RequiredError } from "./base";
|
|
20
19
|
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @export
|
|
24
|
-
*/
|
|
25
20
|
export const DUMMY_BASE_URL = 'https://example.com'
|
|
26
21
|
|
|
27
22
|
/**
|
|
28
23
|
*
|
|
29
24
|
* @throws {RequiredError}
|
|
30
|
-
* @export
|
|
31
25
|
*/
|
|
32
26
|
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
|
33
27
|
if (paramValue === null || paramValue === undefined) {
|
|
@@ -35,10 +29,6 @@ export const assertParamExists = function (functionName: string, paramName: stri
|
|
|
35
29
|
}
|
|
36
30
|
}
|
|
37
31
|
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @export
|
|
41
|
-
*/
|
|
42
32
|
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
|
43
33
|
if (configuration && configuration.apiKey) {
|
|
44
34
|
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
@@ -48,20 +38,12 @@ export const setApiKeyToObject = async function (object: any, keyParamName: stri
|
|
|
48
38
|
}
|
|
49
39
|
}
|
|
50
40
|
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @export
|
|
54
|
-
*/
|
|
55
41
|
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
|
56
42
|
if (configuration && (configuration.username || configuration.password)) {
|
|
57
43
|
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
58
44
|
}
|
|
59
45
|
}
|
|
60
46
|
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @export
|
|
64
|
-
*/
|
|
65
47
|
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
|
66
48
|
if (configuration && configuration.accessToken) {
|
|
67
49
|
const accessToken = typeof configuration.accessToken === 'function'
|
|
@@ -71,10 +53,6 @@ export const setBearerAuthToObject = async function (object: any, configuration?
|
|
|
71
53
|
}
|
|
72
54
|
}
|
|
73
55
|
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* @export
|
|
77
|
-
*/
|
|
78
56
|
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
|
79
57
|
if (configuration && configuration.accessToken) {
|
|
80
58
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
@@ -84,10 +62,11 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|
|
84
62
|
}
|
|
85
63
|
}
|
|
86
64
|
|
|
65
|
+
|
|
87
66
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
88
67
|
if (parameter == null) return;
|
|
89
68
|
if (typeof parameter === "object") {
|
|
90
|
-
if (Array.isArray(parameter)) {
|
|
69
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
91
70
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
92
71
|
}
|
|
93
72
|
else {
|
|
@@ -106,10 +85,6 @@ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: an
|
|
|
106
85
|
}
|
|
107
86
|
}
|
|
108
87
|
|
|
109
|
-
/**
|
|
110
|
-
*
|
|
111
|
-
* @export
|
|
112
|
-
*/
|
|
113
88
|
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
114
89
|
const searchParams = new URLSearchParams(url.search);
|
|
115
90
|
setFlattenedQueryParams(searchParams, objects);
|
|
@@ -117,31 +92,33 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
|
117
92
|
}
|
|
118
93
|
|
|
119
94
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
95
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
96
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
97
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
122
98
|
*/
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
|
|
101
|
+
if (value instanceof Set) {
|
|
102
|
+
return Array.from(value);
|
|
103
|
+
} else {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
123
108
|
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
124
109
|
const nonString = typeof value !== 'string';
|
|
125
110
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
126
111
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
127
112
|
: nonString;
|
|
128
113
|
return needsSerialization
|
|
129
|
-
? JSON.stringify(value !== undefined ? value : {})
|
|
114
|
+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
130
115
|
: (value || "");
|
|
131
116
|
}
|
|
132
117
|
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
* @export
|
|
136
|
-
*/
|
|
137
118
|
export const toPathString = function (url: URL) {
|
|
138
119
|
return url.pathname + url.search + url.hash
|
|
139
120
|
}
|
|
140
121
|
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
* @export
|
|
144
|
-
*/
|
|
145
122
|
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
146
123
|
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
147
124
|
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
2
|
/**
|
|
4
3
|
* 3DS OOB Outgoing Webhook API
|
|
5
4
|
* The 3DS Authentication API supports OOB (out of band) authentication during 3DS payment processing, where the client\'s own cardholder authentication service is used. All endpoints use HTTP response codes; requests and responses are UTF-8 encoded in JSON format. A client must be able to handle new elements added to either the request or response without breaking. **Timeout**: The 3rd party authentication system has 150 seconds (default, configurable during 3DS setup) to send a callback with the authentication challenge result. After this, Enfuce responds with a timeout to ACS and end user authentication fails. **CustomerNumber** in this context is equal to `cardholder.customerNumber` in other parts of the Enfuce API. ## 3DS OOB Authentication flow ``` Payment Network Enfuce 3DS API Client System | | | |-- 3ds auth request -->| | (1) | |-- POST /v1/3ds/oob/challenge/initiate ->| (2) | |<-------------- HTTP 200 OK --------------| (3) | | | | | authenticate cardholder | | | | |<-- POST /v1/3ds/challenge/oob/result ---| (4) |<- 3ds auth response --| | (5) ``` 1. Enfuce receives a 3DS authentication request from the payment network including merchant information. 2. Enfuce calls the client system, requesting a cardholder authentication. - The request contains both `authenticationId` and `challengeId` (UUIDs) that the client system uses when sending the challenge result back. - It also contains the customerNumber and other contextual info. 3. The client system must return an HTTP 200 OK response within 2 seconds. 4. Once the client system has a result from the cardholder authentication, it calls the \"Submit authentication challenge result\" endpoint, which needs to happen within 150 seconds from the start. 5. Enfuce responds to the payment network, and the authorization process can proceed.
|
|
@@ -12,12 +11,24 @@
|
|
|
12
11
|
* Do not edit the class manually.
|
|
13
12
|
*/
|
|
14
13
|
|
|
14
|
+
interface AWSv4Configuration {
|
|
15
|
+
options?: {
|
|
16
|
+
region?: string
|
|
17
|
+
service?: string
|
|
18
|
+
}
|
|
19
|
+
credentials?: {
|
|
20
|
+
accessKeyId?: string
|
|
21
|
+
secretAccessKey?: string,
|
|
22
|
+
sessionToken?: string
|
|
23
|
+
}
|
|
24
|
+
}
|
|
15
25
|
|
|
16
26
|
export interface ConfigurationParameters {
|
|
17
27
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
18
28
|
username?: string;
|
|
19
29
|
password?: string;
|
|
20
30
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
31
|
+
awsv4?: AWSv4Configuration;
|
|
21
32
|
basePath?: string;
|
|
22
33
|
serverIndex?: number;
|
|
23
34
|
baseOptions?: any;
|
|
@@ -28,49 +39,43 @@ export class Configuration {
|
|
|
28
39
|
/**
|
|
29
40
|
* parameter for apiKey security
|
|
30
41
|
* @param name security name
|
|
31
|
-
* @memberof Configuration
|
|
32
42
|
*/
|
|
33
43
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
34
44
|
/**
|
|
35
45
|
* parameter for basic security
|
|
36
|
-
*
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof Configuration
|
|
39
46
|
*/
|
|
40
47
|
username?: string;
|
|
41
48
|
/**
|
|
42
49
|
* parameter for basic security
|
|
43
|
-
*
|
|
44
|
-
* @type {string}
|
|
45
|
-
* @memberof Configuration
|
|
46
50
|
*/
|
|
47
51
|
password?: string;
|
|
48
52
|
/**
|
|
49
53
|
* parameter for oauth2 security
|
|
50
54
|
* @param name security name
|
|
51
55
|
* @param scopes oauth2 scope
|
|
52
|
-
* @memberof Configuration
|
|
53
56
|
*/
|
|
54
57
|
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
55
58
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @
|
|
59
|
+
* parameter for aws4 signature security
|
|
60
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
61
|
+
* @param {string} options.region - aws region
|
|
62
|
+
* @param {string} options.service - name of the service.
|
|
63
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
64
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
65
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
59
66
|
* @memberof Configuration
|
|
60
67
|
*/
|
|
68
|
+
awsv4?: AWSv4Configuration;
|
|
69
|
+
/**
|
|
70
|
+
* override base path
|
|
71
|
+
*/
|
|
61
72
|
basePath?: string;
|
|
62
73
|
/**
|
|
63
74
|
* override server index
|
|
64
|
-
*
|
|
65
|
-
* @type {number}
|
|
66
|
-
* @memberof Configuration
|
|
67
75
|
*/
|
|
68
76
|
serverIndex?: number;
|
|
69
77
|
/**
|
|
70
78
|
* base options for axios calls
|
|
71
|
-
*
|
|
72
|
-
* @type {any}
|
|
73
|
-
* @memberof Configuration
|
|
74
79
|
*/
|
|
75
80
|
baseOptions?: any;
|
|
76
81
|
/**
|
|
@@ -87,6 +92,7 @@ export class Configuration {
|
|
|
87
92
|
this.username = param.username;
|
|
88
93
|
this.password = param.password;
|
|
89
94
|
this.accessToken = param.accessToken;
|
|
95
|
+
this.awsv4 = param.awsv4;
|
|
90
96
|
this.basePath = param.basePath;
|
|
91
97
|
this.serverIndex = param.serverIndex;
|
|
92
98
|
this.baseOptions = {
|
|
@@ -109,7 +115,7 @@ export class Configuration {
|
|
|
109
115
|
* @return True if the given MIME is JSON, false otherwise.
|
|
110
116
|
*/
|
|
111
117
|
public isJsonMime(mime: string): boolean {
|
|
112
|
-
const jsonMime: RegExp =
|
|
113
|
-
return mime !== null &&
|
|
118
|
+
const jsonMime: RegExp = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
119
|
+
return mime !== null && jsonMime.test(mime);
|
|
114
120
|
}
|
|
115
121
|
}
|