@soltech/fluid-common 1.10.0-sc23269.1 → 1.10.0-sc23269.2
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/index.d.ts +20 -3
- package/package.json +1 -1
- package/src/index.ts +22 -3
package/lib/index.d.ts
CHANGED
|
@@ -155,6 +155,16 @@ export interface PaymentMethod {
|
|
|
155
155
|
finalTransactionResultCheckEnabled?: boolean;
|
|
156
156
|
encryptionSettings?: EncryptionSettings;
|
|
157
157
|
hostedFields?: HostedFieldsSettings;
|
|
158
|
+
deviceProtection?: DeviceProtectionSettings;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* What the gateway's browser SDK needs to start profiling the payer's device. Its presence is
|
|
162
|
+
* also how the client decides the gateway behind this method profiles at all — it describes the
|
|
163
|
+
* gateway rather than the method, so every method of that gateway carries the same values.
|
|
164
|
+
*/
|
|
165
|
+
export interface DeviceProtectionSettings {
|
|
166
|
+
merchantId: string;
|
|
167
|
+
env: string;
|
|
158
168
|
}
|
|
159
169
|
export interface EncryptionSettings {
|
|
160
170
|
encryptionType: EncryptionType;
|
|
@@ -242,7 +252,15 @@ export interface TransactionParams {
|
|
|
242
252
|
amount: number;
|
|
243
253
|
paymentMethodId: string;
|
|
244
254
|
}
|
|
245
|
-
|
|
255
|
+
/**
|
|
256
|
+
* What a gateway's own browser SDK profiled the payer's device with, forwarded as request
|
|
257
|
+
* headers. It cannot live on `TransactionParams` itself: `DynamicTransactionParams` narrows
|
|
258
|
+
* every property to `string | number | undefined` with an index signature.
|
|
259
|
+
*/
|
|
260
|
+
export interface GatewayProtectionParams {
|
|
261
|
+
protectionHeaders?: Record<string, string>;
|
|
262
|
+
}
|
|
263
|
+
export interface CreditcardTransactionParams extends TransactionParams, GatewayProtectionParams {
|
|
246
264
|
cardHolder?: string;
|
|
247
265
|
cardNumber?: string;
|
|
248
266
|
cvc: string;
|
|
@@ -250,7 +268,6 @@ export interface CreditcardTransactionParams extends TransactionParams {
|
|
|
250
268
|
expiryYear?: string;
|
|
251
269
|
expiryDate?: string;
|
|
252
270
|
cardToken?: string;
|
|
253
|
-
protectionHeaders?: Record<string, string>;
|
|
254
271
|
}
|
|
255
272
|
/**
|
|
256
273
|
* Transaction params for any payment method whose payload is keyed dynamically by
|
|
@@ -260,7 +277,7 @@ export interface CreditcardTransactionParams extends TransactionParams {
|
|
|
260
277
|
export interface DynamicTransactionParams extends TransactionParams {
|
|
261
278
|
[key: string]: string | number | undefined;
|
|
262
279
|
}
|
|
263
|
-
export interface ApplePayTransactionParams extends TransactionParams {
|
|
280
|
+
export interface ApplePayTransactionParams extends TransactionParams, GatewayProtectionParams {
|
|
264
281
|
/** The authorised `ApplePayPaymentToken`, serialised, opaque to everything but the gateway. */
|
|
265
282
|
token: string;
|
|
266
283
|
billingContact?: ApplePayContact;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -174,6 +174,17 @@ export interface PaymentMethod {
|
|
|
174
174
|
finalTransactionResultCheckEnabled?: boolean;
|
|
175
175
|
encryptionSettings?: EncryptionSettings;
|
|
176
176
|
hostedFields?: HostedFieldsSettings;
|
|
177
|
+
deviceProtection?: DeviceProtectionSettings;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* What the gateway's browser SDK needs to start profiling the payer's device. Its presence is
|
|
182
|
+
* also how the client decides the gateway behind this method profiles at all — it describes the
|
|
183
|
+
* gateway rather than the method, so every method of that gateway carries the same values.
|
|
184
|
+
*/
|
|
185
|
+
export interface DeviceProtectionSettings {
|
|
186
|
+
merchantId: string;
|
|
187
|
+
env: string;
|
|
177
188
|
}
|
|
178
189
|
|
|
179
190
|
export interface EncryptionSettings {
|
|
@@ -282,7 +293,16 @@ export interface TransactionParams {
|
|
|
282
293
|
paymentMethodId: string;
|
|
283
294
|
}
|
|
284
295
|
|
|
285
|
-
|
|
296
|
+
/**
|
|
297
|
+
* What a gateway's own browser SDK profiled the payer's device with, forwarded as request
|
|
298
|
+
* headers. It cannot live on `TransactionParams` itself: `DynamicTransactionParams` narrows
|
|
299
|
+
* every property to `string | number | undefined` with an index signature.
|
|
300
|
+
*/
|
|
301
|
+
export interface GatewayProtectionParams {
|
|
302
|
+
protectionHeaders?: Record<string, string>;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export interface CreditcardTransactionParams extends TransactionParams, GatewayProtectionParams {
|
|
286
306
|
cardHolder?: string;
|
|
287
307
|
cardNumber?: string;
|
|
288
308
|
cvc: string;
|
|
@@ -290,7 +310,6 @@ export interface CreditcardTransactionParams extends TransactionParams {
|
|
|
290
310
|
expiryYear?: string;
|
|
291
311
|
expiryDate?: string;
|
|
292
312
|
cardToken?: string;
|
|
293
|
-
protectionHeaders?: Record<string, string>;
|
|
294
313
|
}
|
|
295
314
|
|
|
296
315
|
/**
|
|
@@ -302,7 +321,7 @@ export interface DynamicTransactionParams extends TransactionParams {
|
|
|
302
321
|
[key: string]: string | number | undefined;
|
|
303
322
|
}
|
|
304
323
|
|
|
305
|
-
export interface ApplePayTransactionParams extends TransactionParams {
|
|
324
|
+
export interface ApplePayTransactionParams extends TransactionParams, GatewayProtectionParams {
|
|
306
325
|
/** The authorised `ApplePayPaymentToken`, serialised, opaque to everything but the gateway. */
|
|
307
326
|
token: string;
|
|
308
327
|
billingContact?: ApplePayContact;
|