@reeboot/strapi-payment-plugin 0.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.
Files changed (54) hide show
  1. package/README.md +112 -0
  2. package/dist/_chunks/App-BGle38NN.js +1149 -0
  3. package/dist/_chunks/App-DoUUpjp-.mjs +1149 -0
  4. package/dist/_chunks/en-B4KWt_jN.js +4 -0
  5. package/dist/_chunks/en-Byx4XI2L.mjs +4 -0
  6. package/dist/admin/index.js +64 -0
  7. package/dist/admin/index.mjs +65 -0
  8. package/dist/admin/src/components/Header.d.ts +2 -0
  9. package/dist/admin/src/components/Initializer.d.ts +5 -0
  10. package/dist/admin/src/components/NavigationMenu.d.ts +2 -0
  11. package/dist/admin/src/components/PluginIcon.d.ts +2 -0
  12. package/dist/admin/src/components/Sidebar.d.ts +2 -0
  13. package/dist/admin/src/components/TransactionDetailsModal.d.ts +18 -0
  14. package/dist/admin/src/components/TransactionList.d.ts +18 -0
  15. package/dist/admin/src/index.d.ts +10 -0
  16. package/dist/admin/src/pages/App.d.ts +2 -0
  17. package/dist/admin/src/pages/ConfigurationPage.d.ts +2 -0
  18. package/dist/admin/src/pages/DashboardPage.d.ts +2 -0
  19. package/dist/admin/src/pages/HomePage.d.ts +2 -0
  20. package/dist/admin/src/pages/ProductsPage.d.ts +2 -0
  21. package/dist/admin/src/pages/SubscriptionsPage.d.ts +2 -0
  22. package/dist/admin/src/pages/TransactionsPage.d.ts +2 -0
  23. package/dist/admin/src/pluginId.d.ts +1 -0
  24. package/dist/admin/src/utils/getTranslation.d.ts +2 -0
  25. package/dist/server/controllers/product.d.ts +12 -0
  26. package/dist/server/controllers/subscription.d.ts +12 -0
  27. package/dist/server/index.js +7287 -0
  28. package/dist/server/index.mjs +7286 -0
  29. package/dist/server/services/product.d.ts +7 -0
  30. package/dist/server/services/subscription.d.ts +7 -0
  31. package/dist/server/src/bootstrap.d.ts +5 -0
  32. package/dist/server/src/config/index.d.ts +13 -0
  33. package/dist/server/src/content-types/index.d.ts +2 -0
  34. package/dist/server/src/controllers/controller.d.ts +10 -0
  35. package/dist/server/src/controllers/index.d.ts +41 -0
  36. package/dist/server/src/controllers/productController.d.ts +9 -0
  37. package/dist/server/src/controllers/subscriptionController.d.ts +9 -0
  38. package/dist/server/src/destroy.d.ts +5 -0
  39. package/dist/server/src/index.d.ts +159 -0
  40. package/dist/server/src/middlewares/index.d.ts +2 -0
  41. package/dist/server/src/policies/index.d.ts +2 -0
  42. package/dist/server/src/register.d.ts +5 -0
  43. package/dist/server/src/routes/admin-routes.d.ts +13 -0
  44. package/dist/server/src/routes/content-api.d.ts +12 -0
  45. package/dist/server/src/routes/index.d.ts +51 -0
  46. package/dist/server/src/routes/product-routes.d.ts +13 -0
  47. package/dist/server/src/routes/refund-routes.d.ts +13 -0
  48. package/dist/server/src/routes/subscription-routes.d.ts +13 -0
  49. package/dist/server/src/services/index.d.ts +41 -0
  50. package/dist/server/src/services/paypalDriver.d.ts +7 -0
  51. package/dist/server/src/services/service.d.ts +33 -0
  52. package/dist/server/src/services/stripeDriver.d.ts +290 -0
  53. package/jest.config.js +13 -0
  54. package/package.json +75 -0
