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.
Files changed (81) hide show
  1. package/build/mainstack-payments.js +25240 -95861
  2. package/build/src/api/config.d.ts +6 -0
  3. package/build/src/api/index.d.ts +54 -0
  4. package/build/src/app.d.ts +1 -0
  5. package/build/src/assets/themes/baseThemes.d.ts +2 -0
  6. package/build/src/components/CheckoutForm.d.ts +15 -0
  7. package/build/src/components/DrawerModal.d.ts +10 -0
  8. package/build/src/components/Payment.d.ts +19 -0
  9. package/build/src/components/PaystackPaymentErrorModal.d.ts +6 -0
  10. package/build/src/components/PaystackPaymentModal.d.ts +8 -0
  11. package/build/src/components/WalletPay.d.ts +11 -0
  12. package/build/src/constants/index.d.ts +2 -0
  13. package/build/src/enums/currenciesEnums.d.ts +6 -0
  14. package/build/src/hooks/useApi.d.ts +22 -0
  15. package/build/src/hooks/usePayment.d.ts +7 -0
  16. package/build/src/index.d.ts +3 -0
  17. package/build/src/pages/Home.d.ts +2 -0
  18. package/build/src/pages/Index.d.ts +2 -0
  19. package/build/src/pages/Login.d.ts +2 -0
  20. package/build/src/pages/Page404.d.ts +2 -0
  21. package/build/src/pages/PaymentRedirect.d.ts +2 -0
  22. package/build/src/provider/index.d.ts +6 -0
  23. package/build/src/routes/index.d.ts +7 -0
  24. package/build/src/types/index.d.ts +35 -0
  25. package/{src/utils/countries_flag.json → build/src/utils/countries_flag.json.d.ts} +4 -1
  26. package/{src/utils/countries_with_flags_and_currencies.json → build/src/utils/countries_with_flags_and_currencies.json.d.ts} +4 -1
  27. package/build/src/utils/formatUnderscoreText.d.ts +2 -0
  28. package/build/src/utils/index.d.ts +3 -0
  29. package/build/src/utils/stringifyPrice.d.ts +4 -0
  30. package/build/src/utils/validations.d.ts +14 -0
  31. package/package.json +30 -10
  32. package/.env.sample +0 -1
  33. package/.eslintignore +0 -5
  34. package/.eslintrc.json +0 -95
  35. package/.github/PULL_REQUEST_TEMPLATE.md +0 -15
  36. package/.husky/commit-msg +0 -4
  37. package/.husky/pre-commit +0 -6
  38. package/.prettierignore +0 -7
  39. package/.prettierrc +0 -9
  40. package/.vscode/extensions.json +0 -10
  41. package/build/_redirects +0 -1
  42. package/build/manifest.json +0 -15
  43. package/build/robots.txt +0 -3
  44. package/build/style.css +0 -6
  45. package/build/vite.svg +0 -1
  46. package/commitlint.config.cjs +0 -1
  47. package/index.html +0 -31
  48. package/public/_redirects +0 -1
  49. package/public/manifest.json +0 -15
  50. package/public/robots.txt +0 -3
  51. package/public/vite.svg +0 -1
  52. package/src/api/config.ts +0 -36
  53. package/src/api/index.ts +0 -84
  54. package/src/app.tsx +0 -39
  55. package/src/assets/images/tired-emoji.png +0 -0
  56. package/src/assets/styles/index.css +0 -26
  57. package/src/assets/themes/baseThemes.ts +0 -30
  58. package/src/components/CheckoutForm.tsx +0 -426
  59. package/src/components/DrawerModal.tsx +0 -63
  60. package/src/components/Payment.tsx +0 -772
  61. package/src/components/PaystackPaymentErrorModal.tsx +0 -120
  62. package/src/components/PaystackPaymentModal.tsx +0 -120
  63. package/src/components/WalletPay.tsx +0 -160
  64. package/src/constants/index.ts +0 -3
  65. package/src/enums/currenciesEnums.ts +0 -7
  66. package/src/hooks/usePayment.ts +0 -60
  67. package/src/index.ts +0 -3
  68. package/src/pages/Home.tsx +0 -97
  69. package/src/pages/Index.tsx +0 -23
  70. package/src/pages/Login.tsx +0 -13
  71. package/src/pages/Page404.tsx +0 -13
  72. package/src/pages/PaymentRedirect.tsx +0 -15
  73. package/src/routes/index.tsx +0 -8
  74. package/src/types/index.ts +0 -48
  75. package/src/utils/countries-flag.json +0 -1752
  76. package/src/utils/formatUnderscoreText.ts +0 -5
  77. package/src/utils/index.ts +0 -4
  78. package/src/utils/stringifyPrice.ts +0 -37
  79. package/src/utils/validations.ts +0 -44
  80. package/tsconfig.json +0 -35
  81. package/vite.config.ts +0 -36
@@ -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 };