@reeboot/strapi-payment-plugin 0.0.1 → 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 (84) hide show
  1. package/README.md +378 -119
  2. package/dist/_chunks/Analytics-C2GKvPDX.js +355 -0
  3. package/dist/_chunks/Analytics-Chydh3dg.mjs +355 -0
  4. package/dist/_chunks/App-BCbEuN6h.mjs +68 -0
  5. package/dist/_chunks/App-E2k2mo5p.js +70 -0
  6. package/dist/_chunks/Customers-B8BlQ1BO.mjs +273 -0
  7. package/dist/_chunks/Customers-D0O5ET5C.js +273 -0
  8. package/dist/_chunks/Dashboard-CuqclLak.js +180 -0
  9. package/dist/_chunks/Dashboard-D8-ifJqB.mjs +180 -0
  10. package/dist/_chunks/Orders-5WGSzPGo.js +308 -0
  11. package/dist/_chunks/Orders-ClJJaQrX.mjs +308 -0
  12. package/dist/_chunks/Payments-CIMyOC3n.js +489 -0
  13. package/dist/_chunks/Payments-CRnRBf48.mjs +489 -0
  14. package/dist/_chunks/Settings-BXMLePI_.js +357 -0
  15. package/dist/_chunks/Settings-TeAvV4RH.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-BTk7a2T5.js +66 -0
  19. package/dist/_chunks/index-Bz8V_5zH.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 +1746 -984
  37. package/dist/server/index.mjs +1748 -986
  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,11 +1,5 @@
1
- /**
2
- * An asynchronous bootstrap function that runs before
3
- * your application gets started.
4
- *
5
- * This gives you an opportunity to set up your data
6
- * model, run jobs, or perform some special logic.
7
- */
8
- declare const _default: ({ strapi }: {
9
- strapi: any;
10
- }) => Promise<void>;
11
- export default _default;
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const bootstrap: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => void;
5
+ export default bootstrap;
@@ -1,15 +1,5 @@
1
1
  declare const _default: {
2
2
  default: {};
3
3
  validator(): void;
4
- stripe: {
5
- secretKey: string;
6
- publishableKey: string;
7
- webhookSecret: string;
8
- };
9
- paypal: {
10
- clientId: string;
11
- clientSecret: string;
12
- webhookId: string;
13
- };
14
4
  };
15
5
  export default _default;
