@soltech/fluid-common 1.10.0-beta.0 → 1.10.0-sc23736.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.
@@ -0,0 +1,29 @@
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 = {}));
@@ -0,0 +1,23 @@
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
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,98 @@
1
+ import type { UserData } from './user.js';
2
+ export declare enum WindowRedirectType {
3
+ POPUP_WINDOW = "popupWindow",
4
+ BROWSER_TAB = "browserTab",
5
+ NONE = "none"
6
+ }
7
+ export interface TransactionParams {
8
+ accountId?: string;
9
+ amount: number;
10
+ paymentMethodId: string;
11
+ }
12
+ export interface CreditcardTransactionParams extends TransactionParams {
13
+ cardHolder?: string;
14
+ cardNumber?: string;
15
+ cvc: string;
16
+ expiryMonth?: string;
17
+ expiryYear?: string;
18
+ expiryDate?: string;
19
+ }
20
+ /**
21
+ * Transaction params for any payment method whose payload is keyed dynamically:
22
+ * - CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
23
+ * - Native flows like Apple Pay where the gateway-bound `token` is the only
24
+ * extra key beyond the base TransactionParams.
25
+ * Field keys typically come from `PaymentMethod.inputFields[].paramName`.
26
+ */
27
+ export interface DynamicTransactionParams extends TransactionParams {
28
+ [key: string]: string | number | undefined;
29
+ }
30
+ export interface TransactionOptions {
31
+ bonusCode?: string;
32
+ activityId?: string;
33
+ originalActivityId?: string;
34
+ userData?: UserData;
35
+ trackingData?: object;
36
+ transactionAttributes?: Record<string, string>;
37
+ }
38
+ export interface TransactionResult {
39
+ error?: ProviderTransactionError;
40
+ redirectOutput?: RedirectOutput;
41
+ state: TransactionState;
42
+ statusCode: string;
43
+ transactionId: string;
44
+ pspStatusCode?: string;
45
+ details?: Record<string, unknown>;
46
+ }
47
+ export interface RedirectOutput {
48
+ container: RedirectContainer;
49
+ height?: number;
50
+ html?: string;
51
+ method?: HttpVerb;
52
+ parameters?: Record<string, string>;
53
+ sizeUnit?: string;
54
+ url: string;
55
+ width?: number;
56
+ }
57
+ export type RedirectContainer = 'iframe' | 'window' | 'redirect';
58
+ export declare enum TransactionState {
59
+ SUCCESS = "SUCCESS",
60
+ FAIL = "FAIL",
61
+ PROCESSING = "PROCESSING",
62
+ WAITING_APPROVAL = "WAITING_APPROVAL",
63
+ WAITING_INPUT = "WAITING_INPUT",
64
+ CANCELLED = "CANCELLED"
65
+ }
66
+ export interface ProviderTransactionError {
67
+ action: Action;
68
+ code: string;
69
+ providerCode: string;
70
+ text: string;
71
+ textTitle: string;
72
+ iconSelection: string;
73
+ }
74
+ export declare enum HttpVerb {
75
+ DELETE = "DELETE",
76
+ GET = "GET",
77
+ POST = "POST",
78
+ PUT = "PUT"
79
+ }
80
+ export declare enum Action {
81
+ RESTART_PRESERVING_DETAILS = "RESTART_PRESERVING_DETAILS",
82
+ RESTART_CLEARING_DETAILS = "RESTART_CLEARING_DETAILS",
83
+ SHOW_DETAILS_STEP_PRESERVING_DETAILS = "SHOW_DETAILS_STEP_PRESERVING_DETAILS",
84
+ SHOW_DETAILS_STEP_CLEARING_DETAILS = "SHOW_DETAILS_STEP_CLEARING_DETAILS",
85
+ SHOW_CVC_EDIT = "SHOW_CVC_EDIT",
86
+ DISMISS = "DISMISS"
87
+ }
88
+ export interface PendingWithdrawal {
89
+ amount: string;
90
+ creationDate: string;
91
+ state: WithdrawalState;
92
+ transactionId: string;
93
+ paymentGatewayId: string;
94
+ }
95
+ export declare enum WithdrawalState {
96
+ REQUESTED = "REQUESTED",
97
+ PROCESSING = "PROCESSING"
98
+ }
@@ -0,0 +1,36 @@
1
+ export var WindowRedirectType;
2
+ (function (WindowRedirectType) {
3
+ WindowRedirectType["POPUP_WINDOW"] = "popupWindow";
4
+ WindowRedirectType["BROWSER_TAB"] = "browserTab";
5
+ WindowRedirectType["NONE"] = "none";
6
+ })(WindowRedirectType || (WindowRedirectType = {}));
7
+ export var TransactionState;
8
+ (function (TransactionState) {
9
+ TransactionState["SUCCESS"] = "SUCCESS";
10
+ TransactionState["FAIL"] = "FAIL";
11
+ TransactionState["PROCESSING"] = "PROCESSING";
12
+ TransactionState["WAITING_APPROVAL"] = "WAITING_APPROVAL";
13
+ TransactionState["WAITING_INPUT"] = "WAITING_INPUT";
14
+ TransactionState["CANCELLED"] = "CANCELLED";
15
+ })(TransactionState || (TransactionState = {}));
16
+ export var HttpVerb;
17
+ (function (HttpVerb) {
18
+ HttpVerb["DELETE"] = "DELETE";
19
+ HttpVerb["GET"] = "GET";
20
+ HttpVerb["POST"] = "POST";
21
+ HttpVerb["PUT"] = "PUT";
22
+ })(HttpVerb || (HttpVerb = {}));
23
+ export var Action;
24
+ (function (Action) {
25
+ Action["RESTART_PRESERVING_DETAILS"] = "RESTART_PRESERVING_DETAILS";
26
+ Action["RESTART_CLEARING_DETAILS"] = "RESTART_CLEARING_DETAILS";
27
+ Action["SHOW_DETAILS_STEP_PRESERVING_DETAILS"] = "SHOW_DETAILS_STEP_PRESERVING_DETAILS";
28
+ Action["SHOW_DETAILS_STEP_CLEARING_DETAILS"] = "SHOW_DETAILS_STEP_CLEARING_DETAILS";
29
+ Action["SHOW_CVC_EDIT"] = "SHOW_CVC_EDIT";
30
+ Action["DISMISS"] = "DISMISS";
31
+ })(Action || (Action = {}));
32
+ export var WithdrawalState;
33
+ (function (WithdrawalState) {
34
+ WithdrawalState["REQUESTED"] = "REQUESTED";
35
+ WithdrawalState["PROCESSING"] = "PROCESSING";
36
+ })(WithdrawalState || (WithdrawalState = {}));
package/lib/user.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ export declare enum KycStatus {
2
+ VERIFIED = "verified",
3
+ UNVERIFIED = "unverified",
4
+ PROCESSING = "processing"
5
+ }
6
+ export interface UserData {
7
+ fullName?: string;
8
+ age?: number;
9
+ dayOfMonth?: number;
10
+ dayOfWeek?: string;
11
+ depositLimit?: number;
12
+ minimumDeposit?: number;
13
+ maximumDeposit?: number;
14
+ previousDeposit?: number;
15
+ timeOfDay?: string;
16
+ lifetimeDeposit?: number;
17
+ depositCount?: number;
18
+ daysSinceRegistration?: number;
19
+ kycStatus?: KycStatus;
20
+ affiliateId?: string;
21
+ tags?: string[];
22
+ }
package/lib/user.js ADDED
@@ -0,0 +1,6 @@
1
+ export var KycStatus;
2
+ (function (KycStatus) {
3
+ KycStatus["VERIFIED"] = "verified";
4
+ KycStatus["UNVERIFIED"] = "unverified";
5
+ KycStatus["PROCESSING"] = "processing";
6
+ })(KycStatus || (KycStatus = {}));