@soltech/fluid-common 0.0.49
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/.gitattributes +2 -0
- package/README.md +2 -0
- package/index.d.ts +98 -0
- package/index.ts +11 -0
- package/package.json +18 -0
package/.gitattributes
ADDED
package/README.md
ADDED
package/index.d.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ContentType, TraitType } from './index';
|
|
2
|
+
|
|
3
|
+
export interface WalletRequestBody {
|
|
4
|
+
payload?: object | string;
|
|
5
|
+
payloadOptions?: TransactionOptions;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface WalletInitParams {
|
|
9
|
+
locale: string;
|
|
10
|
+
operatorId: number;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
userId: string | number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface WalletConfig {
|
|
16
|
+
contentText: Record<string, string>;
|
|
17
|
+
defaultDepositAmount: number;
|
|
18
|
+
logo: string;
|
|
19
|
+
theme: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface WalletConfigParams {
|
|
23
|
+
contentText: Record<string, ContentType>,
|
|
24
|
+
theme: Record<string, TraitType>
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface AllPaymentMethods {
|
|
28
|
+
recentPaymentMethods: RecentMethod[];
|
|
29
|
+
paymentMethods: PaymentMethod[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface PaymentMethod {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
termsAndConditions: string;
|
|
37
|
+
logo: string;
|
|
38
|
+
minAmount: number;
|
|
39
|
+
maxAmount: number;
|
|
40
|
+
info: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface RecentMethod {
|
|
44
|
+
accountId: string;
|
|
45
|
+
maskedAccount: string;
|
|
46
|
+
lastSuccess: string;
|
|
47
|
+
paymentMethod: PaymentMethod; //TODO extend PaymentMethod instead
|
|
48
|
+
}
|
|
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
|
+
|
|
59
|
+
export interface CreditcardTransactionParams extends TransactionParams {
|
|
60
|
+
cardHolder?: string;
|
|
61
|
+
cardNumber?: string;
|
|
62
|
+
cvc: string;
|
|
63
|
+
expiryMonth?: string;
|
|
64
|
+
expiryYear?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface BankTransferTransactionParams extends TransactionParams {
|
|
68
|
+
accountNumber?: string;
|
|
69
|
+
bankName?: string;
|
|
70
|
+
bic?: string;
|
|
71
|
+
branchAddress?: string;
|
|
72
|
+
branchName?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface DigitalWalletTransactionParams extends TransactionParams {
|
|
76
|
+
email?: string;
|
|
77
|
+
phoneNumber?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface TransactionOptions {
|
|
81
|
+
bonusCode?: string;
|
|
82
|
+
userAgent?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface TransactionResult {
|
|
86
|
+
redirectOutput?: RedirectOutput;
|
|
87
|
+
status: string;
|
|
88
|
+
transactionId: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface RedirectOutput {
|
|
92
|
+
container: string;
|
|
93
|
+
parameters?: Record<string, string>;
|
|
94
|
+
height?: number;
|
|
95
|
+
width?: number;
|
|
96
|
+
url: string;
|
|
97
|
+
}
|
|
98
|
+
|
package/index.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@soltech/fluid-common",
|
|
3
|
+
"version": "0.0.49",
|
|
4
|
+
"description": "Cashin wallet and api common interfaces",
|
|
5
|
+
"types:": "index.d.ts",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"main": "index.ts",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/soltechno/cashin-common.git"
|
|
11
|
+
},
|
|
12
|
+
"author": "Sol Technologies",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/soltechno/cashin-common/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/soltechno/cashin-common#readme"
|
|
18
|
+
}
|