@soltech/fluid-common 1.6.20 → 1.6.22

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 CHANGED
@@ -39,8 +39,11 @@ export interface WalletInitParams {
39
39
  operatorId: number;
40
40
  sessionId: string;
41
41
  userId: string | number;
42
+ /** @deprecated Use browserInfo.userAgent instead */
42
43
  userAgent: string;
44
+ /** @deprecated Use browserInfo.viewport instead */
43
45
  viewport: Viewport;
46
+ browserInfo?: BrowserInfo;
44
47
  userData?: UserData;
45
48
  timestamp: string;
46
49
  buildDate: string;
@@ -51,6 +54,19 @@ export interface Viewport {
51
54
  innerWidth: number;
52
55
  innerHeight: number;
53
56
  }
57
+ export interface ScreenDimensions {
58
+ height: number;
59
+ width: number;
60
+ }
61
+ export interface BrowserInfo {
62
+ userAgent: string;
63
+ acceptHeader: string;
64
+ javaEnabled: boolean;
65
+ colorDepth: number;
66
+ screen: ScreenDimensions;
67
+ viewport: Viewport;
68
+ timezoneOffset: number;
69
+ }
54
70
  export interface WalletConfig {
55
71
  autofillCreditCardName: boolean;
56
72
  balanceDisplayed: boolean;
@@ -134,13 +150,12 @@ export interface PaymentMethod {
134
150
  transactionStatusCheck?: TransactionStatusCheck;
135
151
  finalTransactionResultCheckEnabled?: boolean;
136
152
  encryptionSettings?: EncryptionSettings;
137
- hostedFields?: boolean;
138
- hostedFieldsUrl?: string;
139
153
  }
140
154
  export interface EncryptionSettings {
141
155
  encryptionType: EncryptionType;
142
156
  expiryDateEncryptionMode: ExpiryDateEncryptionMode;
143
157
  encryptCardholderName: boolean;
158
+ encryptFullYear: boolean;
144
159
  }
145
160
  export declare enum EncryptionType {
146
161
  NO_ENCRYPTION = "NO_ENCRYPTION",
@@ -211,49 +226,16 @@ export interface CreditcardTransactionParams extends TransactionParams {
211
226
  expiryYear?: string;
212
227
  expiryDate?: string;
213
228
  }
214
- export interface BankTransferTransactionParams extends TransactionParams {
215
- accountName?: string;
216
- accountNumber?: string;
217
- accountType?: string;
218
- bankCode?: string;
219
- bankName?: string;
220
- beneficiaryCity?: string;
221
- beneficiaryCountry?: string;
222
- beneficiaryName?: string;
223
- beneficiaryState?: string;
224
- beneficiaryStreet?: string;
225
- beneficiaryZip?: string;
226
- bic?: string;
227
- branchAddress?: string;
228
- branchCode?: string;
229
- branchName?: string;
230
- clearingNumber?: string;
231
- countryCode?: string;
232
- iban?: string;
233
- nationalId?: string;
234
- documentType?: string;
235
- documentNumber?: string;
236
- }
237
- export interface CryptoTransactionParams extends TransactionParams {
238
- cryptoCurrency?: string;
239
- destinationTag?: string;
240
- walletAddress?: string;
241
- }
242
- export interface EWalletTransactionParams extends TransactionParams {
243
- customerNumber?: string;
244
- email?: string;
245
- mobile?: string;
246
- phoneNumber?: string;
247
- service?: string;
248
- beneficiaryName?: string;
249
- userAccountId?: string;
250
- }
251
- export interface VoucherTransactionParams extends TransactionParams {
229
+ /**
230
+ * Transaction params for any payment method whose payload is keyed dynamically:
231
+ * - CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
232
+ * - Native flows like Apple Pay where the gateway-bound `token` is the only
233
+ * extra key beyond the base TransactionParams.
234
+ * Field keys typically come from `PaymentMethod.inputFields[].paramName`.
235
+ */
236
+ export interface DynamicTransactionParams extends TransactionParams {
252
237
  [key: string]: string | number | undefined;
253
238
  }
254
- export interface ApplePayTransactionParams extends TransactionParams {
255
- token?: string;
256
- }
257
239
  export interface TransactionOptions {
258
240
  bonusCode?: string;
259
241
  activityId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soltech/fluid-common",
3
- "version": "1.6.20",
3
+ "version": "1.6.22",
4
4
  "type": "module",
5
5
  "description": "Fluid frontend, API and AI common interfaces & enums",
6
6
  "main": "lib/index.js",
package/src/index.ts CHANGED
@@ -45,8 +45,11 @@ export interface WalletInitParams {
45
45
  operatorId: number;
46
46
  sessionId: string;
47
47
  userId: string | number;
48
+ /** @deprecated Use browserInfo.userAgent instead */
48
49
  userAgent: string;
50
+ /** @deprecated Use browserInfo.viewport instead */
49
51
  viewport: Viewport;
52
+ browserInfo?: BrowserInfo;
50
53
  userData?: UserData;
51
54
  timestamp: string;
52
55
  buildDate: string;
@@ -59,6 +62,21 @@ export interface Viewport {
59
62
  innerHeight: number;
60
63
  }
61
64
 
65
+ export interface ScreenDimensions {
66
+ height: number;
67
+ width: number;
68
+ }
69
+
70
+ export interface BrowserInfo {
71
+ userAgent: string;
72
+ acceptHeader: string;
73
+ javaEnabled: boolean;
74
+ colorDepth: number;
75
+ screen: ScreenDimensions;
76
+ viewport: Viewport;
77
+ timezoneOffset: number;
78
+ }
79
+
62
80
  export interface WalletConfig {
63
81
  autofillCreditCardName: boolean;
64
82
  balanceDisplayed: boolean;
@@ -150,14 +168,13 @@ export interface PaymentMethod {
150
168
  transactionStatusCheck?: TransactionStatusCheck;
151
169
  finalTransactionResultCheckEnabled?: boolean;
152
170
  encryptionSettings?: EncryptionSettings;
153
- hostedFields?: boolean;
154
- hostedFieldsUrl?: string;
155
171
  }
156
172
 
157
173
  export interface EncryptionSettings {
158
174
  encryptionType: EncryptionType;
159
175
  expiryDateEncryptionMode: ExpiryDateEncryptionMode;
160
176
  encryptCardholderName: boolean;
177
+ encryptFullYear: boolean;
161
178
  }
162
179
 
163
180
  export enum EncryptionType {
@@ -239,54 +256,17 @@ export interface CreditcardTransactionParams extends TransactionParams {
239
256
  expiryDate?: string;
240
257
  }
241
258
 
242
- export interface BankTransferTransactionParams extends TransactionParams {
243
- accountName?: string;
244
- accountNumber?: string;
245
- accountType?: string;
246
- bankCode?: string;
247
- bankName?: string;
248
- beneficiaryCity?: string;
249
- beneficiaryCountry?: string;
250
- beneficiaryName?: string;
251
- beneficiaryState?: string;
252
- beneficiaryStreet?: string;
253
- beneficiaryZip?: string;
254
- bic?: string;
255
- branchAddress?: string;
256
- branchCode?: string;
257
- branchName?: string;
258
- clearingNumber?: string;
259
- countryCode?: string;
260
- iban?: string;
261
- nationalId?: string;
262
- documentType?: string;
263
- documentNumber?: string;
264
- }
265
-
266
- export interface CryptoTransactionParams extends TransactionParams {
267
- cryptoCurrency?: string;
268
- destinationTag?: string;
269
- walletAddress?: string;
270
- }
271
-
272
- export interface EWalletTransactionParams extends TransactionParams {
273
- customerNumber?: string;
274
- email?: string;
275
- mobile?: string;
276
- phoneNumber?: string;
277
- service?: string;
278
- beneficiaryName?: string;
279
- userAccountId?: string;
280
- }
281
-
282
- export interface VoucherTransactionParams extends TransactionParams {
259
+ /**
260
+ * Transaction params for any payment method whose payload is keyed dynamically:
261
+ * - CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
262
+ * - Native flows like Apple Pay where the gateway-bound `token` is the only
263
+ * extra key beyond the base TransactionParams.
264
+ * Field keys typically come from `PaymentMethod.inputFields[].paramName`.
265
+ */
266
+ export interface DynamicTransactionParams extends TransactionParams {
283
267
  [key: string]: string | number | undefined;
284
268
  }
285
269
 
286
- export interface ApplePayTransactionParams extends TransactionParams {
287
- token?: string;
288
- }
289
-
290
270
  export interface TransactionOptions {
291
271
  bonusCode?: string;
292
272
  activityId?: string;