@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
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
"quantityChange": {
|
|
12
|
-
"type": "integer",
|
|
13
|
-
"description": "The change in quantity of the product in the inventory. Positive values indicate an increase, while negative values indicate a decrease."
|
|
14
|
-
},
|
|
15
|
-
"warehouseId": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"format": "uuid",
|
|
18
|
-
"description": "The unique identifier of the warehouse where the inventory is being updated."
|
|
19
|
-
},
|
|
20
|
-
"timestamp": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"format": "date-time",
|
|
23
|
-
"description": "The date and time when the inventory update occurred."
|
|
24
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "UpdateInventoryCommand",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"productId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"format": "uuid",
|
|
9
|
+
"description": "The unique identifier of the product whose inventory is being updated."
|
|
25
10
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
11
|
+
"quantityChange": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"description": "The change in quantity of the product in the inventory. Positive values indicate an increase, while negative values indicate a decrease."
|
|
14
|
+
},
|
|
15
|
+
"warehouseId": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "uuid",
|
|
18
|
+
"description": "The unique identifier of the warehouse where the inventory is being updated."
|
|
19
|
+
},
|
|
20
|
+
"timestamp": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "date-time",
|
|
23
|
+
"description": "The date and time when the inventory update occurred."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": ["productId", "quantityChange", "warehouseId", "timestamp"],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-01
|
|
3
3
|
badges:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
- content: ⭐️ JSON Schema
|
|
5
|
+
backgroundColor: purple
|
|
6
|
+
textColor: purple
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
### Added support for JSON Schema
|
|
@@ -29,7 +29,6 @@ InventoryAdjusted uses Avro but now also supports JSON Draft 7.
|
|
|
29
29
|
},
|
|
30
30
|
"required": ["Name", "Age", "Town"]
|
|
31
31
|
}
|
|
32
|
-
|
|
33
32
|
```
|
|
34
33
|
|
|
35
34
|
Using it with our Kafka Cluster
|
|
@@ -26,9 +26,19 @@ import Footer from '@catalog/components/footer.astro';
|
|
|
26
26
|
|
|
27
27
|
The `Inventory Adjusted` event is triggered whenever there is a change in the inventory levels of a product. This could occur due to various reasons such as receiving new stock, sales, returns, or manual adjustments by the inventory management team. The event ensures that all parts of the system that rely on inventory data are kept up-to-date with the latest inventory levels.
|
|
28
28
|
|
|
29
|
-
<Tiles
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
<Tiles>
|
|
30
|
+
<Tile
|
|
31
|
+
icon="UserGroupIcon"
|
|
32
|
+
href="/docs/teams/full-stack"
|
|
33
|
+
title="Contact the team"
|
|
34
|
+
description="Any questions? Feel free to contact the owners"
|
|
35
|
+
/>
|
|
36
|
+
<Tile
|
|
37
|
+
icon="DocumentIcon"
|
|
38
|
+
href={`/generated/events/Inventory/${frontmatter.id}/schema.avro`}
|
|
39
|
+
title="View the schema"
|
|
40
|
+
description="View the schema directly in your browser"
|
|
41
|
+
/>
|
|
32
42
|
</Tiles>
|
|
33
43
|
|
|
34
44
|
## Architecture diagram
|
|
@@ -47,7 +57,7 @@ Event example you my see being published.
|
|
|
47
57
|
"Age": 30,
|
|
48
58
|
"Department": "Engineering",
|
|
49
59
|
"Position": "Software Engineer",
|
|
50
|
-
"Salary": 85000.
|
|
60
|
+
"Salary": 85000.5,
|
|
51
61
|
"JoinDate": "2024-01-15"
|
|
52
62
|
}
|
|
53
63
|
```
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-07-01
|
|
3
3
|
badges:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
- content: Breaking change
|
|
5
|
+
backgroundColor: red
|
|
6
|
+
textColor: red
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
### Removed fields from schema, added new owners
|
|
@@ -24,7 +24,3 @@ Also added the [full stackers](/docs/teams/full-stack) team as owners of this ev
|
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
26
|
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
@@ -6,14 +6,17 @@ schemaPath: schema.json
|
|
|
6
6
|
summary: |
|
|
7
7
|
Indicates a change in inventory level
|
|
8
8
|
owners:
|
|
9
|
-
|
|
9
|
+
- dboyne
|
|
10
10
|
badges:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
- content: Recently updated!
|
|
12
|
+
backgroundColor: green
|
|
13
|
+
textColor: green
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
<Admonition>
|
|
16
|
+
<Admonition>
|
|
17
|
+
When firing this event make sure you set the `correlation-id` in the headers. Our schemas have standard metadata make sure you
|
|
18
|
+
read and follow it.
|
|
19
|
+
</Admonition>
|
|
17
20
|
|
|
18
21
|
### Details
|
|
19
22
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-07-11
|
|
3
3
|
badges:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
- content: New field
|
|
5
|
+
backgroundColor: green
|
|
6
|
+
textColor: green
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
### Added new field to schema
|
|
10
10
|
|
|
11
|
-
We added the new town property to the schema for downstream consumers.
|
|
11
|
+
We added the new town property to the schema for downstream consumers.
|
|
12
12
|
|
|
13
13
|
```json ins={"New: Added new Town property to schema:":9-10}
|
|
14
14
|
// labeled-line-markers.jsx
|
|
15
15
|
{
|
|
16
|
-
"type"
|
|
17
|
-
"namespace"
|
|
18
|
-
"name"
|
|
19
|
-
"fields"
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
"type": "record",
|
|
17
|
+
"namespace": "Tutorialspoint",
|
|
18
|
+
"name": "Employee",
|
|
19
|
+
"fields": [
|
|
20
|
+
{ "name": "Name", "type": "string" },
|
|
21
|
+
{ "name": "Age", "type": "int" },
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
{ "name": "Town", "type": "string" }
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
26
|
```
|
|
@@ -6,18 +6,18 @@ schemaPath: schema.json
|
|
|
6
6
|
summary: |
|
|
7
7
|
Indicates a change in inventory level
|
|
8
8
|
owners:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
- dboyne
|
|
10
|
+
- msmith
|
|
11
|
+
- asmith
|
|
12
|
+
- full-stack
|
|
13
|
+
- mobile-devs
|
|
14
14
|
badges:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
- content: Recently updated!
|
|
16
|
+
backgroundColor: green
|
|
17
|
+
textColor: green
|
|
18
|
+
- content: Channel:Apache Kafka
|
|
19
|
+
backgroundColor: yellow
|
|
20
|
+
textColor: yellow
|
|
21
21
|
---
|
|
22
22
|
|
|
23
23
|
## Overview
|
|
@@ -29,12 +29,15 @@ The `Inventory Adjusted` event is triggered whenever there is a change in the in
|
|
|
29
29
|
## Event Details
|
|
30
30
|
|
|
31
31
|
### Event Name
|
|
32
|
+
|
|
32
33
|
`inventory.adjusted`
|
|
33
34
|
|
|
34
35
|
### Description
|
|
36
|
+
|
|
35
37
|
This event indicates that the inventory count for one or more products has been adjusted. The event carries the updated inventory details including the product ID, the new quantity, and the reason for the adjustment.
|
|
36
38
|
|
|
37
39
|
### Payload
|
|
40
|
+
|
|
38
41
|
The payload of the `Inventory Adjusted` event includes the following fields:
|
|
39
42
|
|
|
40
43
|
```json title="Example of payload" frame="terminal"
|
|
@@ -102,4 +105,4 @@ consumer = KafkaConsumer(
|
|
|
102
105
|
for message in consumer:
|
|
103
106
|
event_data = json.loads(message.value)
|
|
104
107
|
print(f"Received Inventory Adjusted event: {event_data}")
|
|
105
|
-
```
|
|
108
|
+
```
|
|
@@ -6,18 +6,18 @@ schemaPath: schema.json
|
|
|
6
6
|
summary: |
|
|
7
7
|
Indicates inventory is out of stock
|
|
8
8
|
owners:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
- dboyne
|
|
10
|
+
- msmith
|
|
11
|
+
- asmith
|
|
12
|
+
- full-stack
|
|
13
|
+
- mobile-devs
|
|
14
14
|
badges:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
- content: Recently updated!
|
|
16
|
+
backgroundColor: green
|
|
17
|
+
textColor: green
|
|
18
|
+
- content: Channel:Apache Kafka
|
|
19
|
+
backgroundColor: yellow
|
|
20
|
+
textColor: yellow
|
|
21
21
|
---
|
|
22
22
|
|
|
23
23
|
## Overview
|
|
@@ -27,6 +27,7 @@ The `Inventory Adjusted` event is triggered whenever there is a change in the in
|
|
|
27
27
|
<NodeGraph />
|
|
28
28
|
|
|
29
29
|
### Payload
|
|
30
|
+
|
|
30
31
|
The payload of the `Inventory Adjusted` event includes the following fields:
|
|
31
32
|
|
|
32
33
|
```json title="Example of payload" frame="terminal"
|
|
@@ -94,4 +95,4 @@ consumer = KafkaConsumer(
|
|
|
94
95
|
for message in consumer:
|
|
95
96
|
event_data = json.loads(message.value)
|
|
96
97
|
print(f"Received Inventory Adjusted event: {event_data}")
|
|
97
|
-
```
|
|
98
|
+
```
|
|
@@ -45,25 +45,41 @@ repository:
|
|
|
45
45
|
|
|
46
46
|
import Footer from '@catalog/components/footer.astro';
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
48
|
## Overview
|
|
51
49
|
|
|
52
50
|
The Inventory Service is a critical component of the system responsible for managing product stock levels, tracking inventory movements, and ensuring product availability. It interacts with other services to maintain accurate inventory records and supports operations such as order fulfillment, restocking, and inventory audits.
|
|
53
51
|
|
|
54
|
-
<Tiles
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
<Tiles>
|
|
53
|
+
<Tile
|
|
54
|
+
icon="DocumentIcon"
|
|
55
|
+
href={`/docs/services/${frontmatter.id}/${frontmatter.version}/changelog`}
|
|
56
|
+
title="View the changelog"
|
|
57
|
+
description="Want to know the history of this service? View the change logs"
|
|
58
|
+
/>
|
|
59
|
+
<Tile
|
|
60
|
+
icon="UserGroupIcon"
|
|
61
|
+
href="/docs/teams/full-stack"
|
|
62
|
+
title="Contact the team"
|
|
63
|
+
description="Any questions? Feel free to contact the owners"
|
|
64
|
+
/>
|
|
65
|
+
<Tile
|
|
66
|
+
icon="BoltIcon"
|
|
67
|
+
href={`/visualiser/services/${frontmatter.id}/${frontmatter.version}`}
|
|
68
|
+
title={`Sends ${frontmatter.sends.length} messages`}
|
|
69
|
+
description="This service sends messages to downstream consumers"
|
|
70
|
+
/>
|
|
71
|
+
<Tile
|
|
72
|
+
icon="BoltIcon"
|
|
73
|
+
href={`/visualiser/services/${frontmatter.id}/${frontmatter.version}`}
|
|
74
|
+
title={`Receives ${frontmatter.receives.length} messages`}
|
|
75
|
+
description="This service receives messages from other services"
|
|
76
|
+
/>
|
|
59
77
|
</Tiles>
|
|
60
78
|
|
|
61
|
-
|
|
62
79
|
## Architecture diagram
|
|
63
80
|
|
|
64
81
|
<NodeGraph title="Hello world" />
|
|
65
82
|
|
|
66
|
-
|
|
67
83
|
<Steps title="How to connect to Inventory Service">
|
|
68
84
|
<Step title="Obtain API credentials">
|
|
69
85
|
Request API credentials from the Inventory Service team.
|
|
@@ -77,24 +93,27 @@ The Inventory Service is a critical component of the system responsible for mana
|
|
|
77
93
|
<Step title="Initialize the client">
|
|
78
94
|
Use the following code to initialize the Inventory Service client:
|
|
79
95
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
96
|
+
```js
|
|
97
|
+
const InventoryService = require('inventory-service-sdk');
|
|
98
|
+
const client = new InventoryService.Client({
|
|
99
|
+
clientId: 'YOUR_CLIENT_ID',
|
|
100
|
+
clientSecret: 'YOUR_CLIENT_SECRET',
|
|
101
|
+
apiUrl: 'https://api.inventoryservice.com/v1',
|
|
102
|
+
});
|
|
87
103
|
```
|
|
104
|
+
|
|
88
105
|
</Step>
|
|
89
106
|
<Step title="Make API calls">
|
|
90
107
|
|
|
91
108
|
You can now use the client to make API calls. For example, to get all products:
|
|
92
109
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
110
|
+
```js
|
|
111
|
+
client
|
|
112
|
+
.getProducts()
|
|
113
|
+
.then((products) => console.log(products))
|
|
114
|
+
.catch((error) => console.error(error));
|
|
115
|
+
```
|
|
116
|
+
|
|
98
117
|
</Step>
|
|
99
118
|
</Steps>
|
|
100
119
|
|
|
@@ -5,11 +5,11 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
GET request that will return inventory list
|
|
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
|
|
|
@@ -19,4 +19,4 @@ import Footer from '@catalog/components/footer.astro';
|
|
|
19
19
|
|
|
20
20
|
The GetInventoryList message is a query used to retrieve a comprehensive list of all available inventory items within a system. It is designed to return detailed information about each item, such as product names, quantities, availability status, and potentially additional metadata like categories or locations. This query is typically utilized by systems or services that require a real-time view of current stock, ensuring that downstream applications or users have accurate and up-to-date information for decision-making or operational purposes. The GetInventoryList is ideal for use cases such as order processing, stock management, or reporting, providing visibility into the full range of inventory data.
|
|
21
21
|
|
|
22
|
-
<NodeGraph />
|
|
22
|
+
<NodeGraph />
|
|
@@ -1,53 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
"location": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "Filter items by storage location or warehouse."
|
|
18
|
-
},
|
|
19
|
-
"minStockLevel": {
|
|
20
|
-
"type": "integer",
|
|
21
|
-
"description": "Filter items with a stock level greater than or equal to this value."
|
|
22
|
-
},
|
|
23
|
-
"inStock": {
|
|
24
|
-
"type": "boolean",
|
|
25
|
-
"description": "Filter items that are currently in stock (true) or out of stock (false)."
|
|
26
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "GetInventoryList",
|
|
4
|
+
"description": "A query to retrieve a list of all available inventory items with their details.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"filters": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"description": "Optional filters to narrow down the inventory search.",
|
|
10
|
+
"properties": {
|
|
11
|
+
"category": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Filter items by category (e.g., electronics, clothing, etc.)."
|
|
27
14
|
},
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"type": "integer",
|
|
36
|
-
"description": "The current page of results.",
|
|
37
|
-
"minimum": 1,
|
|
38
|
-
"default": 1
|
|
39
|
-
},
|
|
40
|
-
"pageSize": {
|
|
41
|
-
"type": "integer",
|
|
42
|
-
"description": "The number of items per page.",
|
|
43
|
-
"minimum": 1,
|
|
44
|
-
"default": 10
|
|
45
|
-
}
|
|
15
|
+
"location": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Filter items by storage location or warehouse."
|
|
18
|
+
},
|
|
19
|
+
"minStockLevel": {
|
|
20
|
+
"type": "integer",
|
|
21
|
+
"description": "Filter items with a stock level greater than or equal to this value."
|
|
46
22
|
},
|
|
47
|
-
"
|
|
48
|
-
|
|
23
|
+
"inStock": {
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"description": "Filter items that are currently in stock (true) or out of stock (false)."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": false
|
|
49
29
|
},
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
30
|
+
"pagination": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"description": "Pagination options for the query.",
|
|
33
|
+
"properties": {
|
|
34
|
+
"page": {
|
|
35
|
+
"type": "integer",
|
|
36
|
+
"description": "The current page of results.",
|
|
37
|
+
"minimum": 1,
|
|
38
|
+
"default": 1
|
|
39
|
+
},
|
|
40
|
+
"pageSize": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"description": "The number of items per page.",
|
|
43
|
+
"minimum": 1,
|
|
44
|
+
"default": 10
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": ["page", "pageSize"]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": [],
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
}
|
|
@@ -5,11 +5,11 @@ version: 0.0.1
|
|
|
5
5
|
summary: |
|
|
6
6
|
GET request that will return the current stock status for a specific product.
|
|
7
7
|
owners:
|
|
8
|
-
|
|
8
|
+
- dboyne
|
|
9
9
|
badges:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
- content: GET Request
|
|
11
|
+
backgroundColor: green
|
|
12
|
+
textColor: green
|
|
13
13
|
schemaPath: schema.json
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -17,9 +17,9 @@ import Footer from '@catalog/components/footer.astro';
|
|
|
17
17
|
|
|
18
18
|
## Overview
|
|
19
19
|
|
|
20
|
-
The GetInventoryStatus message is a query designed to retrieve the current stock status for a specific product.
|
|
20
|
+
The GetInventoryStatus message is a query designed to retrieve the current stock status for a specific product.
|
|
21
21
|
|
|
22
|
-
This query provides detailed information about the available quantity, reserved quantity, and the warehouse location where the product is stored. It is typically used by systems or services that need to determine the real-time availability of a product, enabling efficient stock management, order fulfillment, and inventory tracking processes.
|
|
22
|
+
This query provides detailed information about the available quantity, reserved quantity, and the warehouse location where the product is stored. It is typically used by systems or services that need to determine the real-time availability of a product, enabling efficient stock management, order fulfillment, and inventory tracking processes.
|
|
23
23
|
|
|
24
24
|
This query is essential for ensuring accurate stock levels are reported to downstream systems, including e-commerce platforms, warehouse management systems, and sales channels.
|
|
25
25
|
|
|
@@ -27,7 +27,6 @@ This query is essential for ensuring accurate stock levels are reported to downs
|
|
|
27
27
|
|
|
28
28
|
<SchemaViewer file="schema.json" title="JSON Schema" maxHeight="500" />
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
### Query using CURL
|
|
32
31
|
|
|
33
32
|
Use this snippet to query the inventory status
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
"availableQuantity": {
|
|
11
|
-
"type": "integer",
|
|
12
|
-
"description": "The quantity of the product currently available in stock",
|
|
13
|
-
"minimum": 0
|
|
14
|
-
},
|
|
15
|
-
"reservedQuantity": {
|
|
16
|
-
"type": "integer",
|
|
17
|
-
"description": "The quantity of the product that is reserved for pending orders",
|
|
18
|
-
"minimum": 0
|
|
19
|
-
},
|
|
20
|
-
"warehouseLocation": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"description": "The location of the warehouse where the product is stored"
|
|
23
|
-
}
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "GetInventoryStatusResponse",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"productId": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "The unique identifier for the product"
|
|
24
9
|
},
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
10
|
+
"availableQuantity": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"description": "The quantity of the product currently available in stock",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"reservedQuantity": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"description": "The quantity of the product that is reserved for pending orders",
|
|
18
|
+
"minimum": 0
|
|
19
|
+
},
|
|
20
|
+
"warehouseLocation": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The location of the warehouse where the product is stored"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["productId", "availableQuantity", "reservedQuantity", "warehouseLocation"],
|
|
26
|
+
"additionalProperties": false
|
|
27
|
+
}
|