mainstack-payments 0.0.0 → 0.0.2
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/build/mainstack-payments.js +25240 -95861
- package/build/src/api/config.d.ts +6 -0
- package/build/src/api/index.d.ts +54 -0
- package/build/src/app.d.ts +1 -0
- package/build/src/assets/themes/baseThemes.d.ts +2 -0
- package/build/src/components/CheckoutForm.d.ts +15 -0
- package/build/src/components/DrawerModal.d.ts +10 -0
- package/build/src/components/Payment.d.ts +19 -0
- package/build/src/components/PaystackPaymentErrorModal.d.ts +6 -0
- package/build/src/components/PaystackPaymentModal.d.ts +8 -0
- package/build/src/components/WalletPay.d.ts +11 -0
- package/build/src/constants/index.d.ts +2 -0
- package/build/src/enums/currenciesEnums.d.ts +6 -0
- package/build/src/hooks/useApi.d.ts +22 -0
- package/build/src/hooks/usePayment.d.ts +7 -0
- package/build/src/index.d.ts +3 -0
- package/build/src/pages/Home.d.ts +2 -0
- package/build/src/pages/Index.d.ts +2 -0
- package/build/src/pages/Login.d.ts +2 -0
- package/build/src/pages/Page404.d.ts +2 -0
- package/build/src/pages/PaymentRedirect.d.ts +2 -0
- package/build/src/provider/index.d.ts +6 -0
- package/build/src/routes/index.d.ts +7 -0
- package/build/src/types/index.d.ts +35 -0
- package/{src/utils/countries_flag.json → build/src/utils/countries_flag.json.d.ts} +4 -1
- package/{src/utils/countries_with_flags_and_currencies.json → build/src/utils/countries_with_flags_and_currencies.json.d.ts} +4 -1
- package/build/src/utils/formatUnderscoreText.d.ts +2 -0
- package/build/src/utils/index.d.ts +3 -0
- package/build/src/utils/stringifyPrice.d.ts +4 -0
- package/build/src/utils/validations.d.ts +14 -0
- package/package.json +30 -10
- package/.env.sample +0 -1
- package/.eslintignore +0 -5
- package/.eslintrc.json +0 -95
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -15
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -6
- package/.prettierignore +0 -7
- package/.prettierrc +0 -9
- package/.vscode/extensions.json +0 -10
- package/build/_redirects +0 -1
- package/build/manifest.json +0 -15
- package/build/robots.txt +0 -3
- package/build/style.css +0 -6
- package/build/vite.svg +0 -1
- package/commitlint.config.cjs +0 -1
- package/index.html +0 -31
- package/public/_redirects +0 -1
- package/public/manifest.json +0 -15
- package/public/robots.txt +0 -3
- package/public/vite.svg +0 -1
- package/src/api/config.ts +0 -36
- package/src/api/index.ts +0 -84
- package/src/app.tsx +0 -39
- package/src/assets/images/tired-emoji.png +0 -0
- package/src/assets/styles/index.css +0 -26
- package/src/assets/themes/baseThemes.ts +0 -30
- package/src/components/CheckoutForm.tsx +0 -426
- package/src/components/DrawerModal.tsx +0 -63
- package/src/components/Payment.tsx +0 -772
- package/src/components/PaystackPaymentErrorModal.tsx +0 -120
- package/src/components/PaystackPaymentModal.tsx +0 -120
- package/src/components/WalletPay.tsx +0 -160
- package/src/constants/index.ts +0 -3
- package/src/enums/currenciesEnums.ts +0 -7
- package/src/hooks/usePayment.ts +0 -60
- package/src/index.ts +0 -3
- package/src/pages/Home.tsx +0 -97
- package/src/pages/Index.tsx +0 -23
- package/src/pages/Login.tsx +0 -13
- package/src/pages/Page404.tsx +0 -13
- package/src/pages/PaymentRedirect.tsx +0 -15
- package/src/routes/index.tsx +0 -8
- package/src/types/index.ts +0 -48
- package/src/utils/countries-flag.json +0 -1752
- package/src/utils/formatUnderscoreText.ts +0 -5
- package/src/utils/index.ts +0 -4
- package/src/utils/stringifyPrice.ts +0 -37
- package/src/utils/validations.ts +0 -44
- package/tsconfig.json +0 -35
- package/vite.config.ts +0 -36
package/src/types/index.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
|
|
3
|
-
type TPaymentOption = "wallet" | "startbutton" | "stripe" | "paystack";
|
|
4
|
-
|
|
5
|
-
type TMetadata = {
|
|
6
|
-
reference?: string;
|
|
7
|
-
actual_price?: number;
|
|
8
|
-
type: string;
|
|
9
|
-
account_id: string;
|
|
10
|
-
user_id: string;
|
|
11
|
-
product_id: string;
|
|
12
|
-
mainstack_product_type:
|
|
13
|
-
| "store"
|
|
14
|
-
| "editor"
|
|
15
|
-
| "bookings"
|
|
16
|
-
| "mediakit"
|
|
17
|
-
| "invoicing"
|
|
18
|
-
| "hosted_courses";
|
|
19
|
-
productName: string;
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
type TCustomizations = {
|
|
24
|
-
theme_color?: string;
|
|
25
|
-
button_label?: string;
|
|
26
|
-
font_family?: string;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
type TPaymentConfig = {
|
|
30
|
-
reference: string;
|
|
31
|
-
currency: string;
|
|
32
|
-
amount: number;
|
|
33
|
-
discountAmount?: number;
|
|
34
|
-
metadata: TMetadata;
|
|
35
|
-
customizations?: TCustomizations;
|
|
36
|
-
transactionFeesSlug: string;
|
|
37
|
-
paymentOptions?: TPaymentOption[];
|
|
38
|
-
paystackRedirectUrl?: string;
|
|
39
|
-
baseUrl: string;
|
|
40
|
-
authMSUrl: string;
|
|
41
|
-
|
|
42
|
-
// not sure
|
|
43
|
-
accountId: string;
|
|
44
|
-
userAllowsWalletPayment: boolean;
|
|
45
|
-
userAllowsCardPayment: boolean;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export type { TPaymentConfig, TMetadata, TCustomizations, TPaymentOption };
|