@soltech/fluid-common 1.10.0-beta.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 +447 -7
- package/lib/index.js +97 -7
- package/package.json +1 -1
- package/src/index.ts +512 -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/payment-methods.ts
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import type { WindowRedirectType } from './transactions.js';
|
|
2
|
-
|
|
3
|
-
export enum PaymentType {
|
|
4
|
-
APPLE_PAY = 'ApplePay',
|
|
5
|
-
BANK_TRANSFER = 'BankTransfer',
|
|
6
|
-
CREDIT_CARD = 'CreditCard',
|
|
7
|
-
CRYPTO = 'Crypto',
|
|
8
|
-
EWALLET = 'EWallet',
|
|
9
|
-
VOUCHER = 'Voucher'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface TransactionStatusCheck {
|
|
13
|
-
url: string;
|
|
14
|
-
intervalSeconds: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface AllPaymentMethods {
|
|
18
|
-
recentPaymentMethods: RecentMethod[];
|
|
19
|
-
paymentMethods: PaymentMethod[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface AllPaymentMethodsByTransactionType {
|
|
23
|
-
deposit: AllPaymentMethods,
|
|
24
|
-
withdrawal: AllPaymentMethods
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface PaymentMethod {
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
paymentGatewayId: string;
|
|
31
|
-
description: string;
|
|
32
|
-
termsAndConditions: string;
|
|
33
|
-
logo: PaymentMethodLogo;
|
|
34
|
-
logoLight?: PaymentMethodLogo;
|
|
35
|
-
minAmount: number;
|
|
36
|
-
maxAmount: number;
|
|
37
|
-
info: string;
|
|
38
|
-
paymentType: PaymentType;
|
|
39
|
-
inputFields?: InputField[];
|
|
40
|
-
storedMethodInputFields?: InputField[];
|
|
41
|
-
bonusCodes?: string[];
|
|
42
|
-
instructions?: string;
|
|
43
|
-
withdrawalInstructions?: string;
|
|
44
|
-
fees?: PaymentMethodFees;
|
|
45
|
-
windowRedirectType?: WindowRedirectType;
|
|
46
|
-
voucherAmounts?: number[];
|
|
47
|
-
depositHandledByHostSite?: boolean;
|
|
48
|
-
withdrawalHandledByHostSite?: boolean;
|
|
49
|
-
withdrawalInputsShownWhenMethodIsStored: boolean;
|
|
50
|
-
transactionStatusCheck?: TransactionStatusCheck;
|
|
51
|
-
finalTransactionResultCheckEnabled?: boolean;
|
|
52
|
-
encryptionSettings?: EncryptionSettings;
|
|
53
|
-
hostedFields?: HostedFieldsSettings;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface EncryptionSettings {
|
|
57
|
-
encryptionType: EncryptionType;
|
|
58
|
-
expiryDateEncryptionMode: ExpiryDateEncryptionMode;
|
|
59
|
-
encryptCardholderName: boolean;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface HostedFieldsSettings {
|
|
63
|
-
url: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export enum EncryptionType {
|
|
67
|
-
NO_ENCRYPTION = 'NO_ENCRYPTION',
|
|
68
|
-
RSA_PKCS1 = 'RSA_PKCS1', // RSA with PKCS#1 v1.5 padding (jsencrypt default)
|
|
69
|
-
RSA_OAEP = 'RSA_OAEP', // RSA with OAEP padding (crypto/Web Crypto)
|
|
70
|
-
SHA384_SIGNATURE = 'SHA384_SIGNATURE' // SHA-384-based signature (headers)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export enum ExpiryDateEncryptionMode {
|
|
74
|
-
NONE = 'NONE',
|
|
75
|
-
SEPARATE_FIELDS = 'SEPARATE_FIELDS',
|
|
76
|
-
SINGLE_FIELD = 'SINGLE_FIELD'
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export type PaymentMethodFees = {
|
|
80
|
-
fixed?: number;
|
|
81
|
-
percentage?: number;
|
|
82
|
-
applyToRange?: {
|
|
83
|
-
min?: number;
|
|
84
|
-
max?: number;
|
|
85
|
-
}
|
|
86
|
-
}[];
|
|
87
|
-
|
|
88
|
-
export interface PaymentMethodLogo {
|
|
89
|
-
height: number;
|
|
90
|
-
url: string;
|
|
91
|
-
width: number;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface InputField {
|
|
95
|
-
paramName: string;
|
|
96
|
-
format: string;
|
|
97
|
-
text: string;
|
|
98
|
-
placeholderText: string;
|
|
99
|
-
errorText: string;
|
|
100
|
-
optional: boolean;
|
|
101
|
-
options: InputFieldOption[];
|
|
102
|
-
prefillKey?: string;
|
|
103
|
-
removePrefixPlusSign?: boolean;
|
|
104
|
-
relatesTo?: string;
|
|
105
|
-
showForValues?: string[];
|
|
106
|
-
isPassword?: boolean;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface InputFieldOption {
|
|
110
|
-
label: string;
|
|
111
|
-
code: string;
|
|
112
|
-
relatesTo?: string;
|
|
113
|
-
showForValues?: string[];
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export enum RecentMethodMaskedAccountFormat {
|
|
117
|
-
DEFAULT = 'Default',
|
|
118
|
-
LAST_8_DIGITS = 'Last8Digits',
|
|
119
|
-
FULL_VALUE = 'FullValue',
|
|
120
|
-
NOTHING = 'Nothing'
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export interface RecentMethod extends PaymentMethod {
|
|
124
|
-
accountId: string;
|
|
125
|
-
maskedAccount: string;
|
|
126
|
-
lastSuccess?: string;
|
|
127
|
-
expiryDate?: string;
|
|
128
|
-
maskedAccountFormat?: RecentMethodMaskedAccountFormat;
|
|
129
|
-
}
|
package/src/tracking.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface TrackingEvent {
|
|
2
|
-
eventId: string;
|
|
3
|
-
data: object;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface TrackingEventData {
|
|
7
|
-
id: string;
|
|
8
|
-
event: string;
|
|
9
|
-
operatorId?: string;
|
|
10
|
-
timestamp?: string | number | Date;
|
|
11
|
-
activityId?: string;
|
|
12
|
-
originalActivityId?: string;
|
|
13
|
-
bonusesOffered?: boolean;
|
|
14
|
-
country?: string;
|
|
15
|
-
sessionId?: string;
|
|
16
|
-
userAgent?: string;
|
|
17
|
-
userId?: string;
|
|
18
|
-
|
|
19
|
-
[key: string]: unknown;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type TrackingEventDataEnvelope = {
|
|
23
|
-
id: string;
|
|
24
|
-
environment: 'production' | 'staging' | 'demo';
|
|
25
|
-
body: TrackingEventData;
|
|
26
|
-
};
|
package/src/transactions.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import type { UserData } from './user.js';
|
|
2
|
-
|
|
3
|
-
export enum WindowRedirectType {
|
|
4
|
-
POPUP_WINDOW = 'popupWindow',
|
|
5
|
-
BROWSER_TAB = 'browserTab',
|
|
6
|
-
NONE = 'none'
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface TransactionParams {
|
|
10
|
-
accountId?: string;
|
|
11
|
-
amount: number;
|
|
12
|
-
paymentMethodId: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface CreditcardTransactionParams extends TransactionParams {
|
|
16
|
-
cardHolder?: string;
|
|
17
|
-
cardNumber?: string;
|
|
18
|
-
cvc: string;
|
|
19
|
-
expiryMonth?: string;
|
|
20
|
-
expiryYear?: string;
|
|
21
|
-
expiryDate?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Transaction params for any payment method whose payload is keyed dynamically:
|
|
25
|
-
* - CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
|
|
26
|
-
* - Native flows like Apple Pay where the gateway-bound `token` is the only
|
|
27
|
-
* extra key beyond the base TransactionParams.
|
|
28
|
-
* Field keys typically come from `PaymentMethod.inputFields[].paramName`.
|
|
29
|
-
*/
|
|
30
|
-
export interface DynamicTransactionParams extends TransactionParams {
|
|
31
|
-
[key: string]: string | number | undefined;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface TransactionOptions {
|
|
35
|
-
bonusCode?: string;
|
|
36
|
-
activityId?: string;
|
|
37
|
-
originalActivityId?: string;
|
|
38
|
-
userData?: UserData;
|
|
39
|
-
trackingData?: object;
|
|
40
|
-
transactionAttributes?: Record<string, string>;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface TransactionResult {
|
|
44
|
-
error?: ProviderTransactionError;
|
|
45
|
-
redirectOutput?: RedirectOutput;
|
|
46
|
-
state: TransactionState;
|
|
47
|
-
statusCode: string;
|
|
48
|
-
transactionId: string;
|
|
49
|
-
pspStatusCode?: string;
|
|
50
|
-
details?: Record<string, unknown>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface RedirectOutput {
|
|
54
|
-
container: RedirectContainer;
|
|
55
|
-
height?: number;
|
|
56
|
-
html?: string;
|
|
57
|
-
method?: HttpVerb;
|
|
58
|
-
parameters?: Record<string, string>;
|
|
59
|
-
sizeUnit?: string;
|
|
60
|
-
url: string;
|
|
61
|
-
width?: number;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export type RedirectContainer = 'iframe' | 'window' | 'redirect';
|
|
65
|
-
|
|
66
|
-
export enum TransactionState {
|
|
67
|
-
SUCCESS = 'SUCCESS',
|
|
68
|
-
FAIL = 'FAIL',
|
|
69
|
-
PROCESSING = 'PROCESSING',
|
|
70
|
-
WAITING_APPROVAL = 'WAITING_APPROVAL',
|
|
71
|
-
WAITING_INPUT = 'WAITING_INPUT',
|
|
72
|
-
CANCELLED = 'CANCELLED'
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface ProviderTransactionError {
|
|
76
|
-
action: Action;
|
|
77
|
-
code: string;
|
|
78
|
-
providerCode: string;
|
|
79
|
-
text: string;
|
|
80
|
-
textTitle: string;
|
|
81
|
-
iconSelection: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export enum HttpVerb {
|
|
85
|
-
DELETE = 'DELETE',
|
|
86
|
-
GET = 'GET',
|
|
87
|
-
POST = 'POST',
|
|
88
|
-
PUT = 'PUT'
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export enum Action {
|
|
92
|
-
RESTART_PRESERVING_DETAILS = 'RESTART_PRESERVING_DETAILS',
|
|
93
|
-
RESTART_CLEARING_DETAILS = 'RESTART_CLEARING_DETAILS',
|
|
94
|
-
SHOW_DETAILS_STEP_PRESERVING_DETAILS = 'SHOW_DETAILS_STEP_PRESERVING_DETAILS',
|
|
95
|
-
SHOW_DETAILS_STEP_CLEARING_DETAILS = 'SHOW_DETAILS_STEP_CLEARING_DETAILS',
|
|
96
|
-
SHOW_CVC_EDIT = 'SHOW_CVC_EDIT',
|
|
97
|
-
DISMISS = 'DISMISS'
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface PendingWithdrawal {
|
|
101
|
-
amount: string;
|
|
102
|
-
creationDate: string;
|
|
103
|
-
state: WithdrawalState;
|
|
104
|
-
transactionId: string;
|
|
105
|
-
paymentGatewayId: string;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export enum WithdrawalState {
|
|
109
|
-
REQUESTED = 'REQUESTED',
|
|
110
|
-
PROCESSING = 'PROCESSING'
|
|
111
|
-
}
|
package/src/user.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export enum KycStatus {
|
|
2
|
-
VERIFIED = 'verified',
|
|
3
|
-
UNVERIFIED = 'unverified',
|
|
4
|
-
PROCESSING = 'processing'
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface UserData {
|
|
8
|
-
fullName?: string;
|
|
9
|
-
age?: number;
|
|
10
|
-
dayOfMonth?: number;
|
|
11
|
-
dayOfWeek?: string;
|
|
12
|
-
depositLimit?: number;
|
|
13
|
-
minimumDeposit?: number;
|
|
14
|
-
maximumDeposit?: number;
|
|
15
|
-
previousDeposit?: number;
|
|
16
|
-
timeOfDay?: string;
|
|
17
|
-
lifetimeDeposit?: number;
|
|
18
|
-
depositCount?: number;
|
|
19
|
-
daysSinceRegistration?: number;
|
|
20
|
-
kycStatus?: KycStatus;
|
|
21
|
-
affiliateId?: string;
|
|
22
|
-
tags?: string[];
|
|
23
|
-
}
|