@eventcatalog/create-eventcatalog 4.1.3 → 4.2.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.
- package/dist/index.js +510 -539
- package/package.json +9 -6
- package/templates/amazon-api-gateway/README-template.md +4 -8
- package/templates/amazon-api-gateway/eventcatalog.auth.js +4 -5
- package/templates/amazon-api-gateway/eventcatalog.config.js +16 -11
- package/templates/amazon-api-gateway/eventcatalog.styles.css +1 -1
- package/templates/analytics.ts +8 -8
- package/templates/asyncapi/asyncapi-files/messages/user-signed-up.yml +1 -1
- package/templates/asyncapi/asyncapi-files/user-service.yml +1 -1
- package/templates/asyncapi/eventcatalog.auth.js +4 -5
- package/templates/asyncapi/eventcatalog.config.js +16 -9
- package/templates/asyncapi/eventcatalog.styles.css +1 -1
- package/templates/asyncapi/teams/order-management.mdx +6 -6
- package/templates/asyncapi/teams/user-management.mdx +4 -4
- package/templates/asyncapi/users/aSmith.mdx +0 -1
- package/templates/asyncapi/users/alee.mdx +1 -1
- package/templates/asyncapi/users/azhang.mdx +1 -1
- package/templates/asyncapi/users/dboyne.mdx +4 -3
- package/templates/asyncapi/users/dkim.mdx +1 -1
- package/templates/asyncapi/users/jbrown.mdx +1 -1
- package/templates/asyncapi/users/mSmith.mdx +2 -2
- package/templates/confluent/README-template.md +4 -8
- package/templates/confluent/eventcatalog.auth.js +4 -5
- package/templates/confluent/eventcatalog.config.js +7 -8
- package/templates/confluent/eventcatalog.styles.css +1 -1
- package/templates/default/channels/inventory.{env}.events/index.mdx +10 -8
- package/templates/default/channels/orders.{env}.events/index.mdx +5 -3
- package/templates/default/channels/payment.{env}.events/index.mdx +14 -13
- package/templates/default/domains/E-Commerce/index.mdx +32 -20
- package/templates/default/domains/E-Commerce/ubiquitous-language.mdx +9 -9
- package/templates/default/domains/Orders/changelog.mdx +1 -1
- package/templates/default/domains/Orders/entities/CartItem/index.mdx +15 -14
- package/templates/default/domains/Orders/entities/Customer/index.mdx +5 -5
- package/templates/default/domains/Orders/entities/Order/index.mdx +9 -9
- package/templates/default/domains/Orders/entities/OrderItem/index.mdx +6 -5
- package/templates/default/domains/Orders/entities/ShoppingCart/index.mdx +16 -15
- package/templates/default/domains/Orders/index.mdx +22 -7
- package/templates/default/domains/Orders/services/InventoryService/changelog.mdx +1 -1
- package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/index.mdx +2 -5
- package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/schema.json +26 -27
- package/templates/default/domains/Orders/services/InventoryService/commands/PlaceOrder/index.mdx +10 -12
- package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/index.mdx +1 -1
- package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/schema.json +26 -27
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/changelog.mdx +3 -4
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/index.mdx +14 -4
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/changelog.mdx +3 -7
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/index.mdx +8 -5
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/changelog.mdx +11 -11
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/index.mdx +15 -12
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/index.mdx +1 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/index.mdx +13 -12
- package/templates/default/domains/Orders/services/InventoryService/index.mdx +40 -21
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/index.mdx +5 -5
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/schema.json +48 -49
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/index.mdx +6 -7
- package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/schema.json +25 -26
- package/templates/default/domains/Orders/services/NotificationService/index.mdx +29 -10
- package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/index.mdx +4 -4
- package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/schema.json +0 -1
- package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/index.mdx +4 -5
- package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/schema.json +43 -44
- package/templates/default/domains/Orders/services/OrdersService/changelog.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/schema.json +66 -67
- package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/index.mdx +1 -2
- package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/schema.json +67 -68
- package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/index.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/schema.json +62 -63
- package/templates/default/domains/Orders/services/OrdersService/index.mdx +26 -6
- package/templates/default/domains/Orders/services/OrdersService/openapi.yml +3 -3
- package/templates/default/domains/Orders/services/OrdersService/order-service-asyncapi.yaml +11 -11
- package/templates/default/domains/Orders/services/OrdersService/queries/GetOrder/index.mdx +5 -5
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/changelog.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/index.mdx +1 -1
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/openapi.yml +1 -1
- package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/order-service-asyncapi.yaml +11 -11
- package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/index.mdx +1 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/schema.json +12 -12
- package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/schema.json +17 -17
- package/templates/default/domains/Orders/services/ShippingService/commands/CreateShipment/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/schema.json +26 -26
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/schema.json +0 -1
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/index.mdx +2 -2
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/schema.json +15 -15
- package/templates/default/domains/Orders/services/ShippingService/index.mdx +14 -5
- package/templates/default/domains/Orders/ubiquitous-language.mdx +10 -10
- package/templates/default/domains/Orders/versioned/0.0.1/index.mdx +7 -7
- package/templates/default/domains/Orders/versioned/0.0.2/index.mdx +3 -3
- package/templates/default/domains/Payment/entities/Address/index.mdx +17 -16
- package/templates/default/domains/Payment/entities/Invoice/index.mdx +8 -7
- package/templates/default/domains/Payment/entities/Payment/index.mdx +15 -14
- package/templates/default/domains/Payment/entities/PaymentMethod/index.mdx +8 -7
- package/templates/default/domains/Payment/entities/Transaction/index.mdx +6 -5
- package/templates/default/domains/Payment/flows/PaymentProcessed/index.mdx +71 -70
- package/templates/default/domains/Payment/index.mdx +10 -10
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/index.mdx +2 -2
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/schema.json +1 -1
- package/templates/default/domains/Payment/services/FraudDetectionService/index.mdx +3 -2
- package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/index.mdx +4 -3
- package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/schema.json +1 -1
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/index.mdx +4 -2
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/schema.json +1 -1
- package/templates/default/domains/Payment/services/PaymentGatewayService/index.mdx +3 -2
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/index.mdx +1 -1
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/index.mdx +1 -1
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/index.mdx +3 -3
- package/templates/default/domains/Payment/services/PaymentService/index.mdx +1 -0
- package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/index.mdx +5 -5
- package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/schema.json +0 -1
- package/templates/default/domains/Payment/ubiquitous-language.mdx +8 -8
- package/templates/default/domains/ProductCatalog/entities/Category/index.mdx +10 -9
- package/templates/default/domains/ProductCatalog/entities/Inventory/index.mdx +15 -14
- package/templates/default/domains/ProductCatalog/entities/Product/index.mdx +11 -10
- package/templates/default/domains/ProductCatalog/entities/Review/index.mdx +15 -14
- package/templates/default/domains/ProductCatalog/index.mdx +8 -6
- package/templates/default/domains/ProductCatalog/ubiquitous-language.mdx +10 -10
- package/templates/default/domains/Subscriptions/entities/BillingProfile/index.mdx +8 -7
- package/templates/default/domains/Subscriptions/entities/SubscriptionPeriod/index.mdx +8 -7
- package/templates/default/domains/Subscriptions/flows/CancelSubscription/SubscriptionRenewed/index.mdx +207 -208
- package/templates/default/domains/Subscriptions/flows/CancelSubscription/index.mdx +48 -49
- package/templates/default/domains/Subscriptions/flows/CancelSubscription/versioned/0.0.1/index.mdx +36 -36
- package/templates/default/domains/Subscriptions/index.mdx +10 -10
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/index.mdx +3 -2
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/schema.json +1 -1
- package/templates/default/domains/Subscriptions/services/BillingService/index.mdx +2 -1
- package/templates/default/domains/Subscriptions/services/PlanManagementService/index.mdx +6 -2
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/index.mdx +30 -10
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/schema.json +10 -2
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/index.mdx +5 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/schema.json +10 -2
- package/templates/default/domains/Subscriptions/ubiquitous-language.mdx +9 -9
- package/templates/default/eventcatalog.auth.js +4 -5
- package/templates/default/eventcatalog.config.js +6 -8
- package/templates/default/eventcatalog.styles.css +1 -1
- package/templates/default/teams/full-stack.mdx +4 -4
- package/templates/default/teams/mobile-devs.mdx +4 -2
- package/templates/default/users/aSmith.mdx +0 -1
- package/templates/default/users/dboyne.mdx +4 -3
- package/templates/default/users/mSmith.mdx +2 -2
- package/templates/empty/eventcatalog.auth.js +4 -5
- package/templates/empty/eventcatalog.config.js +6 -7
- package/templates/empty/eventcatalog.styles.css +1 -1
- package/templates/eventbridge/README-template.md +4 -8
- package/templates/eventbridge/eventcatalog.auth.js +4 -5
- package/templates/eventbridge/eventcatalog.config.js +7 -8
- package/templates/eventbridge/eventcatalog.styles.css +1 -1
- package/templates/graphql/eventcatalog.auth.js +4 -5
- package/templates/graphql/eventcatalog.config.js +29 -20
- package/templates/graphql/eventcatalog.styles.css +1 -1
- package/templates/graphql/teams/order-management.mdx +6 -6
- package/templates/graphql/teams/payment-management.mdx +4 -4
- package/templates/graphql/teams/product-management.mdx +4 -4
- package/templates/graphql/users/aSmith.mdx +0 -1
- package/templates/graphql/users/alee.mdx +1 -1
- package/templates/graphql/users/azhang.mdx +1 -1
- package/templates/graphql/users/dboyne.mdx +4 -3
- package/templates/graphql/users/dkim.mdx +1 -1
- package/templates/graphql/users/jbrown.mdx +1 -1
- package/templates/graphql/users/mSmith.mdx +2 -2
- package/templates/index.ts +49 -59
- package/templates/openapi/eventcatalog.auth.js +4 -5
- package/templates/openapi/eventcatalog.config.js +33 -26
- package/templates/openapi/eventcatalog.styles.css +1 -1
- package/templates/openapi/teams/order-management.mdx +6 -6
- package/templates/openapi/teams/payment-management.mdx +4 -4
- package/templates/openapi/teams/product-management.mdx +4 -4
- package/templates/openapi/users/aSmith.mdx +0 -1
- package/templates/openapi/users/alee.mdx +1 -1
- package/templates/openapi/users/azhang.mdx +1 -1
- package/templates/openapi/users/dboyne.mdx +4 -3
- package/templates/openapi/users/dkim.mdx +1 -1
- package/templates/openapi/users/jbrown.mdx +1 -1
- package/templates/openapi/users/mSmith.mdx +2 -2
- package/templates/types.ts +12 -3
|
@@ -25,7 +25,7 @@ owners:
|
|
|
25
25
|
- dboyne
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
import Footer from '@catalog/components/footer.astro'
|
|
28
|
+
import Footer from '@catalog/components/footer.astro';
|
|
29
29
|
|
|
30
30
|
## Overview
|
|
31
31
|
|
|
@@ -42,6 +42,7 @@ The Fraud Detection Service is responsible for analyzing payment transactions in
|
|
|
42
42
|
## API Endpoints
|
|
43
43
|
|
|
44
44
|
### REST API
|
|
45
|
+
|
|
45
46
|
- `POST /api/fraud/check` - Submit transaction for fraud check
|
|
46
47
|
- `GET /api/fraud/risk-score/{transactionId}` - Get risk score for transaction
|
|
47
48
|
- `PUT /api/fraud/override/{transactionId}` - Manual override of fraud decision
|
|
@@ -55,7 +56,7 @@ fraud_detection:
|
|
|
55
56
|
medium: 50
|
|
56
57
|
low: 20
|
|
57
58
|
auto_block_threshold: 90
|
|
58
|
-
ml_model_version:
|
|
59
|
+
ml_model_version: '2.3.1'
|
|
59
60
|
```
|
|
60
61
|
|
|
61
62
|
<Footer />
|
|
@@ -16,7 +16,7 @@ badges:
|
|
|
16
16
|
schemaPath: schema.json
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
import Footer from '@catalog/components/footer.astro'
|
|
19
|
+
import Footer from '@catalog/components/footer.astro';
|
|
20
20
|
|
|
21
21
|
## Overview
|
|
22
22
|
|
|
@@ -25,6 +25,7 @@ The `ProcessPayment` command is used to initiate payment processing through the
|
|
|
25
25
|
## Command Sources
|
|
26
26
|
|
|
27
27
|
This command can be triggered by:
|
|
28
|
+
|
|
28
29
|
- **BillingService** (Subscriptions Domain) - For recurring subscription payments
|
|
29
30
|
- **OrdersService** (Orders Domain) - For one-time order payments
|
|
30
31
|
- **PaymentService** (Payment Domain) - For payment retries
|
|
@@ -37,7 +38,7 @@ sequenceDiagram
|
|
|
37
38
|
participant PGS as PaymentGatewayService
|
|
38
39
|
participant FDS as FraudDetectionService
|
|
39
40
|
participant EXT as External Gateway
|
|
40
|
-
|
|
41
|
+
|
|
41
42
|
BS->>PGS: ProcessPayment
|
|
42
43
|
PGS->>FDS: Check Fraud
|
|
43
44
|
FDS-->>PGS: Risk Assessment
|
|
@@ -71,4 +72,4 @@ sequenceDiagram
|
|
|
71
72
|
}
|
|
72
73
|
```
|
|
73
74
|
|
|
74
|
-
<Footer />
|
|
75
|
+
<Footer />
|
|
@@ -12,7 +12,7 @@ badges:
|
|
|
12
12
|
schemaPath: schema.json
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
import Footer from '@catalog/components/footer.astro'
|
|
15
|
+
import Footer from '@catalog/components/footer.astro';
|
|
16
16
|
|
|
17
17
|
## Overview
|
|
18
18
|
|
|
@@ -21,6 +21,7 @@ The `PaymentFailed` event is emitted when a payment attempt fails for any reason
|
|
|
21
21
|
## Consumers
|
|
22
22
|
|
|
23
23
|
This event is consumed by:
|
|
24
|
+
|
|
24
25
|
- **BillingService** (Subscriptions Domain) - To handle subscription payment failures
|
|
25
26
|
- **OrdersService** (Orders Domain) - To handle order payment failures
|
|
26
27
|
- **NotificationService** (Orders Domain) - To notify customers of payment failures
|
|
@@ -28,6 +29,7 @@ This event is consumed by:
|
|
|
28
29
|
## Failure Reasons
|
|
29
30
|
|
|
30
31
|
Common failure reasons include:
|
|
32
|
+
|
|
31
33
|
- **insufficient_funds** - Card has insufficient funds
|
|
32
34
|
- **card_declined** - Card was declined by issuer
|
|
33
35
|
- **expired_card** - Card has expired
|
|
@@ -59,4 +61,4 @@ Common failure reasons include:
|
|
|
59
61
|
}
|
|
60
62
|
```
|
|
61
63
|
|
|
62
|
-
<Footer />
|
|
64
|
+
<Footer />
|
|
@@ -21,7 +21,7 @@ owners:
|
|
|
21
21
|
- dboyne
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
import Footer from '@catalog/components/footer.astro'
|
|
24
|
+
import Footer from '@catalog/components/footer.astro';
|
|
25
25
|
|
|
26
26
|
## Overview
|
|
27
27
|
|
|
@@ -46,6 +46,7 @@ The Payment Gateway Service acts as an abstraction layer between our payment sys
|
|
|
46
46
|
## API Endpoints
|
|
47
47
|
|
|
48
48
|
### REST API
|
|
49
|
+
|
|
49
50
|
- `POST /api/gateway/authorize` - Authorize a payment
|
|
50
51
|
- `POST /api/gateway/capture` - Capture an authorized payment
|
|
51
52
|
- `POST /api/gateway/refund` - Process a refund
|
|
@@ -67,4 +68,4 @@ payment_gateway:
|
|
|
67
68
|
backoff_ms: 1000
|
|
68
69
|
```
|
|
69
70
|
|
|
70
|
-
<Footer />
|
|
71
|
+
<Footer />
|
package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/index.mdx
CHANGED
|
@@ -22,7 +22,7 @@ The Payment Initiated event is triggered when a user initiates a payment through
|
|
|
22
22
|
{
|
|
23
23
|
"userId": "123e4567-e89b-12d3-a456-426614174000",
|
|
24
24
|
"orderId": "789e1234-b56c-78d9-e012-3456789fghij",
|
|
25
|
-
"amount": 100.
|
|
25
|
+
"amount": 100.5,
|
|
26
26
|
"paymentMethod": "CreditCard",
|
|
27
27
|
"timestamp": "2024-07-04T14:48:00Z"
|
|
28
28
|
}
|
package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/index.mdx
CHANGED
|
@@ -23,7 +23,7 @@ The PaymentProcessed event is triggered after the payment has been successfully
|
|
|
23
23
|
"transactionId": "123e4567-e89b-12d3-a456-426614174000",
|
|
24
24
|
"userId": "123e4567-e89b-12d3-a456-426614174000",
|
|
25
25
|
"orderId": "789e1234-b56c-78d9-e012-3456789fghij",
|
|
26
|
-
"amount": 100.
|
|
26
|
+
"amount": 100.5,
|
|
27
27
|
"paymentMethod": "CreditCard",
|
|
28
28
|
"status": "confirmed",
|
|
29
29
|
"confirmationDetails": {
|
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
schemaPath: schema.json
|
|
6
6
|
summary: Event is triggered after the payment has been successfully processed
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
import Footer from '@catalog/components/footer.astro';
|
|
@@ -23,7 +23,7 @@ The PaymentProcessed event is triggered after the payment has been successfully
|
|
|
23
23
|
"transactionId": "123e4567-e89b-12d3-a456-426614174000",
|
|
24
24
|
"userId": "123e4567-e89b-12d3-a456-426614174000",
|
|
25
25
|
"orderId": "789e1234-b56c-78d9-e012-3456789fghij",
|
|
26
|
-
"amount": 100.
|
|
26
|
+
"amount": 100.5,
|
|
27
27
|
"paymentMethod": "CreditCard",
|
|
28
28
|
"status": "confirmed",
|
|
29
29
|
"confirmationDetails": {
|
|
@@ -40,4 +40,4 @@ The PaymentProcessed event is triggered after the payment has been successfully
|
|
|
40
40
|
- **Sensitive Data Handling**: Avoid including sensitive information (e.g., full credit card numbers) in the event payload. Use secure channels and encryption for such data.
|
|
41
41
|
- **Authentication and Authorization**: Ensure that only authorized services can publish or consume PaymentProcessed events.
|
|
42
42
|
|
|
43
|
-
<Footer />
|
|
43
|
+
<Footer />
|
|
@@ -31,6 +31,7 @@ The Payment Service is a crucial component of our system that handles all paymen
|
|
|
31
31
|
<NodeGraph />
|
|
32
32
|
|
|
33
33
|
### Key Components
|
|
34
|
+
|
|
34
35
|
- Payment API: Exposes endpoints for initiating payments and querying payment status.
|
|
35
36
|
- Payment Processor: Handles the core payment processing logic.
|
|
36
37
|
- Event Bus: Manages the communication between services using events.
|
package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/index.mdx
CHANGED
|
@@ -5,11 +5,11 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
GET request that will return the payment status for a specific order, identified by its orderId.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
badges:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
- content: Recently updated!
|
|
11
|
+
backgroundColor: green
|
|
12
|
+
textColor: green
|
|
13
13
|
schemaPath: schema.json
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -23,4 +23,4 @@ This query is useful in scenarios such as order management, refund processing, o
|
|
|
23
23
|
|
|
24
24
|
<NodeGraph />
|
|
25
25
|
|
|
26
|
-
<SchemaViewer file="schema.json" title="JSON Schema" maxHeight="500" />
|
|
26
|
+
<SchemaViewer file="schema.json" title="JSON Schema" maxHeight="500" />
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
dictionary:
|
|
3
3
|
- id: Transaction
|
|
4
4
|
name: Transaction
|
|
5
|
-
summary:
|
|
5
|
+
summary: 'The process of transferring funds from one party to another.'
|
|
6
6
|
icon: CreditCard
|
|
7
7
|
- id: Invoice
|
|
8
8
|
name: Invoice
|
|
9
|
-
summary:
|
|
9
|
+
summary: 'A document issued by a seller to a buyer, listing goods or services provided and the amount due.'
|
|
10
10
|
description: |
|
|
11
11
|
Invoices are critical for financial transactions, serving as a request for payment from the buyer. They include:
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ dictionary:
|
|
|
20
20
|
icon: CreditCard
|
|
21
21
|
- id: Payment Method
|
|
22
22
|
name: Payment Method
|
|
23
|
-
summary:
|
|
23
|
+
summary: 'The means by which a payment is made, such as credit card or bank transfer.'
|
|
24
24
|
description: |
|
|
25
25
|
Payment methods are the various ways customers can pay for goods or services. Common methods include:
|
|
26
26
|
|
|
@@ -33,7 +33,7 @@ dictionary:
|
|
|
33
33
|
icon: Wallet
|
|
34
34
|
- id: Receipt
|
|
35
35
|
name: Receipt
|
|
36
|
-
summary:
|
|
36
|
+
summary: 'A document acknowledging that a payment has been made.'
|
|
37
37
|
description: |
|
|
38
38
|
Receipts serve as proof of payment and are important for record-keeping. They typically include:
|
|
39
39
|
|
|
@@ -47,7 +47,7 @@ dictionary:
|
|
|
47
47
|
icon: Receipt
|
|
48
48
|
- id: Refund
|
|
49
49
|
name: Refund
|
|
50
|
-
summary:
|
|
50
|
+
summary: 'The process of returning funds to a customer for a returned product or service.'
|
|
51
51
|
description: |
|
|
52
52
|
Refunds are issued when a customer returns a product or cancels a service. The process involves:
|
|
53
53
|
|
|
@@ -59,7 +59,7 @@ dictionary:
|
|
|
59
59
|
icon: RotateCcw
|
|
60
60
|
- id: Currency
|
|
61
61
|
name: Currency
|
|
62
|
-
summary:
|
|
62
|
+
summary: 'The system of money in general use in a particular country.'
|
|
63
63
|
description: |
|
|
64
64
|
Currency is the medium of exchange for goods and services. Key aspects include:
|
|
65
65
|
|
|
@@ -71,7 +71,7 @@ dictionary:
|
|
|
71
71
|
icon: DollarSign
|
|
72
72
|
- id: Payment Gateway
|
|
73
73
|
name: Payment Gateway
|
|
74
|
-
summary:
|
|
74
|
+
summary: 'A service that authorizes and processes payments for online and offline transactions.'
|
|
75
75
|
description: |
|
|
76
76
|
Payment gateways facilitate the transfer of payment information between the customer and the merchant. They ensure secure and efficient transactions by:
|
|
77
77
|
|
|
@@ -83,7 +83,7 @@ dictionary:
|
|
|
83
83
|
icon: Server
|
|
84
84
|
- id: Chargeback
|
|
85
85
|
name: Chargeback
|
|
86
|
-
summary:
|
|
86
|
+
summary: 'A demand by a credit card provider for a retailer to make good the loss on a fraudulent or disputed transaction.'
|
|
87
87
|
description: |
|
|
88
88
|
Chargebacks occur when a customer disputes a transaction, and the funds are returned to their account. The process involves:
|
|
89
89
|
|
|
@@ -92,13 +92,14 @@ properties:
|
|
|
92
92
|
The Category entity organizes products into a hierarchical structure, supporting multi-level categorization. It enables efficient product discovery and navigation through the e-commerce catalog.
|
|
93
93
|
|
|
94
94
|
### Entity Properties
|
|
95
|
+
|
|
95
96
|
<EntityPropertiesTable />
|
|
96
97
|
|
|
97
98
|
## Relationships
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
- **Parent Category:** Each category can have one parent `Category` (identified by `parentCategoryId`).
|
|
101
|
+
- **Child Categories:** A category can have multiple child `Category` entities creating a hierarchy.
|
|
102
|
+
- **Products:** A category contains multiple `Product` entities (identified by `categoryId`).
|
|
102
103
|
|
|
103
104
|
## Hierarchy Examples
|
|
104
105
|
|
|
@@ -118,9 +119,9 @@ Electronics (Level 0)
|
|
|
118
119
|
|
|
119
120
|
## Business Rules
|
|
120
121
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
- Root categories have `parentCategoryId` as null and `level` as 0
|
|
123
|
+
- Child categories must have a valid `parentCategoryId`
|
|
124
|
+
- Category slugs must be unique across the entire catalog
|
|
125
|
+
- Categories cannot be deleted if they contain products or subcategories
|
|
126
|
+
- Inactive categories should hide all associated products from public view
|
|
127
|
+
- Maximum hierarchy depth should be limited (e.g., 5 levels)
|
|
@@ -89,30 +89,31 @@ properties:
|
|
|
89
89
|
The Inventory entity manages stock levels and availability for products in the e-commerce system. It tracks current quantities, reserved stock, and provides reorder management capabilities.
|
|
90
90
|
|
|
91
91
|
### Entity Properties
|
|
92
|
+
|
|
92
93
|
<EntityPropertiesTable />
|
|
93
94
|
|
|
94
95
|
## Relationships
|
|
95
96
|
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
- **Product:** Each inventory record belongs to one `Product` (identified by `productId`).
|
|
98
|
+
- **OrderItem:** Inventory quantities are affected by `OrderItem` entities when orders are placed.
|
|
98
99
|
|
|
99
100
|
## Stock Calculations
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
- **Available Quantity** = Quantity On Hand - Quantity Reserved
|
|
103
|
+
- **Reorder Needed** = Quantity Available <= Reorder Point
|
|
104
|
+
- **Stock Value** = Quantity On Hand × Unit Cost
|
|
104
105
|
|
|
105
106
|
## Examples
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
- **Inventory #1:** iPhone 15 Pro - 25 on hand, 5 reserved, 20 available, reorder at 10 units.
|
|
109
|
+
- **Inventory #2:** Running Shoes Size 9 - 0 on hand, 2 reserved, backorder allowed.
|
|
109
110
|
|
|
110
111
|
## Business Rules
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
- Quantity on hand cannot be negative
|
|
114
|
+
- Quantity reserved cannot exceed quantity on hand
|
|
115
|
+
- Available quantity is automatically calculated
|
|
116
|
+
- Reorder alerts are triggered when available = reorder point
|
|
117
|
+
- Stock reservations are created when orders are placed
|
|
118
|
+
- Stock is decremented when orders are shipped
|
|
119
|
+
- Inventory adjustments must be logged for audit trail
|
|
@@ -95,23 +95,24 @@ properties:
|
|
|
95
95
|
The Product entity represents items or services available for purchase in the e-commerce system. It serves as an aggregate root containing all product-related information including pricing, categorization, inventory details, and customer reviews.
|
|
96
96
|
|
|
97
97
|
### Entity Properties
|
|
98
|
+
|
|
98
99
|
<EntityPropertiesTable />
|
|
99
100
|
|
|
100
101
|
## Relationships
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
- **Category:** Each product belongs to one `Category` (identified by `categoryId`).
|
|
104
|
+
- **Inventory:** Each product has one `Inventory` record tracking stock levels.
|
|
105
|
+
- **Review:** A product can have multiple `Review` entities from customers.
|
|
106
|
+
- **OrderItem:** Products are referenced in `OrderItem` entities when included in orders.
|
|
106
107
|
|
|
107
108
|
## Examples
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
- **Product #1:** "iPhone 15 Pro" - Electronics category, $999.99, with 50 units in stock and 4.5-star reviews.
|
|
111
|
+
- **Product #2:** "Running Shoes" - Sports category, $129.99, various sizes available, with detailed size chart.
|
|
111
112
|
|
|
112
113
|
## Business Rules
|
|
113
114
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
- Products must have a unique SKU across the entire catalog
|
|
116
|
+
- Products cannot be deleted if they have associated order items
|
|
117
|
+
- Price changes should be tracked for audit purposes
|
|
118
|
+
- Products must belong to an active category to be purchasable
|
|
@@ -122,13 +122,14 @@ properties:
|
|
|
122
122
|
The Review entity captures customer feedback and ratings for products. It supports verified purchase validation, content moderation, community voting, and merchant responses to build trust and provide valuable product insights.
|
|
123
123
|
|
|
124
124
|
### Entity Properties
|
|
125
|
+
|
|
125
126
|
<EntityPropertiesTable />
|
|
126
127
|
|
|
127
128
|
## Relationships
|
|
128
129
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
- **Product:** Each review belongs to one `Product` (identified by `productId`).
|
|
131
|
+
- **Customer:** Each review is written by one `Customer` (identified by `customerId`).
|
|
132
|
+
- **Order:** Each review can be linked to one `Order` for purchase verification (identified by `orderId`).
|
|
132
133
|
|
|
133
134
|
## Review Lifecycle
|
|
134
135
|
|
|
@@ -140,17 +141,17 @@ submitted → pending → approved → published
|
|
|
140
141
|
|
|
141
142
|
## Examples
|
|
142
143
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
- **Review #1:** 5-star review for iPhone 15 Pro, verified purchase, "Excellent camera quality!"
|
|
145
|
+
- **Review #2:** 3-star review for Running Shoes, helpful votes: 15/20, includes photos
|
|
146
|
+
- **Review #3:** 1-star review flagged for inappropriate content, pending moderation
|
|
146
147
|
|
|
147
148
|
## Business Rules
|
|
148
149
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
150
|
+
- Reviews can only be submitted by customers who purchased the product
|
|
151
|
+
- Rating must be between 1-5 stars
|
|
152
|
+
- Verified purchase reviews are given higher weight in calculations
|
|
153
|
+
- Inappropriate content is flagged and requires moderation
|
|
154
|
+
- Customers can only review the same product once per purchase
|
|
155
|
+
- Helpful votes help surface most valuable reviews
|
|
156
|
+
- Merchant responses are limited to one per review
|
|
157
|
+
- Reviews older than 2 years may have reduced weight in calculations
|
|
@@ -28,29 +28,31 @@ A visualization of the entities in the Product Catalog domain. Here you can see
|
|
|
28
28
|
|
|
29
29
|
<EntityMap id="ProductCatalog" />
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
31
|
## Core Responsibilities
|
|
34
32
|
|
|
35
33
|
### Product Management
|
|
34
|
+
|
|
36
35
|
- Maintain product information including pricing, descriptions, and specifications
|
|
37
36
|
- Support product variants (size, color, style)
|
|
38
37
|
- Handle product lifecycle (active, discontinued, draft)
|
|
39
38
|
- Manage product relationships and cross-selling
|
|
40
39
|
|
|
41
|
-
### Category Management
|
|
40
|
+
### Category Management
|
|
41
|
+
|
|
42
42
|
- Organize products into hierarchical categories
|
|
43
43
|
- Support multi-level category structures
|
|
44
44
|
- Maintain category metadata and SEO information
|
|
45
45
|
- Handle category navigation and filtering
|
|
46
46
|
|
|
47
47
|
### Inventory Management
|
|
48
|
+
|
|
48
49
|
- Track stock levels and availability
|
|
49
|
-
- Manage reorder points and stock alerts
|
|
50
|
+
- Manage reorder points and stock alerts
|
|
50
51
|
- Handle inventory reservations and allocations
|
|
51
52
|
- Support warehouse and location management
|
|
52
53
|
|
|
53
54
|
### Review Management
|
|
55
|
+
|
|
54
56
|
- Collect and manage customer product reviews
|
|
55
57
|
- Calculate review metrics and ratings
|
|
56
58
|
- Moderate review content
|
|
@@ -60,7 +62,7 @@ A visualization of the entities in the Product Catalog domain. Here you can see
|
|
|
60
62
|
|
|
61
63
|
- **Product**: Central aggregate containing all product information
|
|
62
64
|
- **Category**: Hierarchical product categorization system
|
|
63
|
-
- **Inventory**: Stock tracking and availability management
|
|
65
|
+
- **Inventory**: Stock tracking and availability management
|
|
64
66
|
- **Review**: Customer feedback and rating system
|
|
65
67
|
|
|
66
68
|
## Business Rules
|
|
@@ -68,4 +70,4 @@ A visualization of the entities in the Product Catalog domain. Here you can see
|
|
|
68
70
|
- Products must belong to an active category
|
|
69
71
|
- Inventory levels affect product availability
|
|
70
72
|
- Reviews require verified purchases
|
|
71
|
-
- Category hierarchies have maximum depth limits
|
|
73
|
+
- Category hierarchies have maximum depth limits
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
dictionary:
|
|
3
3
|
- id: Product
|
|
4
4
|
name: Product
|
|
5
|
-
summary:
|
|
5
|
+
summary: 'A distinct item available for sale, defined by its attributes, pricing, and descriptions.'
|
|
6
6
|
description: |
|
|
7
7
|
A product is the central aggregate in the Product Catalog domain. It contains all information needed to present and sell an item:
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ dictionary:
|
|
|
15
15
|
icon: Package
|
|
16
16
|
- id: Category
|
|
17
17
|
name: Category
|
|
18
|
-
summary:
|
|
18
|
+
summary: 'A hierarchical grouping used to organize products for browsing and discovery.'
|
|
19
19
|
description: |
|
|
20
20
|
Categories form a tree structure that helps customers navigate the catalog. Key aspects include:
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@ dictionary:
|
|
|
28
28
|
icon: FolderTree
|
|
29
29
|
- id: Inventory
|
|
30
30
|
name: Inventory
|
|
31
|
-
summary:
|
|
31
|
+
summary: 'The tracked quantity of a product available for sale across warehouses and locations.'
|
|
32
32
|
description: |
|
|
33
33
|
Inventory represents the stock levels for each product or variant. It involves:
|
|
34
34
|
|
|
@@ -41,7 +41,7 @@ dictionary:
|
|
|
41
41
|
icon: Warehouse
|
|
42
42
|
- id: Review
|
|
43
43
|
name: Review
|
|
44
|
-
summary:
|
|
44
|
+
summary: 'Customer feedback on a product, including a rating and optional written commentary.'
|
|
45
45
|
description: |
|
|
46
46
|
Reviews provide social proof and help customers make purchase decisions. Review management includes:
|
|
47
47
|
|
|
@@ -54,11 +54,11 @@ dictionary:
|
|
|
54
54
|
icon: Star
|
|
55
55
|
- id: SKU
|
|
56
56
|
name: SKU
|
|
57
|
-
summary:
|
|
57
|
+
summary: 'Stock Keeping Unit — a unique identifier assigned to each distinct product variant for inventory tracking.'
|
|
58
58
|
icon: Tag
|
|
59
59
|
- id: Variant
|
|
60
60
|
name: Variant
|
|
61
|
-
summary:
|
|
61
|
+
summary: 'A specific version of a product differentiated by attributes such as size, color, or material.'
|
|
62
62
|
description: |
|
|
63
63
|
Variants allow a single product to be offered in multiple configurations. Each variant has:
|
|
64
64
|
|
|
@@ -71,18 +71,18 @@ dictionary:
|
|
|
71
71
|
icon: Layers
|
|
72
72
|
- id: Pricing
|
|
73
73
|
name: Pricing
|
|
74
|
-
summary:
|
|
74
|
+
summary: 'The monetary value assigned to a product or variant, including base price, sale price, and currency.'
|
|
75
75
|
icon: DollarSign
|
|
76
76
|
- id: Product Lifecycle
|
|
77
77
|
name: Product Lifecycle
|
|
78
|
-
summary:
|
|
78
|
+
summary: 'The stages a product moves through from creation to retirement: draft, active, and discontinued.'
|
|
79
79
|
icon: RefreshCw
|
|
80
80
|
- id: Attribute
|
|
81
81
|
name: Attribute
|
|
82
|
-
summary:
|
|
82
|
+
summary: 'A descriptive property of a product such as weight, dimensions, material, or brand.'
|
|
83
83
|
icon: ListChecks
|
|
84
84
|
- id: Cross-Sell
|
|
85
85
|
name: Cross-Sell
|
|
86
|
-
summary:
|
|
86
|
+
summary: 'A recommendation of related or complementary products to encourage additional purchases.'
|
|
87
87
|
icon: ArrowRightLeft
|
|
88
88
|
---
|
|
@@ -54,17 +54,18 @@ properties:
|
|
|
54
54
|
The BillingProfile entity consolidates billing-specific details for a customer, such as the billing address, contact email for invoices, tax information, and potentially preferred payment methods. This might be distinct from the customer's general contact information or shipping addresses.
|
|
55
55
|
|
|
56
56
|
### Entity Properties
|
|
57
|
+
|
|
57
58
|
<EntityPropertiesTable />
|
|
58
59
|
|
|
59
60
|
## Relationships
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
- **Customer:** A billing profile belongs to one `Customer`. A customer might potentially have multiple profiles in complex scenarios, but often just one.
|
|
63
|
+
- **Address:** Linked to a primary billing `Address`.
|
|
64
|
+
- **PaymentMethod:** May specify a preferred `PaymentMethod`.
|
|
65
|
+
- **Invoice:** Invoices are typically generated using information from the BillingProfile.
|
|
66
|
+
- **Subscription:** Subscriptions may use the associated customer's BillingProfile for charging.
|
|
66
67
|
|
|
67
68
|
## Examples
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
- Jane Doe's personal billing profile with her home address and primary email.
|
|
71
|
+
- Acme Corp's billing profile with their HQ address, VAT ID, and accounts payable email address.
|
|
@@ -59,17 +59,18 @@ properties:
|
|
|
59
59
|
The SubscriptionPeriod entity tracks the state and details of a specific billing cycle within a `Subscription`. It links the subscription to the relevant invoice and payment for that interval and records the exact dates and amount billed.
|
|
60
60
|
|
|
61
61
|
### Entity Properties
|
|
62
|
+
|
|
62
63
|
<EntityPropertiesTable />
|
|
63
64
|
|
|
64
65
|
## Relationships
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
- **Subscription:** A subscription period belongs to one `Subscription`.
|
|
68
|
+
- **Plan:** Reflects the `Plan` active during this period.
|
|
69
|
+
- **Invoice:** May be associated with one `Invoice` generated for this period.
|
|
70
|
+
- **Payment:** May be associated with one `Payment` that settled the period's invoice.
|
|
70
71
|
|
|
71
72
|
## Examples
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
- Period for Jane Doe's 'Pro Plan' from 2024-05-01 to 2024-05-31, invoiced via #INV-00123, status Paid.
|
|
75
|
+
- Period for Acme Corp's 'Enterprise Plan' from 2024-04-15 to 2024-05-14, status Billed, awaiting payment.
|
|
76
|
+
- The first period (trial) for a new subscription from 2024-05-20 to 2024-06-19, status Active, amountBilled $0.00.
|