@reeboot/strapi-payment-plugin 0.0.4 → 0.0.5

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 (46) hide show
  1. package/dist/_chunks/{Analytics-nBSdLT2v.js → Analytics-CLjtRWYA.js} +68 -51
  2. package/dist/_chunks/{Analytics-DSJqY9ng.mjs → Analytics-CQmAVKsq.mjs} +68 -51
  3. package/dist/_chunks/App-DXN62SV6.mjs +118 -0
  4. package/dist/_chunks/App-Dk7XtjNA.js +120 -0
  5. package/dist/_chunks/{Customers-BpFzfglV.js → Customers-BNDi4QBH.js} +113 -51
  6. package/dist/_chunks/{Customers-C6FH7-zG.mjs → Customers-BQzVBQDT.mjs} +114 -52
  7. package/dist/_chunks/Dashboard-CuHC-dit.mjs +311 -0
  8. package/dist/_chunks/Dashboard-UUwohHZa.js +311 -0
  9. package/dist/_chunks/{Orders-CBkT2YfP.mjs → Orders-65mNfu2i.mjs} +140 -80
  10. package/dist/_chunks/{Orders-OG-pwV-B.js → Orders-CitNCdWE.js} +139 -79
  11. package/dist/_chunks/PaymentList-B0CAzInT.mjs +137 -0
  12. package/dist/_chunks/PaymentList-Dy1BAFoD.js +136 -0
  13. package/dist/_chunks/{Payments-DSDJ-HWm.mjs → Payments-FnhoV_2B.mjs} +175 -136
  14. package/dist/_chunks/{Payments-BLen1P9N.js → Payments-TOnygGIW.js} +173 -134
  15. package/dist/_chunks/Settings-BJtDagUs.js +644 -0
  16. package/dist/_chunks/Settings-EoLSuZLe.mjs +644 -0
  17. package/dist/_chunks/{index-DS_PYNkf.mjs → index-2Zd_T7bD.mjs} +1 -1
  18. package/dist/_chunks/{index-BqqrpI6D.js → index-CHEgJ7e5.js} +1 -1
  19. package/dist/admin/index.js +1 -1
  20. package/dist/admin/index.mjs +1 -1
  21. package/dist/admin/src/components/CustomerList.d.ts +1 -13
  22. package/dist/admin/src/components/IntegrationModal.d.ts +7 -0
  23. package/dist/admin/src/components/OrderList.d.ts +1 -19
  24. package/dist/admin/src/components/PaymentCard.d.ts +2 -33
  25. package/dist/admin/src/components/PaymentList.d.ts +3 -11
  26. package/dist/admin/src/components/RefundModal.d.ts +2 -8
  27. package/dist/admin/src/types/index.d.ts +47 -0
  28. package/dist/server/index.js +197 -91
  29. package/dist/server/index.mjs +197 -91
  30. package/dist/server/src/content-types/index.d.ts +9 -2
  31. package/dist/server/src/content-types/order/index.d.ts +8 -1
  32. package/dist/server/src/content-types/payment/index.d.ts +1 -1
  33. package/dist/server/src/index.d.ts +9 -2
  34. package/dist/server/src/types/api.d.ts +31 -0
  35. package/dist/server/src/types/customer.d.ts +2 -0
  36. package/dist/server/src/types/index.d.ts +4 -179
  37. package/dist/server/src/types/order.d.ts +2 -0
  38. package/dist/server/src/types/payment.d.ts +2 -0
  39. package/package.json +8 -7
  40. package/dist/_chunks/App-B83DZ9NG.js +0 -70
  41. package/dist/_chunks/App-BUSTbkyy.mjs +0 -68
  42. package/dist/_chunks/Dashboard-CNMTzSyc.js +0 -180
  43. package/dist/_chunks/Dashboard-Dbwl0ZBo.mjs +0 -180
  44. package/dist/_chunks/Settings-Dq1xy32B.js +0 -357
  45. package/dist/_chunks/Settings-jmGslDsB.mjs +0 -357
  46. package/dist/admin/src/pages/HomePage.d.ts +0 -2
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-BqqrpI6D.js");
2
+ const index = require("../_chunks/index-CHEgJ7e5.js");
3
3
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-DS_PYNkf.mjs";
1
+ import { i } from "../_chunks/index-2Zd_T7bD.mjs";
2
2
  export {
3
3
  i as default
4
4
  };
@@ -1,17 +1,5 @@
1
1
  import React from 'react';
