@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.
- package/README.md +378 -119
- package/dist/_chunks/Analytics-C2GKvPDX.js +355 -0
- package/dist/_chunks/Analytics-Chydh3dg.mjs +355 -0
- package/dist/_chunks/App-BCbEuN6h.mjs +68 -0
- package/dist/_chunks/App-E2k2mo5p.js +70 -0
- package/dist/_chunks/Customers-B8BlQ1BO.mjs +273 -0
- package/dist/_chunks/Customers-D0O5ET5C.js +273 -0
- package/dist/_chunks/Dashboard-CuqclLak.js +180 -0
- package/dist/_chunks/Dashboard-D8-ifJqB.mjs +180 -0
- package/dist/_chunks/Orders-5WGSzPGo.js +308 -0
- package/dist/_chunks/Orders-ClJJaQrX.mjs +308 -0
- package/dist/_chunks/Payments-CIMyOC3n.js +489 -0
- package/dist/_chunks/Payments-CRnRBf48.mjs +489 -0
- package/dist/_chunks/Settings-BXMLePI_.js +357 -0
- package/dist/_chunks/Settings-TeAvV4RH.mjs +357 -0
- package/dist/_chunks/en-BJocyOVu.mjs +240 -0
- package/dist/_chunks/en-BkVAf_R4.js +240 -0
- package/dist/_chunks/index-BTk7a2T5.js +66 -0
- package/dist/_chunks/index-Bz8V_5zH.mjs +67 -0
- package/dist/admin/index.js +2 -63
- package/dist/admin/index.mjs +2 -63
- package/dist/admin/src/components/AnalyticsChart.d.ts +19 -0
- package/dist/admin/src/components/CustomerList.d.ts +21 -0
- package/dist/admin/src/components/OrderList.d.ts +27 -0
- package/dist/admin/src/components/PaymentCard.d.ts +39 -0
- package/dist/admin/src/components/PaymentList.d.ts +19 -0
- package/dist/admin/src/components/RefundModal.d.ts +15 -0
- package/dist/admin/src/pages/Analytics.d.ts +2 -0
- package/dist/admin/src/pages/Customers.d.ts +2 -0
- package/dist/admin/src/pages/Dashboard.d.ts +2 -0
- package/dist/admin/src/pages/HomePage.d.ts +1 -1
- package/dist/admin/src/pages/Orders.d.ts +2 -0
- package/dist/admin/src/pages/Payments.d.ts +2 -0
- package/dist/admin/src/pages/Settings.d.ts +2 -0
- package/dist/admin/src/pluginId.d.ts +1 -1
- package/dist/server/index.js +1746 -984
- package/dist/server/index.mjs +1748 -986
- package/dist/server/src/bootstrap.d.ts +5 -11
- package/dist/server/src/config/index.d.ts +0 -10
- package/dist/server/src/content-types/customer/index.d.ts +69 -0
- package/dist/server/src/content-types/index.d.ts +123 -39
- package/dist/server/src/content-types/{product.d.ts → order/index.d.ts} +26 -19
- package/dist/server/src/content-types/{subscription.d.ts → payment/index.d.ts} +30 -21
- package/dist/server/src/controllers/controller.d.ts +5 -12
- package/dist/server/src/controllers/index.d.ts +29 -34
- package/dist/server/src/controllers/stripe.d.ts +104 -0
- package/dist/server/src/index.d.ts +179 -139
- package/dist/server/src/middlewares/index.d.ts +19 -1
- package/dist/server/src/policies/index.d.ts +3 -1
- package/dist/server/src/routes/{admin-routes.d.ts → admin/index.d.ts} +4 -4
- package/dist/server/src/routes/content-api/index.d.ts +21 -0
- package/dist/server/src/routes/index.d.ts +11 -16
- package/dist/server/src/services/index.d.ts +2 -38
- package/dist/server/src/services/{stripeDriver.d.ts → stripe.d.ts} +52 -59
- package/dist/server/src/types/index.d.ts +179 -0
- package/package.json +20 -25
- package/dist/_chunks/App-DD7GyuRr.mjs +0 -1424
- package/dist/_chunks/App-KZVBFRwo.js +0 -1424
- package/dist/_chunks/en-B4KWt_jN.js +0 -4
- package/dist/_chunks/en-Byx4XI2L.mjs +0 -4
- package/dist/admin/src/components/Header.d.ts +0 -2
- package/dist/admin/src/components/NavigationMenu.d.ts +0 -2
- package/dist/admin/src/components/Sidebar.d.ts +0 -2
- package/dist/admin/src/components/TransactionDetailsModal.d.ts +0 -18
- package/dist/admin/src/components/TransactionList.d.ts +0 -18
- package/dist/admin/src/pages/ConfigurationPage.d.ts +0 -2
- package/dist/admin/src/pages/DashboardPage.d.ts +0 -2
- package/dist/admin/src/pages/ProductsPage.d.ts +0 -2
- package/dist/admin/src/pages/SubscriptionsPage.d.ts +0 -2
- package/dist/admin/src/pages/TransactionsPage.d.ts +0 -2
- package/dist/server/src/controllers/product.d.ts +0 -18
- package/dist/server/src/controllers/subscription.d.ts +0 -16
- package/dist/server/src/controllers/webhook.d.ts +0 -10
- package/dist/server/src/routes/content-api.d.ts +0 -12
- package/dist/server/src/routes/product.d.ts +0 -2
- package/dist/server/src/routes/refund-routes.d.ts +0 -13
- package/dist/server/src/routes/subscription.d.ts +0 -5
- package/dist/server/src/routes/webhook.d.ts +0 -15
- package/dist/server/src/services/paypalDriver.d.ts +0 -47
- package/dist/server/src/services/product.d.ts +0 -7
- package/dist/server/src/services/service.d.ts +0 -26
- package/dist/server/src/services/subscription.d.ts +0 -9
- package/dist/server/src/services/sync.d.ts +0 -13
- package/jest.config.js +0 -13
|
@@ -4,146 +4,93 @@ declare const _default: {
|
|
|
4
4
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
5
5
|
}) => void;
|
|
6
6
|
bootstrap: ({ strapi }: {
|
|
7
|
-
strapi:
|
|
8
|
-
}) =>
|
|
7
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
8
|
+
}) => void;
|
|
9
9
|
destroy: ({ strapi }: {
|
|
10
10
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
11
11
|
}) => void;
|
|
12
12
|
config: {
|
|
13
13
|
default: {};
|
|
14
14
|
validator(): void;
|
|
15
|
-
stripe: {
|
|
16
|
-
secretKey: string;
|
|
17
|
-
publishableKey: string;
|
|
18
|
-
webhookSecret: string;
|
|
19
|
-
};
|
|
20
|
-
paypal: {
|
|
21
|
-
clientId: string;
|
|
22
|
-
clientSecret: string;
|
|
23
|
-
webhookId: string;
|
|
24
|
-
};
|
|
25
15
|
};
|
|
26
16
|
controllers: {
|
|
27
17
|
controller: ({ strapi }: {
|
|
28
|
-
strapi: any;
|
|
29
|
-
}) => {
|
|
30
|
-
initiatePayment(ctx: any): Promise<void>;
|
|
31
|
-
processWebhook(ctx: any): Promise<void>;
|
|
32
|
-
refundPayment(ctx: any): Promise<void>;
|
|
33
|
-
getPaymentDetails(ctx: any): Promise<void>;
|
|
34
|
-
getTransactions(ctx: any): Promise<void>;
|
|
35
|
-
saveConfiguration(ctx: any): Promise<void>;
|
|
36
|
-
getConfigStatus(ctx: any): Promise<void>;
|
|
37
|
-
testPayment(ctx: any): Promise<void>;
|
|
38
|
-
testPaymentWithRedirect(ctx: any): Promise<void>;
|
|
39
|
-
};
|
|
40
|
-
product: ({ strapi, }: {
|
|
41
18
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
42
19
|
}) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
20
|
+
index(ctx: any): void;
|
|
21
|
+
};
|
|
22
|
+
stripe: {
|
|
23
|
+
createPaymentIntent(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
24
|
+
confirmPayment(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
25
|
+
createCustomer(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
26
|
+
retrieveCustomer(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
27
|
+
createRefund(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
28
|
+
handleWebhook(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
29
|
+
getServiceStatus(ctx: import("koa").Context): Promise<void>;
|
|
30
|
+
getPaymentDetails(ctx: import("koa").Context): Promise<any>;
|
|
31
|
+
listPayments(ctx: import("koa").Context): Promise<void>;
|
|
32
|
+
listCustomers(ctx: import("koa").Context): Promise<void>;
|
|
33
|
+
createOrder(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
34
|
+
getOrderDetails(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
35
|
+
listOrders(ctx: import("koa").Context): Promise<void>;
|
|
36
|
+
getDashboardData(ctx: import("koa").Context): Promise<void>;
|
|
37
|
+
getPaymentReports(ctx: import("koa").Context): Promise<void>;
|
|
38
|
+
getPluginConfig(ctx: import("koa").Context): Promise<void>;
|
|
39
|
+
updatePluginConfig(ctx: import("koa").Context): Promise<void>;
|
|
40
|
+
getAnalytics(ctx: import("koa").Context): Promise<void>;
|
|
41
|
+
adminCreateRefund(ctx: import("koa").Context): Promise<import("koa").Context>;
|
|
42
|
+
adminListPayments(ctx: import("koa").Context): Promise<void>;
|
|
43
|
+
adminListCustomers(ctx: import("koa").Context): Promise<void>;
|
|
44
|
+
adminListOrders(ctx: import("koa").Context): Promise<void>;
|
|
45
|
+
testWebhook(ctx: import("koa").Context): Promise<void>;
|
|
46
|
+
initializePayment(ctx: import("koa").Context): Promise<void>;
|
|
47
|
+
createSamplePayment(ctx: import("koa").Context): Promise<void>;
|
|
48
|
+
};
|
|
64
49
|
};
|
|
65
50
|
routes: {
|
|
66
|
-
|
|
51
|
+
'content-api': {
|
|
67
52
|
type: string;
|
|
68
|
-
routes: {
|
|
53
|
+
routes: ({
|
|
69
54
|
method: string;
|
|
70
55
|
path: string;
|
|
71
56
|
handler: string;
|
|
72
57
|
config: {
|
|
73
|
-
policies: any[];
|
|
74
58
|
auth: boolean;
|
|
59
|
+
policies: any[];
|
|
75
60
|
};
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
refundRoutes: {
|
|
79
|
-
type: string;
|
|
80
|
-
routes: {
|
|
61
|
+
} | {
|
|
81
62
|
method: string;
|
|
82
63
|
path: string;
|
|
83
64
|
handler: string;
|
|
84
65
|
config: {
|
|
85
66
|
policies: any[];
|
|
86
|
-
auth
|
|
67
|
+
auth?: undefined;
|
|
87
68
|
};
|
|
88
|
-
}[];
|
|
69
|
+
})[];
|
|
89
70
|
};
|
|
90
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Plugin server methods
|
|
73
|
+
*/
|
|
74
|
+
admin: {
|
|
91
75
|
type: string;
|
|
92
76
|
routes: {
|
|
93
77
|
method: string;
|
|
94
78
|
path: string;
|
|
95
79
|
handler: string;
|
|
96
80
|
config: {
|
|
97
|
-
policies:
|
|
81
|
+
policies: string[];
|
|
82
|
+
middlewares: any[];
|
|
98
83
|
};
|
|
99
84
|
}[];
|
|
100
85
|
};
|
|
101
|
-
productRoutes: import("@strapi/types/dist/core/core-api/router").Router;
|
|
102
|
-
subscriptionRoutes: import("@strapi/types/dist/core/core-api/router").Router;
|
|
103
86
|
};
|
|
104
87
|
services: {
|
|
105
|
-
|
|
106
|
-
strapi: any;
|
|
107
|
-
}) => {
|
|
108
|
-
initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
|
|
109
|
-
processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
|
|
110
|
-
refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
|
|
111
|
-
getPaymentDetails(gateway: any, transactionId: any): Promise<any>;
|
|
112
|
-
getTransactions(gateway: any, status: any, limit?: number, offset?: number): Promise<{
|
|
113
|
-
data: any[];
|
|
114
|
-
meta: {
|
|
115
|
-
total: number;
|
|
116
|
-
limit: number;
|
|
117
|
-
offset: number;
|
|
118
|
-
};
|
|
119
|
-
}>;
|
|
120
|
-
saveConfiguration(configData: any): Promise<{
|
|
121
|
-
success: boolean;
|
|
122
|
-
message: string;
|
|
123
|
-
data: any;
|
|
124
|
-
}>;
|
|
125
|
-
getConfigStatus(): Promise<{
|
|
126
|
-
stripe: boolean;
|
|
127
|
-
paypal: boolean;
|
|
128
|
-
}>;
|
|
129
|
-
};
|
|
130
|
-
product: ({ strapi, }: {
|
|
88
|
+
stripe: ({ strapi }: {
|
|
131
89
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
132
|
-
}) =>
|
|
133
|
-
createProduct: (productData: any) => Promise<any>;
|
|
134
|
-
updateProduct: (id: any, productData: any) => Promise<any>;
|
|
135
|
-
} & import("@strapi/types/dist/core/core-api/service").Base;
|
|
136
|
-
subscription: ({ strapi, }: {
|
|
137
|
-
strapi: import("@strapi/types/dist/core").Strapi;
|
|
138
|
-
}) => {
|
|
139
|
-
createSubscription: (subscriptionData: any) => Promise<any>;
|
|
140
|
-
updateSubscription: (id: any, subscriptionData: any) => Promise<any>;
|
|
141
|
-
cancelSubscription: (id: any) => Promise<any>;
|
|
142
|
-
syncSubscriptionStatus: (id: any) => Promise<any>;
|
|
143
|
-
} & import("@strapi/types/dist/core/core-api/service").Base;
|
|
90
|
+
}) => import("./services/stripe").StripeService;
|
|
144
91
|
};
|
|
145
92
|
contentTypes: {
|
|
146
|
-
|
|
93
|
+
customer: {
|
|
147
94
|
schema: {
|
|
148
95
|
kind: string;
|
|
149
96
|
collectionName: string;
|
|
@@ -157,55 +104,61 @@ declare const _default: {
|
|
|
157
104
|
draftAndPublish: boolean;
|
|
158
105
|
};
|
|
159
106
|
pluginOptions: {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
};
|
|
163
|
-
"content-type-builder": {
|
|
164
|
-
visible: boolean;
|
|
107
|
+
i18n: {
|
|
108
|
+
localized: boolean;
|
|
165
109
|
};
|
|
166
110
|
};
|
|
167
111
|
attributes: {
|
|
168
|
-
|
|
112
|
+
email: {
|
|
169
113
|
type: string;
|
|
114
|
+
unique: boolean;
|
|
170
115
|
required: boolean;
|
|
116
|
+
configurable: boolean;
|
|
171
117
|
};
|
|
172
|
-
|
|
173
|
-
type: string;
|
|
174
|
-
};
|
|
175
|
-
price: {
|
|
118
|
+
stripe_customer_id: {
|
|
176
119
|
type: string;
|
|
120
|
+
unique: boolean;
|
|
177
121
|
required: boolean;
|
|
122
|
+
configurable: boolean;
|
|
178
123
|
};
|
|
179
|
-
|
|
124
|
+
first_name: {
|
|
180
125
|
type: string;
|
|
181
126
|
required: boolean;
|
|
182
|
-
|
|
127
|
+
configurable: boolean;
|
|
183
128
|
};
|
|
184
|
-
|
|
129
|
+
last_name: {
|
|
185
130
|
type: string;
|
|
186
|
-
|
|
131
|
+
required: boolean;
|
|
132
|
+
configurable: boolean;
|
|
187
133
|
};
|
|
188
|
-
|
|
134
|
+
phone: {
|
|
189
135
|
type: string;
|
|
190
|
-
|
|
191
|
-
default: string;
|
|
136
|
+
configurable: boolean;
|
|
192
137
|
};
|
|
193
|
-
|
|
138
|
+
address: {
|
|
194
139
|
type: string;
|
|
140
|
+
configurable: boolean;
|
|
195
141
|
};
|
|
196
|
-
|
|
142
|
+
metadata: {
|
|
197
143
|
type: string;
|
|
144
|
+
configurable: boolean;
|
|
198
145
|
};
|
|
199
|
-
|
|
146
|
+
orders: {
|
|
200
147
|
type: string;
|
|
148
|
+
relation: string;
|
|
149
|
+
target: string;
|
|
150
|
+
mappedBy: string;
|
|
201
151
|
};
|
|
202
|
-
|
|
152
|
+
payments: {
|
|
203
153
|
type: string;
|
|
154
|
+
relation: string;
|
|
155
|
+
target: string;
|
|
156
|
+
mappedBy: string;
|
|
204
157
|
};
|
|
205
158
|
};
|
|
206
159
|
};
|
|
207
160
|
};
|
|
208
|
-
|
|
161
|
+
order: {
|
|
209
162
|
schema: {
|
|
210
163
|
kind: string;
|
|
211
164
|
collectionName: string;
|
|
@@ -219,53 +172,140 @@ declare const _default: {
|
|
|
219
172
|
draftAndPublish: boolean;
|
|
220
173
|
};
|
|
221
174
|
pluginOptions: {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
};
|
|
225
|
-
"content-type-builder": {
|
|
226
|
-
visible: boolean;
|
|
175
|
+
i18n: {
|
|
176
|
+
localized: boolean;
|
|
227
177
|
};
|
|
228
178
|
};
|
|
229
179
|
attributes: {
|
|
230
|
-
|
|
180
|
+
order_number: {
|
|
181
|
+
type: string;
|
|
182
|
+
unique: boolean;
|
|
183
|
+
required: boolean;
|
|
184
|
+
configurable: boolean;
|
|
185
|
+
};
|
|
186
|
+
total_amount: {
|
|
187
|
+
type: string;
|
|
188
|
+
required: boolean;
|
|
189
|
+
min: number;
|
|
190
|
+
configurable: boolean;
|
|
191
|
+
default: number;
|
|
192
|
+
};
|
|
193
|
+
currency: {
|
|
194
|
+
type: string;
|
|
195
|
+
required: boolean;
|
|
196
|
+
default: string;
|
|
197
|
+
configurable: boolean;
|
|
198
|
+
};
|
|
199
|
+
status: {
|
|
200
|
+
type: string;
|
|
201
|
+
enum: string[];
|
|
202
|
+
required: boolean;
|
|
203
|
+
default: string;
|
|
204
|
+
configurable: boolean;
|
|
205
|
+
};
|
|
206
|
+
customer: {
|
|
231
207
|
type: string;
|
|
232
208
|
relation: string;
|
|
233
209
|
target: string;
|
|
210
|
+
inversedBy: string;
|
|
234
211
|
};
|
|
235
|
-
|
|
212
|
+
payments: {
|
|
236
213
|
type: string;
|
|
237
214
|
relation: string;
|
|
238
215
|
target: string;
|
|
216
|
+
mappedBy: string;
|
|
239
217
|
};
|
|
240
|
-
|
|
218
|
+
items: {
|
|
241
219
|
type: string;
|
|
242
|
-
|
|
243
|
-
|
|
220
|
+
required: boolean;
|
|
221
|
+
configurable: boolean;
|
|
222
|
+
};
|
|
223
|
+
metadata: {
|
|
224
|
+
type: string;
|
|
225
|
+
configurable: boolean;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Plugin server methods
|
|
232
|
+
*/
|
|
233
|
+
payment: {
|
|
234
|
+
schema: {
|
|
235
|
+
kind: string;
|
|
236
|
+
collectionName: string;
|
|
237
|
+
info: {
|
|
238
|
+
singularName: string;
|
|
239
|
+
pluralName: string;
|
|
240
|
+
displayName: string;
|
|
241
|
+
description: string;
|
|
242
|
+
};
|
|
243
|
+
options: {
|
|
244
|
+
draftAndPublish: boolean;
|
|
245
|
+
};
|
|
246
|
+
pluginOptions: {
|
|
247
|
+
i18n: {
|
|
248
|
+
localized: boolean;
|
|
244
249
|
};
|
|
245
|
-
|
|
250
|
+
};
|
|
251
|
+
attributes: {
|
|
252
|
+
stripe_payment_intent_id: {
|
|
246
253
|
type: string;
|
|
254
|
+
unique: boolean;
|
|
247
255
|
required: boolean;
|
|
256
|
+
configurable: boolean;
|
|
248
257
|
};
|
|
249
|
-
|
|
258
|
+
amount: {
|
|
250
259
|
type: string;
|
|
260
|
+
required: boolean;
|
|
261
|
+
min: number;
|
|
262
|
+
configurable: boolean;
|
|
263
|
+
default: number;
|
|
251
264
|
};
|
|
252
|
-
|
|
265
|
+
currency: {
|
|
253
266
|
type: string;
|
|
267
|
+
required: boolean;
|
|
268
|
+
default: string;
|
|
269
|
+
configurable: boolean;
|
|
254
270
|
};
|
|
255
|
-
|
|
271
|
+
status: {
|
|
256
272
|
type: string;
|
|
273
|
+
enum: string[];
|
|
274
|
+
required: boolean;
|
|
275
|
+
default: string;
|
|
276
|
+
configurable: boolean;
|
|
277
|
+
};
|
|
278
|
+
payment_method: {
|
|
279
|
+
type: string;
|
|
280
|
+
configurable: boolean;
|
|
281
|
+
};
|
|
282
|
+
metadata: {
|
|
283
|
+
type: string;
|
|
284
|
+
configurable: boolean;
|
|
257
285
|
};
|
|
258
|
-
|
|
286
|
+
customer: {
|
|
259
287
|
type: string;
|
|
288
|
+
relation: string;
|
|
289
|
+
target: string;
|
|
290
|
+
inversedBy: string;
|
|
260
291
|
};
|
|
261
|
-
|
|
292
|
+
order: {
|
|
262
293
|
type: string;
|
|
294
|
+
relation: string;
|
|
295
|
+
target: string;
|
|
296
|
+
inversedBy: string;
|
|
263
297
|
};
|
|
264
298
|
};
|
|
265
299
|
};
|
|
266
300
|
};
|
|
267
301
|
};
|
|
268
|
-
policies: {
|
|
269
|
-
|
|
302
|
+
policies: {
|
|
303
|
+
isAuthenticated: (ctx: any) => boolean;
|
|
304
|
+
};
|
|
305
|
+
middlewares: {
|
|
306
|
+
'webhook-validator': (ctx: import("koa").Context, next: () => Promise<any>) => Promise<import("koa").Context>;
|
|
307
|
+
rateLimiter: (ctx: import("koa").Context, next: () => Promise<any>) => Promise<any>;
|
|
308
|
+
inputSanitizer: (ctx: import("koa").Context, next: () => Promise<any>) => Promise<void>;
|
|
309
|
+
};
|
|
270
310
|
};
|
|
271
311
|
export default _default;
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Context } from 'koa';
|
|
2
|
+
/**
|
|
3
|
+
* Webhook validator middleware for Stripe webhooks
|
|
4
|
+
* This middleware validates the webhook signature and handles raw body parsing
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: {
|
|
7
|
+
/**
|
|
8
|
+
* Webhook signature validator
|
|
9
|
+
*/
|
|
10
|
+
'webhook-validator': (ctx: Context, next: () => Promise<any>) => Promise<Context>;
|
|
11
|
+
/**
|
|
12
|
+
* Rate limiter middleware for sensitive operations
|
|
13
|
+
*/
|
|
14
|
+
rateLimiter: (ctx: Context, next: () => Promise<any>) => Promise<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Input sanitization middleware
|
|
17
|
+
*/
|
|
18
|
+
inputSanitizer: (ctx: Context, next: () => Promise<any>) => Promise<void>;
|
|
19
|
+
};
|
|
2
20
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const routes: {
|
|
2
2
|
type: string;
|
|
3
3
|
routes: {
|
|
4
4
|
method: string;
|
|
5
5
|
path: string;
|
|
6
6
|
handler: string;
|
|
7
7
|
config: {
|
|
8
|
-
policies:
|
|
9
|
-
|
|
8
|
+
policies: string[];
|
|
9
|
+
middlewares: any[];
|
|
10
10
|
};
|
|
11
11
|
}[];
|
|
12
12
|
};
|
|
13
|
-
export default
|
|
13
|
+
export default routes;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const routes: {
|
|
2
|
+
type: string;
|
|
3
|
+
routes: ({
|
|
4
|
+
method: string;
|
|
5
|
+
path: string;
|
|
6
|
+
handler: string;
|
|
7
|
+
config: {
|
|
8
|
+
auth: boolean;
|
|
9
|
+
policies: any[];
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
method: string;
|
|
13
|
+
path: string;
|
|
14
|
+
handler: string;
|
|
15
|
+
config: {
|
|
16
|
+
policies: any[];
|
|
17
|
+
auth?: undefined;
|
|
18
|
+
};
|
|
19
|
+
})[];
|
|
20
|
+
};
|
|
21
|
+
export default routes;
|
|
@@ -1,40 +1,35 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
1
|
+
declare const routes: {
|
|
2
|
+
'content-api': {
|
|
3
3
|
type: string;
|
|
4
|
-
routes: {
|
|
4
|
+
routes: ({
|
|
5
5
|
method: string;
|
|
6
6
|
path: string;
|
|
7
7
|
handler: string;
|
|
8
8
|
config: {
|
|
9
|
-
policies: any[];
|
|
10
9
|
auth: boolean;
|
|
10
|
+
policies: any[];
|
|
11
11
|
};
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
refundRoutes: {
|
|
15
|
-
type: string;
|
|
16
|
-
routes: {
|
|
12
|
+
} | {
|
|
17
13
|
method: string;
|
|
18
14
|
path: string;
|
|
19
15
|
handler: string;
|
|
20
16
|
config: {
|
|
21
17
|
policies: any[];
|
|
22
|
-
auth
|
|
18
|
+
auth?: undefined;
|
|
23
19
|
};
|
|
24
|
-
}[];
|
|
20
|
+
})[];
|
|
25
21
|
};
|
|
26
|
-
|
|
22
|
+
admin: {
|
|
27
23
|
type: string;
|
|
28
24
|
routes: {
|
|
29
25
|
method: string;
|
|
30
26
|
path: string;
|
|
31
27
|
handler: string;
|
|
32
28
|
config: {
|
|
33
|
-
policies:
|
|
29
|
+
policies: string[];
|
|
30
|
+
middlewares: any[];
|
|
34
31
|
};
|
|
35
32
|
}[];
|
|
36
33
|
};
|
|
37
|
-
productRoutes: import("@strapi/types/dist/core/core-api/router").Router;
|
|
38
|
-
subscriptionRoutes: import("@strapi/types/dist/core/core-api/router").Router;
|
|
39
34
|
};
|
|
40
|
-
export default
|
|
35
|
+
export default routes;
|
|
@@ -1,42 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
strapi: any;
|
|
4
|
-
}) => {
|
|
5
|
-
initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
|
|
6
|
-
processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
|
|
7
|
-
refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
|
|
8
|
-
getPaymentDetails(gateway: any, transactionId: any): Promise<any>;
|
|
9
|
-
getTransactions(gateway: any, status: any, limit?: number, offset?: number): Promise<{
|
|
10
|
-
data: any[];
|
|
11
|
-
meta: {
|
|
12
|
-
total: number;
|
|
13
|
-
limit: number;
|
|
14
|
-
offset: number;
|
|
15
|
-
};
|
|
16
|
-
}>;
|
|
17
|
-
saveConfiguration(configData: any): Promise<{
|
|
18
|
-
success: boolean;
|
|
19
|
-
message: string;
|
|
20
|
-
data: any;
|
|
21
|
-
}>;
|
|
22
|
-
getConfigStatus(): Promise<{
|
|
23
|
-
stripe: boolean;
|
|
24
|
-
paypal: boolean;
|
|
25
|
-
}>;
|
|
26
|
-
};
|
|
27
|
-
product: ({ strapi, }: {
|
|
2
|
+
stripe: ({ strapi }: {
|
|
28
3
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
29
|
-
}) =>
|
|
30
|
-
createProduct: (productData: any) => Promise<any>;
|
|
31
|
-
updateProduct: (id: any, productData: any) => Promise<any>;
|
|
32
|
-
} & import("@strapi/types/dist/core/core-api/service").Base;
|
|
33
|
-
subscription: ({ strapi, }: {
|
|
34
|
-
strapi: import("@strapi/types/dist/core").Strapi;
|
|
35
|
-
}) => {
|
|
36
|
-
createSubscription: (subscriptionData: any) => Promise<any>;
|
|
37
|
-
updateSubscription: (id: any, subscriptionData: any) => Promise<any>;
|
|
38
|
-
cancelSubscription: (id: any) => Promise<any>;
|
|
39
|
-
syncSubscriptionStatus: (id: any) => Promise<any>;
|
|
40
|
-
} & import("@strapi/types/dist/core/core-api/service").Base;
|
|
4
|
+
}) => import("./stripe").StripeService;
|
|
41
5
|
};
|
|
42
6
|
export default _default;
|