@@ -0,0 +1,69 @@
1
+ declare const _default: {
2
+ schema: {
3
+ kind: string;
4
+ collectionName: string;
5
+ info: {
6
+ singularName: string;
7
+ pluralName: string;
8
+ displayName: string;
9
+ description: string;
10
+ };
11
+ options: {
12
+ draftAndPublish: boolean;
13
+ };
14
+ pluginOptions: {
15
+ i18n: {
16
+ localized: boolean;
17
+ };
18
+ };
19
+ attributes: {
20
+ email: {
21
+ type: string;
22
+ unique: boolean;
23
+ required: boolean;
24
+ configurable: boolean;
25
+ };
26
+ stripe_customer_id: {
27
+ type: string;
28
+ unique: boolean;
29
+ required: boolean;
30
+ configurable: boolean;
31
+ };
32
+ first_name: {
33
+ type: string;
34
+ required: boolean;
35
+ configurable: boolean;
36
+ };
37
+ last_name: {
38
+ type: string;
39
+ required: boolean;
40
+ configurable: boolean;
41
+ };
42
+ phone: {
43
+ type: string;
44
+ configurable: boolean;
45
+ };
46
+ address: {
47
+ type: string;
48
+ configurable: boolean;
49
+ };
50
+ metadata: {
51
+ type: string;
52
+ configurable: boolean;
53
+ };
54
+ orders: {
55
+ type: string;
56
+ relation: string;
57
+ target: string;
58
+ mappedBy: string;
59
+ };
60
+ payments: {
61
+ type: string;
62
+ relation: string;
63
+ target: string;
64
+ mappedBy: string;
65
+ };
66
+ };
67
+ };
68
+ };
69
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- product: {
2
+ customer: {
3
3
  schema: {
4
4
  kind: string;
5
5
  collectionName: string;
@@ -13,55 +13,61 @@ declare const _default: {
13
13
  draftAndPublish: boolean;
14
14
  };
15
15
  pluginOptions: {
16
- "content-manager": {
17
- visible: boolean;
18
- };
19
- "content-type-builder": {
20
- visible: boolean;
16
+ i18n: {
17
+ localized: boolean;
21
18
  };
22
19
  };
23
20
  attributes: {
24
- name: {
21
+ email: {
25
22
  type: string;
23
+ unique: boolean;
26
24
  required: boolean;
25
+ configurable: boolean;
27
26
  };
28
- description: {
29
- type: string;
30
- };
31
- price: {
27
+ stripe_customer_id: {
32
28
  type: string;
29
+ unique: boolean;
33
30
  required: boolean;
31
+ configurable: boolean;
34
32
  };
35
- currency: {
33
+ first_name: {
36
34
  type: string;
37
35
  required: boolean;
38
- default: string;
36
+ configurable: boolean;
39
37
  };
40
- isSubscription: {
38
+ last_name: {
41
39
  type: string;
42
- default: boolean;
40
+ required: boolean;
41
+ configurable: boolean;
43
42
  };
44
- subscriptionInterval: {
43
+ phone: {
45
44
  type: string;
46
- enum: string[];
47
- default: string;
45
+ configurable: boolean;
48
46
  };
49
- stripeProductId: {
47
+ address: {
50
48
  type: string;
49
+ configurable: boolean;
51
50
  };
52
- paypalProductId: {
51
+ metadata: {
53
52
  type: string;
53
+ configurable: boolean;
54
54
  };
55
- createdAt: {
55
+ orders: {
56
56
  type: string;
57
+ relation: string;
58
+ target: string;
59
+ mappedBy: string;
57
60
  };
58
- updatedAt: {
61
+ payments: {
59
62
  type: string;
63
+ relation: string;
64
+ target: string;
65
+ mappedBy: string;
60
66
  };
61
67
  };
62
68
  };
63
69
  };
64
- subscription: {
70
+ order: {
65
71
  schema: {
66
72
  kind: string;
67
73
  collectionName: string;
@@ -75,47 +81,125 @@ declare const _default: {
75
81
  draftAndPublish: boolean;
76
82
  };
77
83
  pluginOptions: {
78
- "content-manager": {
79
- visible: boolean;
80
- };
81
- "content-type-builder": {
82
- visible: boolean;
84
+ i18n: {
85
+ localized: boolean;
83
86
  };
84
87
  };
85
88
  attributes: {
86
- user: {
89
+ order_number: {
90
+ type: string;
91
+ unique: boolean;
92
+ required: boolean;
93
+ configurable: boolean;
94
+ };
95
+ total_amount: {
96
+ type: string;
97
+ required: boolean;
98
+ min: number;
99
+ configurable: boolean;
100
+ default: number;
101
+ };
102
+ currency: {
103
+ type: string;
104
+ required: boolean;
105
+ default: string;
106
+ configurable: boolean;
107
+ };
108
+ status: {
109
+ type: string;
110
+ enum: string[];
111
+ required: boolean;
112
+ default: string;
113
+ configurable: boolean;
114
+ };
115
+ customer: {
87
116
  type: string;
88
117
  relation: string;
89
118
  target: string;
119
+ inversedBy: string;
90
120
  };
91
- product: {
121
+ payments: {
92
122
  type: string;
93
123
  relation: string;
94
124
  target: string;
125
+ mappedBy: string;
95
126
  };
96
- status: {
127
+ items: {
97
128
  type: string;
98
- enum: string[];
99
- default: string;
129
+ required: boolean;
130
+ configurable: boolean;
100
131
  };
101
- startDate: {
132
+ metadata: {
102
133
  type: string;
134
+ configurable: boolean;
135
+ };
136
+ };
137
+ };
138
+ };
139
+ payment: {
140
+ schema: {
141
+ kind: string;
142
+ collectionName: string;
143
+ info: {
144
+ singularName: string;
145
+ pluralName: string;
146
+ displayName: string;
147
+ description: string;
148
+ };
149
+ options: {
150
+ draftAndPublish: boolean;
151
+ };
152
+ pluginOptions: {
153
+ i18n: {
154
+ localized: boolean;
155
+ };
156
+ };
157
+ attributes: {
158
+ stripe_payment_intent_id: {
159
+ type: string;
160
+ unique: boolean;
103
161
  required: boolean;
162
+ configurable: boolean;
104
163
  };
105
- endDate: {
164
+ amount: {
106
165
  type: string;
166
+ required: boolean;
167
+ min: number;
168
+ configurable: boolean;
169
+ default: number;
107
170
  };
108
- stripeSubscriptionId: {
171
+ currency: {
109
172
  type: string;
173
+ required: boolean;
174
+ default: string;
175
+ configurable: boolean;
110
176
  };
111
- paypalSubscriptionId: {
177
+ status: {
112
178
  type: string;
179
+ enum: string[];
180
+ required: boolean;
181
+ default: string;
182
+ configurable: boolean;
113
183
  };
114
- createdAt: {
184
+ payment_method: {
115
185
  type: string;
186
+ configurable: boolean;
116
187
  };
117
- updatedAt: {
188
+ metadata: {
118
189
  type: string;
190
+ configurable: boolean;
191
+ };
192
+ customer: {
193
+ type: string;
194
+ relation: string;
195
+ target: string;
196
+ inversedBy: string;
197
+ };
198
+ order: {
199
+ type: string;
200
+ relation: string;
201
+ target: string;
202
+ inversedBy: string;
119
203
  };
120
204
  };
121
205
  };
@@ -12,50 +12,57 @@ declare const _default: {
12
12
  draftAndPublish: boolean;
13
13
  };
14
14
  pluginOptions: {
15
- "content-manager": {
16
- visible: boolean;
17
- };
18
- "content-type-builder": {
19
- visible: boolean;
15
+ i18n: {
16
+ localized: boolean;
20
17
  };
21
18
  };
22
19
  attributes: {
23
- name: {
20
+ order_number: {
24
21
  type: string;
22
+ unique: boolean;
25
23
  required: boolean;
24
+ configurable: boolean;
26
25
  };
27
- description: {
28
- type: string;
29
- };
30
- price: {
26
+ total_amount: {
31
27
  type: string;
32
28
  required: boolean;
29
+ min: number;
30
+ configurable: boolean;
31
+ default: number;
33
32
  };
34
33
  currency: {
35
34
  type: string;
36
35
  required: boolean;
37
36
  default: string;
37
+ configurable: boolean;
38
38
  };
39
- isSubscription: {
40
- type: string;
41
- default: boolean;
42
- };
43
- subscriptionInterval: {
39
+ status: {
44
40
  type: string;
45
41
  enum: string[];
42
+ required: boolean;
46
43
  default: string;
44
+ configurable: boolean;
47
45
  };
48
- stripeProductId: {
46
+ customer: {
49
47
  type: string;
48
+ relation: string;
49
+ target: string;
50
+ inversedBy: string;
50
51
  };
51
- paypalProductId: {
52
+ payments: {
52
53
  type: string;
54
+ relation: string;
55
+ target: string;
56
+ mappedBy: string;
53
57
  };
54
- createdAt: {
58
+ items: {
55
59
  type: string;
60
+ required: boolean;
61
+ configurable: boolean;
56
62
  };
57
- updatedAt: {
63
+ metadata: {
58
64
  type: string;
65
+ configurable: boolean;
59
66
  };
60
67
  };
61
68
  };
@@ -12,47 +12,56 @@ declare const _default: {
12
12
  draftAndPublish: boolean;
13
13
  };
14
14
  pluginOptions: {
15
- "content-manager": {
16
- visible: boolean;
17
- };
18
- "content-type-builder": {
19
- visible: boolean;
15
+ i18n: {
16
+ localized: boolean;
20
17
  };
21
18
  };
22
19
  attributes: {
23
- user: {
20
+ stripe_payment_intent_id: {
24
21
  type: string;
25
- relation: string;
26
- target: string;
22
+ unique: boolean;
23
+ required: boolean;
24
+ configurable: boolean;
27
25
  };
28
- product: {
26
+ amount: {
29
27
  type: string;
30
- relation: string;
31
- target: string;
28
+ required: boolean;
29
+ min: number;
30
+ configurable: boolean;
31
+ default: number;
32
32
  };
33
- status: {
33
+ currency: {
34
34
  type: string;
35
- enum: string[];
35
+ required: boolean;
36
36
  default: string;
37
+ configurable: boolean;
37
38
  };
38
- startDate: {
39
+ status: {
39
40
  type: string;
41
+ enum: string[];
40
42
  required: boolean;
43
+ default: string;
44
+ configurable: boolean;
41
45
  };
42
- endDate: {
43
- type: string;
44
- };
45
- stripeSubscriptionId: {
46
+ payment_method: {
46
47
  type: string;
48
+ configurable: boolean;
47
49
  };
48
- paypalSubscriptionId: {
50
+ metadata: {
49
51
  type: string;
52
+ configurable: boolean;
50
53
  };
51
- createdAt: {
54
+ customer: {
52
55
  type: string;
56
+ relation: string;
57
+ target: string;
58
+ inversedBy: string;
53
59
  };
54
- updatedAt: {
60
+ order: {
55
61
  type: string;
62
+ relation: string;
63
+ target: string;
64
+ inversedBy: string;
56
65
  };
57
66
  };
58
67
  };
@@ -1,14 +1,7 @@
1
- declare const _default: ({ strapi }: {
2
- strapi: any;
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const controller: ({ strapi }: {
3
+ strapi: Core.Strapi;
3
4
  }) => {
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
- testPayment(ctx: any): Promise<void>;
12
- testPaymentWithRedirect(ctx: any): Promise<void>;
5
+ index(ctx: any): void;
13
6
  };
14
- export default _default;
7
+ export default controller;
@@ -1,41 +1,36 @@
1
1
  /// <reference types="koa" />
2
2
  declare const _default: {
3
3
  controller: ({ strapi }: {
4
- strapi: any;
5
- }) => {
6
- initiatePayment(ctx: any): Promise<void>;
7
- processWebhook(ctx: any): Promise<void>;
8
- refundPayment(ctx: any): Promise<void>;
9
- getPaymentDetails(ctx: any): Promise<void>;
10
- getTransactions(ctx: any): Promise<void>;
11
- saveConfiguration(ctx: any): Promise<void>;
12
- getConfigStatus(ctx: any): Promise<void>;
13
- testPayment(ctx: any): Promise<void>;
14
- testPaymentWithRedirect(ctx: any): Promise<void>;
15
- };
16
- product: ({ strapi, }: {
17
- strapi: import("@strapi/types/dist/core").Strapi;
18
- }) => {
19
- create: (ctx: import("koa").Context) => Promise<void>;
20
- update: (ctx: import("koa").Context) => Promise<void>;
21
- find: (ctx: import("koa").Context) => Promise<void>;
22
- findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
23
- delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
24
- sync: (ctx: import("koa").Context) => Promise<import("koa").Context>;
25
- getStripeProducts: (ctx: import("koa").Context) => Promise<void>;
26
- importFromStripe: (ctx: import("koa").Context) => Promise<import("koa").Context>;
27
- createPaymentLink: (ctx: import("koa").Context) => Promise<import("koa").Context>;
28
- } & import("@strapi/types/dist/core/core-api/controller").Base;
29
- subscription: ({ strapi, }: {
30
4
  strapi: import("@strapi/types/dist/core").Strapi;
31
5
  }) => {
32
- create: (ctx: import("koa").Context) => Promise<void>;
33
- update: (ctx: import("koa").Context) => Promise<void>;
34
- find: (ctx: import("koa").Context) => Promise<void>;
35
- findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
36
- delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
37
- sync: (ctx: import("koa").Context) => Promise<void>;
38
- cancel: (ctx: import("koa").Context) => Promise<void>;
39
- } & import("@strapi/types/dist/core/core-api/controller").Base;
6
+ index(ctx: any): void;
7
+ };
8
+ stripe: {
9
+ createPaymentIntent(ctx: import("koa").Context): Promise<import("koa").Context>;
10
+ confirmPayment(ctx: import("koa").Context): Promise<import("koa").Context>;
11
+ createCustomer(ctx: import("koa").Context): Promise<import("koa").Context>;
12
+ retrieveCustomer(ctx: import("koa").Context): Promise<import("koa").Context>;
13
+ createRefund(ctx: import("koa").Context): Promise<import("koa").Context>;
14
+ handleWebhook(ctx: import("koa").Context): Promise<import("koa").Context>;
15
+ getServiceStatus(ctx: import("koa").Context): Promise<void>;
16
+ getPaymentDetails(ctx: import("koa").Context): Promise<any>;
17
+ listPayments(ctx: import("koa").Context): Promise<void>;
18
+ listCustomers(ctx: import("koa").Context): Promise<void>;
19
+ createOrder(ctx: import("koa").Context): Promise<import("koa").Context>;
20
+ getOrderDetails(ctx: import("koa").Context): Promise<import("koa").Context>;
21
+ listOrders(ctx: import("koa").Context): Promise<void>;
22
+ getDashboardData(ctx: import("koa").Context): Promise<void>;
23
+ getPaymentReports(ctx: import("koa").Context): Promise<void>;
24
+ getPluginConfig(ctx: import("koa").Context): Promise<void>;
25
+ updatePluginConfig(ctx: import("koa").Context): Promise<void>;
26
+ getAnalytics(ctx: import("koa").Context): Promise<void>;
27
+ adminCreateRefund(ctx: import("koa").Context): Promise<import("koa").Context>;
28
+ adminListPayments(ctx: import("koa").Context): Promise<void>;
29
+ adminListCustomers(ctx: import("koa").Context): Promise<void>;
30
+ adminListOrders(ctx: import("koa").Context): Promise<void>;
31
+ testWebhook(ctx: import("koa").Context): Promise<void>;
32
+ initializePayment(ctx: import("koa").Context): Promise<void>;
33
+ createSamplePayment(ctx: import("koa").Context): Promise<void>;
34
+ };
40
35
  };
41
36
  export default _default;
@@ -0,0 +1,104 @@
1
+ import type { Context } from 'koa';
2
+ declare const stripeController: {
3
+ /**
4
+ * Create a payment intent
5
+ */
6
+ createPaymentIntent(ctx: Context): Promise<Context>;
7
+ /**
8
+ * Confirm a payment intent
9
+ */
10
+ confirmPayment(ctx: Context): Promise<Context>;
11
+ /**
12
+ * Create a Stripe customer
13
+ */
14
+ createCustomer(ctx: Context): Promise<Context>;
15
+ /**
16
+ * Retrieve a Stripe customer
17
+ */
18
+ retrieveCustomer(ctx: Context): Promise<Context>;
19
+ /**
20
+ * Create a refund
21
+ */
22
+ createRefund(ctx: Context): Promise<Context>;
23
+ /**
24
+ * Handle Stripe webhooks
25
+ */
26
+ handleWebhook(ctx: Context): Promise<Context>;
27
+ /**
28
+ * Get Stripe service status/health check
29
+ */
30
+ getServiceStatus(ctx: Context): Promise<void>;
31
+ /**
32
+ * Get payment details by Stripe payment intent ID
33
+ */
34
+ getPaymentDetails(ctx: Context): Promise<any>;
35
+ /**
36
+ * List payments with filtering and pagination
37
+ */
38
+ listPayments(ctx: Context): Promise<void>;
39
+ /**
40
+ * List customers with filtering and pagination
41
+ */
42
+ listCustomers(ctx: Context): Promise<void>;
43
+ /**
44
+ * Create a new order
45
+ */
46
+ createOrder(ctx: Context): Promise<Context>;
47
+ /**
48
+ * Get order details by ID
49
+ */
50
+ getOrderDetails(ctx: Context): Promise<Context>;
51
+ /**
52
+ * List orders with filtering and pagination
53
+ */
54
+ listOrders(ctx: Context): Promise<void>;
55
+ /**
56
+ * Get dashboard data for admin panel
57
+ */
58
+ getDashboardData(ctx: Context): Promise<void>;
59
+ /**
60
+ * Get payment reports
61
+ */
62
+ getPaymentReports(ctx: Context): Promise<void>;
63
+ /**
64
+ * Get plugin configuration
65
+ */
66
+ getPluginConfig(ctx: Context): Promise<void>;
67
+ /**
68
+ * Update plugin configuration
69
+ */
70
+ updatePluginConfig(ctx: Context): Promise<void>;
71
+ /**
72
+ * Get analytics data
73
+ */
74
+ getAnalytics(ctx: Context): Promise<void>;
75
+ /**
76
+ * Admin create refund
77
+ */
78
+ adminCreateRefund(ctx: Context): Promise<Context>;
79
+ /**
80
+ * Admin list payments (no user restrictions)
81
+ */
82
+ adminListPayments(ctx: Context): Promise<void>;
83
+ /**
84
+ * Admin list customers (no user restrictions)
85
+ */
86
+ adminListCustomers(ctx: Context): Promise<void>;
87
+ /**
88
+ * Admin list orders (no user restrictions)
89
+ */
90
+ adminListOrders(ctx: Context): Promise<void>;
91
+ /**
92
+ * Test webhook endpoint
93
+ */
94
+ testWebhook(ctx: Context): Promise<void>;
95
+ /**
96
+ * Initialize a functional payment flow (Customer -> Order -> PI)
97
+ */
98
+ initializePayment(ctx: Context): Promise<void>;
99
+ /**
100
+ * Create and confirm a sample payment for dashboard demonstration
101
+ */
102
+ createSamplePayment(ctx: Context): Promise<void>;
103
+ };
104
+ export default stripeController;