@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
|
@@ -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" />
|
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
POST request that will update the status of a 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,29 +1,29 @@
|
|
|
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
|
-
"required": ["shipmentId", "status"]
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "UpdateShipmentStatus",
|
|
5
|
+
"description": "Schema for updating a shipment's status",
|
|
6
|
+
"properties": {
|
|
7
|
+
"UpdateShipmentStatus": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"shipmentId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Unique identifier for the shipment"
|
|
13
|
+
},
|
|
14
|
+
"status": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": ["pending", "shipped", "delivered", "returned"],
|
|
17
|
+
"description": "Current status of the shipment"
|
|
18
|
+
},
|
|
19
|
+
"updatedAt": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "date-time",
|
|
22
|
+
"description": "Timestamp when the status was last updated"
|
|
26
23
|
}
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
},
|
|
25
|
+
"required": ["shipmentId", "status"]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["UpdateShipmentStatus"]
|
|
29
29
|
}
|
package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/index.mdx
CHANGED
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
Event that is emitted when a shipment delivery fails.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
schemaPath: schema.json
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -19,4 +19,4 @@ This event can be applied in e-commerce systems, marketplaces, or any platform w
|
|
|
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" />
|
package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/schema.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
"orderId": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"description": "Identifier for the associated order"
|
|
14
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "DeliveryFailed",
|
|
5
|
+
"description": "Schema for delivery failed event",
|
|
6
|
+
"properties": {
|
|
7
|
+
"shipmentId": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Unique identifier for the shipment"
|
|
15
10
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
11
|
+
"orderId": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Identifier for the associated order"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["shipmentId", "orderId"]
|
|
17
|
+
}
|
package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/index.mdx
CHANGED
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
Event that is emitted when a return is initiated.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
schemaPath: schema.json
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -19,4 +19,4 @@ This event can be applied in e-commerce systems, marketplaces, or any platform w
|
|
|
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" />
|
package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/schema.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
"orderId": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"description": "Identifier for the associated order"
|
|
14
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "ReturnInitiated",
|
|
5
|
+
"description": "Schema for return initiated event",
|
|
6
|
+
"properties": {
|
|
7
|
+
"shipmentId": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Unique identifier for the shipment"
|
|
15
10
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
11
|
+
"orderId": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Identifier for the associated order"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["shipmentId", "orderId"]
|
|
17
|
+
}
|
package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/index.mdx
CHANGED
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
Event that is emitted when a shipment is created.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
schemaPath: schema.json
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -19,4 +19,4 @@ This event can be applied in e-commerce systems, marketplaces, or any platform w
|
|
|
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" />
|
package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/index.mdx
CHANGED
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
Event that is emitted when a shipment is delivered.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
schemaPath: schema.json
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -19,4 +19,4 @@ This event can be applied in e-commerce systems, marketplaces, or any platform w
|
|
|
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,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
"orderId": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"description": "Identifier for the associated order"
|
|
14
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "ShipmentDelivered",
|
|
5
|
+
"description": "Schema for shipment delivered event",
|
|
6
|
+
"properties": {
|
|
7
|
+
"shipmentId": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Unique identifier for the shipment"
|
|
15
10
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
11
|
+
"orderId": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Identifier for the associated order"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["shipmentId", "orderId"]
|
|
17
|
+
}
|
|
@@ -5,7 +5,7 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
Event that is emitted when a shipment is dispatched.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
schemaPath: schema.json
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -19,4 +19,4 @@ This event can be applied in e-commerce systems, marketplaces, or any platform w
|
|
|
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" />
|