2
- interface Customer {
3
- id: string;
4
- stripeCustomerId: string;
5
- email: string;
6
- firstName?: string;
7
- lastName?: string;
8
- totalSpent: number;
9
- currency: string;
10
- paymentCount: number;
11
- lastPaymentDate?: string;
12
- isActive: boolean;
13
- registrationDate: string;
14
- }
2
+ import type { Customer } from '../types';
15
3
  interface CustomerListProps {
16
4
  customers: Customer[];
17
5
  onCustomerClick?: (customer: Customer) => void;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface IntegrationModalProps {
3
+ onClose: () => void;
4
+ publishableKey: string;
5
+ }
6
+ declare const IntegrationModal: React.FC<IntegrationModalProps>;
7
+ export { IntegrationModal };
@@ -1,23 +1,5 @@
1
1
  import React from 'react';
2
- interface Order {
3
- id: string;
4
- orderNumber: string;
5
- customerEmail: string;
6
- customerName?: string;
7
- status: 'pending' | 'processing' | 'shipped' | 'delivered' | 'cancelled' | 'refunded';
8
- totalAmount: number;
9
- currency: string;
10
- paymentStatus: 'unpaid' | 'paid' | 'partially_paid' | 'refunded';
11
- items: OrderItem[];
12
- createdAt: string;
13
- }
14
- interface OrderItem {
15
- id: string;
16
- productName: string;
17
- quantity: number;
18
- unitPrice: number;
19
- totalPrice: number;
20
- }
2
+ import type { Order } from '../types';
21
3
  interface OrderListProps {
22
4
  orders: Order[];
23
5
  onOrderClick?: (order: Order) => void;
@@ -1,38 +1,7 @@
1
1
  import React from 'react';
2
+ import type { Payment } from '../types';
2
3
  interface PaymentCardProps {
3
- payment: {
4
- id: string;
5
- stripePaymentId: string;
6
- amount: number;
7
- currency: string;
8
- status: string;
9
- customerEmail: string;
10
- customerName?: string;
11
- paymentMethod: string;
12
- description?: string;
13
- metadata?: Record<string, any>;
14
- createdAt: string;
15
- updatedAt: string;
16
- orderId?: string;
17
- refundAmount?: number;
18
- failureReason?: string;
19
- billingAddress?: {
20
- line1?: string;
21
- line2?: string;
22
- city?: string;
23
- state?: string;
24
- postal_code?: string;
25
- country?: string;
26
- };
27
- shippingAddress?: {
28
- line1?: string;
29
- line2?: string;
30
- city?: string;
31
- state?: string;
32
- postal_code?: string;
33
- country?: string;
34
- };
35
- };
4
+ payment: Payment;
36
5
  onClose: () => void;
37
6
  }
38
7
  declare const PaymentCard: React.FC<PaymentCardProps>;
@@ -1,18 +1,10 @@
1
1
  import React from 'react';
2
- interface Payment {
3
- id: string;
4
- stripePaymentId: string;
5
- amount: number;
6
- currency: string;
7
- status: string;
8
- customerEmail: string;
9
- customerName?: string;
10
- paymentMethod: string;
11
- createdAt: string;
12
- }
2
+ import type { Payment } from '../types';
13
3
  interface PaymentListProps {
14
4
  payments: Payment[];
15
5
  onPaymentClick?: (payment: Payment) => void;
6
+ onRefund?: (payment: Payment) => void;
7
+ onViewDetails?: (payment: Payment) => void;
16
8
  compact?: boolean;
17
9
  }
18
10
  declare const PaymentList: React.FC<PaymentListProps>;
@@ -1,13 +1,7 @@
1
1
  import React from 'react';
2
+ import type { Payment } from '../types';
2
3
  interface RefundModalProps {
3
- payment: {
4
- id: string;
5
- stripePaymentId: string;
6
- amount: number;
7
- currency: string;
8
- customerEmail: string;
9
- description?: string;
10
- };
4
+ payment: Payment;
11
5
  onClose: () => void;
12
6
  onSuccess: () => void;
13
7
  }
@@ -0,0 +1,47 @@
1
+ import { Modules } from '@strapi/strapi';
2
+ export type Customer = Modules.Documents.Document<'plugin::payment-plugin.customer'> & {
3
+ id: string | number;
4
+ documentId: string;
5
+ totalSpent: number;
6
+ currency: string;
7
+ paymentCount: number;
8
+ lastPaymentDate?: string;
9
+ registrationDate: string;
10
+ isActive: boolean;
11
+ tags: string[];
12
+ };
13
+ export interface OrderItem {
14
+ id: string;
15
+ productName: string;
16
+ sku?: string;
17
+ quantity: number;
18
+ unitPrice: number;
19
+ totalPrice: number;
20
+ }
21
+ export type Order = Modules.Documents.Document<'plugin::payment-plugin.order'> & {
22
+ id: string | number;
23
+ documentId: string;
24
+ order_number: string;
25
+ total_amount: number;
26
+ currency: string;
27
+ order_status: string;
28
+ payment_status: string;
29
+ customerEmail: string;
30
+ customerName: string;
31
+ paymentStatus: string;
32
+ items: OrderItem[];
33
+ };
34
+ export type Payment = Modules.Documents.Document<'plugin::payment-plugin.payment'> & {
35
+ id: string | number;
36
+ documentId: string;
37
+ amount: number;
38
+ currency: string;
39
+ payment_status: string;
40
+ stripe_payment_intent_id: string;
41
+ customerEmail: string;
42
+ customerName: string;
43
+ orderId?: string;
44
+ };
45
+ export type CustomerInput = Omit<Customer, 'id' | 'documentId' | 'createdAt' | 'updatedAt' | 'publishedAt'>;
46
+ export type OrderInput = Omit<Order, 'id' | 'documentId' | 'createdAt' | 'updatedAt' | 'publishedAt'>;
47
+ export type PaymentInput = Omit<Payment, 'id' | 'documentId' | 'createdAt' | 'updatedAt' | 'publishedAt'>;