@reeboot/strapi-payment-plugin 0.0.0 → 0.0.1

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 (38) hide show
  1. package/README.md +82 -9
  2. package/dist/_chunks/{App-DoUUpjp-.mjs → App-DD7GyuRr.mjs} +572 -297
  3. package/dist/_chunks/{App-BGle38NN.js → App-KZVBFRwo.js} +569 -294
  4. package/dist/admin/index.js +2 -2
  5. package/dist/admin/index.mjs +2 -2
  6. package/dist/admin/src/pluginId.d.ts +1 -1
  7. package/dist/server/index.js +952 -6988
  8. package/dist/server/index.mjs +951 -6987
  9. package/dist/server/src/bootstrap.d.ts +11 -5
  10. package/dist/server/src/config/index.d.ts +2 -0
  11. package/dist/server/src/content-types/index.d.ts +123 -1
  12. package/dist/server/src/content-types/product.d.ts +63 -0
  13. package/dist/server/src/content-types/subscription.d.ts +60 -0
  14. package/dist/server/src/controllers/controller.d.ts +5 -1
  15. package/dist/server/src/controllers/index.d.ts +29 -29
  16. package/dist/server/src/controllers/product.d.ts +18 -0
  17. package/dist/server/src/controllers/subscription.d.ts +16 -0
  18. package/dist/server/src/controllers/webhook.d.ts +10 -0
  19. package/dist/server/src/index.d.ts +177 -65
  20. package/dist/server/src/routes/index.d.ts +4 -15
  21. package/dist/server/src/routes/product.d.ts +2 -0
  22. package/dist/server/src/routes/subscription.d.ts +5 -0
  23. package/dist/server/src/routes/{product-routes.d.ts → webhook.d.ts} +3 -1
  24. package/dist/server/src/services/index.d.ts +17 -16
  25. package/dist/server/src/services/paypalDriver.d.ts +44 -4
  26. package/dist/server/src/services/product.d.ts +7 -0
  27. package/dist/server/src/services/service.d.ts +7 -14
  28. package/dist/server/src/services/stripeDriver.d.ts +31 -0
  29. package/dist/server/src/services/subscription.d.ts +9 -0
  30. package/dist/server/src/services/sync.d.ts +13 -0
  31. package/package.json +4 -3
  32. package/dist/server/controllers/product.d.ts +0 -12
  33. package/dist/server/controllers/subscription.d.ts +0 -12
  34. package/dist/server/services/product.d.ts +0 -7
  35. package/dist/server/services/subscription.d.ts +0 -7
  36. package/dist/server/src/controllers/productController.d.ts +0 -9
  37. package/dist/server/src/controllers/subscriptionController.d.ts +0 -9
  38. package/dist/server/src/routes/subscription-routes.d.ts +0 -13
@@ -4,12 +4,14 @@ declare const _default: {
4
4
  strapi: import("@strapi/types/dist/core").Strapi;
5
5
  }) => void;
6
6
  bootstrap: ({ strapi }: {
7
- strapi: import("@strapi/types/dist/core").Strapi;
8
- }) => void;
7
+ strapi: any;
8
+ }) => Promise<void>;
9
9
  destroy: ({ strapi }: {
10
10
  strapi: import("@strapi/types/dist/core").Strapi;
11
11
  }) => void;
