@soltech/fluid-common 0.4.23 → 0.4.25

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
@@ -63,6 +63,12 @@ export interface PaymentMethod {
63
63
  inputFields?: InputField[];
64
64
  bonusCodes?: string[];
65
65
  instructions?: string;
66
+ fees: PaymentMethodFee[];
67
+ }
68
+ export interface PaymentMethodFee {
69
+ fixedAmount?: string;
70
+ percentageAmount?: string;
71
+ applyMixedFee: boolean;
66
72
  }
67
73
  export interface PaymentMethodLogo {
68
74
  height: number;
@@ -188,32 +194,3 @@ export interface BonusPaymentMethod {
188
194
  providerType: string;
189
195
  service?: string;
190
196
  }
191
- export interface TrackingEventData {
192
- amount?: number;
193
- amountOptionClicked?: number;
194
- bonusesAvailable?: boolean;
195
- currentMethod?: string;
196
- errorCode?: string;
197
- fieldId?: string;
198
- hasStoredMethods?: boolean;
199
- isStored?: boolean;
200
- isValid?: boolean;
201
- playNowLink?: string;
202
- preselectedAmount?: number;
203
- previousAmount?: number;
204
- previousBonus?: string;
205
- previousMethod?: string;
206
- replacedAmount?: number;
207
- selectedBonus?: string;
208
- selectedMethod?: string;
209
- sessionId?: string;
210
- stepName?: string;
211
- suggestedAmounts?: number[];
212
- transactionStatus?: string;
213
- transactionType?: string;
214
- userAgent?: string;
215
- }
216
- export interface TrackingEvent {
217
- eventId: string;
218
- data: TrackingEventData;
219
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soltech/fluid-common",
3
- "version": "0.4.23",
3
+ "version": "0.4.25",
4
4
  "type": "module",
5
5
  "description": "Fluid frontend and API commons",
6
6
  "main": "lib/index.js",
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  export enum Integration {
3
2
  LEFT = 'LEFT',
4
3
  RIGHT = 'RIGHT',
@@ -17,10 +16,10 @@ export enum TraitType {
17
16
  }
18
17
 
19
18
  export enum PaymentType {
20
- BANK_TRANSFER = 'BankTransfer',
21
- CREDIT_CARD = 'CreditCard',
22
- CRYPTO = 'Crypto',
23
- EWALLET = 'EWallet'
19
+ BANK_TRANSFER = 'BankTransfer',
20
+ CREDIT_CARD = 'CreditCard',
21
+ CRYPTO = 'Crypto',
22
+ EWALLET = 'EWallet'
24
23
  }
25
24
 
26
25
  export interface WalletRequestBody {
@@ -40,7 +39,7 @@ export interface WalletConfig {
40
39
  defaultDepositAmount: number;
41
40
  integration: Integration;
42
41
  logo: string;
43
- suggestedDepositAmounts: number[];
42
+ suggestedDepositAmounts: number[];
44
43
  theme: Record<string, string>;
45
44
  }
46
45
 
@@ -69,32 +68,39 @@ export interface PaymentMethod {
69
68
  minAmount: number;
70
69
  maxAmount: number;
71
70
  info: string;
72
- paymentType: PaymentType;
73
- providerType: string;
74
- inputFields?: InputField[];
75
- bonusCodes?: string[];
71
+ paymentType: PaymentType;
72
+ providerType: string;
73
+ inputFields?: InputField[];
74
+ bonusCodes?: string[];
76
75
  instructions?: string;
76
+ fees: PaymentMethodFee[];
77
+ }
78
+
79
+ export interface PaymentMethodFee {
80
+ fixedAmount?: string;
81
+ percentageAmount?: string;
82
+ applyMixedFee: boolean;
77
83
  }
78
84
 
79
85
  export interface PaymentMethodLogo {
80
- height: number;
81
- url: string;
82
- width: number;
86
+ height: number;
87
+ url: string;
88
+ width: number;
83
89
  }
84
90
 
85
91
  export interface InputField {
86
92
  paramName: string;
87
93
  format: string;
88
94
  text: string;
89
- placeholderText: string;
90
- errorText: string;
91
- options: InputFieldOption[];
95
+ placeholderText: string;
96
+ errorText: string;
97
+ options: InputFieldOption[];
92
98
  }
93
99
 
94
100
  export interface InputFieldOption {
95
- label: string;
96
- code: string;
97
- logo?: PaymentMethodLogo;
101
+ label: string;
102
+ code: string;
103
+ logo?: PaymentMethodLogo;
98
104
  }
99
105
 
100
106
  export interface RecentMethod extends PaymentMethod {
@@ -119,38 +125,38 @@ export interface CreditcardTransactionParams extends TransactionParams {
119
125
  }
120
126
 
121
127
  export interface BankTransferTransactionParams extends TransactionParams {
122
- accountName?: string;
123
- accountNumber?: string;
124
- accountType?: string;
125
- bankCode?: string;
126
- bankName?: string;
127
- beneficiaryCity?: string;
128
- beneficiaryCountry?: string;
129
- beneficiaryName?: string;
130
- beneficiaryState?: string;
131
- beneficiaryStreet?: string;
132
- beneficiaryZip?: string;
133
- bic?: string;
134
- branchAddress?: string;
135
- branchCode?: string;
136
- branchName?: string;
137
- clearingNumber?: string;
138
- countryCode?: string;
139
- iban?: string;
140
- nationalId?: string;
128
+ accountName?: string;
129
+ accountNumber?: string;
130
+ accountType?: string;
131
+ bankCode?: string;
132
+ bankName?: string;
133
+ beneficiaryCity?: string;
134
+ beneficiaryCountry?: string;
135
+ beneficiaryName?: string;
136
+ beneficiaryState?: string;
137
+ beneficiaryStreet?: string;
138
+ beneficiaryZip?: string;
139
+ bic?: string;
140
+ branchAddress?: string;
141
+ branchCode?: string;
142
+ branchName?: string;
143
+ clearingNumber?: string;
144
+ countryCode?: string;
145
+ iban?: string;
146
+ nationalId?: string;
141
147
  }
142
148
 
143
149
  export interface CryptoTransactionParams extends TransactionParams {
144
- cryptoCurrency?: string;
145
- destinationTag?: string;
146
- walletAddress?: string;
150
+ cryptoCurrency?: string;
151
+ destinationTag?: string;
152
+ walletAddress?: string;
147
153
  }
148
154
 
149
155
  export interface EWalletTransactionParams extends TransactionParams {
150
- customerNumber?: string;
156
+ customerNumber?: string;
151
157
  email?: string;
152
- mobile?: string;
153
- phoneNumber?: string;
158
+ mobile?: string;
159
+ phoneNumber?: string;
154
160
  service?: string;
155
161
  }
156
162
 
@@ -160,7 +166,7 @@ export interface TransactionOptions {
160
166
  }
161
167
 
162
168
  export interface TransactionResult {
163
- error?: ProviderTransactionError;
169
+ error?: ProviderTransactionError;
164
170
  redirectOutput?: RedirectOutput;
165
171
  state: TransactionState;
166
172
  statusCode: string;
@@ -178,15 +184,15 @@ export interface RedirectOutput {
178
184
  export enum TransactionState {
179
185
  SUCCESS = 'SUCCESS',
180
186
  FAIL = 'FAIL',
181
- PROCESSING = 'PROCESSING',
182
- WAITING_APPROVAL = 'WAITING_APPROVAL',
187
+ PROCESSING = 'PROCESSING',
188
+ WAITING_APPROVAL = 'WAITING_APPROVAL',
183
189
  WAITING_INPUT = 'WAITING_INPUT'
184
190
  }
185
191
 
186
192
  export interface ProviderTransactionError {
187
- code: string;
188
- text: string;
189
- action: Action;
193
+ code: string;
194
+ text: string;
195
+ action: Action;
190
196
  }
191
197
 
192
198
  export enum Action {
@@ -198,54 +204,23 @@ export enum Action {
198
204
 
199
205
  export interface PendingWithdrawal {
200
206
  amount: string;
201
- creationDate: string;
207
+ creationDate: string;
202
208
  providerType: string;
203
209
  state: WithdrawalState;
204
210
  transactionId: string;
205
211
  }
206
212
 
207
213
  export enum WithdrawalState {
208
- REQUESTED = 'REQUESTED',
209
- PROCESSING = 'PROCESSING'
214
+ REQUESTED = 'REQUESTED',
215
+ PROCESSING = 'PROCESSING'
210
216
  }
211
217
 
212
218
  export interface AvailableBonusWithPaymentMethods {
213
- code: string;
214
- paymentMethodFilter?: BonusPaymentMethod[];
219
+ code: string;
220
+ paymentMethodFilter?: BonusPaymentMethod[];
215
221
  }
216
222
 
217
223
  export interface BonusPaymentMethod {
218
224
  providerType: string;
219
225
  service?: string;
220
226
  }
221
-
222
- export interface TrackingEventData {
223
- amount?: number;
224
- amountOptionClicked?: number;
225
- bonusesAvailable?: boolean;
226
- currentMethod?: string;
227
- errorCode?: string;
228
- fieldId?: string;
229
- hasStoredMethods?: boolean;
230
- isStored?: boolean;
231
- isValid?: boolean;
232
- playNowLink?: string;
233
- preselectedAmount?: number;
234
- previousAmount?: number;
235
- previousBonus?: string;
236
- previousMethod?: string;
237
- replacedAmount?: number;
238
- selectedBonus?: string;
239
- selectedMethod?: string;
240
- sessionId?: string;
241
- stepName?: string;
242
- suggestedAmounts?: number[];
243
- transactionStatus?: string;
244
- transactionType?: string;
245
- userAgent?: string;
246
- }
247
-
248
- export interface TrackingEvent {
249
- eventId: string;
250
- data: TrackingEventData;
251
- }