@reeboot/strapi-payment-plugin 0.0.1 → 0.0.3

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 (84) hide show
  1. package/README.md +378 -119
  2. package/dist/_chunks/Analytics-DSJqY9ng.mjs +355 -0
  3. package/dist/_chunks/Analytics-nBSdLT2v.js +355 -0
  4. package/dist/_chunks/App-B83DZ9NG.js +70 -0
  5. package/dist/_chunks/App-BUSTbkyy.mjs +68 -0
  6. package/dist/_chunks/Customers-BpFzfglV.js +273 -0
  7. package/dist/_chunks/Customers-C6FH7-zG.mjs +273 -0
  8. package/dist/_chunks/Dashboard-CNMTzSyc.js +180 -0
  9. package/dist/_chunks/Dashboard-Dbwl0ZBo.mjs +180 -0
  10. package/dist/_chunks/Orders-CBkT2YfP.mjs +308 -0
  11. package/dist/_chunks/Orders-OG-pwV-B.js +308 -0
  12. package/dist/_chunks/Payments-BLen1P9N.js +489 -0
  13. package/dist/_chunks/Payments-DSDJ-HWm.mjs +489 -0
  14. package/dist/_chunks/Settings-Dq1xy32B.js +357 -0
  15. package/dist/_chunks/Settings-jmGslDsB.mjs +357 -0
  16. package/dist/_chunks/en-BJocyOVu.mjs +240 -0
  17. package/dist/_chunks/en-BkVAf_R4.js +240 -0
  18. package/dist/_chunks/index-BqqrpI6D.js +66 -0
  19. package/dist/_chunks/index-DS_PYNkf.mjs +67 -0
  20. package/dist/admin/index.js +2 -63
  21. package/dist/admin/index.mjs +2 -63
  22. package/dist/admin/src/components/AnalyticsChart.d.ts +19 -0
  23. package/dist/admin/src/components/CustomerList.d.ts +21 -0
  24. package/dist/admin/src/components/OrderList.d.ts +27 -0
  25. package/dist/admin/src/components/PaymentCard.d.ts +39 -0
  26. package/dist/admin/src/components/PaymentList.d.ts +19 -0
  27. package/dist/admin/src/components/RefundModal.d.ts +15 -0
  28. package/dist/admin/src/pages/Analytics.d.ts +2 -0
  29. package/dist/admin/src/pages/Customers.d.ts +2 -0
  30. package/dist/admin/src/pages/Dashboard.d.ts +2 -0
  31. package/dist/admin/src/pages/HomePage.d.ts +1 -1
  32. package/dist/admin/src/pages/Orders.d.ts +2 -0
  33. package/dist/admin/src/pages/Payments.d.ts +2 -0
  34. package/dist/admin/src/pages/Settings.d.ts +2 -0
  35. package/dist/admin/src/pluginId.d.ts +1 -1
  36. package/dist/server/index.js +1770 -992
  37. package/dist/server/index.mjs +1773 -995
  38. package/dist/server/src/bootstrap.d.ts +5 -11
  39. package/dist/server/src/config/index.d.ts +0 -10
  40. package/dist/server/src/content-types/customer/index.d.ts +69 -0
  41. package/dist/server/src/content-types/index.d.ts +123 -39
  42. package/dist/server/src/content-types/{product.d.ts → order/index.d.ts} +26 -19
  43. package/dist/server/src/content-types/{subscription.d.ts → payment/index.d.ts} +30 -21
  44. package/dist/server/src/controllers/controller.d.ts +5 -12
  45. package/dist/server/src/controllers/index.d.ts +29 -34
  46. package/dist/server/src/controllers/stripe.d.ts +104 -0
  47. package/dist/server/src/index.d.ts +179 -139
  48. package/dist/server/src/middlewares/index.d.ts +19 -1
  49. package/dist/server/src/policies/index.d.ts +3 -1
  50. package/dist/server/src/routes/{admin-routes.d.ts → admin/index.d.ts} +4 -4
  51. package/dist/server/src/routes/content-api/index.d.ts +21 -0
  52. package/dist/server/src/routes/index.d.ts +11 -16
  53. package/dist/server/src/services/index.d.ts +2 -38
  54. package/dist/server/src/services/{stripeDriver.d.ts → stripe.d.ts} +52 -59
  55. package/dist/server/src/types/index.d.ts +179 -0
  56. package/package.json +20 -25
  57. package/dist/_chunks/App-DD7GyuRr.mjs +0 -1424
  58. package/dist/_chunks/App-KZVBFRwo.js +0 -1424
  59. package/dist/_chunks/en-B4KWt_jN.js +0 -4
  60. package/dist/_chunks/en-Byx4XI2L.mjs +0 -4
  61. package/dist/admin/src/components/Header.d.ts +0 -2
  62. package/dist/admin/src/components/NavigationMenu.d.ts +0 -2
  63. package/dist/admin/src/components/Sidebar.d.ts +0 -2
  64. package/dist/admin/src/components/TransactionDetailsModal.d.ts +0 -18
  65. package/dist/admin/src/components/TransactionList.d.ts +0 -18
  66. package/dist/admin/src/pages/ConfigurationPage.d.ts +0 -2
  67. package/dist/admin/src/pages/DashboardPage.d.ts +0 -2
  68. package/dist/admin/src/pages/ProductsPage.d.ts +0 -2
  69. package/dist/admin/src/pages/SubscriptionsPage.d.ts +0 -2
  70. package/dist/admin/src/pages/TransactionsPage.d.ts +0 -2
  71. package/dist/server/src/controllers/product.d.ts +0 -18
  72. package/dist/server/src/controllers/subscription.d.ts +0 -16
  73. package/dist/server/src/controllers/webhook.d.ts +0 -10
  74. package/dist/server/src/routes/content-api.d.ts +0 -12
  75. package/dist/server/src/routes/product.d.ts +0 -2
  76. package/dist/server/src/routes/refund-routes.d.ts +0 -13
  77. package/dist/server/src/routes/subscription.d.ts +0 -5
  78. package/dist/server/src/routes/webhook.d.ts +0 -15
  79. package/dist/server/src/services/paypalDriver.d.ts +0 -47
  80. package/dist/server/src/services/product.d.ts +0 -7
  81. package/dist/server/src/services/service.d.ts +0 -26
  82. package/dist/server/src/services/subscription.d.ts +0 -9
  83. package/dist/server/src/services/sync.d.ts +0 -13
  84. package/jest.config.js +0 -13
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const en = {};
4
- exports.default = en;
@@ -1,4 +0,0 @@
1
- const en = {};
2
- export {
3
- en as default
4
- };
@@ -1,2 +0,0 @@
1
- declare const Header: () => import("react/jsx-runtime").JSX.Element;
2
- export default Header;
@@ -1,2 +0,0 @@
1
- declare const NavigationMenu: () => import("react/jsx-runtime").JSX.Element;
2
- export default NavigationMenu;
@@ -1,2 +0,0 @@
1
- declare const Sidebar: () => import("react/jsx-runtime").JSX.Element;
2
- export default Sidebar;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- interface TransactionDetailsModalProps {
3
- isOpen: boolean;
4
- onClose: () => void;
5
- transaction: {
6
- id: string;
7
- amount: number;
8
- currency: string;
9
- status: string;
10
- date: string;
11
- customer: string;
12
- paymentMethod: string;
13
- gateway: string;
14
- } | null;
15
- onRefund: () => void;
16
- }
17
- declare const TransactionDetailsModal: React.FC<TransactionDetailsModalProps>;
18
- export default TransactionDetailsModal;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- interface Transaction {
3
- id: string;
4
- amount: number;
5
- currency: string;
6
- status: string;
7
- date: string;
8
- customer: string;
9
- paymentMethod: string;
10
- gateway: string;
11
- }
12
- interface TransactionListProps {
13
- transactions: Transaction[];
14
- onViewDetails: (transaction: Transaction) => void;
15
- onStatusUpdate?: (transactionId: string, newStatus: string) => void;
16
- }
17
- declare const TransactionList: React.FC<TransactionListProps>;
18
- export default TransactionList;
@@ -1,2 +0,0 @@
1
- declare const ConfigurationPage: () => import("react/jsx-runtime").JSX.Element;
2
- export default ConfigurationPage;
@@ -1,2 +0,0 @@
1
- declare const DashboardPage: () => import("react/jsx-runtime").JSX.Element;
2
- export default DashboardPage;
@@ -1,2 +0,0 @@
1
- declare const ProductsPage: () => import("react/jsx-runtime").JSX.Element;
2
- export default ProductsPage;
@@ -1,2 +0,0 @@
1
- declare const SubscriptionsPage: () => import("react/jsx-runtime").JSX.Element;
2
- export default SubscriptionsPage;
@@ -1,2 +0,0 @@
1
- declare const TransactionsPage: () => import("react/jsx-runtime").JSX.Element;
2
- export default TransactionsPage;
@@ -1,18 +0,0 @@
1
- /**
2
- * controller
3
- */
4
- /// <reference types="koa" />
5
- declare const _default: ({ strapi, }: {
6
- strapi: import("@strapi/types/dist/core").Strapi;
7
- }) => {
8
- create: (ctx: import("koa").Context) => Promise<void>;
9
- update: (ctx: import("koa").Context) => Promise<void>;
10
- find: (ctx: import("koa").Context) => Promise<void>;
11
- findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
12
- delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
13
- sync: (ctx: import("koa").Context) => Promise<import("koa").Context>;
14
- getStripeProducts: (ctx: import("koa").Context) => Promise<void>;
15
- importFromStripe: (ctx: import("koa").Context) => Promise<import("koa").Context>;
16
- createPaymentLink: (ctx: import("koa").Context) => Promise<import("koa").Context>;
17
- } & import("@strapi/types/dist/core/core-api/controller").Base;
18
- export default _default;
@@ -1,16 +0,0 @@
1
- /**
2
- * controller
3
- */
4
- /// <reference types="koa" />
5
- declare const _default: ({ strapi, }: {
6
- strapi: import("@strapi/types/dist/core").Strapi;
7
- }) => {
8
- create: (ctx: import("koa").Context) => Promise<void>;
9
- update: (ctx: import("koa").Context) => Promise<void>;
10
- find: (ctx: import("koa").Context) => Promise<void>;
11
- findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
12
- delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
13
- sync: (ctx: import("koa").Context) => Promise<void>;
14
- cancel: (ctx: import("koa").Context) => Promise<void>;
15
- } & import("@strapi/types/dist/core/core-api/controller").Base;
16
- export default _default;
@@ -1,10 +0,0 @@
1
- /**
2
- * webhook controller
3
- */
4
- /// <reference types="koa" />
5
- declare const _default: ({ strapi, }: {
6
- strapi: import("@strapi/types/dist/core").Strapi;
7
- }) => {
8
- process: (ctx: import("koa").Context) => Promise<void>;
9
- } & import("@strapi/types/dist/core/core-api/controller").Base;
10
- export default _default;
@@ -1,12 +0,0 @@
1
- declare const _default: {
2
- type: string;
3
- routes: {
4
- method: string;
5
- path: string;
6
- handler: string;
7
- config: {
8
- policies: any[];
9
- };
10
- }[];
11
- };
12
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import("@strapi/types/dist/core/core-api/router").Router;
2
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- type: string;
3
- routes: {
4
- method: string;
5
- path: string;
6
- handler: string;
7
- config: {
8
- policies: any[];
9
- auth: boolean;
10
- };
11
- }[];
12
- };
13
- export default _default;
@@ -1,5 +0,0 @@
1
- /**
2
- * router
3
- */
4
- declare const _default: import("@strapi/types/dist/core/core-api/router").Router;
5
- export default _default;
@@ -1,15 +0,0 @@
1
- /**
2
- * webhook router
3
- */
4
- declare const _default: {
5
- type: string;
6
- routes: {
7
- method: string;
8
- path: string;
9
- handler: string;
10
- config: {
11
- auth: boolean;
12
- };
13
- }[];
14
- };
15
- export default _default;
@@ -1,47 +0,0 @@
1
- declare const _default: {
2
- initializePayment(amount: any, currency: any, orderId: any, options: any): Promise<{
3
- status: string;
4
- message: string;
5
- }>;
6
- processWebhook(payload: any, signature: any): Promise<{
7
- status: string;
8
- message: string;
9
- }>;
10
- refundPayment(transactionId: any, amount: any, options: any): Promise<{
11
- status: string;
12
- message: string;
13
- }>;
14
- getPaymentDetails(transactionId: any): Promise<{
15
- status: string;
16
- message: string;
17
- }>;
18
- createProduct(productData: any): Promise<{
19
- status: string;
20
- message: string;
21
- }>;
22
- updateProduct(productId: any, productData: any): Promise<{
23
- status: string;
24
- message: string;
25
- }>;
26
- createSubscription(customerId: any, planId: any, options: any): Promise<{
27
- status: string;
28
- message: string;
29
- }>;
30
- updateSubscription(subscriptionId: any, options: any): Promise<{
31
- status: string;
32
- message: string;
33
- }>;
34
- cancelSubscription(subscriptionId: any, reason: any): Promise<{
35
- status: string;
36
- message: string;
37
- }>;
38
- getSubscription(subscriptionId: any): Promise<{
39
- status: string;
40
- message: string;
41
- }>;
42
- getTransactions(limit: any, page: any): Promise<{
43
- status: string;
44
- message: string;
45
- }>;
46
- };
47
- export default _default;
@@ -1,7 +0,0 @@
1
- declare const _default: ({ strapi, }: {
2
- strapi: import("@strapi/types/dist/core").Strapi;
3
- }) => {
4
- createProduct: (productData: any) => Promise<any>;
5
- updateProduct: (id: any, productData: any) => Promise<any>;
6
- } & import("@strapi/types/dist/core/core-api/service").Base;
7
- export default _default;
@@ -1,26 +0,0 @@
1
- declare const _default: ({ strapi }: {
2
- strapi: any;
3
- }) => {
4
- initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
5
- processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
6
- refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
7
- getPaymentDetails(gateway: any, transactionId: any): Promise<any>;
8
- getTransactions(gateway: any, status: any, limit?: number, offset?: number): Promise<{
9
- data: any[];
10
- meta: {
11
- total: number;
12
- limit: number;
13
- offset: number;
14
- };
15
- }>;
16
- saveConfiguration(configData: any): Promise<{
17
- success: boolean;
18
- message: string;
19
- data: any;
20
- }>;
21
- getConfigStatus(): Promise<{
22
- stripe: boolean;
23
- paypal: boolean;
24
- }>;
25
- };
26
- export default _default;
@@ -1,9 +0,0 @@
1
- declare const _default: ({ strapi, }: {
2
- strapi: import("@strapi/types/dist/core").Strapi;
3
- }) => {
4
- createSubscription: (subscriptionData: any) => Promise<any>;
5
- updateSubscription: (id: any, subscriptionData: any) => Promise<any>;
6
- cancelSubscription: (id: any) => Promise<any>;
7
- syncSubscriptionStatus: (id: any) => Promise<any>;
8
- } & import("@strapi/types/dist/core/core-api/service").Base;
9
- export default _default;
@@ -1,13 +0,0 @@
1
- /**
2
- * Sync service for periodic synchronization
3
- */
4
- declare const _default: ({ strapi, }: {
5
- strapi: import("@strapi/types/dist/core").Strapi;
6
- }) => {
7
- syncAllProducts: () => Promise<void>;
8
- syncProduct: (productId: any) => Promise<any>;
9
- syncAllSubscriptions: () => Promise<void>;
10
- syncSubscription: (subscriptionId: any) => Promise<any>;
11
- startPeriodicSync: () => Promise<void>;
12
- } & import("@strapi/types/dist/core/core-api/service").Base;
13
- export default _default;
package/jest.config.js DELETED
@@ -1,13 +0,0 @@
1
- module.exports = {
2
- preset: 'ts-jest',
3
- testEnvironment: 'node',
4
- testMatch: ['**/server/src/**/*.test.ts'],
5
- moduleNameMapper: {
6
- '^@/(.*)$': '<rootDir>/server/src/$1',
7
- },
8
- transform: {
9
- '^.+\\.tsx?$': ['ts-jest', {
10
- tsconfig: 'server/tsconfig.json',
11
- }],
12
- },
13
- };