@soltech/fluid-common 0.0.50 → 0.0.52
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 +11 -0
- package/package.json +11 -7
- package/{index.d.ts → src/index.ts} +2 -4
- package/tsconfig.json +22 -0
- package/index.ts +0 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare enum ContentType {
|
|
2
|
+
PLAIN_TEXT = "PLAIN_TEXT",
|
|
3
|
+
HTML = "HTML"
|
|
4
|
+
}
|
|
5
|
+
export declare 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,11 @@
|
|
|
1
|
+
export var ContentType;
|
|
2
|
+
(function (ContentType) {
|
|
3
|
+
ContentType["PLAIN_TEXT"] = "PLAIN_TEXT";
|
|
4
|
+
ContentType["HTML"] = "HTML";
|
|
5
|
+
})(ContentType || (ContentType = {}));
|
|
6
|
+
export var TraitType;
|
|
7
|
+
(function (TraitType) {
|
|
8
|
+
TraitType["COLOR"] = "COLOR";
|
|
9
|
+
TraitType["IMAGE"] = "IMAGE";
|
|
10
|
+
TraitType["TEXT"] = "TEXT";
|
|
11
|
+
})(TraitType || (TraitType = {}));
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soltech/fluid-common",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.52",
|
|
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
|
+
},
|
|
6
11
|
"repository": {
|
|
7
12
|
"type": "git",
|
|
8
13
|
"url": "git+https://github.com/soltechno/cashin-common.git"
|
|
9
14
|
},
|
|
10
15
|
"author": "Sol Technologies",
|
|
11
16
|
"license": "ISC",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
}
|
|
15
|
-
"homepage": "https://github.com/soltechno/cashin-common#readme"
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"typescript": "^5.0.4"
|
|
19
|
+
}
|
|
16
20
|
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
export
|
|
2
|
+
export enum ContentType {
|
|
3
3
|
PLAIN_TEXT = 'PLAIN_TEXT',
|
|
4
4
|
HTML = 'HTML'
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export enum TraitType {
|
|
8
8
|
COLOR = 'COLOR',
|
|
9
9
|
IMAGE = 'IMAGE',
|
|
10
10
|
TEXT = 'TEXT'
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
13
|
export interface WalletRequestBody {
|
|
16
14
|
payload?: object | string;
|
|
17
15
|
payloadOptions?: TransactionOptions;
|
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
|
+
}
|
package/index.ts
DELETED
|
File without changes
|