@eventcatalog/create-eventcatalog 4.2.2 → 4.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/examples/examples.config.yaml +15 -0
  4. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/examples/stock-decrease.json +23 -0
  5. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/examples/stock-increase.json +23 -0
  6. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/examples/examples.config.yaml +7 -0
  7. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/examples/product-depleted.json +19 -0
  8. package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/examples/address-change.json +36 -0
  9. package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/examples/examples.config.yaml +15 -0
  10. package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/examples/quantity-change.json +29 -0
  11. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/examples/customer-request.json +34 -0
  12. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/examples/examples.config.yaml +15 -0
  13. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/examples/out-of-stock.json +28 -0
  14. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/examples/examples.config.yaml +15 -0
  15. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/examples/gift-order.json +38 -0
  16. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/examples/standard-order.json +42 -0
  17. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/address-not-found.json +23 -0
  18. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/customer-unavailable.json +40 -0
  19. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/damaged-in-transit.json +33 -0
  20. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/examples.config.yaml +23 -0
  21. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/examples/defective-item.json +33 -0
  22. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/examples/examples.config.yaml +15 -0
  23. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/examples/wrong-item.json +51 -0
  24. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/examples/examples.config.yaml +15 -0
  25. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/examples/multi-package.json +76 -0
  26. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/examples/single-package.json +51 -0
  27. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/examples/examples.config.yaml +15 -0
  28. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/examples/front-door-delivery.json +30 -0
  29. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/examples/signed-delivery.json +31 -0
  30. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/examples/examples.config.yaml +15 -0
  31. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/examples/express-shipping.json +33 -0
  32. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/examples/standard-shipping.json +32 -0
  33. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/examples/domestic-transit.json +48 -0
  34. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/examples/examples.config.yaml +15 -0
  35. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/examples/international-transit.json +61 -0
  36. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/examples/check-flagged.json +50 -0
  37. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/examples/check-passed.json +45 -0
  38. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/examples/examples.config.yaml +15 -0
  39. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/card-declined.json +38 -0
  40. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/examples.config.yaml +23 -0
  41. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/expired-card.json +38 -0
  42. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/insufficient-funds.json +38 -0
  43. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/examples/examples.config.yaml +15 -0
  44. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/examples/express-checkout.json +45 -0
  45. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/examples/standard-checkout.json +52 -0
  46. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/examples/examples.config.yaml +15 -0
  47. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/examples/international-payment.json +48 -0
  48. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/examples/successful-payment.json +48 -0
  49. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/examples/examples.config.yaml +7 -0
  50. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/examples/upcoming-renewal.json +28 -0
  51. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/examples/examples.config.yaml +15 -0
  52. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/examples/payment-failure.json +25 -0
  53. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/examples/voluntary-cancellation.json +23 -0
  54. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/examples/annual-plan.json +26 -0
  55. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/examples/examples.config.yaml +15 -0
  56. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/examples/monthly-plan.json +25 -0
