@miden-npm/vue 0.1.0 → 2.0.0
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/dist/assets/fonts/EuclidCircularARegular.ttf +0 -0
- package/dist/index.cjs.js +14 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10303 -1145
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +14 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -0
- package/dist/styles.css +1 -0
- package/dist/types/apis/checkout.api.d.ts +8 -2
- package/dist/types/apis/encrypt.api.d.ts +4 -0
- package/dist/types/apis/index.d.ts +2 -0
- package/dist/types/apis/resources.api.d.ts +4 -0
- package/dist/types/buzapay-checkout/checkout-button.vue.d.ts +3 -1
- package/dist/types/buzapay-checkout/checkout-card.vue.d.ts +8 -10
- package/dist/types/buzapay-checkout/checkout-iframe.vue.d.ts +3 -1
- package/dist/types/components/base/button.vue.d.ts +2 -0
- package/dist/types/components/base/card.vue.d.ts +5 -1
- package/dist/types/components/base/circle-countdown.vue.d.ts +17 -0
- package/dist/types/components/base/index.d.ts +1 -0
- package/dist/types/components/base/input.vue.d.ts +4 -2
- package/dist/types/components/base/label-info.vue.d.ts +1 -1
- package/dist/types/components/base/radio-group.vue.d.ts +2 -0
- package/dist/types/components/base/select.vue.d.ts +1 -1
- package/dist/types/components/base/success.vue.d.ts +13 -1
- package/dist/types/components/icons/icon-cards.vue.d.ts +11 -0
- package/dist/types/components/icons/icon-close.vue.d.ts +11 -0
- package/dist/types/components/icons/icon-coin.vue.d.ts +11 -0
- package/dist/types/components/icons/icon-courthouse.vue.d.ts +11 -0
- package/dist/types/components/icons/icon-lock.vue.d.ts +11 -0
- package/dist/types/components/icons/icon-miden-logo.vue.d.ts +9 -0
- package/dist/types/components/icons/icon-qr-code.vue.d.ts +4 -0
- package/dist/types/components/icons/index.d.ts +9 -0
- package/dist/types/components/pay-by-card.vue.d.ts +15 -3
- package/dist/types/components/pay-by-stable-coin.vue.d.ts +10 -7
- package/dist/types/components/pay-by-transfer.vue.d.ts +11 -19
- package/dist/types/index.d.ts +4 -0
- package/dist/types/miden-checkout/checkout-button.vue.d.ts +17 -0
- package/dist/types/miden-checkout/checkout-card.vue.d.ts +25 -0
- package/dist/types/miden-checkout/checkout-iframe.vue.d.ts +25 -0
- package/dist/types/types/checkout.type.d.ts +105 -0
- package/dist/types/types/resource.type.d.ts +13 -0
- package/dist/types/utils/api.util.d.ts +1 -1
- package/dist/types/utils/card-scheme.util.d.ts +23 -0
- package/dist/types/utils/error.util.d.ts +6 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/object.util.d.ts +1 -0
- package/package.json +18 -6
|
@@ -1,8 +1,113 @@
|
|
|
1
1
|
export interface IPaymentObject {
|
|
2
|
+
merchantName: string;
|
|
2
3
|
amount: number;
|
|
3
4
|
currency: string;
|
|
4
5
|
email: string;
|
|
5
6
|
phoneNumber: string;
|
|
6
7
|
narration: string;
|
|
8
|
+
redirectUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ICardDetails {
|
|
11
|
+
pan: string;
|
|
12
|
+
expiryDate: string;
|
|
13
|
+
cvv: string;
|
|
14
|
+
cardScheme: string;
|
|
15
|
+
nameOnCard: string;
|
|
16
|
+
cardType?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IBillingDetails {
|
|
19
|
+
address1: string;
|
|
20
|
+
address2?: string;
|
|
21
|
+
postalCode: string;
|
|
22
|
+
state: string;
|
|
23
|
+
city: string;
|
|
24
|
+
country: string;
|
|
25
|
+
emailAddress: string;
|
|
26
|
+
phoneNumber: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ISuccessObject {
|
|
29
|
+
paymentDate: string | null;
|
|
30
|
+
paymentId: string;
|
|
31
|
+
paymentStatus: string;
|
|
32
|
+
message?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IAuthorizeCardPaymentPayload {
|
|
35
|
+
customerId: string;
|
|
36
|
+
amount: string;
|
|
37
|
+
currency: string;
|
|
38
|
+
narration: string;
|
|
39
|
+
encryptedCardDetails: string;
|
|
40
|
+
billingDetails: IBillingDetails;
|
|
7
41
|
redirectUrl: string;
|
|
42
|
+
paymentReference: string;
|
|
43
|
+
isCheckout: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface ISuccessObject {
|
|
46
|
+
paymentDate: string | null;
|
|
47
|
+
paymentId: string;
|
|
48
|
+
paymentStatus: string;
|
|
49
|
+
message?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface IErrorObject {
|
|
52
|
+
errorMessage: string;
|
|
53
|
+
}
|
|
54
|
+
export interface IPaymentReferenceDetail {
|
|
55
|
+
id: string;
|
|
56
|
+
transactionReference: string;
|
|
57
|
+
customerName: string | null;
|
|
58
|
+
merchantName: string;
|
|
59
|
+
email: string | null;
|
|
60
|
+
phoneNumber: string | null;
|
|
61
|
+
amount: number;
|
|
62
|
+
currency: string;
|
|
63
|
+
merchantReference: string;
|
|
64
|
+
narration: string;
|
|
65
|
+
redirectUrl: string;
|
|
66
|
+
paymentStatus: string;
|
|
67
|
+
linkName: string;
|
|
68
|
+
type: string;
|
|
69
|
+
virtualAccountNumber: string | null;
|
|
70
|
+
ussdCode: string | null;
|
|
71
|
+
merchantId: string;
|
|
72
|
+
paymentUrl: string;
|
|
73
|
+
webhookUrl: string | null;
|
|
74
|
+
channel: string | null;
|
|
75
|
+
webhookProcessed: boolean;
|
|
76
|
+
webhookProcessingStatus: string | null;
|
|
77
|
+
webhookProcessingTime: string;
|
|
78
|
+
tryCount: number;
|
|
79
|
+
transactionDate: string;
|
|
80
|
+
finalTransactionStatus: string | null;
|
|
81
|
+
settledAmount: number;
|
|
82
|
+
transactionPosted: boolean;
|
|
83
|
+
postingTransactionId: string | null;
|
|
84
|
+
postedAmount: number;
|
|
85
|
+
createdAt: string;
|
|
86
|
+
updatedAt: string;
|
|
87
|
+
invoiceReceiptUrl: string;
|
|
88
|
+
invoiceUrl: string;
|
|
89
|
+
}
|
|
90
|
+
export interface IGeneratePaymentAccountPayload {
|
|
91
|
+
paymentReference: string;
|
|
92
|
+
channel: string;
|
|
93
|
+
customerName: string;
|
|
94
|
+
merchantId: string;
|
|
95
|
+
}
|
|
96
|
+
export interface IPaymentAccountResponse {
|
|
97
|
+
accountName: string;
|
|
98
|
+
accountNumber: string;
|
|
99
|
+
bank: string;
|
|
100
|
+
}
|
|
101
|
+
export interface IGenerateStableCoinAddress {
|
|
102
|
+
paymentReference: string;
|
|
103
|
+
currency: string;
|
|
104
|
+
chain: string;
|
|
105
|
+
transactionAmount: number;
|
|
106
|
+
merchantId: string;
|
|
107
|
+
}
|
|
108
|
+
export interface IGenerateStableCoinAddressResponse {
|
|
109
|
+
walletAddress: string;
|
|
110
|
+
transactionAmount: string;
|
|
111
|
+
chain: string;
|
|
112
|
+
networkFee: number;
|
|
8
113
|
}
|
|
@@ -27,3 +27,16 @@ export interface IApiResponse<T> extends IPagination {
|
|
|
27
27
|
totalDebitTransactions?: string;
|
|
28
28
|
totalTransactions?: string;
|
|
29
29
|
}
|
|
30
|
+
export interface ISelectOption {
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ICountry {
|
|
35
|
+
countryName: string;
|
|
36
|
+
iso2: string;
|
|
37
|
+
iso3: string;
|
|
38
|
+
}
|
|
39
|
+
export interface IState {
|
|
40
|
+
name: string;
|
|
41
|
+
code: string;
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getBaseUrl: (mode: string) => string;
|
|
1
|
+
export declare const getBaseUrl: (mode: string, caller: "buzapay" | "miden") => string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum CardSchemes {
|
|
2
|
+
Visa = 1,
|
|
3
|
+
MasterCard = 2,
|
|
4
|
+
Verve = 3,
|
|
5
|
+
MastercardAndVisa = 4,
|
|
6
|
+
AmericanExpress = 5,
|
|
7
|
+
Discover = 6,
|
|
8
|
+
JCB = 7,
|
|
9
|
+
DinersClub = 8,
|
|
10
|
+
Maestro = 9,
|
|
11
|
+
UnionPay = 10,
|
|
12
|
+
UnionPay3DS = 11,// based on known test BINs only
|
|
13
|
+
UnionPayNon3DS = 12,// based on known test BINs only
|
|
14
|
+
UATP = 13,
|
|
15
|
+
PayPak = 14,
|
|
16
|
+
Jaywan = 15,
|
|
17
|
+
Mada = 16,// mada-only
|
|
18
|
+
MadaVisa = 17,
|
|
19
|
+
MadaMastercard = 18,
|
|
20
|
+
Unknown = 19
|
|
21
|
+
}
|
|
22
|
+
export declare function cardTypeHandler(cardNumber: string): string;
|
|
23
|
+
export declare function detect(cardNumber: string): CardSchemes;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface RulesListItem {
|
|
2
|
+
rule: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function getValidationErrorMessage(rulesStr: string, inputValue: string, label: string): string | null;
|
|
6
|
+
export declare const validateGroup: (values: Record<string, string>, rulesMap: Record<string, string>, prettyLabels?: Record<string, string>) => Record<string, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miden-npm/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org",
|
|
@@ -17,27 +17,39 @@
|
|
|
17
17
|
"types": "./dist/types/index.d.ts",
|
|
18
18
|
"import": "./dist/index.es.js",
|
|
19
19
|
"require": "./dist/index.cjs.js"
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
|
+
"./dist/styles.css": "./dist/styles.css",
|
|
22
|
+
"./package.json": "./package.json"
|
|
21
23
|
},
|
|
22
24
|
"files": [
|
|
23
25
|
"dist"
|
|
24
26
|
],
|
|
25
27
|
"sideEffects": false,
|
|
26
28
|
"peerDependencies": {
|
|
27
|
-
"
|
|
29
|
+
"crypto-js": "^4.2.0",
|
|
30
|
+
"imask": "^7.6.1",
|
|
31
|
+
"vue": "^3.4.0",
|
|
32
|
+
"vue-imask": "^7.6.1"
|
|
28
33
|
},
|
|
29
34
|
"devDependencies": {
|
|
35
|
+
"@types/crypto-js": "^4.2.2",
|
|
30
36
|
"@vitejs/plugin-vue": "^5.2.4",
|
|
37
|
+
"crypto-js": "^4.2.0",
|
|
38
|
+
"imask": "^7.6.1",
|
|
39
|
+
"npm-run-all": "^4.1.5",
|
|
31
40
|
"rimraf": "^6.0.1",
|
|
32
41
|
"typescript": "^5.9.2",
|
|
33
42
|
"vite": "^5.4.19",
|
|
43
|
+
"vite-plugin-static-copy": "^3.1.4",
|
|
34
44
|
"vue": "^3.5.20",
|
|
45
|
+
"vue-imask": "^7.6.1",
|
|
35
46
|
"vue-tsc": "^2.2.12"
|
|
36
47
|
},
|
|
37
48
|
"scripts": {
|
|
38
|
-
"build": "rimraf dist && vite build && vue-tsc -p tsconfig.build.json",
|
|
49
|
+
"build": "rimraf dist && vite build && vue-tsc -p tsconfig.build.json && pnpm build:css",
|
|
39
50
|
"build:watch": "vite build --watch",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
51
|
+
"build:css": "tailwindcss -c ./tailwind.config.cjs -i ./src/styles.css -o ./dist/styles.css --minify",
|
|
52
|
+
"build:types": "vue-tsc -w -p tsconfig.build.json",
|
|
53
|
+
"dev": "run-p build:watch build:types build:css"
|
|
42
54
|
}
|
|
43
55
|
}
|