@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
|
@@ -35,14 +35,33 @@ import Footer from '@catalog/components/footer.astro';
|
|
|
35
35
|
|
|
36
36
|
The Notification Service is responsible for managing and delivering notifications to users and other services. It supports various notification channels such as email, SMS, push notifications, and in-app notifications. The service ensures reliable and timely delivery of messages and integrates with other services to trigger notifications based on specific events.
|
|
37
37
|
|
|
38
|
-
<Tiles
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
<Tiles>
|
|
39
|
+
<Tile
|
|
40
|
+
icon="DocumentIcon"
|
|
41
|
+
href={`/docs/services/${frontmatter.id}/${frontmatter.version}/changelog`}
|
|
42
|
+
title="View the changelog"
|
|
43
|
+
description="Want to know the history of this service? View the change logs"
|
|
44
|
+
/>
|
|
45
|
+
<Tile
|
|
46
|
+
icon="UserGroupIcon"
|
|
47
|
+
href="/docs/teams/full-stack"
|
|
48
|
+
title="Contact the team"
|
|
49
|
+
description="Any questions? Feel free to contact the owners"
|
|
50
|
+
/>
|
|
51
|
+
<Tile
|
|
52
|
+
icon="BoltIcon"
|
|
53
|
+
href={`/visualiser/services/${frontmatter.id}/${frontmatter.version}`}
|
|
54
|
+
title={`Sends ${frontmatter.sends.length} messages`}
|
|
55
|
+
description="This service sends messages to downstream consumers"
|
|
56
|
+
/>
|
|
57
|
+
<Tile
|
|
58
|
+
icon="BoltIcon"
|
|
59
|
+
href={`/visualiser/services/${frontmatter.id}/${frontmatter.version}`}
|
|
60
|
+
title={`Receives ${frontmatter.receives.length} messages`}
|
|
61
|
+
description="This service receives messages from other services"
|
|
62
|
+
/>
|
|
43
63
|
</Tiles>
|
|
44
64
|
|
|
45
|
-
|
|
46
65
|
## Architecture diagram
|
|
47
66
|
|
|
48
67
|
<NodeGraph />
|
|
@@ -51,12 +70,12 @@ The Notification Service is responsible for managing and delivering notification
|
|
|
51
70
|
|
|
52
71
|
<AccordionGroup>
|
|
53
72
|
<Accordion title="Notification">
|
|
54
|
-
- Description: A message that is sent to a user or a service.
|
|
55
|
-
|
|
73
|
+
- Description: A message that is sent to a user or a service. - Attributes: notificationId, type, recipient, content, channel,
|
|
74
|
+
status, timestamp
|
|
56
75
|
</Accordion>
|
|
57
76
|
<Accordion title="Channel">
|
|
58
|
-
- Description: The medium through which the notification is delivered (e.g., email, SMS, push notification).
|
|
59
|
-
|
|
77
|
+
- Description: The medium through which the notification is delivered (e.g., email, SMS, push notification). - Attributes:
|
|
78
|
+
channelId, name, provider, configuration
|
|
60
79
|
</Accordion>
|
|
61
80
|
</AccordionGroup>
|
|
62
81
|
|
|
@@ -5,11 +5,11 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
GET request that will return detailed information about a specific notification, identified by its notificationId.
|
|
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
|
|
|
@@ -5,11 +5,11 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
GET request that will return a list of notifications for a specific user, with options to filter by status (unread or all).
|
|
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
|
|
|
@@ -24,4 +24,3 @@ Use cases include delivering notifications for order updates, promotional campai
|
|
|
24
24
|
<NodeGraph />
|
|
25
25
|
|
|
26
26
|
<SchemaViewer file="schema.json" title="JSON Schema" maxHeight="500" />
|
|
27
|
-
|
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
"status": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"enum": ["unread", "read"],
|
|
31
|
-
"description": "The read status of the notification."
|
|
32
|
-
},
|
|
33
|
-
"createdAt": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"format": "date-time",
|
|
36
|
-
"description": "The date and time when the notification was created."
|
|
37
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "GetUserNotificationsResponse",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"userId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "The unique identifier for the user."
|
|
9
|
+
},
|
|
10
|
+
"notifications": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"description": "A list of notifications for the user.",
|
|
13
|
+
"items": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"notificationId": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The unique identifier for the notification."
|
|
19
|
+
},
|
|
20
|
+
"title": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The title or subject of the notification."
|
|
23
|
+
},
|
|
24
|
+
"message": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The message body of the notification."
|
|
38
27
|
},
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
"status": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": ["unread", "read"],
|
|
31
|
+
"description": "The read status of the notification."
|
|
32
|
+
},
|
|
33
|
+
"createdAt": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": "date-time",
|
|
36
|
+
"description": "The date and time when the notification was created."
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": ["notificationId", "title", "message", "status", "createdAt"],
|
|
40
|
+
"additionalProperties": false
|
|
42
41
|
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"required": ["userId", "notifications"],
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
}
|
package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/schema.json
CHANGED
|
@@ -1,71 +1,70 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
"newQuantity": {
|
|
36
|
-
"type": "integer",
|
|
37
|
-
"description": "The new quantity of the product ordered."
|
|
38
|
-
},
|
|
39
|
-
"unitPrice": {
|
|
40
|
-
"type": "number",
|
|
41
|
-
"format": "float",
|
|
42
|
-
"description": "The price per unit of the product."
|
|
43
|
-
},
|
|
44
|
-
"totalPrice": {
|
|
45
|
-
"type": "number",
|
|
46
|
-
"format": "float",
|
|
47
|
-
"description": "The total price for this order item (newQuantity * unitPrice)."
|
|
48
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderAmendedEvent",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"orderId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"format": "uuid",
|
|
9
|
+
"description": "The unique identifier of the order that was amended."
|
|
10
|
+
},
|
|
11
|
+
"userId": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "uuid",
|
|
14
|
+
"description": "The unique identifier of the user who placed the order."
|
|
15
|
+
},
|
|
16
|
+
"amendedItems": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"description": "A list of items that were amended in the order, each containing product details and updated quantities.",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"productId": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "uuid",
|
|
25
|
+
"description": "The unique identifier of the product."
|
|
26
|
+
},
|
|
27
|
+
"productName": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The name of the product."
|
|
30
|
+
},
|
|
31
|
+
"oldQuantity": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"description": "The original quantity of the product ordered."
|
|
49
34
|
},
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
35
|
+
"newQuantity": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"description": "The new quantity of the product ordered."
|
|
38
|
+
},
|
|
39
|
+
"unitPrice": {
|
|
40
|
+
"type": "number",
|
|
41
|
+
"format": "float",
|
|
42
|
+
"description": "The price per unit of the product."
|
|
43
|
+
},
|
|
44
|
+
"totalPrice": {
|
|
45
|
+
"type": "number",
|
|
46
|
+
"format": "float",
|
|
47
|
+
"description": "The total price for this order item (newQuantity * unitPrice)."
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": ["productId", "productName", "oldQuantity", "newQuantity", "unitPrice", "totalPrice"]
|
|
66
51
|
}
|
|
67
52
|
},
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
53
|
+
"orderStatus": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "The current status of the order after the amendment."
|
|
56
|
+
},
|
|
57
|
+
"totalAmount": {
|
|
58
|
+
"type": "number",
|
|
59
|
+
"format": "float",
|
|
60
|
+
"description": "The total amount of the order after the amendment."
|
|
61
|
+
},
|
|
62
|
+
"timestamp": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"format": "date-time",
|
|
65
|
+
"description": "The date and time when the order was amended, in ISO 8601 format."
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": ["orderId", "userId", "amendedItems", "orderStatus", "totalAmount", "timestamp"],
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
}
|
package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/index.mdx
CHANGED
|
@@ -43,13 +43,12 @@ The OrderCancelled event is triggered whenever an existing order is cancelled. T
|
|
|
43
43
|
"cancellationReason": "Customer requested cancellation",
|
|
44
44
|
"timestamp": "2024-07-04T14:48:00Z"
|
|
45
45
|
}
|
|
46
|
-
|
|
47
46
|
```
|
|
48
47
|
|
|
49
48
|
## Schema
|
|
50
49
|
|
|
51
50
|
JSON schema for the event.
|
|
52
51
|
|
|
53
|
-
<Schema title="JSON Schema" file="schema.json"/>
|
|
52
|
+
<Schema title="JSON Schema" file="schema.json" />
|
|
54
53
|
|
|
55
54
|
<Footer />
|
package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/schema.json
CHANGED
|
@@ -1,72 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
"unitPrice": {
|
|
36
|
-
"type": "number",
|
|
37
|
-
"format": "float",
|
|
38
|
-
"description": "The price per unit of the product."
|
|
39
|
-
},
|
|
40
|
-
"totalPrice": {
|
|
41
|
-
"type": "number",
|
|
42
|
-
"format": "float",
|
|
43
|
-
"description": "The total price for this order item (quantity * unit price)."
|
|
44
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderCancelledEvent",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"orderId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"format": "uuid",
|
|
9
|
+
"description": "The unique identifier of the order that was cancelled."
|
|
10
|
+
},
|
|
11
|
+
"userId": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "uuid",
|
|
14
|
+
"description": "The unique identifier of the user who placed the order."
|
|
15
|
+
},
|
|
16
|
+
"orderItems": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"description": "A list of items included in the cancelled order, each containing product details and quantities.",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"productId": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "uuid",
|
|
25
|
+
"description": "The unique identifier of the product."
|
|
26
|
+
},
|
|
27
|
+
"productName": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The name of the product."
|
|
30
|
+
},
|
|
31
|
+
"quantity": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"description": "The quantity of the product ordered."
|
|
45
34
|
},
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
},
|
|
59
|
-
"cancellationReason": {
|
|
60
|
-
"type": "string",
|
|
61
|
-
"description": "The reason for the order cancellation, if provided."
|
|
62
|
-
},
|
|
63
|
-
"timestamp": {
|
|
64
|
-
"type": "string",
|
|
65
|
-
"format": "date-time",
|
|
66
|
-
"description": "The date and time when the order was cancelled."
|
|
35
|
+
"unitPrice": {
|
|
36
|
+
"type": "number",
|
|
37
|
+
"format": "float",
|
|
38
|
+
"description": "The price per unit of the product."
|
|
39
|
+
},
|
|
40
|
+
"totalPrice": {
|
|
41
|
+
"type": "number",
|
|
42
|
+
"format": "float",
|
|
43
|
+
"description": "The total price for this order item (quantity * unit price)."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": ["productId", "productName", "quantity", "unitPrice", "totalPrice"]
|
|
67
47
|
}
|
|
68
48
|
},
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
49
|
+
"orderStatus": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "The current status of the order after cancellation.",
|
|
52
|
+
"enum": ["cancelled"]
|
|
53
|
+
},
|
|
54
|
+
"totalAmount": {
|
|
55
|
+
"type": "number",
|
|
56
|
+
"format": "float",
|
|
57
|
+
"description": "The total amount of the order that was cancelled."
|
|
58
|
+
},
|
|
59
|
+
"cancellationReason": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "The reason for the order cancellation, if provided."
|
|
62
|
+
},
|
|
63
|
+
"timestamp": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"format": "date-time",
|
|
66
|
+
"description": "The date and time when the order was cancelled."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": ["orderId", "userId", "orderItems", "orderStatus", "totalAmount", "timestamp"],
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
}
|
package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/schema.json
CHANGED
|
@@ -1,67 +1,66 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
"unitPrice": {
|
|
36
|
-
"type": "number",
|
|
37
|
-
"format": "float",
|
|
38
|
-
"description": "The price per unit of the product."
|
|
39
|
-
},
|
|
40
|
-
"totalPrice": {
|
|
41
|
-
"type": "number",
|
|
42
|
-
"format": "float",
|
|
43
|
-
"description": "The total price for this order item (quantity * unitPrice)."
|
|
44
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderConfirmedEvent",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"orderId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"format": "uuid",
|
|
9
|
+
"description": "The unique identifier of the confirmed order."
|
|
10
|
+
},
|
|
11
|
+
"userId": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "uuid",
|
|
14
|
+
"description": "The unique identifier of the user who placed the order."
|
|
15
|
+
},
|
|
16
|
+
"orderItems": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"description": "A list of items included in the confirmed order, each containing product details and quantities.",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"productId": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "uuid",
|
|
25
|
+
"description": "The unique identifier of the product."
|
|
26
|
+
},
|
|
27
|
+
"productName": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The name of the product."
|
|
30
|
+
},
|
|
31
|
+
"quantity": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"description": "The quantity of the product ordered."
|
|
45
34
|
},
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"confirmationTimestamp": {
|
|
59
|
-
"type": "string",
|
|
60
|
-
"format": "date-time",
|
|
61
|
-
"description": "The date and time when the order was confirmed."
|
|
35
|
+
"unitPrice": {
|
|
36
|
+
"type": "number",
|
|
37
|
+
"format": "float",
|
|
38
|
+
"description": "The price per unit of the product."
|
|
39
|
+
},
|
|
40
|
+
"totalPrice": {
|
|
41
|
+
"type": "number",
|
|
42
|
+
"format": "float",
|
|
43
|
+
"description": "The total price for this order item (quantity * unitPrice)."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": ["productId", "productName", "quantity", "unitPrice", "totalPrice"]
|
|
62
47
|
}
|
|
63
48
|
},
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
49
|
+
"orderStatus": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "The current status of the order after confirmation."
|
|
52
|
+
},
|
|
53
|
+
"totalAmount": {
|
|
54
|
+
"type": "number",
|
|
55
|
+
"format": "float",
|
|
56
|
+
"description": "The total amount of the confirmed order."
|
|
57
|
+
},
|
|
58
|
+
"confirmationTimestamp": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "date-time",
|
|
61
|
+
"description": "The date and time when the order was confirmed."
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": ["orderId", "userId", "orderItems", "orderStatus", "totalAmount", "confirmationTimestamp"],
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|