package/dist/index.js CHANGED
@@ -29808,7 +29808,7 @@ var import_os2 = __toESM(require("os"));
29808
29808
  var package_default = {
29809
29809
  name: "@eventcatalog/create-eventcatalog",
29810
29810
  description: "Create EventCatalog with one command",
29811
- version: "4.2.2",
29811
+ version: "4.2.3",
29812
29812
  bin: {
29813
29813
  "create-catalog": "./dist/index.js"
29814
29814
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eventcatalog/create-eventcatalog",
3
3
  "description": "Create EventCatalog with one command",
4
- "version": "4.2.2",
4
+ "version": "4.2.3",
5
5
  "bin": {
6
6
  "create-catalog": "./dist/index.js"
7
7
  },
@@ -0,0 +1,15 @@
1
+ stock-increase.json:
2
+ name: Stock Increase
3
+ summary: Inventory increased after receiving a supplier delivery of 200 units at the east warehouse.
4
+ usage: |
5
+ curl -X POST http://localhost:3000/api/events/publish \
6
+ -H "Content-Type: application/json" \
7
+ -d @stock-increase.json
8
+
9
+ stock-decrease.json:
10
+ name: Stock Decrease
11
+ summary: Inventory decreased by 3 units due to damaged goods identified during warehouse inspection.
12
+ usage: |
13
+ curl -X POST http://localhost:3000/api/events/publish \
14
+ -H "Content-Type: application/json" \
15
+ -d @stock-decrease.json
@@ -0,0 +1,23 @@
1
+ {
2
+ "eventId": "evt_8a9b0c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
3
+ "eventType": "InventoryAdjusted",
4
+ "timestamp": "2025-11-17T14:22:09.587Z",
5
+ "adjustmentId": "adj_40355",
6
+ "productId": "prod_4102",
7
+ "productName": "Limited Edition Sneakers",
8
+ "sku": "LES-42-WHT",
9
+ "warehouseId": "wh_west_02",
10
+ "adjustmentType": "DECREASE",
11
+ "reason": "DAMAGED_GOODS",
12
+ "previousQuantity": 15,
13
+ "adjustedQuantity": 3,
14
+ "newQuantity": 12,
15
+ "unitCost": 85.0,
16
+ "currency": "USD",
17
+ "metadata": {
18
+ "source": "warehouse-system",
19
+ "correlationId": "corr_fedcba98-7654-3210-fedc-ba9876543210",
20
+ "inspectionReportId": "insp_71882",
21
+ "adjustedBy": "usr_wh_2011"
22
+ }
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "eventId": "evt_3d4e5f6a-7b8c-9d0e-1f2a-3b4c5d6e7f8a",
3
+ "eventType": "InventoryAdjusted",
4
+ "timestamp": "2025-11-17T07:45:22.310Z",
5
+ "adjustmentId": "adj_40291",
6
+ "productId": "prod_1129",
7
+ "productName": "Wireless Bluetooth Headphones",
8
+ "sku": "WBH-400-BLK",
9
+ "warehouseId": "wh_east_01",
10
+ "adjustmentType": "INCREASE",
11
+ "reason": "SUPPLIER_DELIVERY",
12
+ "previousQuantity": 42,
13
+ "adjustedQuantity": 200,
14
+ "newQuantity": 242,
15
+ "unitCost": 22.5,
16
+ "currency": "USD",
17
+ "metadata": {
18
+ "source": "warehouse-system",
19
+ "correlationId": "corr_12345678-abcd-ef01-2345-6789abcdef01",
20
+ "purchaseOrderId": "po_20251117_003",
21
+ "receivedBy": "usr_wh_1044"
22
+ }
23
+ }
@@ -0,0 +1,7 @@
1
+ product-depleted.json:
2
+ name: Product Depleted
3
+ summary: A product reached zero stock after fulfilling an order, with 3 pending orders still affected.
4
+ usage: |
5
+ curl -X POST http://localhost:3000/api/events/publish \
6
+ -H "Content-Type: application/json" \
7
+ -d @product-depleted.json
@@ -0,0 +1,19 @@
1
+ {
2
+ "eventId": "evt_4b5c6d7e-8f9a-0b1c-2d3e-4f5a6b7c8d9e",
3
+ "eventType": "OutOfStock",
4
+ "timestamp": "2025-11-18T10:05:38.922Z",
5
+ "productId": "prod_4102",
6
+ "productName": "Limited Edition Sneakers",
7
+ "sku": "LES-42-WHT",
8
+ "warehouseId": "wh_west_02",
9
+ "previousQuantity": 1,
10
+ "currentQuantity": 0,
11
+ "lastSoldOrderId": "ord_86701",
12
+ "restockEstimate": null,
13
+ "affectedPendingOrders": 3,
14
+ "metadata": {
15
+ "source": "inventory-system",
16
+ "correlationId": "corr_aabbccdd-eeff-0011-2233-445566778899",
17
+ "triggeredBy": "order_fulfillment"
18
+ }
19
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "eventId": "evt_b7d14e92-6f3a-4c09-9e72-1a5b8d3f6c20",
3
+ "eventType": "OrderAmended",
4
+ "timestamp": "2025-11-14T14:05:33.119Z",
5
+ "orderId": "ord_83102",
6
+ "userId": "usr_51037",
7
+ "amendmentType": "ADDRESS_CHANGE",
8
+ "amendments": [],
9
+ "shippingAddress": {
10
+ "previous": {
11
+ "line1": "42 Oak Street",
12
+ "line2": "Apt 7B",
13
+ "city": "Portland",
14
+ "state": "OR",
15
+ "postalCode": "97201",
16
+ "country": "US"
17
+ },
18
+ "updated": {
19
+ "line1": "158 Maple Avenue",
20
+ "line2": null,
21
+ "city": "Portland",
22
+ "state": "OR",
23
+ "postalCode": "97205",
24
+ "country": "US"
25
+ }
26
+ },
27
+ "previousOrderTotal": 89.97,
28
+ "newOrderTotal": 89.97,
29
+ "currency": "USD",
30
+ "orderStatus": "confirmed",
31
+ "metadata": {
32
+ "source": "mobile-app",
33
+ "correlationId": "corr_f8e7d6c5-b4a3-2190-fedc-ba0987654321",
34
+ "userAgent": "EventCatalog-Mobile/2.3.1 (iOS 17.4)"
35
+ }
36
+ }
@@ -0,0 +1,15 @@
1
+ quantity-change.json:
2
+ name: Quantity Change
3
+ summary: Customer updated the quantity of an item in their order from 1 to 3 units.
4
+ usage: |
5
+ curl -X POST http://localhost:3000/api/events/publish \
6
+ -H "Content-Type: application/json" \
7
+ -d @quantity-change.json
8
+
9
+ address-change.json:
10
+ name: Shipping Address Change
11
+ summary: Customer changed the shipping address on a confirmed order before dispatch.
12
+ usage: |
13
+ curl -X POST http://localhost:3000/api/events/publish \
14
+ -H "Content-Type: application/json" \
15
+ -d @address-change.json
@@ -0,0 +1,29 @@
1
+ {
2
+ "eventId": "evt_9a3f2c71-4e88-4b1a-b5d0-83c1e7a2f640",
3
+ "eventType": "OrderAmended",
4
+ "timestamp": "2025-11-14T09:23:17.482Z",
5
+ "orderId": "ord_82451",
6
+ "userId": "usr_44829",
7
+ "amendmentType": "QUANTITY_CHANGE",
8
+ "amendments": [
9
+ {
10
+ "productId": "prod_1129",
11
+ "productName": "Wireless Bluetooth Headphones",
12
+ "sku": "WBH-400-BLK",
13
+ "previousQuantity": 1,
14
+ "newQuantity": 3,
15
+ "unitPrice": 49.99,
16
+ "previousLineTotal": 49.99,
17
+ "newLineTotal": 149.97
18
+ }
19
+ ],
20
+ "previousOrderTotal": 124.98,
21
+ "newOrderTotal": 224.96,
22
+ "currency": "USD",
23
+ "orderStatus": "confirmed",
24
+ "metadata": {
25
+ "source": "web",
26
+ "correlationId": "corr_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
27
+ "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"
28
+ }
29
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "eventId": "evt_c4e81a29-7d52-4f6b-a390-2e9f5b8c1d74",
3
+ "eventType": "OrderCancelled",
4
+ "timestamp": "2025-11-15T11:42:08.734Z",
5
+ "orderId": "ord_84219",
6
+ "userId": "usr_33741",
7
+ "cancellationReason": "CUSTOMER_REQUEST",
8
+ "cancellationNote": "Changed my mind about the purchase",
9
+ "items": [
10
+ {
11
+ "productId": "prod_2045",
12
+ "productName": "Ergonomic Office Chair",
13
+ "sku": "EOC-200-GRY",
14
+ "quantity": 1,
15
+ "unitPrice": 349.99
16
+ },
17
+ {
18
+ "productId": "prod_3087",
19
+ "productName": "Standing Desk Mat",
20
+ "sku": "SDM-100-BLK",
21
+ "quantity": 1,
22
+ "unitPrice": 44.99
23
+ }
24
+ ],
25
+ "refundAmount": 394.98,
26
+ "currency": "USD",
27
+ "previousStatus": "confirmed",
28
+ "newStatus": "cancelled",
29
+ "metadata": {
30
+ "source": "web",
31
+ "correlationId": "corr_d2c3b4a5-6789-0123-abcd-456789012345",
32
+ "cancelledBy": "customer"
33
+ }
34
+ }
@@ -0,0 +1,15 @@
1
+ customer-request.json:
2
+ name: Customer Requested Cancellation
3
+ summary: Customer cancelled a confirmed order containing two items before shipment.
4
+ usage: |
5
+ curl -X POST http://localhost:3000/api/events/publish \
6
+ -H "Content-Type: application/json" \
7
+ -d @customer-request.json
8
+
9
+ out-of-stock.json:
10
+ name: Out of Stock Cancellation
11
+ summary: System automatically cancelled an order because the product was no longer available from the supplier.
12
+ usage: |
13
+ curl -X POST http://localhost:3000/api/events/publish \
14
+ -H "Content-Type: application/json" \
15
+ -d @out-of-stock.json
@@ -0,0 +1,28 @@
1
+ {
2
+ "eventId": "evt_e5f92b38-8c63-4a7d-b401-3f0a6c9d2e85",
3
+ "eventType": "OrderCancelled",
4
+ "timestamp": "2025-11-15T16:18:45.291Z",
5
+ "orderId": "ord_84507",
6
+ "userId": "usr_28956",
7
+ "cancellationReason": "OUT_OF_STOCK",
8
+ "cancellationNote": "Product no longer available from supplier",
9
+ "items": [
10
+ {
11
+ "productId": "prod_4102",
12
+ "productName": "Limited Edition Sneakers",
13
+ "sku": "LES-42-WHT",
14
+ "quantity": 1,
15
+ "unitPrice": 189.99
16
+ }
17
+ ],
18
+ "refundAmount": 189.99,
19
+ "currency": "USD",
20
+ "previousStatus": "confirmed",
21
+ "newStatus": "cancelled",
22
+ "metadata": {
23
+ "source": "system",
24
+ "correlationId": "corr_a9b8c7d6-5432-1098-fedc-ba9876543210",
25
+ "cancelledBy": "system",
26
+ "inventoryCheckId": "inv_chk_77201"
27
+ }
28
+ }
@@ -0,0 +1,15 @@
1
+ standard-order.json:
2
+ name: Standard Order
3
+ summary: A typical confirmed order with two items, standard shipping, and credit card payment.
4
+ usage: |
5
+ curl -X POST http://localhost:3000/api/events/publish \
6
+ -H "Content-Type: application/json" \
7
+ -d @standard-order.json
8
+
9
+ gift-order.json:
10
+ name: Gift Order
11
+ summary: A confirmed gift order with gift wrapping, a personal message, and express shipping.
12
+ usage: |
13
+ curl -X POST http://localhost:3000/api/events/publish \
14
+ -H "Content-Type: application/json" \
15
+ -d @gift-order.json
@@ -0,0 +1,38 @@
1
+ {
2
+ "eventId": "evt_7f8e9d0c-1b2a-3c4d-5e6f-7a8b9c0d1e2f",
3
+ "eventType": "OrderConfirmed",
4
+ "timestamp": "2025-11-16T12:15:44.882Z",
5
+ "orderId": "ord_85412",
6
+ "userId": "usr_72019",
7
+ "items": [
8
+ {
9
+ "productId": "prod_6300",
10
+ "productName": "Scented Candle Gift Set",
11
+ "sku": "SCG-050-AST",
12
+ "quantity": 1,
13
+ "unitPrice": 59.99,
14
+ "lineTotal": 59.99
15
+ }
16
+ ],
17
+ "orderTotal": 65.98,
18
+ "currency": "USD",
19
+ "isGift": true,
20
+ "giftMessage": "Happy Birthday! Hope you enjoy these.",
21
+ "giftWrapping": true,
22
+ "giftWrappingCost": 5.99,
23
+ "shippingAddress": {
24
+ "line1": "305 Pine Lane",
25
+ "line2": "Suite 4",
26
+ "city": "Seattle",
27
+ "state": "WA",
28
+ "postalCode": "98101",
29
+ "country": "US"
30
+ },
31
+ "shippingMethod": "express",
32
+ "estimatedDelivery": "2025-11-18",
33
+ "paymentMethod": "paypal",
34
+ "metadata": {
35
+ "source": "mobile-app",
36
+ "correlationId": "corr_ffeeddcc-bbaa-9988-7766-554433221100"
37
+ }
38
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "eventId": "evt_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
3
+ "eventType": "OrderConfirmed",
4
+ "timestamp": "2025-11-16T08:30:12.654Z",
5
+ "orderId": "ord_85330",
6
+ "userId": "usr_61482",
7
+ "items": [
8
+ {
9
+ "productId": "prod_5210",
10
+ "productName": "USB-C Charging Cable 2m",
11
+ "sku": "UCC-200-WHT",
12
+ "quantity": 2,
13
+ "unitPrice": 14.99,
14
+ "lineTotal": 29.98
15
+ },
16
+ {
17
+ "productId": "prod_5211",
18
+ "productName": "Wireless Mouse",
19
+ "sku": "WM-300-BLK",
20
+ "quantity": 1,
21
+ "unitPrice": 34.99,
22
+ "lineTotal": 34.99
23
+ }
24
+ ],
25
+ "orderTotal": 64.97,
26
+ "currency": "USD",
27
+ "shippingAddress": {
28
+ "line1": "720 Elm Drive",
29
+ "line2": null,
30
+ "city": "Austin",
31
+ "state": "TX",
32
+ "postalCode": "73301",
33
+ "country": "US"
34
+ },
35
+ "shippingMethod": "standard",
36
+ "estimatedDelivery": "2025-11-21",
37
+ "paymentMethod": "credit_card",
38
+ "metadata": {
39
+ "source": "web",
40
+ "correlationId": "corr_11223344-5566-7788-99aa-bbccddeeff00"
41
+ }
42
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "eventId": "evt_df_60101",
3
+ "shipmentId": "shp_84201",
4
+ "orderId": "ord_10482",
5
+ "failedAt": "2026-03-14T14:30:00Z",
6
+ "carrier": "FedEx",
7
+ "trackingNumber": "FX7829041890",
8
+ "failureReason": "address_not_found",
9
+ "failureDetails": "Delivery address not found. The provided address does not match any known location.",
10
+ "deliveryAttempts": 1,
11
+ "destination": {
12
+ "line1": "999 Phantom Lane",
13
+ "city": "Denver",
14
+ "state": "CO",
15
+ "zipCode": "80201",
16
+ "country": "US"
17
+ },
18
+ "nextAction": "contact_customer",
19
+ "customer": {
20
+ "customerId": "cust_8901",
21
+ "email": "taylor.morgan@example.com"
22
+ }
23
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "eventId": "evt_df_60108",
3
+ "shipmentId": "shp_84305",
4
+ "orderId": "ord_10596",
5
+ "failedAt": "2026-03-15T17:45:00Z",
6
+ "carrier": "UPS",
7
+ "trackingNumber": "1Z9R8F030392850142",
8
+ "failureReason": "customer_unavailable",
9
+ "failureDetails": "Customer unavailable. Three delivery attempts were made with no response.",
10
+ "deliveryAttempts": 3,
11
+ "attemptHistory": [
12
+ {
13
+ "attempt": 1,
14
+ "timestamp": "2026-03-13T10:30:00Z",
15
+ "notes": "No answer at door"
16
+ },
17
+ {
18
+ "attempt": 2,
19
+ "timestamp": "2026-03-14T14:15:00Z",
20
+ "notes": "No answer at door, left notice"
21
+ },
22
+ {
23
+ "attempt": 3,
24
+ "timestamp": "2026-03-15T17:45:00Z",
25
+ "notes": "Final attempt, no answer"
26
+ }
27
+ ],
28
+ "destination": {
29
+ "line1": "310 Oak Avenue",
30
+ "city": "Seattle",
31
+ "state": "WA",
32
+ "zipCode": "98101",
33
+ "country": "US"
34
+ },
35
+ "nextAction": "return_to_warehouse",
36
+ "customer": {
37
+ "customerId": "cust_9340",
38
+ "email": "chris.baker@example.com"
39
+ }
40
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "eventId": "evt_df_60115",
3
+ "shipmentId": "shp_84410",
4
+ "orderId": "ord_10703",
5
+ "failedAt": "2026-03-13T08:20:00Z",
6
+ "carrier": "FedEx",
7
+ "trackingNumber": "FX7829042104",
8
+ "failureReason": "damaged_in_transit",
9
+ "failureDetails": "Package damaged in transit. Item was returned to the warehouse for inspection.",
10
+ "deliveryAttempts": 0,
11
+ "damageReport": {
12
+ "reportId": "dmg_5501",
13
+ "severity": "major",
14
+ "description": "Outer packaging crushed, visible damage to contents",
15
+ "reportedBy": "warehouse_staff",
16
+ "photos": [
17
+ "https://cdn.shipping.example.com/damage-reports/dmg_5501_01.jpg",
18
+ "https://cdn.shipping.example.com/damage-reports/dmg_5501_02.jpg"
19
+ ]
20
+ },
21
+ "destination": {
22
+ "line1": "88 River Road",
23
+ "city": "Portland",
24
+ "state": "OR",
25
+ "zipCode": "97201",
26
+ "country": "US"
27
+ },
28
+ "nextAction": "reship_order",
29
+ "customer": {
30
+ "customerId": "cust_9412",
31
+ "email": "sam.nguyen@example.com"
32
+ }
33
+ }
@@ -0,0 +1,23 @@
1
+ address-not-found.json:
2
+ name: Address Not Found
3
+ summary: Delivery failed because the provided address could not be located by the carrier.
4
+ usage: |
5
+ curl -X POST http://localhost:3000/events/publish \
6
+ -H "Content-Type: application/json" \
7
+ -d @address-not-found.json
8
+
9
+ customer-unavailable.json:
10
+ name: Customer Unavailable
11
+ summary: Three delivery attempts were made but the customer was not available to receive the package.
12
+ usage: |
13
+ curl -X POST http://localhost:3000/events/publish \
14
+ -H "Content-Type: application/json" \
15
+ -d @customer-unavailable.json
16
+
17
+ damaged-in-transit.json:
18
+ name: Damaged in Transit
19
+ summary: Package was damaged during shipping and returned to the warehouse for inspection.
20
+ usage: |
21
+ curl -X POST http://localhost:3000/events/publish \
22
+ -H "Content-Type: application/json" \
23
+ -d @damaged-in-transit.json
@@ -0,0 +1,33 @@
1
+ {
2
+ "eventId": "evt_ret_70301",
3
+ "returnId": "ret_22010",
4
+ "shipmentId": "shp_88190",
5
+ "orderId": "ord_10450",
6
+ "initiatedAt": "2026-03-09T10:22:00Z",
7
+ "reason": "defective_item",
8
+ "reasonDetails": "Screen has a dead pixel cluster in the upper-left corner. Noticed after unboxing.",
9
+ "items": [
10
+ {
11
+ "itemId": "item_30291",
12
+ "sku": "ELEC-MON-27-4K",
13
+ "name": "27\" 4K Monitor",
14
+ "quantity": 1,
15
+ "pricePerUnit": 449.99
16
+ }
17
+ ],
18
+ "customer": {
19
+ "customerId": "cust_8842",
20
+ "email": "alex.rivera@example.com"
21
+ },
22
+ "returnMethod": "carrier_pickup",
23
+ "returnLabel": {
24
+ "carrier": "UPS",
25
+ "trackingNumber": "1Z9R8F030392811204",
26
+ "labelUrl": "https://cdn.shipping.example.com/return-labels/ret_22010.pdf"
27
+ },
28
+ "refundEstimate": {
29
+ "amount": 449.99,
30
+ "currency": "USD",
31
+ "method": "original_payment"
32
+ }
33
+ }
@@ -0,0 +1,15 @@
1
+ defective-item.json:
2
+ name: Defective Item Return
3
+ summary: A return initiated for a defective monitor with a dead pixel, scheduled for carrier pickup with full refund.
4
+ usage: |
5
+ curl -X POST http://localhost:3000/events/publish \
6
+ -H "Content-Type: application/json" \
7
+ -d @defective-item.json
8
+
9
+ wrong-item.json:
10
+ name: Wrong Item Received
11
+ summary: A return initiated because the customer received the wrong product, with drop-off return and automatic reshipping.
12
+ usage: |
13
+ curl -X POST http://localhost:3000/events/publish \
14
+ -H "Content-Type: application/json" \
15
+ -d @wrong-item.json
@@ -0,0 +1,51 @@
1
+ {
2
+ "eventId": "evt_ret_70305",
3
+ "returnId": "ret_22014",
4
+ "shipmentId": "shp_88201",
5
+ "orderId": "ord_10468",
6
+ "initiatedAt": "2026-03-10T08:15:00Z",
7
+ "reason": "wrong_item",
8
+ "reasonDetails": "Ordered navy blue running shoes size 10, received black hiking boots size 11.",
9
+ "items": [
10
+ {
11
+ "itemId": "item_30310",
12
+ "sku": "SHOE-HIKE-BLK-11",
13
+ "name": "Trail Hiking Boots - Black (Size 11)",
14
+ "quantity": 1,
15
+ "pricePerUnit": 129.95
16
+ }
17
+ ],
18
+ "expectedItems": [
19
+ {
20
+ "sku": "SHOE-RUN-NVY-10",
21
+ "name": "Performance Running Shoes - Navy (Size 10)",
22
+ "quantity": 1
23
+ }
24
+ ],
25
+ "customer": {
26
+ "customerId": "cust_9103",
27
+ "email": "jamie.patel@example.com"
28
+ },
29
+ "returnMethod": "drop_off",
30
+ "dropOffLocations": [
31
+ {
32
+ "name": "UPS Store - Downtown",
33
+ "address": "142 Main St, Portland, OR 97201"
34
+ },
35
+ {
36
+ "name": "UPS Store - Mall",
37
+ "address": "8500 SE Sunnyside Rd, Portland, OR 97086"
38
+ }
39
+ ],
40
+ "returnLabel": {
41
+ "carrier": "UPS",
42
+ "trackingNumber": "1Z9R8F030392811280",
43
+ "labelUrl": "https://cdn.shipping.example.com/return-labels/ret_22014.pdf"
44
+ },
45
+ "refundEstimate": {
46
+ "amount": 129.95,
47
+ "currency": "USD",
48
+ "method": "original_payment"
49
+ },
50
+ "reshipping": true
51
+ }
@@ -0,0 +1,15 @@
1
+ single-package.json:
2
+ name: Single Package Shipment
3
+ summary: A new shipment created with a single package containing two books, shipped via standard USPS.
4
+ usage: |
5
+ curl -X POST http://localhost:3000/events/publish \
6
+ -H "Content-Type: application/json" \
7
+ -d @single-package.json
8
+
9
+ multi-package.json:
10
+ name: Multi-Package Shipment
11
+ summary: A new shipment created with two packages (monitor and peripherals) for express delivery via FedEx.
12
+ usage: |
13
+ curl -X POST http://localhost:3000/events/publish \
14
+ -H "Content-Type: application/json" \
15
+ -d @multi-package.json