@soltech/fluid-common 0.4.36 → 0.4.37
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 +9 -5
- package/lib/index.js +1 -0
- package/package.json +1 -1
- package/src/index.ts +59 -55
package/lib/index.d.ts
CHANGED
|
@@ -63,6 +63,11 @@ export interface PaymentMethod {
|
|
|
63
63
|
inputFields?: InputField[];
|
|
64
64
|
bonusCodes?: string[];
|
|
65
65
|
instructions?: string;
|
|
66
|
+
fees: PaymentMethodFees;
|
|
67
|
+
}
|
|
68
|
+
export interface PaymentMethodFees {
|
|
69
|
+
fixedAmount?: string;
|
|
70
|
+
percentage?: string;
|
|
66
71
|
}
|
|
67
72
|
export interface PaymentMethodLogo {
|
|
68
73
|
height: number;
|
|
@@ -160,6 +165,7 @@ export declare enum TransactionState {
|
|
|
160
165
|
}
|
|
161
166
|
export interface ProviderTransactionError {
|
|
162
167
|
code: string;
|
|
168
|
+
textTitle: string;
|
|
163
169
|
text: string;
|
|
164
170
|
action: Action;
|
|
165
171
|
}
|
|
@@ -167,7 +173,8 @@ export declare enum Action {
|
|
|
167
173
|
RESTART_PRESERVING_DETAILS = "RESTART_PRESERVING_DETAILS",
|
|
168
174
|
RESTART_CLEARING_DETAILS = "RESTART_CLEARING_DETAILS",
|
|
169
175
|
SHOW_DETAILS_STEP_PRESERVING_DETAILS = "SHOW_DETAILS_STEP_PRESERVING_DETAILS",
|
|
170
|
-
SHOW_DETAILS_STEP_CLEARING_DETAILS = "SHOW_DETAILS_STEP_CLEARING_DETAILS"
|
|
176
|
+
SHOW_DETAILS_STEP_CLEARING_DETAILS = "SHOW_DETAILS_STEP_CLEARING_DETAILS",
|
|
177
|
+
SHOW_CVC_EDIT = "SHOW_CVC_EDIT"
|
|
171
178
|
}
|
|
172
179
|
export interface PendingWithdrawal {
|
|
173
180
|
amount: string;
|
|
@@ -182,10 +189,7 @@ export declare enum WithdrawalState {
|
|
|
182
189
|
}
|
|
183
190
|
export interface AvailableBonusWithPaymentMethods {
|
|
184
191
|
code: string;
|
|
185
|
-
paymentMethodFilter?:
|
|
186
|
-
applyTo?: BonusPaymentMethod[];
|
|
187
|
-
excludeFrom?: BonusPaymentMethod[];
|
|
188
|
-
};
|
|
192
|
+
paymentMethodFilter?: BonusPaymentMethod[];
|
|
189
193
|
}
|
|
190
194
|
export interface BonusPaymentMethod {
|
|
191
195
|
providerType: string;
|
package/lib/index.js
CHANGED
|
@@ -36,6 +36,7 @@ export var Action;
|
|
|
36
36
|
Action["RESTART_CLEARING_DETAILS"] = "RESTART_CLEARING_DETAILS";
|
|
37
37
|
Action["SHOW_DETAILS_STEP_PRESERVING_DETAILS"] = "SHOW_DETAILS_STEP_PRESERVING_DETAILS";
|
|
38
38
|
Action["SHOW_DETAILS_STEP_CLEARING_DETAILS"] = "SHOW_DETAILS_STEP_CLEARING_DETAILS";
|
|
39
|
+
Action["SHOW_CVC_EDIT"] = "SHOW_CVC_EDIT";
|
|
39
40
|
})(Action || (Action = {}));
|
|
40
41
|
export var WithdrawalState;
|
|
41
42
|
(function (WithdrawalState) {
|
package/package.json
CHANGED
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
42
|
+
suggestedDepositAmounts: number[];
|
|
44
43
|
theme: Record<string, string>;
|
|
45
44
|
}
|
|
46
45
|
|
|
@@ -69,32 +68,38 @@ export interface PaymentMethod {
|
|
|
69
68
|
minAmount: number;
|
|
70
69
|
maxAmount: number;
|
|
71
70
|
info: string;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
paymentType: PaymentType;
|
|
72
|
+
providerType: string;
|
|
73
|
+
inputFields?: InputField[];
|
|
74
|
+
bonusCodes?: string[];
|
|
76
75
|
instructions?: string;
|
|
76
|
+
fees: PaymentMethodFees;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface PaymentMethodFees {
|
|
80
|
+
fixedAmount?: string;
|
|
81
|
+
percentage?: string;
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
export interface PaymentMethodLogo {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
height: number;
|
|
86
|
+
url: string;
|
|
87
|
+
width: number;
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
export interface InputField {
|
|
86
91
|
paramName: string;
|
|
87
92
|
format: string;
|
|
88
93
|
text: string;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
placeholderText: string;
|
|
95
|
+
errorText: string;
|
|
96
|
+
options: InputFieldOption[];
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
export interface InputFieldOption {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
100
|
+
label: string;
|
|
101
|
+
code: string;
|
|
102
|
+
logo?: PaymentMethodLogo;
|
|
98
103
|
}
|
|
99
104
|
|
|
100
105
|
export interface RecentMethod extends PaymentMethod {
|
|
@@ -119,38 +124,38 @@ export interface CreditcardTransactionParams extends TransactionParams {
|
|
|
119
124
|
}
|
|
120
125
|
|
|
121
126
|
export interface BankTransferTransactionParams extends TransactionParams {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
127
|
+
accountName?: string;
|
|
128
|
+
accountNumber?: string;
|
|
129
|
+
accountType?: string;
|
|
130
|
+
bankCode?: string;
|
|
131
|
+
bankName?: string;
|
|
132
|
+
beneficiaryCity?: string;
|
|
133
|
+
beneficiaryCountry?: string;
|
|
134
|
+
beneficiaryName?: string;
|
|
135
|
+
beneficiaryState?: string;
|
|
136
|
+
beneficiaryStreet?: string;
|
|
137
|
+
beneficiaryZip?: string;
|
|
138
|
+
bic?: string;
|
|
139
|
+
branchAddress?: string;
|
|
140
|
+
branchCode?: string;
|
|
141
|
+
branchName?: string;
|
|
142
|
+
clearingNumber?: string;
|
|
143
|
+
countryCode?: string;
|
|
144
|
+
iban?: string;
|
|
145
|
+
nationalId?: string;
|
|
141
146
|
}
|
|
142
147
|
|
|
143
148
|
export interface CryptoTransactionParams extends TransactionParams {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
cryptoCurrency?: string;
|
|
150
|
+
destinationTag?: string;
|
|
151
|
+
walletAddress?: string;
|
|
147
152
|
}
|
|
148
153
|
|
|
149
154
|
export interface EWalletTransactionParams extends TransactionParams {
|
|
150
|
-
|
|
155
|
+
customerNumber?: string;
|
|
151
156
|
email?: string;
|
|
152
|
-
|
|
153
|
-
|
|
157
|
+
mobile?: string;
|
|
158
|
+
phoneNumber?: string;
|
|
154
159
|
service?: string;
|
|
155
160
|
}
|
|
156
161
|
|
|
@@ -160,7 +165,7 @@ export interface TransactionOptions {
|
|
|
160
165
|
}
|
|
161
166
|
|
|
162
167
|
export interface TransactionResult {
|
|
163
|
-
|
|
168
|
+
error?: ProviderTransactionError;
|
|
164
169
|
redirectOutput?: RedirectOutput;
|
|
165
170
|
state: TransactionState;
|
|
166
171
|
statusCode: string;
|
|
@@ -178,13 +183,14 @@ export interface RedirectOutput {
|
|
|
178
183
|
export enum TransactionState {
|
|
179
184
|
SUCCESS = 'SUCCESS',
|
|
180
185
|
FAIL = 'FAIL',
|
|
181
|
-
|
|
182
|
-
|
|
186
|
+
PROCESSING = 'PROCESSING',
|
|
187
|
+
WAITING_APPROVAL = 'WAITING_APPROVAL',
|
|
183
188
|
WAITING_INPUT = 'WAITING_INPUT'
|
|
184
189
|
}
|
|
185
190
|
|
|
186
191
|
export interface ProviderTransactionError {
|
|
187
192
|
code: string;
|
|
193
|
+
textTitle: string;
|
|
188
194
|
text: string;
|
|
189
195
|
action: Action;
|
|
190
196
|
}
|
|
@@ -194,27 +200,25 @@ export enum Action {
|
|
|
194
200
|
RESTART_CLEARING_DETAILS = 'RESTART_CLEARING_DETAILS',
|
|
195
201
|
SHOW_DETAILS_STEP_PRESERVING_DETAILS = 'SHOW_DETAILS_STEP_PRESERVING_DETAILS',
|
|
196
202
|
SHOW_DETAILS_STEP_CLEARING_DETAILS = 'SHOW_DETAILS_STEP_CLEARING_DETAILS',
|
|
203
|
+
SHOW_CVC_EDIT = 'SHOW_CVC_EDIT',
|
|
197
204
|
}
|
|
198
205
|
|
|
199
206
|
export interface PendingWithdrawal {
|
|
200
207
|
amount: string;
|
|
201
|
-
|
|
208
|
+
creationDate: string;
|
|
202
209
|
providerType: string;
|
|
203
210
|
state: WithdrawalState;
|
|
204
211
|
transactionId: string;
|
|
205
212
|
}
|
|
206
213
|
|
|
207
214
|
export enum WithdrawalState {
|
|
208
|
-
|
|
209
|
-
|
|
215
|
+
REQUESTED = 'REQUESTED',
|
|
216
|
+
PROCESSING = 'PROCESSING'
|
|
210
217
|
}
|
|
211
218
|
|
|
212
219
|
export interface AvailableBonusWithPaymentMethods {
|
|
213
|
-
|
|
214
|
-
paymentMethodFilter?:
|
|
215
|
-
applyTo?: BonusPaymentMethod[];
|
|
216
|
-
excludeFrom?: BonusPaymentMethod[];
|
|
217
|
-
}
|
|
220
|
+
code: string;
|
|
221
|
+
paymentMethodFilter?: BonusPaymentMethod[];
|
|
218
222
|
}
|
|
219
223
|
|
|
220
224
|
export interface BonusPaymentMethod {
|