@@ -0,0 +1,7 @@
1
+ /**
2
+ * service
3
+ */
4
+ declare const _default: ({ strapi, }: {
5
+ strapi: import("@strapi/types/dist/core").Strapi;
6
+ }) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * service
3
+ */
4
+ declare const _default: ({ strapi, }: {
5
+ strapi: import("@strapi/types/dist/core").Strapi;
6
+ }) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
7
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const bootstrap: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => void;
5
+ export default bootstrap;
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ stripe: {
3
+ secretKey: string;
4
+ publishableKey: string;
5
+ webhookSecret: string;
6
+ };
7
+ paypal: {
8
+ clientId: string;
9
+ clientSecret: string;
10
+ webhookId: string;
11
+ };
12
+ };
13
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ declare const _default: {
2
+ initiatePayment(ctx: any): Promise<void>;
3
+ processWebhook(ctx: any): Promise<void>;
4
+ refundPayment(ctx: any): Promise<void>;
5
+ getPaymentDetails(ctx: any): Promise<void>;
6
+ getTransactions(ctx: any): Promise<void>;
7
+ saveConfiguration(ctx: any): Promise<void>;
8
+ getConfigStatus(ctx: any): Promise<void>;
9
+ };
10
+ export default _default;
@@ -0,0 +1,41 @@
1
+ /// <reference types="koa" />
2
+ declare const _default: {
3
+ controller: {
4
+ initiatePayment(ctx: any): Promise<void>;
5
+ processWebhook(ctx: any): Promise<void>;
6
+ refundPayment(ctx: any): Promise<void>;
7
+ getPaymentDetails(ctx: any): Promise<void>;
8
+ getTransactions(ctx: any): Promise<void>;
9
+ saveConfiguration(ctx: any): Promise<void>;
10
+ getConfigStatus(ctx: any): Promise<void>;
11
+ };
12
+ productController: {
13
+ find(ctx: import("koa").Context): Promise<void>;
14
+ findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
15
+ create(ctx: import("koa").Context): Promise<void>;
16
+ update(ctx: import("koa").Context): Promise<void>;
17
+ delete(ctx: import("koa").Context): Promise<void>;
18
+ };
19
+ subscriptionController: {
20
+ find(ctx: import("koa").Context): Promise<void>;
21
+ findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
22
+ create(ctx: import("koa").Context): Promise<void>;
23
+ update(ctx: import("koa").Context): Promise<void>;
24
+ delete(ctx: import("koa").Context): Promise<void>;
25
+ };
26
+ product: {
27
+ find(ctx: import("koa").Context): Promise<void>;
28
+ findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
29
+ create(ctx: import("koa").Context): Promise<void>;
30
+ update(ctx: import("koa").Context): Promise<void>;
31
+ delete(ctx: import("koa").Context): Promise<void>;
32
+ };
33
+ subscription: {
34
+ find(ctx: import("koa").Context): Promise<void>;
35
+ findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
36
+ create(ctx: import("koa").Context): Promise<void>;
37
+ update(ctx: import("koa").Context): Promise<void>;
38
+ delete(ctx: import("koa").Context): Promise<void>;
39
+ };
40
+ };
41
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { Context } from 'koa';
2
+ declare const _default: {
3
+ find(ctx: Context): Promise<void>;
4
+ findOne(ctx: Context): Promise<Context>;
5
+ create(ctx: Context): Promise<void>;
6
+ update(ctx: Context): Promise<void>;
7
+ delete(ctx: Context): Promise<void>;
8
+ };
9
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { Context } from 'koa';
2
+ declare const _default: {
3
+ find(ctx: Context): Promise<void>;
4
+ findOne(ctx: Context): Promise<Context>;
5
+ create(ctx: Context): Promise<void>;
6
+ update(ctx: Context): Promise<void>;
7
+ delete(ctx: Context): Promise<void>;
8
+ };
9
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const destroy: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => void;
5
+ export default destroy;
@@ -0,0 +1,159 @@
1
+ /// <reference types="koa" />
2
+ declare const _default: {
3
+ register: ({ strapi }: {
4
+ strapi: import("@strapi/types/dist/core").Strapi;
5
+ }) => void;
6
+ bootstrap: ({ strapi }: {
7
+ strapi: import("@strapi/types/dist/core").Strapi;
8
+ }) => void;
9
+ destroy: ({ strapi }: {
10
+ strapi: import("@strapi/types/dist/core").Strapi;
11
+ }) => void;
12
+ config: {
13
+ stripe: {
14
+ secretKey: string;
15
+ publishableKey: string;
16
+ webhookSecret: string;
17
+ };
18
+ paypal: {
19
+ clientId: string;
20
+ clientSecret: string;
21
+ webhookId: string;
22
+ };
23
+ };
24
+ controllers: {
25
+ controller: {
26
+ initiatePayment(ctx: any): Promise<void>;
27
+ processWebhook(ctx: any): Promise<void>;
28
+ refundPayment(ctx: any): Promise<void>;
29
+ getPaymentDetails(ctx: any): Promise<void>;
30
+ getTransactions(ctx: any): Promise<void>;
31
+ saveConfiguration(ctx: any): Promise<void>;
32
+ getConfigStatus(ctx: any): Promise<void>;
33
+ };
34
+ productController: {
35
+ find(ctx: import("koa").Context): Promise<void>;
36
+ findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
37
+ create(ctx: import("koa").Context): Promise<void>;
38
+ update(ctx: import("koa").Context): Promise<void>;
39
+ delete(ctx: import("koa").Context): Promise<void>;
40
+ };
41
+ subscriptionController: {
42
+ find(ctx: import("koa").Context): Promise<void>;
43
+ findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
44
+ create(ctx: import("koa").Context): Promise<void>;
45
+ update(ctx: import("koa").Context): Promise<void>;
46
+ delete(ctx: import("koa").Context): Promise<void>;
47
+ };
48
+ product: {
49
+ find(ctx: import("koa").Context): Promise<void>;
50
+ findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
51
+ create(ctx: import("koa").Context): Promise<void>;
52
+ update(ctx: import("koa").Context): Promise<void>;
53
+ delete(ctx: import("koa").Context): Promise<void>;
54
+ };
55
+ subscription: {
56
+ find(ctx: import("koa").Context): Promise<void>;
57
+ findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
58
+ create(ctx: import("koa").Context): Promise<void>;
59
+ update(ctx: import("koa").Context): Promise<void>;
60
+ delete(ctx: import("koa").Context): Promise<void>;
61
+ };
62
+ };
63
+ routes: {
64
+ adminRoutes: {
65
+ type: string;
66
+ routes: {
67
+ method: string;
68
+ path: string;
69
+ handler: string;
70
+ config: {
71
+ policies: any[];
72
+ auth: boolean;
73
+ };
74
+ }[];
75
+ };
76
+ productRoutes: {
77
+ type: string;
78
+ routes: {
79
+ method: string;
80
+ path: string;
81
+ handler: string; /**
82
+ * Plugin server methods
83
+ */
84
+ config: {
85
+ policies: any[];
86
+ auth: boolean;
87
+ };
88
+ }[];
89
+ };
90
+ subscriptionRoutes: {
91
+ type: string;
92
+ routes: {
93
+ method: string;
94
+ path: string;
95
+ handler: string;
96
+ config: {
97
+ policies: any[];
98
+ auth: boolean;
99
+ };
100
+ }[];
101
+ };
102
+ refundRoutes: {
103
+ type: string;
104
+ routes: {
105
+ method: string;
106
+ path: string;
107
+ handler: string;
108
+ config: {
109
+ policies: any[];
110
+ auth: boolean;
111
+ };
112
+ }[];
113
+ };
114
+ };
115
+ services: {
116
+ service: {
117
+ initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
118
+ processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
119
+ refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
120
+ getPaymentDetails(gateway: any, transactionId: any): Promise<any>;
121
+ getTransactions(gateway: any, status: any, limit: any, offset: any): Promise<{
122
+ data: {
123
+ id: string;
124
+ amount: number;
125
+ currency: string;
126
+ status: string;
127
+ date: string;
128
+ customer: string;
129
+ paymentMethod: string;
130
+ gateway: any;
131
+ }[];
132
+ meta: {
133
+ total: number;
134
+ limit: any;
135
+ offset: any;
136
+ };
137
+ }>;
138
+ saveConfiguration(configData: any): Promise<{
139
+ success: boolean;
140
+ message: string;
141
+ data: any;
142
+ }>;
143
+ getConfigStatus(): Promise<{
144
+ stripe: boolean;
145
+ paypal: boolean;
146
+ }>;
147
+ };
148
+ product: ({ strapi, }: {
149
+ strapi: import("@strapi/types/dist/core").Strapi;
150
+ }) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
151
+ subscription: ({ strapi, }: {
152
+ strapi: import("@strapi/types/dist/core").Strapi;
153
+ }) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
154
+ };
155
+ contentTypes: {};
156
+ policies: {};
157
+ middlewares: {};
158
+ };
159
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const register: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => void;
5
+ export default register;
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,51 @@
1
+ declare const _default: {
2
+ adminRoutes: {
3
+ type: string;
4
+ routes: {
5
+ method: string;
6
+ path: string;
7
+ handler: string;
8
+ config: {
9
+ policies: any[];
10
+ auth: boolean;
11
+ };
12
+ }[];
13
+ };
14
+ productRoutes: {
15
+ type: string;
16
+ routes: {
17
+ method: string;
18
+ path: string;
19
+ handler: string;
20
+ config: {
21
+ policies: any[];
22
+ auth: boolean;
23
+ };
24
+ }[];
25
+ };
26
+ subscriptionRoutes: {
27
+ type: string;
28
+ routes: {
29
+ method: string;
30
+ path: string;
31
+ handler: string;
32
+ config: {
33
+ policies: any[];
34
+ auth: boolean;
35
+ };
36
+ }[];
37
+ };
38
+ refundRoutes: {
39
+ type: string;
40
+ routes: {
41
+ method: string;
42
+ path: string;
43
+ handler: string;
44
+ config: {
45
+ policies: any[];
46
+ auth: boolean;
47
+ };
48
+ }[];
49
+ };
50
+ };
51
+ export default _default;
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,41 @@
1
+ declare const _default: {
2
+ service: {
3
+ initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
4
+ processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
5
+ refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
6
+ getPaymentDetails(gateway: any, transactionId: any): Promise<any>;
7
+ getTransactions(gateway: any, status: any, limit: any, offset: any): Promise<{
8
+ data: {
9
+ id: string;
10
+ amount: number;
11
+ currency: string;
12
+ status: string;
13
+ date: string;
14
+ customer: string;
15
+ paymentMethod: string;
16
+ gateway: any;
17
+ }[];
18
+ meta: {
19
+ total: number;
20
+ limit: any;
21
+ offset: any;
22
+ };
23
+ }>;
24
+ saveConfiguration(configData: any): Promise<{
25
+ success: boolean;
26
+ message: string;
27
+ data: any;
28
+ }>;
29
+ getConfigStatus(): Promise<{
30
+ stripe: boolean;
31
+ paypal: boolean;
32
+ }>;
33
+ };
34
+ product: ({ strapi, }: {
35
+ strapi: import("@strapi/types/dist/core").Strapi;
36
+ }) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
37
+ subscription: ({ strapi, }: {
38
+ strapi: import("@strapi/types/dist/core").Strapi;
39
+ }) => Partial<import("@strapi/types/dist/core/core-api/service").Base> & import("@strapi/types/dist/core/core-api/service").Generic & import("@strapi/types/dist/core/core-api/service").Base;
40
+ };
41
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ initializePayment(amount: any, currency: any, orderId: any, options: any): Promise<any>;
3
+ processWebhook(payload: any, signature: any): Promise<any>;
4
+ refundPayment(transactionId: any, amount: any, options: any): Promise<any>;
5
+ getPaymentDetails(transactionId: any): Promise<any>;
6
+ };
7
+ export default _default;
@@ -0,0 +1,33 @@
1
+ declare const _default: {
2
+ initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
3
+ processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
4
+ refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
5
+ getPaymentDetails(gateway: any, transactionId: any): Promise<any>;
6
+ getTransactions(gateway: any, status: any, limit: any, offset: any): Promise<{
7
+ data: {
8
+ id: string;
9
+ amount: number;
10
+ currency: string;
11
+ status: string;
12
+ date: string;
13
+ customer: string;
14
+ paymentMethod: string;
15
+ gateway: any;
16
+ }[];
17
+ meta: {
18
+ total: number;
19
+ limit: any;
20
+ offset: any;
21
+ };
22
+ }>;
23
+ saveConfiguration(configData: any): Promise<{
24
+ success: boolean;
25
+ message: string;
26
+ data: any;
27
+ }>;
28
+ getConfigStatus(): Promise<{
29
+ stripe: boolean;
30
+ paypal: boolean;
31
+ }>;
32
+ };
33
+ export default _default;