@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.
Files changed (189) hide show
  1. package/dist/index.js +510 -539
  2. package/package.json +9 -6
  3. package/templates/amazon-api-gateway/README-template.md +4 -8
  4. package/templates/amazon-api-gateway/eventcatalog.auth.js +4 -5
  5. package/templates/amazon-api-gateway/eventcatalog.config.js +16 -11
  6. package/templates/amazon-api-gateway/eventcatalog.styles.css +1 -1
  7. package/templates/analytics.ts +8 -8
  8. package/templates/asyncapi/asyncapi-files/messages/user-signed-up.yml +1 -1
  9. package/templates/asyncapi/asyncapi-files/user-service.yml +1 -1
  10. package/templates/asyncapi/eventcatalog.auth.js +4 -5
  11. package/templates/asyncapi/eventcatalog.config.js +16 -9
  12. package/templates/asyncapi/eventcatalog.styles.css +1 -1
  13. package/templates/asyncapi/teams/order-management.mdx +6 -6
  14. package/templates/asyncapi/teams/user-management.mdx +4 -4
  15. package/templates/asyncapi/users/aSmith.mdx +0 -1
  16. package/templates/asyncapi/users/alee.mdx +1 -1
  17. package/templates/asyncapi/users/azhang.mdx +1 -1
  18. package/templates/asyncapi/users/dboyne.mdx +4 -3
  19. package/templates/asyncapi/users/dkim.mdx +1 -1
  20. package/templates/asyncapi/users/jbrown.mdx +1 -1
  21. package/templates/asyncapi/users/mSmith.mdx +2 -2
  22. package/templates/confluent/README-template.md +4 -8
  23. package/templates/confluent/eventcatalog.auth.js +4 -5
  24. package/templates/confluent/eventcatalog.config.js +7 -8
  25. package/templates/confluent/eventcatalog.styles.css +1 -1
  26. package/templates/default/channels/inventory.{env}.events/index.mdx +10 -8
  27. package/templates/default/channels/orders.{env}.events/index.mdx +5 -3
  28. package/templates/default/channels/payment.{env}.events/index.mdx +14 -13
  29. package/templates/default/domains/E-Commerce/index.mdx +32 -20
  30. package/templates/default/domains/E-Commerce/ubiquitous-language.mdx +9 -9
  31. package/templates/default/domains/Orders/changelog.mdx +1 -1
  32. package/templates/default/domains/Orders/entities/CartItem/index.mdx +15 -14
  33. package/templates/default/domains/Orders/entities/Customer/index.mdx +5 -5
  34. package/templates/default/domains/Orders/entities/Order/index.mdx +9 -9
  35. package/templates/default/domains/Orders/entities/OrderItem/index.mdx +6 -5
  36. package/templates/default/domains/Orders/entities/ShoppingCart/index.mdx +16 -15
  37. package/templates/default/domains/Orders/index.mdx +22 -7
  38. package/templates/default/domains/Orders/services/InventoryService/changelog.mdx +1 -1
  39. package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/index.mdx +2 -5
  40. package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/schema.json +26 -27
  41. package/templates/default/domains/Orders/services/InventoryService/commands/PlaceOrder/index.mdx +10 -12
  42. package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/index.mdx +1 -1
  43. package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/schema.json +26 -27
  44. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/changelog.mdx +3 -4
  45. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/index.mdx +14 -4
  46. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/changelog.mdx +3 -7
  47. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/index.mdx +8 -5
  48. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/changelog.mdx +11 -11
  49. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/index.mdx +15 -12
  50. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/index.mdx +1 -0
  51. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/index.mdx +13 -12
  52. package/templates/default/domains/Orders/services/InventoryService/index.mdx +40 -21
  53. package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/index.mdx +5 -5
  54. package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/schema.json +48 -49
  55. package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/index.mdx +6 -7
  56. package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/schema.json +25 -26
  57. package/templates/default/domains/Orders/services/NotificationService/index.mdx +29 -10
  58. package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/index.mdx +4 -4
  59. package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/schema.json +0 -1
  60. package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/index.mdx +4 -5
  61. package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/schema.json +43 -44
  62. package/templates/default/domains/Orders/services/OrdersService/changelog.mdx +1 -1
  63. package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/schema.json +66 -67
  64. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/index.mdx +1 -2
  65. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/schema.json +67 -68
  66. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/index.mdx +1 -1
  67. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/schema.json +62 -63
  68. package/templates/default/domains/Orders/services/OrdersService/index.mdx +26 -6
  69. package/templates/default/domains/Orders/services/OrdersService/openapi.yml +3 -3
  70. package/templates/default/domains/Orders/services/OrdersService/order-service-asyncapi.yaml +11 -11
  71. package/templates/default/domains/Orders/services/OrdersService/queries/GetOrder/index.mdx +5 -5
  72. package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/changelog.mdx +1 -1
  73. package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/index.mdx +1 -1
  74. package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/openapi.yml +1 -1
  75. package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/order-service-asyncapi.yaml +11 -11
  76. package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/index.mdx +1 -2
  77. package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/schema.json +12 -12
  78. package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/index.mdx +2 -2
  79. package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/schema.json +17 -17
  80. package/templates/default/domains/Orders/services/ShippingService/commands/CreateShipment/index.mdx +2 -2
  81. package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/index.mdx +2 -2
  82. package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/schema.json +26 -26
  83. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/index.mdx +2 -2
  84. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/schema.json +15 -15
  85. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/index.mdx +2 -2
  86. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/schema.json +15 -15
  87. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/index.mdx +2 -2
  88. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/schema.json +0 -1
  89. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/index.mdx +2 -2
  90. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/schema.json +15 -15
  91. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/index.mdx +2 -2
  92. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/schema.json +15 -15
  93. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/index.mdx +2 -2
  94. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/schema.json +15 -15
  95. package/templates/default/domains/Orders/services/ShippingService/index.mdx +14 -5
  96. package/templates/default/domains/Orders/ubiquitous-language.mdx +10 -10
  97. package/templates/default/domains/Orders/versioned/0.0.1/index.mdx +7 -7
  98. package/templates/default/domains/Orders/versioned/0.0.2/index.mdx +3 -3
  99. package/templates/default/domains/Payment/entities/Address/index.mdx +17 -16
  100. package/templates/default/domains/Payment/entities/Invoice/index.mdx +8 -7
  101. package/templates/default/domains/Payment/entities/Payment/index.mdx +15 -14
  102. package/templates/default/domains/Payment/entities/PaymentMethod/index.mdx +8 -7
  103. package/templates/default/domains/Payment/entities/Transaction/index.mdx +6 -5
  104. package/templates/default/domains/Payment/flows/PaymentProcessed/index.mdx +71 -70
  105. package/templates/default/domains/Payment/index.mdx +10 -10
  106. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/index.mdx +2 -2
  107. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/schema.json +1 -1
  108. package/templates/default/domains/Payment/services/FraudDetectionService/index.mdx +3 -2
  109. package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/index.mdx +4 -3
  110. package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/schema.json +1 -1
  111. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/index.mdx +4 -2
  112. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/schema.json +1 -1
  113. package/templates/default/domains/Payment/services/PaymentGatewayService/index.mdx +3 -2
  114. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/index.mdx +1 -1
  115. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/index.mdx +1 -1
  116. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/index.mdx +3 -3
  117. package/templates/default/domains/Payment/services/PaymentService/index.mdx +1 -0
  118. package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/index.mdx +5 -5
  119. package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/schema.json +0 -1
  120. package/templates/default/domains/Payment/ubiquitous-language.mdx +8 -8
  121. package/templates/default/domains/ProductCatalog/entities/Category/index.mdx +10 -9
  122. package/templates/default/domains/ProductCatalog/entities/Inventory/index.mdx +15 -14
  123. package/templates/default/domains/ProductCatalog/entities/Product/index.mdx +11 -10
  124. package/templates/default/domains/ProductCatalog/entities/Review/index.mdx +15 -14
  125. package/templates/default/domains/ProductCatalog/index.mdx +8 -6
  126. package/templates/default/domains/ProductCatalog/ubiquitous-language.mdx +10 -10
  127. package/templates/default/domains/Subscriptions/entities/BillingProfile/index.mdx +8 -7
  128. package/templates/default/domains/Subscriptions/entities/SubscriptionPeriod/index.mdx +8 -7
  129. package/templates/default/domains/Subscriptions/flows/CancelSubscription/SubscriptionRenewed/index.mdx +207 -208
  130. package/templates/default/domains/Subscriptions/flows/CancelSubscription/index.mdx +48 -49
  131. package/templates/default/domains/Subscriptions/flows/CancelSubscription/versioned/0.0.1/index.mdx +36 -36
  132. package/templates/default/domains/Subscriptions/index.mdx +10 -10
  133. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/index.mdx +3 -2
  134. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/schema.json +1 -1
  135. package/templates/default/domains/Subscriptions/services/BillingService/index.mdx +2 -1
  136. package/templates/default/domains/Subscriptions/services/PlanManagementService/index.mdx +6 -2
  137. package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/index.mdx +5 -5
  138. package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/index.mdx +5 -5
  139. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/index.mdx +5 -5
  140. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/index.mdx +5 -5
  141. package/templates/default/domains/Subscriptions/services/SubscriptionService/index.mdx +30 -10
  142. package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/index.mdx +5 -5
  143. package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/schema.json +10 -2
  144. package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/index.mdx +5 -5
  145. package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/schema.json +10 -2
  146. package/templates/default/domains/Subscriptions/ubiquitous-language.mdx +9 -9
  147. package/templates/default/eventcatalog.auth.js +4 -5
  148. package/templates/default/eventcatalog.config.js +6 -8
  149. package/templates/default/eventcatalog.styles.css +1 -1
  150. package/templates/default/teams/full-stack.mdx +4 -4
  151. package/templates/default/teams/mobile-devs.mdx +4 -2
  152. package/templates/default/users/aSmith.mdx +0 -1
  153. package/templates/default/users/dboyne.mdx +4 -3
  154. package/templates/default/users/mSmith.mdx +2 -2
  155. package/templates/empty/eventcatalog.auth.js +4 -5
  156. package/templates/empty/eventcatalog.config.js +6 -7
  157. package/templates/empty/eventcatalog.styles.css +1 -1
  158. package/templates/eventbridge/README-template.md +4 -8
  159. package/templates/eventbridge/eventcatalog.auth.js +4 -5
  160. package/templates/eventbridge/eventcatalog.config.js +7 -8
  161. package/templates/eventbridge/eventcatalog.styles.css +1 -1
  162. package/templates/graphql/eventcatalog.auth.js +4 -5
  163. package/templates/graphql/eventcatalog.config.js +29 -20
  164. package/templates/graphql/eventcatalog.styles.css +1 -1
  165. package/templates/graphql/teams/order-management.mdx +6 -6
  166. package/templates/graphql/teams/payment-management.mdx +4 -4
  167. package/templates/graphql/teams/product-management.mdx +4 -4
  168. package/templates/graphql/users/aSmith.mdx +0 -1
  169. package/templates/graphql/users/alee.mdx +1 -1
  170. package/templates/graphql/users/azhang.mdx +1 -1
  171. package/templates/graphql/users/dboyne.mdx +4 -3
  172. package/templates/graphql/users/dkim.mdx +1 -1
  173. package/templates/graphql/users/jbrown.mdx +1 -1
  174. package/templates/graphql/users/mSmith.mdx +2 -2
  175. package/templates/index.ts +49 -59
  176. package/templates/openapi/eventcatalog.auth.js +4 -5
  177. package/templates/openapi/eventcatalog.config.js +33 -26
  178. package/templates/openapi/eventcatalog.styles.css +1 -1
  179. package/templates/openapi/teams/order-management.mdx +6 -6
  180. package/templates/openapi/teams/payment-management.mdx +4 -4
  181. package/templates/openapi/teams/product-management.mdx +4 -4
  182. package/templates/openapi/users/aSmith.mdx +0 -1
  183. package/templates/openapi/users/alee.mdx +1 -1
  184. package/templates/openapi/users/azhang.mdx +1 -1
  185. package/templates/openapi/users/dboyne.mdx +4 -3
  186. package/templates/openapi/users/dkim.mdx +1 -1
  187. package/templates/openapi/users/jbrown.mdx +1 -1
  188. package/templates/openapi/users/mSmith.mdx +2 -2
  189. 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: "2.3.1"
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 />
@@ -55,4 +55,4 @@
55
55
  }
