@eventcatalog/create-eventcatalog 4.1.2 → 4.2.0-beta.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 +9 -5
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/schema.json +36 -0
- 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 +16 -12
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/schema.json +36 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/index.mdx +2 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/schema.json +28 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/index.mdx +14 -12
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/schema.json +28 -0
- 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 +2 -1
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/schema.json +31 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/index.mdx +2 -1
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/schema.json +54 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/index.mdx +4 -3
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/schema.json +54 -0
- 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 +6 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/schema.json +30 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/index.mdx +6 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/schema.json +31 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/index.mdx +6 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/schema.json +35 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/index.mdx +6 -5
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/schema.json +36 -0
- 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
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
|
+
}
|
|
@@ -47,14 +47,34 @@ import Footer from '@catalog/components/footer.astro';
|
|
|
47
47
|
|
|
48
48
|
The Orders Service is responsible for managing customer orders within the system. It handles order creation, updating, status tracking, and interactions with other services such as Inventory, Payment, and Notification services to ensure smooth order processing and fulfillment.
|
|
49
49
|
|
|
50
|
-
<Tiles
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
<Tiles>
|
|
51
|
+
<Tile
|
|
52
|
+
icon="DocumentIcon"
|
|
53
|
+
href={`/docs/services/${frontmatter.id}/${frontmatter.version}/changelog`}
|
|
54
|
+
title="View the changelog"
|
|
55
|
+
description="Want to know the history of this service? View the change logs"
|
|
56
|
+
/>
|
|
57
|
+
<Tile
|
|
58
|
+
icon="UserGroupIcon"
|
|
59
|
+
href="/docs/teams/full-stack"
|
|
60
|
+
title="Contact the team"
|
|
61
|
+
description="Any questions? Feel free to contact the owners"
|
|
62
|
+
/>
|
|
63
|
+
<Tile
|
|
64
|
+
icon="BoltIcon"
|
|
65
|
+
href={`/visualiser/services/${frontmatter.id}/${frontmatter.version}`}
|
|
66
|
+
title={`Sends ${frontmatter.sends.length} messages`}
|
|
67
|
+
description="This service sends messages to downstream consumers"
|
|
68
|
+
/>
|
|
69
|
+
<Tile
|
|
70
|
+
icon="BoltIcon"
|
|
71
|
+
href={`/visualiser/services/${frontmatter.id}/${frontmatter.version}`}
|
|
72
|
+
title={`Receives ${frontmatter.receives.length} messages`}
|
|
73
|
+
description="This service receives messages from other services"
|
|
74
|
+
/>
|
|
55
75
|
</Tiles>
|
|
56
76
|
|
|
57
|
-
## Architecture diagram
|
|
77
|
+
## Architecture diagram
|
|
58
78
|
|
|
59
79
|
<NodeGraph />
|
|
60
80
|
|
|
@@ -11,7 +11,7 @@ info:
|
|
|
11
11
|
|
|
12
12
|
servers:
|
|
13
13
|
- url: https://example.com/
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
paths:
|
|
16
16
|
/v1/task/{id}:
|
|
17
17
|
put:
|
|
@@ -59,7 +59,7 @@ paths:
|
|
|
59
59
|
required: true
|
|
60
60
|
schema:
|
|
61
61
|
type: string
|
|
62
|
-
delete:
|
|
62
|
+
delete:
|
|
63
63
|
summary: Delete Task
|
|
64
64
|
operationId: DeleteTask
|
|
65
65
|
responses:
|
|
@@ -182,4 +182,4 @@ components:
|
|
|
182
182
|
securitySchemes:
|
|
183
183
|
authorization:
|
|
184
184
|
type: http
|
|
185
|
-
scheme: bearer
|
|
185
|
+
scheme: bearer
|
|
@@ -2,11 +2,11 @@ asyncapi: 3.0.0
|
|
|
2
2
|
|
|
3
3
|
info:
|
|
4
4
|
title: Order service
|
|
5
|
-
description: |
|
|
5
|
+
description: |
|
|
6
6
|
This service is in charge of processing order events.
|
|
7
7
|
version: '1.0.0'
|
|
8
8
|
|
|
9
|
-
servers:
|
|
9
|
+
servers:
|
|
10
10
|
topic:
|
|
11
11
|
host: https://mytopic.com
|
|
12
12
|
description: Custom Topic.
|
|
@@ -27,7 +27,7 @@ channels:
|
|
|
27
27
|
summary: Order placed event
|
|
28
28
|
$ref: '#/components/messages/OrderPlaced'
|
|
29
29
|
|
|
30
|
-
operations:
|
|
30
|
+
operations:
|
|
31
31
|
onOrderConfirmation:
|
|
32
32
|
summary: Action to confirm an order.
|
|
33
33
|
description: The product availability of an order will lead to the confirmation of the order.
|
|
@@ -81,15 +81,15 @@ components:
|
|
|
81
81
|
description: order model
|
|
82
82
|
properties:
|
|
83
83
|
orderId:
|
|
84
|
-
|
|
84
|
+
'$ref': '#/components/schemas/orderId'
|
|
85
85
|
orderDate:
|
|
86
86
|
description: Date of order submition.
|
|
87
87
|
type: string
|
|
88
88
|
format: date-time
|
|
89
89
|
userId:
|
|
90
|
-
|
|
90
|
+
'$ref': '#/components/schemas/userId'
|
|
91
91
|
productId:
|
|
92
|
-
|
|
92
|
+
'$ref': '#/components/schemas/productId'
|
|
93
93
|
price:
|
|
94
94
|
type: number
|
|
95
95
|
quantity:
|
|
@@ -99,7 +99,7 @@ components:
|
|
|
99
99
|
EventEnvelope:
|
|
100
100
|
type: object
|
|
101
101
|
allOf:
|
|
102
|
-
|
|
102
|
+
- $ref: 'https://raw.githubusercontent.com/cloudevents/spec/v1.0.1/spec.json'
|
|
103
103
|
properties:
|
|
104
104
|
id:
|
|
105
105
|
type: string
|
|
@@ -116,15 +116,15 @@ components:
|
|
|
116
116
|
|
|
117
117
|
EventType:
|
|
118
118
|
type: string
|
|
119
|
-
enum:
|
|
120
|
-
-
|
|
121
|
-
-
|
|
119
|
+
enum:
|
|
120
|
+
- 'order.placed'
|
|
121
|
+
- 'order.confirmed'
|
|
122
122
|
|
|
123
123
|
OrderConfirmed:
|
|
124
124
|
type: object
|
|
125
125
|
additionalProperties: false
|
|
126
126
|
allOf:
|
|
127
|
-
- $ref: '#/components/schemas/EventEnvelope'
|
|
127
|
+
- $ref: '#/components/schemas/EventEnvelope'
|
|
128
128
|
properties:
|
|
129
129
|
data:
|
|
130
130
|
$ref: '#/components/schemas/Order'
|
|
@@ -5,11 +5,11 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
GET request that will return detailed information about 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 can be applied in e-commerce systems, marketplaces, or any platform w
|
|
|
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" />
|
|
@@ -33,7 +33,7 @@ import Footer from '@catalog/components/footer.astro';
|
|
|
33
33
|
|
|
34
34
|
The Orders Service is responsible for managing customer orders within the system. It handles order creation, updating, status tracking, and interactions with other services such as Inventory, Payment, and Notification services to ensure smooth order processing and fulfillment.
|
|
35
35
|
|
|
36
|
-
## Architecture diagram
|
|
36
|
+
## Architecture diagram
|
|
37
37
|
|
|
38
38
|
<NodeGraph />
|
|
39
39
|
|
|
@@ -2,11 +2,11 @@ asyncapi: 3.0.0
|
|
|
2
2
|
|
|
3
3
|
info:
|
|
4
4
|
title: Order service
|
|
5
|
-
description: |
|
|
5
|
+
description: |
|
|
6
6
|
This service is in charge of processing order events.
|
|
7
7
|
version: '1.0.0'
|
|
8
8
|
|
|
9
|
-
servers:
|
|
9
|
+
servers:
|
|
10
10
|
topic:
|
|
11
11
|
host: https://mytopic.com
|
|
12
12
|
description: Custom Topic.
|
|
@@ -27,7 +27,7 @@ channels:
|
|
|
27
27
|
summary: Order placed event
|
|
28
28
|
$ref: '#/components/messages/OrderPlaced'
|
|
29
29
|
|
|
30
|
-
operations:
|
|
30
|
+
operations:
|
|
31
31
|
onOrderConfirmation:
|
|
32
32
|
summary: Action to confirm an order.
|
|
33
33
|
description: The product availability of an order will lead to the confirmation of the order.
|
|
@@ -81,15 +81,15 @@ components:
|
|
|
81
81
|
description: order model
|
|
82
82
|
properties:
|
|
83
83
|
orderId:
|
|
84
|
-
|
|
84
|
+
'$ref': '#/components/schemas/orderId'
|
|
85
85
|
orderDate:
|
|
86
86
|
description: Date of order submition.
|
|
87
87
|
type: string
|
|
88
88
|
format: date-time
|
|
89
89
|
userId:
|
|
90
|
-
|
|
90
|
+
'$ref': '#/components/schemas/userId'
|
|
91
91
|
productId:
|
|
92
|
-
|
|
92
|
+
'$ref': '#/components/schemas/productId'
|
|
93
93
|
price:
|
|
94
94
|
type: number
|
|
95
95
|
quantity:
|
|
@@ -99,7 +99,7 @@ components:
|
|
|
99
99
|
EventEnvelope:
|
|
100
100
|
type: object
|
|
101
101
|
allOf:
|
|
102
|
-
|
|
102
|
+
- $ref: 'https://raw.githubusercontent.com/cloudevents/spec/v1.0.1/spec.json'
|
|
103
103
|
properties:
|
|
104
104
|
id:
|
|
105
105
|
type: string
|
|
@@ -116,15 +116,15 @@ components:
|
|
|
116
116
|
|
|
117
117
|
EventType:
|
|
118
118
|
type: string
|
|
119
|
-
enum:
|
|
120
|
-
-
|
|
121
|
-
-
|
|
119
|
+
enum:
|
|
120
|
+
- 'order.placed'
|
|
121
|
+
- 'order.confirmed'
|
|
122
122
|
|
|
123
123
|
OrderConfirmed:
|
|
124
124
|
type: object
|
|
125
125
|
additionalProperties: false
|
|
126
126
|
allOf:
|
|
127
|
-
- $ref: '#/components/schemas/EventEnvelope'
|
|
127
|
+
- $ref: '#/components/schemas/EventEnvelope'
|
|
128
128
|
properties:
|
|
129
129
|
data:
|
|
130
130
|
$ref: '#/components/schemas/Order'
|
package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/index.mdx
CHANGED
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
POST request that will cancel a shipment, identified by its shipmentId.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
schemaPath: schema.json
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -20,4 +20,3 @@ This command can be applied in e-commerce systems, marketplaces, or any platform
|
|
|
20
20
|
<SchemaViewer file="schema.json" title="Schema" maxHeight="500" />
|
|
21
21
|
|
|
22
22
|
<NodeGraph />
|
|
23
|
-
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "CancelShipment",
|
|
5
|
+
"description": "Schema for cancelling a shipment",
|
|
6
|
+
"properties": {
|
|
7
|
+
"shipmentId": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Unique identifier for the shipment"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": ["shipmentId"]
|
|
13
|
+
}
|
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
POST request that will create a return label for a specific shipment, identified by its shipmentId.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
schemaPath: schema.json
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -19,4 +19,4 @@ This command can be applied in e-commerce systems, marketplaces, or any platform
|
|
|
19
19
|
|
|
20
20
|
<NodeGraph />
|
|
21
21
|
|
|
22
|
-
<SchemaViewer file="schema.json" title="JSON Schema" maxHeight="500" />
|
|
22
|
+
<SchemaViewer file="schema.json" title="JSON Schema" maxHeight="500" />
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"required": ["shipmentId"]
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "CreateReturnLabel",
|
|
5
|
+
"description": "Schema for creating a return shipping label",
|
|
6
|
+
"properties": {
|
|
7
|
+
"CreateReturnLabel": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"shipmentId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Unique identifier for the shipment"
|
|
16
13
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
14
|
+
},
|
|
15
|
+
"required": ["shipmentId"]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["CreateReturnLabel"]
|
|
19
|
+
}
|
package/templates/default/domains/Orders/services/ShippingService/commands/CreateShipment/index.mdx
CHANGED
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
POST request that will create a shipment for a specific order, identified by its orderId.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
schemaPath: schema.json
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -19,4 +19,4 @@ This command can be applied in e-commerce systems, marketplaces, or any platform
|
|
|
19
19
|
|
|
20
20
|
<NodeGraph />
|
|
21
21
|
|
|
22
|
-
<SchemaViewer file="schema.json" title="JSON Schema" maxHeight="500" />
|
|
22
|
+
<SchemaViewer file="schema.json" title="JSON Schema" maxHeight="500" />
|