@eventcatalog/create-eventcatalog 4.2.2 → 4.2.4
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 +1 -1
- package/package.json +1 -1
- package/templates/asyncapi/README-template.md +54 -0
- package/templates/default/README-template.md +54 -0
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/examples/stock-decrease.json +23 -0
- package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/examples/stock-increase.json +23 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/examples/examples.config.yaml +7 -0
- package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/examples/product-depleted.json +19 -0
- package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/examples/address-change.json +36 -0
- package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/examples/quantity-change.json +29 -0
- package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/examples/customer-request.json +34 -0
- package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/examples/out-of-stock.json +28 -0
- package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/examples/gift-order.json +38 -0
- package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/examples/standard-order.json +42 -0
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/address-not-found.json +23 -0
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/customer-unavailable.json +40 -0
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/damaged-in-transit.json +33 -0
- package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/examples.config.yaml +23 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/examples/defective-item.json +33 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/examples/wrong-item.json +51 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/examples/multi-package.json +76 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/examples/single-package.json +51 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/examples/front-door-delivery.json +30 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/examples/signed-delivery.json +31 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/examples/express-shipping.json +33 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/examples/standard-shipping.json +32 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/examples/domestic-transit.json +48 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/examples/international-transit.json +61 -0
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/examples/check-flagged.json +50 -0
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/examples/check-passed.json +45 -0
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/card-declined.json +38 -0
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/examples.config.yaml +23 -0
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/expired-card.json +38 -0
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/insufficient-funds.json +38 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/examples/express-checkout.json +45 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/examples/standard-checkout.json +52 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/examples/international-payment.json +48 -0
- package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/examples/successful-payment.json +48 -0
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/examples/examples.config.yaml +7 -0
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/examples/upcoming-renewal.json +28 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/examples/payment-failure.json +25 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/examples/voluntary-cancellation.json +23 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/examples/annual-plan.json +26 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/examples/examples.config.yaml +15 -0
- package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/examples/monthly-plan.json +25 -0
- package/templates/empty/README-template.md +54 -0
- package/templates/graphql/README-template.md +54 -0
- package/templates/openapi/README-template.md +58 -0
|
@@ -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
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_sc_12005",
|
|
3
|
+
"shipmentId": "shp_88245",
|
|
4
|
+
"orderId": "ord_10558",
|
|
5
|
+
"createdAt": "2026-03-10T11:00:00Z",
|
|
6
|
+
"status": "created",
|
|
7
|
+
"customer": {
|
|
8
|
+
"customerId": "cust_9225",
|
|
9
|
+
"name": "David Kim",
|
|
10
|
+
"email": "david.kim@example.com"
|
|
11
|
+
},
|
|
12
|
+
"shippingAddress": {
|
|
13
|
+
"line1": "500 Technology Square",
|
|
14
|
+
"line2": "Apt 12B",
|
|
15
|
+
"city": "San Francisco",
|
|
16
|
+
"state": "CA",
|
|
17
|
+
"zipCode": "94105",
|
|
18
|
+
"country": "US"
|
|
19
|
+
},
|
|
20
|
+
"shippingMethod": "express",
|
|
21
|
+
"carrier": "FedEx",
|
|
22
|
+
"packages": [
|
|
23
|
+
{
|
|
24
|
+
"packageId": "pkg_44350",
|
|
25
|
+
"weightKg": 8.5,
|
|
26
|
+
"dimensions": {
|
|
27
|
+
"lengthCm": 60,
|
|
28
|
+
"widthCm": 45,
|
|
29
|
+
"heightCm": 35
|
|
30
|
+
},
|
|
31
|
+
"items": [
|
|
32
|
+
{
|
|
33
|
+
"itemId": "item_30420",
|
|
34
|
+
"sku": "ELEC-MON-32-4K",
|
|
35
|
+
"name": "32\" 4K Professional Monitor",
|
|
36
|
+
"quantity": 1
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"fragile": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"packageId": "pkg_44351",
|
|
43
|
+
"weightKg": 3.2,
|
|
44
|
+
"dimensions": {
|
|
45
|
+
"lengthCm": 40,
|
|
46
|
+
"widthCm": 30,
|
|
47
|
+
"heightCm": 20
|
|
48
|
+
},
|
|
49
|
+
"items": [
|
|
50
|
+
{
|
|
51
|
+
"itemId": "item_30421",
|
|
52
|
+
"sku": "ELEC-KB-MECH-01",
|
|
53
|
+
"name": "Mechanical Keyboard",
|
|
54
|
+
"quantity": 1
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"itemId": "item_30422",
|
|
58
|
+
"sku": "ELEC-MOUSE-ERG-01",
|
|
59
|
+
"name": "Ergonomic Wireless Mouse",
|
|
60
|
+
"quantity": 1
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"itemId": "item_30423",
|
|
64
|
+
"sku": "ELEC-DOCK-USB-01",
|
|
65
|
+
"name": "USB-C Docking Station",
|
|
66
|
+
"quantity": 1
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"estimatedDelivery": "2026-03-12T14:00:00Z",
|
|
72
|
+
"shippingCost": {
|
|
73
|
+
"amount": 24.99,
|
|
74
|
+
"currency": "USD"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_sc_12001",
|
|
3
|
+
"shipmentId": "shp_88240",
|
|
4
|
+
"orderId": "ord_10550",
|
|
5
|
+
"createdAt": "2026-03-10T07:30:00Z",
|
|
6
|
+
"status": "created",
|
|
7
|
+
"customer": {
|
|
8
|
+
"customerId": "cust_9210",
|
|
9
|
+
"name": "Emily Watson",
|
|
10
|
+
"email": "emily.watson@example.com"
|
|
11
|
+
},
|
|
12
|
+
"shippingAddress": {
|
|
13
|
+
"line1": "742 Evergreen Terrace",
|
|
14
|
+
"city": "Austin",
|
|
15
|
+
"state": "TX",
|
|
16
|
+
"zipCode": "73301",
|
|
17
|
+
"country": "US"
|
|
18
|
+
},
|
|
19
|
+
"shippingMethod": "standard",
|
|
20
|
+
"carrier": "USPS",
|
|
21
|
+
"packages": [
|
|
22
|
+
{
|
|
23
|
+
"packageId": "pkg_44320",
|
|
24
|
+
"weightKg": 1.2,
|
|
25
|
+
"dimensions": {
|
|
26
|
+
"lengthCm": 25,
|
|
27
|
+
"widthCm": 18,
|
|
28
|
+
"heightCm": 10
|
|
29
|
+
},
|
|
30
|
+
"items": [
|
|
31
|
+
{
|
|
32
|
+
"itemId": "item_30400",
|
|
33
|
+
"sku": "BOOK-PROG-TS-01",
|
|
34
|
+
"name": "Programming TypeScript",
|
|
35
|
+
"quantity": 1
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"itemId": "item_30401",
|
|
39
|
+
"sku": "BOOK-PROG-RS-01",
|
|
40
|
+
"name": "The Rust Programming Language",
|
|
41
|
+
"quantity": 1
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"estimatedDelivery": "2026-03-16T18:00:00Z",
|
|
47
|
+
"shippingCost": {
|
|
48
|
+
"amount": 5.99,
|
|
49
|
+
"currency": "USD"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
front-door-delivery.json:
|
|
2
|
+
name: Front Door Delivery
|
|
3
|
+
summary: A standard delivery left at the customer's front door with photo proof of delivery.
|
|
4
|
+
usage: |
|
|
5
|
+
curl -X POST http://localhost:3000/events/publish \
|
|
6
|
+
-H "Content-Type: application/json" \
|
|
7
|
+
-d @front-door-delivery.json
|
|
8
|
+
|
|
9
|
+
signed-delivery.json:
|
|
10
|
+
name: Signed Delivery
|
|
11
|
+
summary: A delivery requiring recipient signature, hand-delivered and signed by the customer.
|
|
12
|
+
usage: |
|
|
13
|
+
curl -X POST http://localhost:3000/events/publish \
|
|
14
|
+
-H "Content-Type: application/json" \
|
|
15
|
+
-d @signed-delivery.json
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_del_40210",
|
|
3
|
+
"shipmentId": "shp_88214",
|
|
4
|
+
"orderId": "ord_10482",
|
|
5
|
+
"deliveredAt": "2026-03-14T11:42:00Z",
|
|
6
|
+
"carrier": "FedEx",
|
|
7
|
+
"trackingNumber": "FX7829041635",
|
|
8
|
+
"deliveryType": "front_door",
|
|
9
|
+
"signatureRequired": false,
|
|
10
|
+
"deliveryLocation": {
|
|
11
|
+
"type": "front_door",
|
|
12
|
+
"notes": "Left at front door per customer instructions"
|
|
13
|
+
},
|
|
14
|
+
"proofOfDelivery": {
|
|
15
|
+
"photoUrl": "https://cdn.shipping.example.com/delivery-photos/shp_88214.jpg",
|
|
16
|
+
"gpsCoordinates": {
|
|
17
|
+
"latitude": 42.3601,
|
|
18
|
+
"longitude": -71.0589
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"recipient": {
|
|
22
|
+
"name": "Sarah Johnson",
|
|
23
|
+
"address": {
|
|
24
|
+
"city": "Boston",
|
|
25
|
+
"state": "MA",
|
|
26
|
+
"zipCode": "02101",
|
|
27
|
+
"country": "US"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_del_40215",
|
|
3
|
+
"shipmentId": "shp_88220",
|
|
4
|
+
"orderId": "ord_10517",
|
|
5
|
+
"deliveredAt": "2026-03-12T15:08:00Z",
|
|
6
|
+
"carrier": "UPS",
|
|
7
|
+
"trackingNumber": "1Z9R8F030392847582",
|
|
8
|
+
"deliveryType": "signed",
|
|
9
|
+
"signatureRequired": true,
|
|
10
|
+
"deliveryLocation": {
|
|
11
|
+
"type": "hand_delivered",
|
|
12
|
+
"notes": "Signed by recipient at front door"
|
|
13
|
+
},
|
|
14
|
+
"proofOfDelivery": {
|
|
15
|
+
"signedBy": "Michael Chen",
|
|
16
|
+
"signatureUrl": "https://cdn.shipping.example.com/signatures/shp_88220.png",
|
|
17
|
+
"gpsCoordinates": {
|
|
18
|
+
"latitude": 40.7128,
|
|
19
|
+
"longitude": -74.006
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"recipient": {
|
|
23
|
+
"name": "Michael Chen",
|
|
24
|
+
"address": {
|
|
25
|
+
"city": "New York",
|
|
26
|
+
"state": "NY",
|
|
27
|
+
"zipCode": "10001",
|
|
28
|
+
"country": "US"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
standard-shipping.json:
|
|
2
|
+
name: Standard Shipping Dispatch
|
|
3
|
+
summary: A shipment dispatched via standard ground shipping from the East Coast warehouse to Boston.
|
|
4
|
+
usage: |
|
|
5
|
+
curl -X POST http://localhost:3000/events/publish \
|
|
6
|
+
-H "Content-Type: application/json" \
|
|
7
|
+
-d @standard-shipping.json
|
|
8
|
+
|
|
9
|
+
express-shipping.json:
|
|
10
|
+
name: Express Shipping Dispatch
|
|
11
|
+
summary: A high-priority express shipment dispatched for next-day delivery via UPS.
|
|
12
|
+
usage: |
|
|
13
|
+
curl -X POST http://localhost:3000/events/publish \
|
|
14
|
+
-H "Content-Type: application/json" \
|
|
15
|
+
-d @express-shipping.json
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_sd_29302",
|
|
3
|
+
"shipmentId": "shp_88215",
|
|
4
|
+
"orderId": "ord_10499",
|
|
5
|
+
"dispatchedAt": "2026-03-10T14:30:00Z",
|
|
6
|
+
"carrier": "UPS",
|
|
7
|
+
"trackingNumber": "1Z9R8F030392847561",
|
|
8
|
+
"shippingMethod": "express",
|
|
9
|
+
"estimatedDelivery": "2026-03-11T12:00:00Z",
|
|
10
|
+
"priority": true,
|
|
11
|
+
"warehouse": {
|
|
12
|
+
"id": "wh_central_03",
|
|
13
|
+
"name": "Central Fulfillment Hub",
|
|
14
|
+
"location": "Chicago, IL"
|
|
15
|
+
},
|
|
16
|
+
"destination": {
|
|
17
|
+
"city": "Minneapolis",
|
|
18
|
+
"state": "MN",
|
|
19
|
+
"zipCode": "55401",
|
|
20
|
+
"country": "US"
|
|
21
|
+
},
|
|
22
|
+
"packages": [
|
|
23
|
+
{
|
|
24
|
+
"packageId": "pkg_44210",
|
|
25
|
+
"weightKg": 0.8,
|
|
26
|
+
"dimensions": {
|
|
27
|
+
"lengthCm": 22,
|
|
28
|
+
"widthCm": 15,
|
|
29
|
+
"heightCm": 10
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_sd_29301",
|
|
3
|
+
"shipmentId": "shp_88214",
|
|
4
|
+
"orderId": "ord_10482",
|
|
5
|
+
"dispatchedAt": "2026-03-10T09:15:00Z",
|
|
6
|
+
"carrier": "FedEx",
|
|
7
|
+
"trackingNumber": "FX7829041635",
|
|
8
|
+
"shippingMethod": "standard",
|
|
9
|
+
"estimatedDelivery": "2026-03-15T18:00:00Z",
|
|
10
|
+
"warehouse": {
|
|
11
|
+
"id": "wh_east_01",
|
|
12
|
+
"name": "East Coast Distribution Center",
|
|
13
|
+
"location": "Newark, NJ"
|
|
14
|
+
},
|
|
15
|
+
"destination": {
|
|
16
|
+
"city": "Boston",
|
|
17
|
+
"state": "MA",
|
|
18
|
+
"zipCode": "02101",
|
|
19
|
+
"country": "US"
|
|
20
|
+
},
|
|
21
|
+
"packages": [
|
|
22
|
+
{
|
|
23
|
+
"packageId": "pkg_44102",
|
|
24
|
+
"weightKg": 2.3,
|
|
25
|
+
"dimensions": {
|
|
26
|
+
"lengthCm": 30,
|
|
27
|
+
"widthCm": 20,
|
|
28
|
+
"heightCm": 15
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_tr_55010",
|
|
3
|
+
"shipmentId": "shp_88214",
|
|
4
|
+
"orderId": "ord_10482",
|
|
5
|
+
"timestamp": "2026-03-12T06:20:00Z",
|
|
6
|
+
"carrier": "FedEx",
|
|
7
|
+
"trackingNumber": "FX7829041635",
|
|
8
|
+
"transitType": "domestic",
|
|
9
|
+
"currentLocation": {
|
|
10
|
+
"facility": "FedEx Ground Hub",
|
|
11
|
+
"city": "Hartford",
|
|
12
|
+
"state": "CT",
|
|
13
|
+
"country": "US",
|
|
14
|
+
"coordinates": {
|
|
15
|
+
"latitude": 41.7658,
|
|
16
|
+
"longitude": -72.6734
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"origin": {
|
|
20
|
+
"city": "Newark",
|
|
21
|
+
"state": "NJ",
|
|
22
|
+
"country": "US"
|
|
23
|
+
},
|
|
24
|
+
"destination": {
|
|
25
|
+
"city": "Boston",
|
|
26
|
+
"state": "MA",
|
|
27
|
+
"country": "US"
|
|
28
|
+
},
|
|
29
|
+
"status": "in_transit",
|
|
30
|
+
"estimatedDelivery": "2026-03-15T18:00:00Z",
|
|
31
|
+
"transitHistory": [
|
|
32
|
+
{
|
|
33
|
+
"location": "Newark, NJ",
|
|
34
|
+
"status": "picked_up",
|
|
35
|
+
"timestamp": "2026-03-10T09:15:00Z"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"location": "Edison, NJ",
|
|
39
|
+
"status": "departed_facility",
|
|
40
|
+
"timestamp": "2026-03-10T22:00:00Z"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"location": "Hartford, CT",
|
|
44
|
+
"status": "arrived_at_facility",
|
|
45
|
+
"timestamp": "2026-03-12T06:20:00Z"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
domestic-transit.json:
|
|
2
|
+
name: Domestic Transit Update
|
|
3
|
+
summary: A shipment moving between facilities within the US, currently at a ground hub in Connecticut.
|
|
4
|
+
usage: |
|
|
5
|
+
curl -X POST http://localhost:3000/events/publish \
|
|
6
|
+
-H "Content-Type: application/json" \
|
|
7
|
+
-d @domestic-transit.json
|
|
8
|
+
|
|
9
|
+
international-transit.json:
|
|
10
|
+
name: International Transit Update
|
|
11
|
+
summary: An international shipment routed through London with customs clearance, en route from the US to Germany.
|
|
12
|
+
usage: |
|
|
13
|
+
curl -X POST http://localhost:3000/events/publish \
|
|
14
|
+
-H "Content-Type: application/json" \
|
|
15
|
+
-d @international-transit.json
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_tr_55018",
|
|
3
|
+
"shipmentId": "shp_88230",
|
|
4
|
+
"orderId": "ord_10534",
|
|
5
|
+
"timestamp": "2026-03-11T18:45:00Z",
|
|
6
|
+
"carrier": "DHL",
|
|
7
|
+
"trackingNumber": "DHL4829173650",
|
|
8
|
+
"transitType": "international",
|
|
9
|
+
"currentLocation": {
|
|
10
|
+
"facility": "DHL International Gateway",
|
|
11
|
+
"city": "London",
|
|
12
|
+
"country": "GB",
|
|
13
|
+
"coordinates": {
|
|
14
|
+
"latitude": 51.47,
|
|
15
|
+
"longitude": -0.4543
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"origin": {
|
|
19
|
+
"city": "New York",
|
|
20
|
+
"state": "NY",
|
|
21
|
+
"country": "US"
|
|
22
|
+
},
|
|
23
|
+
"destination": {
|
|
24
|
+
"city": "Berlin",
|
|
25
|
+
"country": "DE"
|
|
26
|
+
},
|
|
27
|
+
"status": "in_transit",
|
|
28
|
+
"estimatedDelivery": "2026-03-16T14:00:00Z",
|
|
29
|
+
"customs": {
|
|
30
|
+
"status": "cleared",
|
|
31
|
+
"clearedAt": "2026-03-11T14:30:00Z",
|
|
32
|
+
"declarationNumber": "GB-CUS-2026-0384751"
|
|
33
|
+
},
|
|
34
|
+
"transitHistory": [
|
|
35
|
+
{
|
|
36
|
+
"location": "New York, US",
|
|
37
|
+
"status": "picked_up",
|
|
38
|
+
"timestamp": "2026-03-09T16:00:00Z"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"location": "JFK Airport, US",
|
|
42
|
+
"status": "departed_country",
|
|
43
|
+
"timestamp": "2026-03-10T02:30:00Z"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"location": "London Heathrow, GB",
|
|
47
|
+
"status": "arrived_at_hub",
|
|
48
|
+
"timestamp": "2026-03-11T10:15:00Z"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"location": "London, GB",
|
|
52
|
+
"status": "customs_cleared",
|
|
53
|
+
"timestamp": "2026-03-11T14:30:00Z"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"location": "London, GB",
|
|
57
|
+
"status": "in_transit_to_destination",
|
|
58
|
+
"timestamp": "2026-03-11T18:45:00Z"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_fc_a7b8c9d0-7890-bcde-f012-345678901234",
|
|
3
|
+
"timestamp": "2024-03-16T19:05:50.219Z",
|
|
4
|
+
"type": "FraudCheckCompleted",
|
|
5
|
+
"source": "fraud-detection-service",
|
|
6
|
+
"data": {
|
|
7
|
+
"checkId": "chk_9e0f1a2b-3c4d-5e6f-7a8b-9c0d1e2f3a4b",
|
|
8
|
+
"assessmentId": "risk_4d5e6f7a-8b9c-0d1e-2f3a-4b5c6d7e8f9a",
|
|
9
|
+
"paymentId": "pay_6f7a8b9c-0d1e-2f3a-4b5c-6d7e8f9a0b1c",
|
|
10
|
+
"orderId": "ord_92860445",
|
|
11
|
+
"customerId": "cust_31207",
|
|
12
|
+
"result": "flagged",
|
|
13
|
+
"riskScore": 82,
|
|
14
|
+
"riskLevel": "high",
|
|
15
|
+
"checksPerformed": [
|
|
16
|
+
{
|
|
17
|
+
"name": "identity_verification",
|
|
18
|
+
"status": "passed",
|
|
19
|
+
"details": "Customer identity verified"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "card_bin_check",
|
|
23
|
+
"status": "passed",
|
|
24
|
+
"details": "Card BIN matches issuing bank"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "address_verification",
|
|
28
|
+
"status": "warning",
|
|
29
|
+
"details": "AVS returned partial match - postal code mismatch"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "geolocation_check",
|
|
33
|
+
"status": "failed",
|
|
34
|
+
"details": "IP geolocation (Lagos, Nigeria) does not match billing country (US)"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "impossible_travel_check",
|
|
38
|
+
"status": "failed",
|
|
39
|
+
"details": "Impossible travel detected between Portland, OR and Lagos in 2 hours"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"processingTimeMs": 1205,
|
|
43
|
+
"fraudDetected": true,
|
|
44
|
+
"completedAt": "2024-03-16T19:05:50.219Z"
|
|
45
|
+
},
|
|
46
|
+
"metadata": {
|
|
47
|
+
"correlationId": "corr_11aa22bb-33cc-44dd-55ee-66ff77008899",
|
|
48
|
+
"modelVersion": "fraud-ml-v3.2.1"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_fc_f6a7b8c9-6789-abcd-ef01-234567890123",
|
|
3
|
+
"timestamp": "2024-03-15T10:59:05.118Z",
|
|
4
|
+
"type": "FraudCheckCompleted",
|
|
5
|
+
"source": "fraud-detection-service",
|
|
6
|
+
"data": {
|
|
7
|
+
"checkId": "chk_3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d",
|
|
8
|
+
"assessmentId": "risk_7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d",
|
|
9
|
+
"paymentId": "pay_4b5c6d7e-8f9a-0b1c-2d3e-4f5a6b7c8d9e",
|
|
10
|
+
"orderId": "ord_92840123",
|
|
11
|
+
"customerId": "cust_10482",
|
|
12
|
+
"result": "passed",
|
|
13
|
+
"riskScore": 12,
|
|
14
|
+
"riskLevel": "low",
|
|
15
|
+
"checksPerformed": [
|
|
16
|
+
{
|
|
17
|
+
"name": "identity_verification",
|
|
18
|
+
"status": "passed",
|
|
19
|
+
"details": "Customer identity verified against government records"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "card_bin_check",
|
|
23
|
+
"status": "passed",
|
|
24
|
+
"details": "Card BIN matches issuing bank in expected region"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "address_verification",
|
|
28
|
+
"status": "passed",
|
|
29
|
+
"details": "AVS check returned full match on street and postal code"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "velocity_check",
|
|
33
|
+
"status": "passed",
|
|
34
|
+
"details": "Transaction frequency within normal parameters"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"processingTimeMs": 342,
|
|
38
|
+
"fraudDetected": false,
|
|
39
|
+
"completedAt": "2024-03-15T10:59:05.118Z"
|
|
40
|
+
},
|
|
41
|
+
"metadata": {
|
|
42
|
+
"correlationId": "corr_b2c3d4e5-f6a7-8901-bcde-f23456789012",
|
|
43
|
+
"modelVersion": "fraud-ml-v3.2.1"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
check-passed.json:
|
|
2
|
+
name: Check Passed
|
|
3
|
+
summary: All fraud checks passed for a low-risk returning customer. Identity, card BIN, address, and velocity checks all cleared in 342ms.
|
|
4
|
+
usage: |
|
|
5
|
+
curl -X POST http://localhost:3000/events/publish \
|
|
6
|
+
-H "Content-Type: application/json" \
|
|
7
|
+
-d @check-passed.json
|
|
8
|
+
|
|
9
|
+
check-flagged.json:
|
|
10
|
+
name: Check Flagged
|
|
11
|
+
summary: Fraud check flagged due to geolocation mismatch and impossible travel detection. Address verification returned a partial match.
|
|
12
|
+
usage: |
|
|
13
|
+
curl -X POST http://localhost:3000/events/publish \
|
|
14
|
+
-H "Content-Type: application/json" \
|
|
15
|
+
-d @check-flagged.json
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eventId": "evt_pf_8a3b1c9d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
|
|
3
|
+
"timestamp": "2024-03-15T14:23:47.892Z",
|
|
4
|
+
"type": "PaymentFailed",
|
|
5
|
+
"source": "payment-gateway-service",
|
|
6
|
+
"data": {
|
|
7
|
+
"paymentId": "pay_7f8e9d0c-1b2a-3c4d-5e6f-7a8b9c0d1e2f",
|
|
8
|
+
"orderId": "ord_92847561",
|
|
9
|
+
"customerId": "cust_10482",
|
|
10
|
+
"amount": 249.99,
|
|
11
|
+
"currency": "USD",
|
|
12
|
+
"paymentMethod": {
|
|
13
|
+
"type": "credit_card",
|
|
14
|
+
"brand": "visa",
|
|
15
|
+
"last4": "4242",
|
|
16
|
+
"expiryMonth": 11,
|
|
17
|
+
"expiryYear": 2026
|
|
18
|
+
},
|
|
19
|
+
"failureReason": "card_declined",
|
|
20
|
+
"failureCode": "DECLINED_GENERIC",
|
|
21
|
+
"failureMessage": "The card was declined. Please contact your card issuer for more information.",
|
|
22
|
+
"gatewayResponse": {
|
|
23
|
+
"gatewayId": "gw_stripe",
|
|
24
|
+
"transactionId": "txn_3PqR5sT7uV9wX1y",
|
|
25
|
+
"responseCode": "05",
|
|
26
|
+
"avsCheck": "pass",
|
|
27
|
+
"cvvCheck": "pass"
|
|
28
|
+
},
|
|
29
|
+
"retryable": true,
|
|
30
|
+
"attemptNumber": 1,
|
|
31
|
+
"maxAttempts": 3
|
|
32
|
+
},
|
|
33
|
+
"metadata": {
|
|
34
|
+
"correlationId": "corr_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
35
|
+
"ipAddress": "192.168.1.42",
|
|
36
|
+
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"
|
|
37
|
+
}
|
|
38
|
+
}
|