56
56
  },
57
57
  "required": ["paymentId", "amount", "currency", "paymentMethod", "idempotencyKey"]
58
- }
58
+ }
@@ -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 />
@@ -65,4 +65,4 @@
65
65
  }
66
66
  },
67
67
  "required": ["paymentId", "amount", "currency", "failureReason", "timestamp"]
68
- }
68
+ }
@@ -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 />
@@ -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.50,
25
+ "amount": 100.5,
26
26
  "paymentMethod": "CreditCard",
27
27
  "timestamp": "2024-07-04T14:48:00Z"
28
28
  }
@@ -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.50,
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
- - dboyne
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.50,
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.
@@ -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
- - dboyne
8
+ - dboyne
9
9
  badges:
10
- - content: Recently updated!
11
- backgroundColor: green
12
- textColor: green
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" />
@@ -1,4 +1,3 @@
1
-
2
1
  {
3
2
  "$schema": "http://json-schema.org/draft-07/schema#",
4
3
  "title": "GetPaymentStatusResponse",
@@ -2,11 +2,11 @@
2
2
  dictionary:
3
3
  - id: Transaction
4
4
  name: Transaction
5
- summary: "The process of transferring funds from one party to another."
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: "A document issued by a seller to a buyer, listing goods or services provided and the amount due."
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: "The means by which a payment is made, such as credit card or bank transfer."
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: "A document acknowledging that a payment has been made."
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: "The process of returning funds to a customer for a returned product or service."
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: "The system of money in general use in a particular country."
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: "A service that authorizes and processes payments for online and offline transactions."
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: "A demand by a credit card provider for a retailer to make good the loss on a fraudulent or disputed transaction."
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
- * **Parent Category:** Each category can have one parent `Category` (identified by `parentCategoryId`).
100
- * **Child Categories:** A category can have multiple child `Category` entities creating a hierarchy.
101
- * **Products:** A category contains multiple `Product` entities (identified by `categoryId`).
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
- * Root categories have `parentCategoryId` as null and `level` as 0
122
- * Child categories must have a valid `parentCategoryId`
123
- * Category slugs must be unique across the entire catalog
124
- * Categories cannot be deleted if they contain products or subcategories
125
- * Inactive categories should hide all associated products from public view
126
- * Maximum hierarchy depth should be limited (e.g., 5 levels)
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
- * **Product:** Each inventory record belongs to one `Product` (identified by `productId`).
97
- * **OrderItem:** Inventory quantities are affected by `OrderItem` entities when orders are placed.
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
- * **Available Quantity** = Quantity On Hand - Quantity Reserved
102
- * **Reorder Needed** = Quantity Available &lt;= Reorder Point
103
- * **Stock Value** = Quantity On Hand × Unit Cost
102
+ - **Available Quantity** = Quantity On Hand - Quantity Reserved
103
+ - **Reorder Needed** = Quantity Available &lt;= Reorder Point
104
+ - **Stock Value** = Quantity On Hand × Unit Cost
104
105
 
105
106
  ## Examples
106
107
 
107
- * **Inventory #1:** iPhone 15 Pro - 25 on hand, 5 reserved, 20 available, reorder at 10 units.
108
- * **Inventory #2:** Running Shoes Size 9 - 0 on hand, 2 reserved, backorder allowed.
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
- * Quantity on hand cannot be negative
113
- * Quantity reserved cannot exceed quantity on hand
114
- * Available quantity is automatically calculated
115
- * Reorder alerts are triggered when available = reorder point
116
- * Stock reservations are created when orders are placed
117
- * Stock is decremented when orders are shipped
118
- * Inventory adjustments must be logged for audit trail
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
- * **Category:** Each product belongs to one `Category` (identified by `categoryId`).
103
- * **Inventory:** Each product has one `Inventory` record tracking stock levels.
104
- * **Review:** A product can have multiple `Review` entities from customers.
105
- * **OrderItem:** Products are referenced in `OrderItem` entities when included in orders.
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
- * **Product #1:** "iPhone 15 Pro" - Electronics category, $999.99, with 50 units in stock and 4.5-star reviews.
110
- * **Product #2:** "Running Shoes" - Sports category, $129.99, various sizes available, with detailed size chart.
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
- * Products must have a unique SKU across the entire catalog
115
- * Products cannot be deleted if they have associated order items
116
- * Price changes should be tracked for audit purposes
117
- * Products must belong to an active category to be purchasable
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
- * **Product:** Each review belongs to one `Product` (identified by `productId`).
130
- * **Customer:** Each review is written by one `Customer` (identified by `customerId`).
131
- * **Order:** Each review can be linked to one `Order` for purchase verification (identified by `orderId`).
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
- * **Review #1:** 5-star review for iPhone 15 Pro, verified purchase, "Excellent camera quality!"
144
- * **Review #2:** 3-star review for Running Shoes, helpful votes: 15/20, includes photos
145
- * **Review #3:** 1-star review flagged for inappropriate content, pending moderation
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
- * Reviews can only be submitted by customers who purchased the product
150
- * Rating must be between 1-5 stars
151
- * Verified purchase reviews are given higher weight in calculations
152
- * Inappropriate content is flagged and requires moderation
153
- * Customers can only review the same product once per purchase
154
- * Helpful votes help surface most valuable reviews
155
- * Merchant responses are limited to one per review
156
- * Reviews older than 2 years may have reduced weight in calculations
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: "A distinct item available for sale, defined by its attributes, pricing, and descriptions."
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: "A hierarchical grouping used to organize products for browsing and discovery."
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: "The tracked quantity of a product available for sale across warehouses and locations."
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: "Customer feedback on a product, including a rating and optional written commentary."
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: "Stock Keeping Unit — a unique identifier assigned to each distinct product variant for inventory tracking."
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: "A specific version of a product differentiated by attributes such as size, color, or material."
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: "The monetary value assigned to a product or variant, including base price, sale price, and currency."
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: "The stages a product moves through from creation to retirement: draft, active, and discontinued."
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: "A descriptive property of a product such as weight, dimensions, material, or brand."
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: "A recommendation of related or complementary products to encourage additional purchases."
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
- * **Customer:** A billing profile belongs to one `Customer`. A customer might potentially have multiple profiles in complex scenarios, but often just one.
62
- * **Address:** Linked to a primary billing `Address`.
63
- * **PaymentMethod:** May specify a preferred `PaymentMethod`.
64
- * **Invoice:** Invoices are typically generated using information from the BillingProfile.
65
- * **Subscription:** Subscriptions may use the associated customer's BillingProfile for charging.
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
- * Jane Doe's personal billing profile with her home address and primary email.
70
- * Acme Corp's billing profile with their HQ address, VAT ID, and accounts payable email address.
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
- * **Subscription:** A subscription period belongs to one `Subscription`.
67
- * **Plan:** Reflects the `Plan` active during this period.
68
- * **Invoice:** May be associated with one `Invoice` generated for this period.
69
- * **Payment:** May be associated with one `Payment` that settled the period's invoice.
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
- * Period for Jane Doe's 'Pro Plan' from 2024-05-01 to 2024-05-31, invoiced via #INV-00123, status Paid.
74
- * Period for Acme Corp's 'Enterprise Plan' from 2024-04-15 to 2024-05-14, status Billed, awaiting payment.
75
- * The first period (trial) for a new subscription from 2024-05-20 to 2024-06-19, status Active, amountBilled $0.00.
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.