@soltech/fluid-common 1.10.0-beta.1 → 1.10.0-sc23269.1
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 +430 -7
- package/lib/index.js +97 -7
- package/package.json +1 -1
- package/src/index.ts +493 -7
- package/.claude/settings.local.json +0 -12
- package/lib/bonus.d.ts +0 -11
- package/lib/bonus.js +0 -1
- package/lib/payment-methods.d.ts +0 -114
- package/lib/payment-methods.js +0 -29
- package/lib/tracking.d.ts +0 -23
- package/lib/tracking.js +0 -1
- package/lib/transactions.d.ts +0 -98
- package/lib/transactions.js +0 -36
- package/lib/user.d.ts +0 -22
- package/lib/user.js +0 -6
- package/lib/wallet-config-keys.d.ts +0 -459
- package/lib/wallet-config-keys.js +0 -462
- package/lib/wallet.d.ts +0 -92
- package/lib/wallet.js +0 -7
- package/src/bonus.ts +0 -12
- package/src/payment-methods.ts +0 -129
- package/src/tracking.ts +0 -26
- package/src/transactions.ts +0 -111
- package/src/user.ts +0 -23
- package/src/wallet-config-keys.ts +0 -466
- package/src/wallet.ts +0 -103
package/src/index.ts
CHANGED
|
@@ -1,7 +1,493 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export enum Integration {
|
|
2
|
+
LEFT = 'LEFT',
|
|
3
|
+
CENTER = 'CENTER',
|
|
4
|
+
RIGHT = 'RIGHT',
|
|
5
|
+
INLINE = 'INLINE'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export enum ContentType {
|
|
9
|
+
PLAIN_TEXT = 'PLAIN_TEXT',
|
|
10
|
+
HTML = 'HTML'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum TraitType {
|
|
14
|
+
COLOR = 'COLOR',
|
|
15
|
+
IMAGE = 'IMAGE',
|
|
16
|
+
TEXT = 'TEXT',
|
|
17
|
+
SOUND = 'SOUND'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum PaymentType {
|
|
21
|
+
APPLE_PAY = 'ApplePay',
|
|
22
|
+
BANK_TRANSFER = 'BankTransfer',
|
|
23
|
+
CREDIT_CARD = 'CreditCard',
|
|
24
|
+
CRYPTO = 'Crypto',
|
|
25
|
+
EWALLET = 'EWallet',
|
|
26
|
+
VOUCHER = 'Voucher'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export enum WindowRedirectType {
|
|
30
|
+
POPUP_WINDOW = 'popupWindow',
|
|
31
|
+
BROWSER_TAB = 'browserTab',
|
|
32
|
+
NONE = 'none'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface WalletRequestBody {
|
|
36
|
+
payload?: object | string;
|
|
37
|
+
payloadOptions?: TransactionOptions;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface WalletInitParams {
|
|
41
|
+
country: string;
|
|
42
|
+
ipAddress: string;
|
|
43
|
+
locale: string;
|
|
44
|
+
currency: string,
|
|
45
|
+
operatorId: number;
|
|
46
|
+
sessionId: string;
|
|
47
|
+
userId: string | number;
|
|
48
|
+
/** @deprecated Use browserInfo.userAgent instead */
|
|
49
|
+
userAgent: string;
|
|
50
|
+
/** @deprecated Use browserInfo.viewport instead */
|
|
51
|
+
viewport: Viewport;
|
|
52
|
+
browserInfo?: BrowserInfo;
|
|
53
|
+
userData?: UserData;
|
|
54
|
+
timestamp: string;
|
|
55
|
+
buildDate: string;
|
|
56
|
+
hostSiteUrl: string;
|
|
57
|
+
virtual: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface Viewport {
|
|
61
|
+
innerWidth: number;
|
|
62
|
+
innerHeight: number;
|
|
63
|
+
}
|
|
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
|
+
|
|
80
|
+
export interface WalletConfig {
|
|
81
|
+
allowCustomAmount: boolean;
|
|
82
|
+
autofillCreditCardName: boolean;
|
|
83
|
+
balanceDisplayed: boolean;
|
|
84
|
+
banner?: Banner;
|
|
85
|
+
bonusOutlined: boolean;
|
|
86
|
+
campaign?: Campaign;
|
|
87
|
+
cardHolderNameRegex: string | null;
|
|
88
|
+
contactSupportEnabled: boolean;
|
|
89
|
+
contactSupportLink: string;
|
|
90
|
+
contentText: Record<string, string>;
|
|
91
|
+
expressFlowEnabled: boolean;
|
|
92
|
+
defaultDepositAmount: number;
|
|
93
|
+
fullListOfDepositMethodsDisplayed: boolean;
|
|
94
|
+
hideMinMaxEnabled: boolean;
|
|
95
|
+
integration: Integration;
|
|
96
|
+
kycDepositLimit: number | null;
|
|
97
|
+
manualBonusCodesEnabled?: boolean;
|
|
98
|
+
pendingWithdrawalsReminder: {
|
|
99
|
+
threshold: number;
|
|
100
|
+
userResponseRequired: boolean;
|
|
101
|
+
};
|
|
102
|
+
successScreen: {
|
|
103
|
+
promotion: Promotion | null;
|
|
104
|
+
};
|
|
105
|
+
suggestedDepositAmounts: number[];
|
|
106
|
+
theme: Record<string, string>;
|
|
107
|
+
transactionToggleDisplayed: boolean;
|
|
108
|
+
withdrawalInFiatCurrency: boolean;
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface Promotion {
|
|
113
|
+
title: string;
|
|
114
|
+
description: string;
|
|
115
|
+
tag: string;
|
|
116
|
+
ctaLinkLabel: string;
|
|
117
|
+
ctaLinkUrl: string;
|
|
118
|
+
thumbnail: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface WalletConfigParams {
|
|
122
|
+
contentText: Record<string, ContentType>,
|
|
123
|
+
theme: Record<string, TraitType>
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface DepositAmountsSettings {
|
|
127
|
+
id?: string;
|
|
128
|
+
defaultDepositAmount: number;
|
|
129
|
+
suggestedDepositAmounts: number[];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export type TransactionStatusSource = 'gateway' | 'fluid';
|
|
133
|
+
|
|
134
|
+
export interface TransactionStatusCheck {
|
|
135
|
+
url: string;
|
|
136
|
+
intervalSeconds: number;
|
|
137
|
+
source?: TransactionStatusSource;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface AllPaymentMethods {
|
|
141
|
+
recentPaymentMethods: RecentMethod[];
|
|
142
|
+
paymentMethods: PaymentMethod[];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface AllPaymentMethodsByTransactionType {
|
|
146
|
+
deposit: AllPaymentMethods,
|
|
147
|
+
withdrawal: AllPaymentMethods
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface PaymentMethod {
|
|
151
|
+
id: string;
|
|
152
|
+
name: string;
|
|
153
|
+
paymentGatewayId: string;
|
|
154
|
+
description: string;
|
|
155
|
+
termsAndConditions: string;
|
|
156
|
+
logo: PaymentMethodLogo;
|
|
157
|
+
logoLight?: PaymentMethodLogo;
|
|
158
|
+
minAmount: number;
|
|
159
|
+
maxAmount: number;
|
|
160
|
+
info: string;
|
|
161
|
+
paymentType: PaymentType;
|
|
162
|
+
inputFields?: InputField[];
|
|
163
|
+
storedMethodInputFields?: InputField[];
|
|
164
|
+
bonusCodes?: string[];
|
|
165
|
+
instructions?: string;
|
|
166
|
+
withdrawalInstructions?: string;
|
|
167
|
+
fees?: PaymentMethodFees;
|
|
168
|
+
windowRedirectType?: WindowRedirectType;
|
|
169
|
+
voucherAmounts?: number[];
|
|
170
|
+
depositHandledByHostSite?: boolean;
|
|
171
|
+
withdrawalHandledByHostSite?: boolean;
|
|
172
|
+
withdrawalInputsShownWhenMethodIsStored: boolean;
|
|
173
|
+
transactionStatusCheck?: TransactionStatusCheck;
|
|
174
|
+
finalTransactionResultCheckEnabled?: boolean;
|
|
175
|
+
encryptionSettings?: EncryptionSettings;
|
|
176
|
+
hostedFields?: HostedFieldsSettings;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface EncryptionSettings {
|
|
180
|
+
encryptionType: EncryptionType;
|
|
181
|
+
expiryDateEncryptionMode: ExpiryDateEncryptionMode;
|
|
182
|
+
encryptCardholderName: boolean;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type HostedFieldsSettings = CardValuesSettings | CardTokenSettings;
|
|
186
|
+
|
|
187
|
+
interface HostedFieldsBase {
|
|
188
|
+
// Its presence is also how the client decides a method uses hosted fields at all.
|
|
189
|
+
url: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface CardValuesSettings extends HostedFieldsBase {
|
|
193
|
+
// Absent selects this protocol, so responses composed before the field existed keep working.
|
|
194
|
+
protocol?: HostedFieldsProtocol.CARD_VALUES;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface CardTokenSettings extends HostedFieldsBase {
|
|
198
|
+
protocol: HostedFieldsProtocol.CARD_TOKEN;
|
|
199
|
+
params: CardTokenParams;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface CardTokenParams {
|
|
203
|
+
merchantId: string;
|
|
204
|
+
env: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Which message contract the client must speak to the hosted fields, not which gateway
|
|
208
|
+
// is behind them — the gateway's identity stays server-side.
|
|
209
|
+
export enum HostedFieldsProtocol {
|
|
210
|
+
CARD_VALUES = 'CardValues',
|
|
211
|
+
CARD_TOKEN = 'CardToken'
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export enum EncryptionType {
|
|
215
|
+
NO_ENCRYPTION = 'NO_ENCRYPTION',
|
|
216
|
+
RSA_PKCS1 = 'RSA_PKCS1', // RSA with PKCS#1 v1.5 padding (jsencrypt default)
|
|
217
|
+
RSA_OAEP = 'RSA_OAEP', // RSA with OAEP padding (crypto/Web Crypto)
|
|
218
|
+
SHA384_SIGNATURE = 'SHA384_SIGNATURE' // SHA-384-based signature (headers)
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export enum ExpiryDateEncryptionMode {
|
|
222
|
+
NONE = 'NONE',
|
|
223
|
+
SEPARATE_FIELDS = 'SEPARATE_FIELDS',
|
|
224
|
+
SINGLE_FIELD = 'SINGLE_FIELD'
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export type PaymentMethodFees = {
|
|
228
|
+
fixed?: number;
|
|
229
|
+
percentage?: number;
|
|
230
|
+
applyToRange?: {
|
|
231
|
+
min?: number;
|
|
232
|
+
max?: number;
|
|
233
|
+
}
|
|
234
|
+
}[];
|
|
235
|
+
|
|
236
|
+
export interface PaymentMethodLogo {
|
|
237
|
+
height: number;
|
|
238
|
+
url: string;
|
|
239
|
+
width: number;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface InputField {
|
|
243
|
+
paramName: string;
|
|
244
|
+
format: string;
|
|
245
|
+
text: string;
|
|
246
|
+
placeholderText: string;
|
|
247
|
+
errorText: string;
|
|
248
|
+
optional: boolean;
|
|
249
|
+
options: InputFieldOption[];
|
|
250
|
+
prefillKey?: string;
|
|
251
|
+
removePrefixPlusSign?: boolean;
|
|
252
|
+
relatesTo?: string;
|
|
253
|
+
showForValues?: string[];
|
|
254
|
+
isPassword?: boolean;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface InputFieldOption {
|
|
258
|
+
label: string;
|
|
259
|
+
code: string;
|
|
260
|
+
relatesTo?: string;
|
|
261
|
+
showForValues?: string[];
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export enum RecentMethodMaskedAccountFormat {
|
|
265
|
+
DEFAULT = 'Default',
|
|
266
|
+
LAST_8_DIGITS = 'Last8Digits',
|
|
267
|
+
FULL_VALUE = 'FullValue',
|
|
268
|
+
NOTHING = 'Nothing'
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface RecentMethod extends PaymentMethod {
|
|
272
|
+
accountId: string;
|
|
273
|
+
maskedAccount: string;
|
|
274
|
+
lastSuccess?: string;
|
|
275
|
+
expiryDate?: string;
|
|
276
|
+
maskedAccountFormat?: RecentMethodMaskedAccountFormat;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface TransactionParams {
|
|
280
|
+
accountId?: string;
|
|
281
|
+
amount: number;
|
|
282
|
+
paymentMethodId: string;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface CreditcardTransactionParams extends TransactionParams {
|
|
286
|
+
cardHolder?: string;
|
|
287
|
+
cardNumber?: string;
|
|
288
|
+
cvc: string;
|
|
289
|
+
expiryMonth?: string;
|
|
290
|
+
expiryYear?: string;
|
|
291
|
+
expiryDate?: string;
|
|
292
|
+
cardToken?: string;
|
|
293
|
+
protectionHeaders?: Record<string, string>;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Transaction params for any payment method whose payload is keyed dynamically by
|
|
298
|
+
* CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
|
|
299
|
+
* Field keys typically come from `PaymentMethod.inputFields[].paramName`.
|
|
300
|
+
*/
|
|
301
|
+
export interface DynamicTransactionParams extends TransactionParams {
|
|
302
|
+
[key: string]: string | number | undefined;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export interface ApplePayTransactionParams extends TransactionParams {
|
|
306
|
+
/** The authorised `ApplePayPaymentToken`, serialised, opaque to everything but the gateway. */
|
|
307
|
+
token: string;
|
|
308
|
+
billingContact?: ApplePayContact;
|
|
309
|
+
/** Apple returns the payer's email here, not on the billing contact. */
|
|
310
|
+
shippingContact?: ApplePayContact;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Apple's own `ApplePayPaymentContact` shape, carried through unchanged: a gateway that wants
|
|
315
|
+
* it expects the field names Apple uses. Only present when the method asks the sheet for it.
|
|
316
|
+
*/
|
|
317
|
+
export interface ApplePayContact {
|
|
318
|
+
addressLines?: string[];
|
|
319
|
+
administrativeArea?: string;
|
|
320
|
+
country?: string;
|
|
321
|
+
countryCode?: string;
|
|
322
|
+
emailAddress?: string;
|
|
323
|
+
familyName?: string;
|
|
324
|
+
givenName?: string;
|
|
325
|
+
locality?: string;
|
|
326
|
+
phoneNumber?: string;
|
|
327
|
+
postalCode?: string;
|
|
328
|
+
subAdministrativeArea?: string;
|
|
329
|
+
subLocality?: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface TransactionOptions {
|
|
333
|
+
bonusCode?: string;
|
|
334
|
+
activityId?: string;
|
|
335
|
+
originalActivityId?: string;
|
|
336
|
+
userData?: UserData;
|
|
337
|
+
trackingData?: object;
|
|
338
|
+
transactionAttributes?: Record<string, string>;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export interface TransactionResult {
|
|
342
|
+
error?: ProviderTransactionError;
|
|
343
|
+
redirectOutput?: RedirectOutput;
|
|
344
|
+
state: TransactionState;
|
|
345
|
+
statusCode: string;
|
|
346
|
+
transactionId: string;
|
|
347
|
+
pspStatusCode?: string;
|
|
348
|
+
details?: Record<string, unknown>;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export interface RedirectOutput {
|
|
352
|
+
container: RedirectContainer;
|
|
353
|
+
height?: number;
|
|
354
|
+
html?: string;
|
|
355
|
+
method?: HttpVerb;
|
|
356
|
+
parameters?: Record<string, string>;
|
|
357
|
+
sizeUnit?: string;
|
|
358
|
+
url: string;
|
|
359
|
+
width?: number;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export type RedirectContainer = 'iframe' | 'window' | 'redirect';
|
|
363
|
+
|
|
364
|
+
export enum TransactionState {
|
|
365
|
+
SUCCESS = 'SUCCESS',
|
|
366
|
+
FAIL = 'FAIL',
|
|
367
|
+
PROCESSING = 'PROCESSING',
|
|
368
|
+
WAITING_APPROVAL = 'WAITING_APPROVAL',
|
|
369
|
+
WAITING_INPUT = 'WAITING_INPUT',
|
|
370
|
+
CANCELLED = 'CANCELLED'
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export interface ProviderTransactionError {
|
|
374
|
+
action: Action;
|
|
375
|
+
code: string;
|
|
376
|
+
providerCode: string;
|
|
377
|
+
text: string;
|
|
378
|
+
textTitle: string;
|
|
379
|
+
iconSelection: string;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export enum HttpVerb {
|
|
383
|
+
DELETE = 'DELETE',
|
|
384
|
+
GET = 'GET',
|
|
385
|
+
POST = 'POST',
|
|
386
|
+
PUT = 'PUT'
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export enum Action {
|
|
390
|
+
RESTART_PRESERVING_DETAILS = 'RESTART_PRESERVING_DETAILS',
|
|
391
|
+
RESTART_CLEARING_DETAILS = 'RESTART_CLEARING_DETAILS',
|
|
392
|
+
SHOW_DETAILS_STEP_PRESERVING_DETAILS = 'SHOW_DETAILS_STEP_PRESERVING_DETAILS',
|
|
393
|
+
SHOW_DETAILS_STEP_CLEARING_DETAILS = 'SHOW_DETAILS_STEP_CLEARING_DETAILS',
|
|
394
|
+
SHOW_CVC_EDIT = 'SHOW_CVC_EDIT',
|
|
395
|
+
DISMISS = 'DISMISS'
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface PendingWithdrawal {
|
|
399
|
+
amount: string;
|
|
400
|
+
creationDate: string;
|
|
401
|
+
state: WithdrawalState;
|
|
402
|
+
transactionId: string;
|
|
403
|
+
paymentGatewayId: string;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export enum WithdrawalState {
|
|
407
|
+
REQUESTED = 'REQUESTED',
|
|
408
|
+
PROCESSING = 'PROCESSING'
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export interface AvailableBonusWithPaymentMethods {
|
|
412
|
+
code: string;
|
|
413
|
+
paymentMethodFilter?: {
|
|
414
|
+
applyTo?: BonusPaymentMethod[];
|
|
415
|
+
excludeFrom?: BonusPaymentMethod[];
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export interface BonusPaymentMethod {
|
|
420
|
+
providerType: string;
|
|
421
|
+
service?: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export interface TrackingEvent {
|
|
425
|
+
eventId: string;
|
|
426
|
+
data: object;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export enum KycStatus {
|
|
430
|
+
VERIFIED = 'verified',
|
|
431
|
+
UNVERIFIED = 'unverified',
|
|
432
|
+
PROCESSING = 'processing'
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export interface UserData {
|
|
436
|
+
fullName?: string;
|
|
437
|
+
age?: number;
|
|
438
|
+
dayOfMonth?: number;
|
|
439
|
+
dayOfWeek?: string;
|
|
440
|
+
depositLimit?: number;
|
|
441
|
+
minimumDeposit?: number;
|
|
442
|
+
maximumDeposit?: number;
|
|
443
|
+
previousDeposit?: number;
|
|
444
|
+
timeOfDay?: string;
|
|
445
|
+
lifetimeDeposit?: number;
|
|
446
|
+
depositCount?: number;
|
|
447
|
+
daysSinceRegistration?: number;
|
|
448
|
+
kycStatus?: KycStatus;
|
|
449
|
+
affiliateId?: string;
|
|
450
|
+
tags?: string[];
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export interface TrackingEventData {
|
|
454
|
+
id: string;
|
|
455
|
+
event: string;
|
|
456
|
+
operatorId?: string;
|
|
457
|
+
timestamp?: string | number | Date;
|
|
458
|
+
activityId?: string;
|
|
459
|
+
originalActivityId?: string;
|
|
460
|
+
bonusesOffered?: boolean;
|
|
461
|
+
country?: string;
|
|
462
|
+
sessionId?: string;
|
|
463
|
+
userAgent?: string;
|
|
464
|
+
userId?: string;
|
|
465
|
+
|
|
466
|
+
[key: string]: unknown;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export type TrackingEventDataEnvelope = {
|
|
470
|
+
id: string;
|
|
471
|
+
environment: 'production' | 'staging' | 'demo';
|
|
472
|
+
body: TrackingEventData;
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
export interface Banner {
|
|
476
|
+
title: string;
|
|
477
|
+
body: string;
|
|
478
|
+
ctaLabel: string;
|
|
479
|
+
iconUrl: string;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export interface CampaignChatIcons {
|
|
483
|
+
amount?: string;
|
|
484
|
+
bonus?: string;
|
|
485
|
+
paymentMethod?: string;
|
|
486
|
+
paymentDetails?: string;
|
|
487
|
+
securePayment?: string;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export interface Campaign {
|
|
491
|
+
enableSuccessAnimation: boolean;
|
|
492
|
+
customChatIcons?: CampaignChatIcons;
|
|
493
|
+
}
|
package/lib/bonus.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface AvailableBonusWithPaymentMethods {
|
|
2
|
-
code: string;
|
|
3
|
-
paymentMethodFilter?: {
|
|
4
|
-
applyTo?: BonusPaymentMethod[];
|
|
5
|
-
excludeFrom?: BonusPaymentMethod[];
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
export interface BonusPaymentMethod {
|
|
9
|
-
providerType: string;
|
|
10
|
-
service?: string;
|
|
11
|
-
}
|
package/lib/bonus.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/payment-methods.d.ts
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import type { WindowRedirectType } from './transactions.js';
|
|
2
|
-
export declare enum PaymentType {
|
|
3
|
-
APPLE_PAY = "ApplePay",
|
|
4
|
-
BANK_TRANSFER = "BankTransfer",
|
|
5
|
-
CREDIT_CARD = "CreditCard",
|
|
6
|
-
CRYPTO = "Crypto",
|
|
7
|
-
EWALLET = "EWallet",
|
|
8
|
-
VOUCHER = "Voucher"
|
|
9
|
-
}
|
|
10
|
-
export interface TransactionStatusCheck {
|
|
11
|
-
url: string;
|
|
12
|
-
intervalSeconds: number;
|
|
13
|
-
}
|
|
14
|
-
export interface AllPaymentMethods {
|
|
15
|
-
recentPaymentMethods: RecentMethod[];
|
|
16
|
-
paymentMethods: PaymentMethod[];
|
|
17
|
-
}
|
|
18
|
-
export interface AllPaymentMethodsByTransactionType {
|
|
19
|
-
deposit: AllPaymentMethods;
|
|
20
|
-
withdrawal: AllPaymentMethods;
|
|
21
|
-
}
|
|
22
|
-
export interface PaymentMethod {
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
paymentGatewayId: string;
|
|
26
|
-
description: string;
|
|
27
|
-
termsAndConditions: string;
|
|
28
|
-
logo: PaymentMethodLogo;
|
|
29
|
-
logoLight?: PaymentMethodLogo;
|
|
30
|
-
minAmount: number;
|
|
31
|
-
maxAmount: number;
|
|
32
|
-
info: string;
|
|
33
|
-
paymentType: PaymentType;
|
|
34
|
-
inputFields?: InputField[];
|
|
35
|
-
storedMethodInputFields?: InputField[];
|
|
36
|
-
bonusCodes?: string[];
|
|
37
|
-
instructions?: string;
|
|
38
|
-
withdrawalInstructions?: string;
|
|
39
|
-
fees?: PaymentMethodFees;
|
|
40
|
-
windowRedirectType?: WindowRedirectType;
|
|
41
|
-
voucherAmounts?: number[];
|
|
42
|
-
depositHandledByHostSite?: boolean;
|
|
43
|
-
withdrawalHandledByHostSite?: boolean;
|
|
44
|
-
withdrawalInputsShownWhenMethodIsStored: boolean;
|
|
45
|
-
transactionStatusCheck?: TransactionStatusCheck;
|
|
46
|
-
finalTransactionResultCheckEnabled?: boolean;
|
|
47
|
-
encryptionSettings?: EncryptionSettings;
|
|
48
|
-
hostedFields?: HostedFieldsSettings;
|
|
49
|
-
}
|
|
50
|
-
export interface EncryptionSettings {
|
|
51
|
-
encryptionType: EncryptionType;
|
|
52
|
-
expiryDateEncryptionMode: ExpiryDateEncryptionMode;
|
|
53
|
-
encryptCardholderName: boolean;
|
|
54
|
-
}
|
|
55
|
-
export interface HostedFieldsSettings {
|
|
56
|
-
url: string;
|
|
57
|
-
}
|
|
58
|
-
export declare enum EncryptionType {
|
|
59
|
-
NO_ENCRYPTION = "NO_ENCRYPTION",
|
|
60
|
-
RSA_PKCS1 = "RSA_PKCS1",// RSA with PKCS#1 v1.5 padding (jsencrypt default)
|
|
61
|
-
RSA_OAEP = "RSA_OAEP",// RSA with OAEP padding (crypto/Web Crypto)
|
|
62
|
-
SHA384_SIGNATURE = "SHA384_SIGNATURE"
|
|
63
|
-
}
|
|
64
|
-
export declare enum ExpiryDateEncryptionMode {
|
|
65
|
-
NONE = "NONE",
|
|
66
|
-
SEPARATE_FIELDS = "SEPARATE_FIELDS",
|
|
67
|
-
SINGLE_FIELD = "SINGLE_FIELD"
|
|
68
|
-
}
|
|
69
|
-
export type PaymentMethodFees = {
|
|
70
|
-
fixed?: number;
|
|
71
|
-
percentage?: number;
|
|
72
|
-
applyToRange?: {
|
|
73
|
-
min?: number;
|
|
74
|
-
max?: number;
|
|
75
|
-
};
|
|
76
|
-
}[];
|
|
77
|
-
export interface PaymentMethodLogo {
|
|
78
|
-
height: number;
|
|
79
|
-
url: string;
|
|
80
|
-
width: number;
|
|
81
|
-
}
|
|
82
|
-
export interface InputField {
|
|
83
|
-
paramName: string;
|
|
84
|
-
format: string;
|
|
85
|
-
text: string;
|
|
86
|
-
placeholderText: string;
|
|
87
|
-
errorText: string;
|
|
88
|
-
optional: boolean;
|
|
89
|
-
options: InputFieldOption[];
|
|
90
|
-
prefillKey?: string;
|
|
91
|
-
removePrefixPlusSign?: boolean;
|
|
92
|
-
relatesTo?: string;
|
|
93
|
-
showForValues?: string[];
|
|
94
|
-
isPassword?: boolean;
|
|
95
|
-
}
|
|
96
|
-
export interface InputFieldOption {
|
|
97
|
-
label: string;
|
|
98
|
-
code: string;
|
|
99
|
-
relatesTo?: string;
|
|
100
|
-
showForValues?: string[];
|
|
101
|
-
}
|
|
102
|
-
export declare enum RecentMethodMaskedAccountFormat {
|
|
103
|
-
DEFAULT = "Default",
|
|
104
|
-
LAST_8_DIGITS = "Last8Digits",
|
|
105
|
-
FULL_VALUE = "FullValue",
|
|
106
|
-
NOTHING = "Nothing"
|
|
107
|
-
}
|
|
108
|
-
export interface RecentMethod extends PaymentMethod {
|
|
109
|
-
accountId: string;
|
|
110
|
-
maskedAccount: string;
|
|
111
|
-
lastSuccess?: string;
|
|
112
|
-
expiryDate?: string;
|
|
113
|
-
maskedAccountFormat?: RecentMethodMaskedAccountFormat;
|
|
114
|
-
}
|
package/lib/payment-methods.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export var PaymentType;
|
|
2
|
-
(function (PaymentType) {
|
|
3
|
-
PaymentType["APPLE_PAY"] = "ApplePay";
|
|
4
|
-
PaymentType["BANK_TRANSFER"] = "BankTransfer";
|
|
5
|
-
PaymentType["CREDIT_CARD"] = "CreditCard";
|
|
6
|
-
PaymentType["CRYPTO"] = "Crypto";
|
|
7
|
-
PaymentType["EWALLET"] = "EWallet";
|
|
8
|
-
PaymentType["VOUCHER"] = "Voucher";
|
|
9
|
-
})(PaymentType || (PaymentType = {}));
|
|
10
|
-
export var EncryptionType;
|
|
11
|
-
(function (EncryptionType) {
|
|
12
|
-
EncryptionType["NO_ENCRYPTION"] = "NO_ENCRYPTION";
|
|
13
|
-
EncryptionType["RSA_PKCS1"] = "RSA_PKCS1";
|
|
14
|
-
EncryptionType["RSA_OAEP"] = "RSA_OAEP";
|
|
15
|
-
EncryptionType["SHA384_SIGNATURE"] = "SHA384_SIGNATURE"; // SHA-384-based signature (headers)
|
|
16
|
-
})(EncryptionType || (EncryptionType = {}));
|
|
17
|
-
export var ExpiryDateEncryptionMode;
|
|
18
|
-
(function (ExpiryDateEncryptionMode) {
|
|
19
|
-
ExpiryDateEncryptionMode["NONE"] = "NONE";
|
|
20
|
-
ExpiryDateEncryptionMode["SEPARATE_FIELDS"] = "SEPARATE_FIELDS";
|
|
21
|
-
ExpiryDateEncryptionMode["SINGLE_FIELD"] = "SINGLE_FIELD";
|
|
22
|
-
})(ExpiryDateEncryptionMode || (ExpiryDateEncryptionMode = {}));
|
|
23
|
-
export var RecentMethodMaskedAccountFormat;
|
|
24
|
-
(function (RecentMethodMaskedAccountFormat) {
|
|
25
|
-
RecentMethodMaskedAccountFormat["DEFAULT"] = "Default";
|
|
26
|
-
RecentMethodMaskedAccountFormat["LAST_8_DIGITS"] = "Last8Digits";
|
|
27
|
-
RecentMethodMaskedAccountFormat["FULL_VALUE"] = "FullValue";
|
|
28
|
-
RecentMethodMaskedAccountFormat["NOTHING"] = "Nothing";
|
|
29
|
-
})(RecentMethodMaskedAccountFormat || (RecentMethodMaskedAccountFormat = {}));
|
package/lib/tracking.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface TrackingEvent {
|
|
2
|
-
eventId: string;
|
|
3
|
-
data: object;
|
|
4
|
-
}
|
|
5
|
-
export interface TrackingEventData {
|
|
6
|
-
id: string;
|
|
7
|
-
event: string;
|
|
8
|
-
operatorId?: string;
|
|
9
|
-
timestamp?: string | number | Date;
|
|
10
|
-
activityId?: string;
|
|
11
|
-
originalActivityId?: string;
|
|
12
|
-
bonusesOffered?: boolean;
|
|
13
|
-
country?: string;
|
|
14
|
-
sessionId?: string;
|
|
15
|
-
userAgent?: string;
|
|
16
|
-
userId?: string;
|
|
17
|
-
[key: string]: unknown;
|
|
18
|
-
}
|
|
19
|
-
export type TrackingEventDataEnvelope = {
|
|
20
|
-
id: string;
|
|
21
|
-
environment: 'production' | 'staging' | 'demo';
|
|
22
|
-
body: TrackingEventData;
|
|
23
|
-
};
|
package/lib/tracking.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|