@soltech/fluid-common 0.0.49 → 0.0.51
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 +91 -0
- package/lib/index.js +1 -0
- package/package.json +11 -9
- package/{index.d.ts → src/index.ts} +11 -1
- package/tsconfig.json +22 -0
- package/index.ts +0 -11
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare const enum ContentType {
|
|
2
|
+
PLAIN_TEXT = "PLAIN_TEXT",
|
|
3
|
+
HTML = "HTML"
|
|
4
|
+
}
|
|
5
|
+
export declare const enum TraitType {
|
|
6
|
+
COLOR = "COLOR",
|
|
7
|
+
IMAGE = "IMAGE",
|
|
8
|
+
TEXT = "TEXT"
|
|
9
|
+
}
|
|
10
|
+
export interface WalletRequestBody {
|
|
11
|
+
payload?: object | string;
|
|
12
|
+
payloadOptions?: TransactionOptions;
|
|
13
|
+
}
|
|
14
|
+
export interface WalletInitParams {
|
|
15
|
+
locale: string;
|
|
16
|
+
operatorId: number;
|
|
17
|
+
sessionId: string;
|
|
18
|
+
userId: string | number;
|
|
19
|
+
}
|
|
20
|
+
export interface WalletConfig {
|
|
21
|
+
contentText: Record<string, string>;
|
|
22
|
+
defaultDepositAmount: number;
|
|
23
|
+
logo: string;
|
|
24
|
+
theme: Record<string, string>;
|
|
25
|
+
}
|
|
26
|
+
export interface WalletConfigParams {
|
|
27
|
+
contentText: Record<string, ContentType>;
|
|
28
|
+
theme: Record<string, TraitType>;
|
|
29
|
+
}
|
|
30
|
+
export interface AllPaymentMethods {
|
|
31
|
+
recentPaymentMethods: RecentMethod[];
|
|
32
|
+
paymentMethods: PaymentMethod[];
|
|
33
|
+
}
|
|
34
|
+
export interface PaymentMethod {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description: string;
|
|
38
|
+
termsAndConditions: string;
|
|
39
|
+
logo: string;
|
|
40
|
+
minAmount: number;
|
|
41
|
+
maxAmount: number;
|
|
42
|
+
info: string;
|
|
43
|
+
}
|
|
44
|
+
export interface RecentMethod {
|
|
45
|
+
accountId: string;
|
|
46
|
+
maskedAccount: string;
|
|
47
|
+
lastSuccess: string;
|
|
48
|
+
paymentMethod: PaymentMethod;
|
|
49
|
+
}
|
|
50
|
+
export interface TransactionParams {
|
|
51
|
+
accountId?: string;
|
|
52
|
+
amount: number;
|
|
53
|
+
paymentType: string;
|
|
54
|
+
preventCancelWithdrawal?: boolean;
|
|
55
|
+
service?: string;
|
|
56
|
+
storeAccount?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface CreditcardTransactionParams extends TransactionParams {
|
|
59
|
+
cardHolder?: string;
|
|
60
|
+
cardNumber?: string;
|
|
61
|
+
cvc: string;
|
|
62
|
+
expiryMonth?: string;
|
|
63
|
+
expiryYear?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface BankTransferTransactionParams extends TransactionParams {
|
|
66
|
+
accountNumber?: string;
|
|
67
|
+
bankName?: string;
|
|
68
|
+
bic?: string;
|
|
69
|
+
branchAddress?: string;
|
|
70
|
+
branchName?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface DigitalWalletTransactionParams extends TransactionParams {
|
|
73
|
+
email?: string;
|
|
74
|
+
phoneNumber?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface TransactionOptions {
|
|
77
|
+
bonusCode?: string;
|
|
78
|
+
userAgent?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface TransactionResult {
|
|
81
|
+
redirectOutput?: RedirectOutput;
|
|
82
|
+
status: string;
|
|
83
|
+
transactionId: string;
|
|
84
|
+
}
|
|
85
|
+
export interface RedirectOutput {
|
|
86
|
+
container: string;
|
|
87
|
+
parameters?: Record<string, string>;
|
|
88
|
+
height?: number;
|
|
89
|
+
width?: number;
|
|
90
|
+
url: string;
|
|
91
|
+
}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soltech/fluid-common",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"types": "
|
|
7
|
-
"
|
|
3
|
+
"version": "0.0.51",
|
|
4
|
+
"description": "Fluid frontend and API commons",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types:": "lib/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"prepublishOnly": "npm run build"
|
|
10
|
+
},
|
|
8
11
|
"repository": {
|
|
9
12
|
"type": "git",
|
|
10
13
|
"url": "git+https://github.com/soltechno/cashin-common.git"
|
|
11
14
|
},
|
|
12
15
|
"author": "Sol Technologies",
|
|
13
16
|
"license": "ISC",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
}
|
|
17
|
-
"homepage": "https://github.com/soltechno/cashin-common#readme"
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"typescript": "^5.0.4"
|
|
19
|
+
}
|
|
18
20
|
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
export const enum ContentType {
|
|
3
|
+
PLAIN_TEXT = 'PLAIN_TEXT',
|
|
4
|
+
HTML = 'HTML'
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const enum TraitType {
|
|
8
|
+
COLOR = 'COLOR',
|
|
9
|
+
IMAGE = 'IMAGE',
|
|
10
|
+
TEXT = 'TEXT'
|
|
11
|
+
}
|
|
2
12
|
|
|
3
13
|
export interface WalletRequestBody {
|
|
4
14
|
payload?: object | string;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "./lib",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"strict": true,
|
|
6
|
+
"target": "ESNext",
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"useDefineForClassFields": true,
|
|
9
|
+
"lib": [
|
|
10
|
+
"DOM",
|
|
11
|
+
"ES2020",
|
|
12
|
+
],
|
|
13
|
+
"baseUrl": ".",
|
|
14
|
+
"allowJs": true,
|
|
15
|
+
"checkJs": true,
|
|
16
|
+
"esModuleInterop": true,
|
|
17
|
+
},
|
|
18
|
+
"include": [
|
|
19
|
+
"src/**/*.d.ts",
|
|
20
|
+
"src/**/*",
|
|
21
|
+
]
|
|
22
|
+
}
|