12
12
  config: {
13
+ default: {};
14
+ validator(): void;
13
15
  stripe: {
14
16
  secretKey: string;
15
17
  publishableKey: string;
@@ -22,7 +24,9 @@ declare const _default: {
22
24
  };
23
25
  };
24
26
  controllers: {
25
- controller: {
27
+ controller: ({ strapi }: {
28
+ strapi: any;
29
+ }) => {
26
30
  initiatePayment(ctx: any): Promise<void>;
27
31
  processWebhook(ctx: any): Promise<void>;
28
32
  refundPayment(ctx: any): Promise<void>;
@@ -30,35 +34,33 @@ declare const _default: {
30
34
  getTransactions(ctx: any): Promise<void>;
31
35
  saveConfiguration(ctx: any): Promise<void>;
32
36
  getConfigStatus(ctx: any): Promise<void>;
37
+ testPayment(ctx: any): Promise<void>;
38
+ testPaymentWithRedirect(ctx: any): Promise<void>;
33
39
  };
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
- };
40
+ product: ({ strapi, }: {
41
+ strapi: import("@strapi/types/dist/core").Strapi;
42
+ }) => {
43
+ create: (ctx: import("koa").Context) => Promise<void>;
44
+ update: (ctx: import("koa").Context) => Promise<void>;
45
+ find: (ctx: import("koa").Context) => Promise<void>;
46
+ findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
47
+ delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
48
+ sync: (ctx: import("koa").Context) => Promise<import("koa").Context>;
49
+ getStripeProducts: (ctx: import("koa").Context) => Promise<void>;
50
+ importFromStripe: (ctx: import("koa").Context) => Promise<import("koa").Context>;
51
+ createPaymentLink: (ctx: import("koa").Context) => Promise<import("koa").Context>;
52
+ } & import("@strapi/types/dist/core/core-api/controller").Base;
53
+ subscription: ({ strapi, }: {
54
+ strapi: import("@strapi/types/dist/core").Strapi;
55
+ }) => {
56
+ create: (ctx: import("koa").Context) => Promise<void>;
57
+ update: (ctx: import("koa").Context) => Promise<void>;
58
+ find: (ctx: import("koa").Context) => Promise<void>;
59
+ findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
60
+ delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
61
+ sync: (ctx: import("koa").Context) => Promise<void>;
62
+ cancel: (ctx: import("koa").Context) => Promise<void>;
63
+ } & import("@strapi/types/dist/core/core-api/controller").Base;
62
64
  };
63
65
  routes: {
64
66
  adminRoutes: {
@@ -73,21 +75,7 @@ declare const _default: {
73
75
  };
74
76
  }[];
75
77
  };
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: {
78
+ refundRoutes: {
91
79
  type: string;
92
80
  routes: {
93
81
  method: string;
@@ -99,7 +87,7 @@ declare const _default: {
99
87
  };
100
88
  }[];
101
89
  };
102
- refundRoutes: {
90
+ contentApi: {
103
91
  type: string;
104
92
  routes: {
105
93
  method: string;
@@ -107,32 +95,26 @@ declare const _default: {
107
95
  handler: string;
108
96
  config: {
109
97
  policies: any[];
110
- auth: boolean;
111
98
  };
112
99
  }[];
113
100
  };
101
+ productRoutes: import("@strapi/types/dist/core/core-api/router").Router;
102
+ subscriptionRoutes: import("@strapi/types/dist/core/core-api/router").Router;
114
103
  };
115
104
  services: {
116
- service: {
105
+ service: ({ strapi }: {
106
+ strapi: any;
107
+ }) => {
117
108
  initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
118
109
  processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
119
110
  refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
120
111
  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
- }[];
112
+ getTransactions(gateway: any, status: any, limit?: number, offset?: number): Promise<{
113
+ data: any[];
132
114
  meta: {
133
115
  total: number;
134
- limit: any;
135
- offset: any;
116
+ limit: number;
117
+ offset: number;
136
118
  };
137
119
  }>;
138
120
  saveConfiguration(configData: any): Promise<{
@@ -147,12 +129,142 @@ declare const _default: {
147
129
  };
148
130
  product: ({ strapi, }: {
149
131
  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;
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;
151
136
  subscription: ({ strapi, }: {
152
137
  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;
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;
144
+ };
145
+ contentTypes: {
146
+ product: {
147
+ schema: {
148
+ kind: string;
149
+ collectionName: string;
150
+ info: {
151
+ singularName: string;
152
+ pluralName: string;
153
+ displayName: string;
154
+ description: string;
155
+ };
156
+ options: {
157
+ draftAndPublish: boolean;
158
+ };
159
+ pluginOptions: {
160
+ "content-manager": {
161
+ visible: boolean;
162
+ };
163
+ "content-type-builder": {
164
+ visible: boolean;
165
+ };
166
+ };
167
+ attributes: {
168
+ name: {
169
+ type: string;
170
+ required: boolean;
171
+ };
172
+ description: {
173
+ type: string;
174
+ };
175
+ price: {
176
+ type: string;
177
+ required: boolean;
178
+ };
179
+ currency: {
180
+ type: string;
181
+ required: boolean;
182
+ default: string;
183
+ };
184
+ isSubscription: {
185
+ type: string;
186
+ default: boolean;
187
+ };
188
+ subscriptionInterval: {
189
+ type: string;
190
+ enum: string[];
191
+ default: string;
192
+ };
193
+ stripeProductId: {
194
+ type: string;
195
+ };
196
+ paypalProductId: {
197
+ type: string;
198
+ };
199
+ createdAt: {
200
+ type: string;
201
+ };
202
+ updatedAt: {
203
+ type: string;
204
+ };
205
+ };
206
+ };
207
+ };
208
+ subscription: {
209
+ schema: {
210
+ kind: string;
211
+ collectionName: string;
212
+ info: {
213
+ singularName: string;
214
+ pluralName: string;
215
+ displayName: string;
216
+ description: string;
217
+ };
218
+ options: {
219
+ draftAndPublish: boolean;
220
+ };
221
+ pluginOptions: {
222
+ "content-manager": {
223
+ visible: boolean;
224
+ };
225
+ "content-type-builder": {
226
+ visible: boolean;
227
+ };
228
+ };
229
+ attributes: {
230
+ user: {
231
+ type: string;
232
+ relation: string;
233
+ target: string;
234
+ };
235
+ product: {
236
+ type: string;
237
+ relation: string;
238
+ target: string;
239
+ };
240
+ status: {
241
+ type: string;
242
+ enum: string[];
243
+ default: string;
244
+ };
245
+ startDate: {
246
+ type: string;
247
+ required: boolean;
248
+ };
249
+ endDate: {
250
+ type: string;
251
+ };
252
+ stripeSubscriptionId: {
253
+ type: string;
254
+ };
255
+ paypalSubscriptionId: {
256
+ type: string;
257
+ };
258
+ createdAt: {
259
+ type: string;
260
+ };
261
+ updatedAt: {
262
+ type: string;
263
+ };
264
+ };
265
+ };
266
+ };
154
267
  };
155
- contentTypes: {};
156
268
  policies: {};
157
269
  middlewares: {};
158
270
  };
@@ -11,19 +11,7 @@ declare const _default: {
11
11
  };
12
12
  }[];
13
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: {
14
+ refundRoutes: {
27
15
  type: string;
28
16
  routes: {
29
17
  method: string;
@@ -35,7 +23,7 @@ declare const _default: {
35
23
  };
36
24
  }[];
37
25
  };
38
- refundRoutes: {
26
+ contentApi: {
39
27
  type: string;
40
28
  routes: {
41
29
  method: string;
@@ -43,9 +31,10 @@ declare const _default: {
43
31
  handler: string;
44
32
  config: {
45
33
  policies: any[];
46
- auth: boolean;
47
34
  };
48
35
  }[];
49
36
  };
37
+ productRoutes: import("@strapi/types/dist/core/core-api/router").Router;
38
+ subscriptionRoutes: import("@strapi/types/dist/core/core-api/router").Router;
50
39
  };
51
40
  export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@strapi/types/dist/core/core-api/router").Router;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * router
3
+ */
4
+ declare const _default: import("@strapi/types/dist/core/core-api/router").Router;
5
+ export default _default;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * webhook router
3
+ */
1
4
  declare const _default: {
2
5
  type: string;
3
6
  routes: {
@@ -5,7 +8,6 @@ declare const _default: {
5
8
  path: string;
6
9
  handler: string;
7
10
  config: {
8
- policies: any[];
9
11
  auth: boolean;
10
12
  };
11
13
  }[];
@@ -1,24 +1,17 @@
1
1
  declare const _default: {
2
- service: {
2
+ service: ({ strapi }: {
3
+ strapi: any;
4
+ }) => {
3
5
  initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
4
6
  processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
5
7
  refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
6
8
  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
- }[];
9
+ getTransactions(gateway: any, status: any, limit?: number, offset?: number): Promise<{
10
+ data: any[];
18
11
  meta: {
19
12
  total: number;
20
- limit: any;
21
- offset: any;
13
+ limit: number;
14
+ offset: number;
22
15
  };
23
16
  }>;
24
17
  saveConfiguration(configData: any): Promise<{
@@ -33,9 +26,17 @@ declare const _default: {
33
26
  };
34
27
  product: ({ strapi, }: {
35
28
  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;
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;
37
33
  subscription: ({ strapi, }: {
38
34
  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;
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;
40
41
  };
41
42
  export default _default;
@@ -1,7 +1,47 @@
1
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>;
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
+ }>;
6
46
  };
7
47
  export default _default;
@@ -0,0 +1,7 @@
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,23 +1,16 @@
1
- declare const _default: {
1
+ declare const _default: ({ strapi }: {
2
+ strapi: any;
3
+ }) => {
2
4
  initializePayment(gateway: any, amount: any, currency: any, orderId: any, options: any): Promise<any>;
3
5
  processWebhook(gateway: any, payload: any, signature: any): Promise<any>;
4
6
  refundPayment(gateway: any, transactionId: any, amount: any, options: any): Promise<any>;
5
7
  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
- }[];
8
+ getTransactions(gateway: any, status: any, limit?: number, offset?: number): Promise<{
9
+ data: any[];
17
10
  meta: {
18
11
  total: number;
19
- limit: any;
20
- offset: any;
12
+ limit: number;
13
+ offset: number;
21
14
  };
22
15
  }>;
23
16
  saveConfiguration(configData: any): Promise<{
@@ -282,9 +282,40 @@
282
282
  /// <reference types="stripe/types/net/net" />
283
283
  import Stripe from 'stripe';
284
284
  declare const _default: {
285
+ customers: Stripe.CustomersResource;
285
286
  initializePayment(amount: any, currency: any, orderId: any, options: any): Promise<Stripe.Response<Stripe.PaymentIntent>>;
286
287
  processWebhook(payload: any, signature: any): Promise<Stripe.Event>;
287
288
  refundPayment(transactionId: any, amount: any, options: any): Promise<Stripe.Response<Stripe.Refund>>;
289
+ getStripeProducts(): Promise<Stripe.Product[]>;
290
+ getStripeProduct(productId: string): Promise<Stripe.Response<Stripe.Product>>;
291
+ getProductPrice(productId: string): Promise<{
292
+ unit_amount: number;
293
+ currency: string;
294
+ }>;
288
295
  getPaymentDetails(transactionId: any): Promise<Stripe.Response<Stripe.PaymentIntent>>;
296
+ createProduct(productData: any): Promise<Stripe.Response<Stripe.Product>>;
297
+ updateProduct(productId: any, productData: any): Promise<Stripe.Response<Stripe.Product>>;
298
+ deleteProduct(productId: any): Promise<Stripe.Response<Stripe.DeletedProduct>>;
299
+ createSubscription(customerId: any, priceId: any, options?: {}): Promise<Stripe.Response<Stripe.Subscription>>;
300
+ updateSubscription(subscriptionId: any, options?: {}): Promise<Stripe.Response<Stripe.Subscription>>;
301
+ cancelSubscription(subscriptionId: any): Promise<Stripe.Response<Stripe.Subscription>>;
302
+ getSubscription(subscriptionId: any): Promise<Stripe.Response<Stripe.Subscription>>;
303
+ getTransactions(limit?: number, startingAfter?: any): Promise<Stripe.PaymentIntent[]>;
304
+ importProductFromStripe(stripeProductId: any): Promise<{
305
+ name: string;
306
+ description: string;
307
+ price: number;
308
+ currency: any;
309
+ stripeProductId: string;
310
+ }>;
311
+ createPayment(amount: any, currency: any, paymentMethod: any, returnUrl?: string): Promise<{
312
+ paymentIntent: Stripe.Response<Stripe.PaymentIntent>;
313
+ redirectUrl: string;
314
+ }>;
315
+ createPaymentWithUrl(amount: any, currency: any, paymentMethod: any, returnUrl?: string): Promise<{
316
+ paymentIntent: Stripe.Response<Stripe.PaymentIntent>;
317
+ redirectUrl: string;
318
+ }>;
319
+ createPaymentLink(productId: any, options?: {}): Promise<Stripe.Response<Stripe.PaymentLink>>;
289
320
  };
290
321
  export default _default;
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,13 @@
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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.0",
2
+ "version": "0.0.1",
3
3
  "keywords": [],
4
4
  "type": "commonjs",
5
5
  "exports": {
@@ -31,11 +31,12 @@
31
31
  "test:ts:back": "run -T tsc -p server/tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@paypal/checkout-server-sdk": "^1.0.0",
34
+ "@paypal/paypal-server-sdk": "^1.1.0",
35
35
  "@strapi/design-system": "^2.0.0-rc.29",
36
36
  "@strapi/icons": "^2.0.0-rc.29",
37
37
  "formik": "^2.4.6",
38
- "react-intl": "^7.1.11"
38
+ "react-intl": "^7.1.11",
39
+ "stripe": "^18.4.0"
39
40
  },
40
41
  "devDependencies": {
41
42
  "@strapi/sdk-plugin": "^5.3.2",
@@ -1,12 +0,0 @@
1
- /**
2
- * controller
3
- */
4
- /// <reference types="koa" />
5
- declare const _default: {
6
- find(ctx: import("koa").Context): Promise<void>;
7
- findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
8
- create(ctx: import("koa").Context): Promise<void>;
9
- update(ctx: import("koa").Context): Promise<void>;
10
- delete(ctx: import("koa").Context): Promise<void>;
11
- };
12
- export default _default;
@@ -1,12 +0,0 @@
1
- /**
2
- * controller
3
- */
4
- /// <reference types="koa" />
5
- declare const _default: {
6
- find(ctx: import("koa").Context): Promise<void>;
7
- findOne(ctx: import("koa").Context): Promise<import("koa").Context>;
8
- create(ctx: import("koa").Context): Promise<void>;
9
- update(ctx: import("koa").Context): Promise<void>;
10
- delete(ctx: import("koa").Context): Promise<void>;
11
- };
12
- export default _default;
@@ -1,7 +0,0 @@
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;
@@ -1,7 +0,0 @@
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;