@eventcatalog/create-eventcatalog 4.2.1 → 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 (57) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/templates/default/components/footer.astro +1 -1
  4. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/examples/examples.config.yaml +15 -0
  5. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/examples/stock-decrease.json +23 -0
  6. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/examples/stock-increase.json +23 -0
  7. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/examples/examples.config.yaml +7 -0
  8. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/examples/product-depleted.json +19 -0
  9. package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/examples/address-change.json +36 -0
  10. package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/examples/examples.config.yaml +15 -0
  11. package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/examples/quantity-change.json +29 -0
  12. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/examples/customer-request.json +34 -0
  13. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/examples/examples.config.yaml +15 -0
  14. package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/examples/out-of-stock.json +28 -0
  15. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/examples/examples.config.yaml +15 -0
  16. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/examples/gift-order.json +38 -0
  17. package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/examples/standard-order.json +42 -0
  18. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/address-not-found.json +23 -0
  19. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/customer-unavailable.json +40 -0
  20. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/damaged-in-transit.json +33 -0
  21. package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/examples/examples.config.yaml +23 -0
  22. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/examples/defective-item.json +33 -0
  23. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/examples/examples.config.yaml +15 -0
  24. package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/examples/wrong-item.json +51 -0
  25. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/examples/examples.config.yaml +15 -0
  26. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/examples/multi-package.json +76 -0
  27. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/examples/single-package.json +51 -0
  28. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/examples/examples.config.yaml +15 -0
  29. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/examples/front-door-delivery.json +30 -0
  30. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/examples/signed-delivery.json +31 -0
  31. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/examples/examples.config.yaml +15 -0
  32. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/examples/express-shipping.json +33 -0
  33. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/examples/standard-shipping.json +32 -0
  34. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/examples/domestic-transit.json +48 -0
  35. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/examples/examples.config.yaml +15 -0
  36. package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/examples/international-transit.json +61 -0
  37. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/examples/check-flagged.json +50 -0
  38. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/examples/check-passed.json +45 -0
  39. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/examples/examples.config.yaml +15 -0
  40. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/card-declined.json +38 -0
  41. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/examples.config.yaml +23 -0
  42. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/expired-card.json +38 -0
  43. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/examples/insufficient-funds.json +38 -0
  44. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/examples/examples.config.yaml +15 -0
  45. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/examples/express-checkout.json +45 -0
  46. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/examples/standard-checkout.json +52 -0
  47. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/examples/examples.config.yaml +15 -0
  48. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/examples/international-payment.json +48 -0
  49. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/examples/successful-payment.json +48 -0
  50. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/examples/examples.config.yaml +7 -0
  51. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/examples/upcoming-renewal.json +28 -0
  52. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/examples/examples.config.yaml +15 -0
  53. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/examples/payment-failure.json +25 -0
  54. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/examples/voluntary-cancellation.json +23 -0
  55. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/examples/annual-plan.json +26 -0
  56. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/examples/examples.config.yaml +15 -0
  57. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/examples/monthly-plan.json +25 -0
@@ -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
+ }
@@ -0,0 +1,23 @@
1
+ card-declined.json:
2
+ name: Card Declined
3
+ summary: Payment failed because the card was declined by the issuing bank with a generic decline code.
4
+ usage: |
5
+ curl -X POST http://localhost:3000/events/publish \
6
+ -H "Content-Type: application/json" \
7
+ -d @card-declined.json
8
+
9
+ insufficient-funds.json:
10
+ name: Insufficient Funds
11
+ summary: Payment failed due to insufficient funds on a Mastercard for a high-value order.
12
+ usage: |
13
+ curl -X POST http://localhost:3000/events/publish \
14
+ -H "Content-Type: application/json" \
15
+ -d @insufficient-funds.json
16
+
17
+ expired-card.json:
18
+ name: Expired Card
19
+ summary: Payment failed because the customer attempted to use an expired Amex card. This failure is non-retryable.
20
+ usage: |
21
+ curl -X POST http://localhost:3000/events/publish \
22
+ -H "Content-Type: application/json" \
23
+ -d @expired-card.json
@@ -0,0 +1,38 @@
1
+ {
2
+ "eventId": "evt_pf_5c6d7e8f-9a0b-1c2d-3e4f-5a6b7c8d9e0f",
3
+ "timestamp": "2024-03-16T09:12:05.671Z",
4
+ "type": "PaymentFailed",
5
+ "source": "payment-gateway-service",
6
+ "data": {
7
+ "paymentId": "pay_9e8d7c6b-5a4f-3e2d-1c0b-9a8f7e6d5c4b",
8
+ "orderId": "ord_92853298",
9
+ "customerId": "cust_30692",
10
+ "amount": 54.5,
11
+ "currency": "EUR",
12
+ "paymentMethod": {
13
+ "type": "credit_card",
14
+ "brand": "amex",
15
+ "last4": "1003",
16
+ "expiryMonth": 1,
17
+ "expiryYear": 2024
18
+ },
19
+ "failureReason": "expired_card",
20
+ "failureCode": "CARD_EXPIRED",
21
+ "failureMessage": "The card has expired. Please use a different payment method.",
22
+ "gatewayResponse": {
23
+ "gatewayId": "gw_stripe",
24
+ "transactionId": "txn_OpQrStUvWxYz123",
25
+ "responseCode": "54",
26
+ "avsCheck": "unavailable",
27
+ "cvvCheck": "fail"
28
+ },
29
+ "retryable": false,
30
+ "attemptNumber": 1,
31
+ "maxAttempts": 3
32
+ },
33
+ "metadata": {
34
+ "correlationId": "corr_11223344-5566-7788-99aa-bbccddeeff00",
35
+ "ipAddress": "172.16.0.55",
36
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_3 like Mac OS X)"
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "eventId": "evt_pf_2d3e4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
3
+ "timestamp": "2024-03-15T16:45:12.334Z",
4
+ "type": "PaymentFailed",
5
+ "source": "payment-gateway-service",
6
+ "data": {
7
+ "paymentId": "pay_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
8
+ "orderId": "ord_92851034",
9
+ "customerId": "cust_20571",
10
+ "amount": 1299.0,
11
+ "currency": "USD",
12
+ "paymentMethod": {
13
+ "type": "credit_card",
14
+ "brand": "mastercard",
15
+ "last4": "8910",
16
+ "expiryMonth": 3,
17
+ "expiryYear": 2027
18
+ },
19
+ "failureReason": "insufficient_funds",
20
+ "failureCode": "INSUFFICIENT_FUNDS",
21
+ "failureMessage": "The card has insufficient funds to complete this transaction.",
22
+ "gatewayResponse": {
23
+ "gatewayId": "gw_stripe",
24
+ "transactionId": "txn_9AbCdEfGhIjKlMn",
25
+ "responseCode": "51",
26
+ "avsCheck": "pass",
27
+ "cvvCheck": "pass"
28
+ },
29
+ "retryable": true,
30
+ "attemptNumber": 1,
31
+ "maxAttempts": 3
32
+ },
33
+ "metadata": {
34
+ "correlationId": "corr_f7e6d5c4-b3a2-1098-7654-321fedcba098",
35
+ "ipAddress": "10.0.0.88",
36
+ "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
37
+ }
38
+ }