@eventcatalog/create-eventcatalog 4.1.1 → 4.1.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 (67) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +1 -1
  3. package/templates/default/domains/E-Commerce/index.mdx +1 -19
  4. package/templates/default/domains/E-Commerce/ubiquitous-language.mdx +87 -0
  5. package/templates/default/domains/Orders/entities/CartItem/index.mdx +2 -0
  6. package/templates/default/domains/Orders/entities/Customer/index.mdx +2 -0
  7. package/templates/default/domains/Orders/entities/Order/index.mdx +2 -0
  8. package/templates/default/domains/Orders/entities/OrderItem/index.mdx +2 -0
  9. package/templates/default/domains/Orders/entities/ShoppingCart/index.mdx +2 -0
  10. package/templates/default/domains/Orders/index.mdx +1 -0
  11. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/index.mdx +1 -0
  12. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/schema.json +36 -0
  13. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/index.mdx +1 -0
  14. package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/schema.json +36 -0
  15. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/index.mdx +1 -0
  16. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/schema.json +28 -0
  17. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/index.mdx +1 -0
  18. package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/schema.json +28 -0
  19. package/templates/default/domains/Orders/services/InventoryService/index.mdx +2 -2
  20. package/templates/default/domains/Orders/services/InventoryService/versioned/0.0.1/index.mdx +2 -2
  21. package/templates/default/domains/Orders/services/OrdersService/index.mdx +1 -1
  22. package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/index.mdx +1 -1
  23. package/templates/default/domains/Orders/versioned/0.0.2/index.mdx +1 -0
  24. package/templates/default/domains/Payment/entities/Address/index.mdx +2 -0
  25. package/templates/default/domains/Payment/entities/Invoice/index.mdx +2 -0
  26. package/templates/default/domains/Payment/entities/Payment/index.mdx +2 -0
  27. package/templates/default/domains/Payment/entities/PaymentMethod/index.mdx +2 -0
  28. package/templates/default/domains/Payment/entities/Transaction/index.mdx +2 -0
  29. package/templates/default/domains/Payment/flows/PaymentProcessed/index.mdx +3 -3
  30. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/index.mdx +2 -0
  31. package/templates/default/domains/Payment/services/FraudDetectionService/index.mdx +1 -5
  32. package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/index.mdx +2 -0
  33. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/index.mdx +2 -0
  34. package/templates/default/domains/Payment/services/PaymentGatewayService/index.mdx +1 -9
  35. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/index.mdx +1 -0
  36. package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/schema.json +31 -0
  37. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/index.mdx +1 -0
  38. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/schema.json +54 -0
  39. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/index.mdx +1 -0
  40. package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/schema.json +54 -0
  41. package/templates/default/domains/ProductCatalog/entities/Category/index.mdx +2 -0
  42. package/templates/default/domains/ProductCatalog/entities/Inventory/index.mdx +2 -0
  43. package/templates/default/domains/ProductCatalog/entities/Product/index.mdx +2 -0
  44. package/templates/default/domains/ProductCatalog/entities/Review/index.mdx +2 -0
  45. package/templates/default/domains/ProductCatalog/index.mdx +0 -3
  46. package/templates/default/domains/ProductCatalog/ubiquitous-language.mdx +88 -0
  47. package/templates/default/domains/Subscriptions/entities/BillingProfile/index.mdx +2 -0
  48. package/templates/default/domains/Subscriptions/entities/SubscriptionPeriod/index.mdx +2 -0
  49. package/templates/default/domains/Subscriptions/flows/CancelSubscription/index.mdx +2 -0
  50. package/templates/default/domains/Subscriptions/flows/CancelSubscription/versioned/0.0.1/index.mdx +2 -0
  51. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/index.mdx +2 -0
  52. package/templates/default/domains/Subscriptions/services/BillingService/index.mdx +1 -5
  53. package/templates/default/domains/Subscriptions/services/PlanManagementService/index.mdx +3 -17
  54. package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/index.mdx +1 -0
  55. package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/schema.json +30 -0
  56. package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/index.mdx +1 -0
  57. package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/schema.json +31 -0
  58. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/index.mdx +1 -0
  59. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/schema.json +35 -0
  60. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/index.mdx +1 -0
  61. package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/schema.json +36 -0
  62. package/templates/default/teams/full-stack.mdx +1 -1
  63. package/templates/default/teams/mobile-devs.mdx +1 -0
  64. package/templates/default/users/aSmith.mdx +1 -0
  65. package/templates/default/users/dboyne.mdx +1 -0
  66. package/templates/default/users/mSmith.mdx +1 -0
  67. package/templates/index.ts +3 -1
package/dist/index.js CHANGED
@@ -29809,7 +29809,7 @@ var import_os2 = __toESM(require("os"));
29809
29809
  var package_default = {
29810
29810
  name: "@eventcatalog/create-eventcatalog",
29811
29811
  description: "Create EventCatalog with one command",
29812
- version: "4.1.1",
29812
+ version: "4.1.3",
29813
29813
  bin: {
29814
29814
  "create-catalog": "./dist/index.js"
29815
29815
  },
@@ -29912,6 +29912,7 @@ var installTemplate = async ({
29912
29912
  start: "eventcatalog start",
29913
29913
  preview: "eventcatalog preview",
29914
29914
  generate: "eventcatalog generate",
29915
+ lint: "eventcatalog-linter",
29915
29916
  test: 'echo "Error: no test specified" && exit 1'
29916
29917
  }
29917
29918
  };
@@ -29921,7 +29922,8 @@ var installTemplate = async ({
29921
29922
  );
29922
29923
  const installFlags = { packageManager: packageManager2, isOnline };
29923
29924
  const dependencies = [
29924
- "@eventcatalog/core"
29925
+ "@eventcatalog/core",
29926
+ "@eventcatalog/linter"
29925
29927
  ];
29926
29928
  if (template === "asyncapi") {
29927
29929
  dependencies.push("@eventcatalog/generator-asyncapi");
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.1.1",
4
+ "version": "4.1.3",
5
5
  "bin": {
6
6
  "create-catalog": "./dist/index.js"
7
7
  },
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: E-Commerce
3
3
  name: E-Commerce
4
+ summary: Core business domain orchestrating FlowMart's digital marketplace operations
4
5
  version: 1.0.0
5
6
  owners:
6
7
  - dboyne
@@ -18,25 +19,6 @@ badges:
18
19
  backgroundColor: yellow
19
20
  textColor: yellow
20
21
  icon: ShieldCheckIcon
21
-
22
- resourceGroups:
23
- - id: related-resources
24
- title: Core FlowMart Services
25
- items:
26
- - id: InventoryService
27
- type: service
28
- - id: OrdersService
29
- type: service
30
- - id: NotificationService
31
- type: service
32
- - id: ShippingService
33
- type: service
34
- - id: CustomerService
35
- type: service
36
- - id: PaymentService
37
- type: service
38
- - id: AnalyticsService
39
- type: service
40
22
  ---
41
23
 
42
24
  import Footer from '@catalog/components/footer.astro';
@@ -0,0 +1,87 @@
1
+ ---
2
+ dictionary:
3
+ - id: Marketplace
4
+ name: Marketplace
5
+ summary: "The digital platform where buyers and sellers interact to browse, purchase, and sell goods."
6
+ description: |
7
+ The marketplace is FlowMart's core digital storefront, providing the infrastructure for all commerce activity. It encompasses:
8
+
9
+ - Product discovery and search capabilities
10
+ - Seller listings and buyer interactions
11
+ - Transaction facilitation and trust mechanisms
12
+ - Platform-wide policies and governance
13
+ icon: Store
14
+ - id: Checkout
15
+ name: Checkout
16
+ summary: "The process by which a customer finalizes a purchase, providing payment and shipping details."
17
+ description: |
18
+ Checkout is the critical conversion step where a browsing customer becomes a paying customer. The checkout flow includes:
19
+
20
+ - Cart review and item confirmation
21
+ - Shipping address and method selection
22
+ - Payment method selection and authorization
23
+ - Order confirmation and receipt generation
24
+
25
+ Optimizing the checkout experience is essential for reducing cart abandonment and increasing conversion rates.
26
+ icon: ShoppingCart
27
+ - id: Cart
28
+ name: Cart
29
+ summary: "A temporary collection of items a customer intends to purchase."
30
+ description: |
31
+ The shopping cart holds selected products before checkout. Key behaviors include:
32
+
33
+ - Adding and removing items
34
+ - Updating item quantities
35
+ - Applying discount codes and promotions
36
+ - Calculating subtotals, taxes, and shipping estimates
37
+
38
+ Carts may persist across sessions for authenticated customers and have configurable expiration policies.
39
+ icon: ShoppingBag
40
+ - id: Catalog
41
+ name: Catalog
42
+ summary: "The complete collection of products available for sale on the marketplace."
43
+ icon: BookOpen
44
+ - id: Customer
45
+ name: Customer
46
+ summary: "An individual or organization that purchases goods or services from the marketplace."
47
+ description: |
48
+ Customers are the primary consumers in the e-commerce domain. A customer profile includes:
49
+
50
+ - Account and identity information
51
+ - Order history and preferences
52
+ - Saved addresses and payment methods
53
+ - Loyalty status and rewards balance
54
+
55
+ Customers may be guests (unauthenticated) or registered account holders.
56
+ icon: User
57
+ - id: Storefront
58
+ name: Storefront
59
+ summary: "The customer-facing presentation layer of the marketplace, including product pages, navigation, and branding."
60
+ icon: Layout
61
+ - id: Promotion
62
+ name: Promotion
63
+ summary: "A marketing incentive such as a discount, coupon, or special offer applied to products or orders."
64
+ description: |
65
+ Promotions drive customer engagement and sales. Common promotion types include:
66
+
67
+ - Percentage or fixed-amount discounts
68
+ - Buy-one-get-one (BOGO) offers
69
+ - Free shipping thresholds
70
+ - Time-limited flash sales
71
+ - Loyalty reward redemptions
72
+
73
+ Promotions have eligibility rules, usage limits, and validity periods.
74
+ icon: Percent
75
+ - id: Conversion
76
+ name: Conversion
77
+ summary: "The completion of a desired customer action, most commonly a purchase."
78
+ icon: TrendingUp
79
+ - id: Fulfillment
80
+ name: Fulfillment
81
+ summary: "The end-to-end process of receiving, processing, and delivering a customer's order."
82
+ icon: PackageCheck
83
+ - id: Cart Abandonment
84
+ name: Cart Abandonment
85
+ summary: "When a customer adds items to their cart but leaves the site without completing the purchase."
86
+ icon: ShoppingCart
87
+ ---
@@ -4,6 +4,8 @@ name: CartItem
4
4
  version: 1.0.0
5
5
  identifier: cartItemId
6
6
  summary: Represents an individual item within a shopping cart.
7
+ owners:
8
+ - dboyne
7
9
  properties:
8
10
  - name: cartItemId
9
11
  type: UUID
@@ -4,6 +4,8 @@ name: Customer
4
4
  version: 1.0.0
5
5
  identifier: customerId
6
6
  summary: Represents an individual or organization that places orders.
7
+ owners:
8
+ - dboyne
7
9
 
8
10
  properties:
9
11
  - name: customerId
@@ -5,6 +5,8 @@ version: 1.0.0
5
5
  identifier: orderId
6
6
  aggregateRoot: true
7
7
  summary: Represents a customer's request to purchase products or services.
8
+ owners:
9
+ - dboyne
8
10
  properties:
9
11
  - name: orderId
10
12
  type: UUID
@@ -4,6 +4,8 @@ name: OrderItem
4
4
  version: 1.0.0
5
5
  identifier: orderItemId
6
6
  summary: Represents a single item within a customer's order.
7
+ owners:
8
+ - dboyne
7
9
 
8
10
  properties:
9
11
  - name: orderItemId
@@ -5,6 +5,8 @@ version: 1.0.0
5
5
  identifier: cartId
6
6
  aggregateRoot: true
7
7
  summary: Represents a customer's shopping cart containing products before checkout.
8
+ owners:
9
+ - dboyne
8
10
  properties:
9
11
  - name: cartId
10
12
  type: UUID
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: Orders
3
3
  name: Orders
4
+ summary: Handles all operations related to customer orders, from creation to fulfillment
4
5
  version: 0.0.3
5
6
  owners:
6
7
  - dboyne
@@ -2,6 +2,7 @@
2
2
  id: InventoryAdjusted
3
3
  name: Inventory adjusted
4
4
  version: 0.0.1
5
+ schemaPath: schema.json
5
6
  summary: |
6
7
  Indicates a change in inventory level
7
8
  owners:
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "event_id": {
6
+ "type": "string",
7
+ "description": "Unique identifier for the event"
8
+ },
9
+ "timestamp": {
10
+ "type": "string",
11
+ "format": "date-time",
12
+ "description": "Timestamp of the inventory adjustment"
13
+ },
14
+ "product_id": {
15
+ "type": "string",
16
+ "description": "Identifier of the adjusted product"
17
+ },
18
+ "adjusted_quantity": {
19
+ "type": "integer",
20
+ "description": "The quantity adjusted (positive or negative)"
21
+ },
22
+ "new_quantity": {
23
+ "type": "integer",
24
+ "description": "The new total inventory quantity"
25
+ },
26
+ "adjustment_reason": {
27
+ "type": "string",
28
+ "description": "Reason for the adjustment"
29
+ },
30
+ "adjusted_by": {
31
+ "type": "string",
32
+ "description": "Identifier of the user who made the adjustment"
33
+ }
34
+ },
35
+ "required": ["event_id", "timestamp", "product_id", "adjusted_quantity", "new_quantity"]
36
+ }
@@ -2,6 +2,7 @@
2
2
  id: InventoryAdjusted
3
3
  name: Inventory adjusted
4
4
  version: 1.0.0
5
+ schemaPath: schema.json
5
6
  summary: |
6
7
  Indicates a change in inventory level
7
8
  owners:
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "event_id": {
6
+ "type": "string",
7
+ "description": "Unique identifier for the event"
8
+ },
9
+ "timestamp": {
10
+ "type": "string",
11
+ "format": "date-time",
12
+ "description": "Timestamp of the inventory adjustment"
13
+ },
14
+ "product_id": {
15
+ "type": "string",
16
+ "description": "Identifier of the adjusted product"
17
+ },
18
+ "adjusted_quantity": {
19
+ "type": "integer",
20
+ "description": "The quantity adjusted (positive or negative)"
21
+ },
22
+ "new_quantity": {
23
+ "type": "integer",
24
+ "description": "The new total inventory quantity"
25
+ },
26
+ "adjustment_reason": {
27
+ "type": "string",
28
+ "description": "Reason for the adjustment"
29
+ },
30
+ "adjusted_by": {
31
+ "type": "string",
32
+ "description": "Identifier of the user who made the adjustment"
33
+ }
34
+ },
35
+ "required": ["event_id", "timestamp", "product_id", "adjusted_quantity", "new_quantity"]
36
+ }
@@ -2,6 +2,7 @@
2
2
  id: OutOfStock
3
3
  name: Inventory out of stock
4
4
  version: 0.0.4
5
+ schemaPath: schema.json
5
6
  summary: |
6
7
  Indicates inventory is out of stock
7
8
  owners:
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "event_id": {
6
+ "type": "string",
7
+ "description": "Unique identifier for the event"
8
+ },
9
+ "timestamp": {
10
+ "type": "string",
11
+ "format": "date-time",
12
+ "description": "Timestamp when the out-of-stock condition was detected"
13
+ },
14
+ "product_id": {
15
+ "type": "string",
16
+ "description": "Identifier of the out-of-stock product"
17
+ },
18
+ "last_available_quantity": {
19
+ "type": "integer",
20
+ "description": "The last known available quantity before stock ran out"
21
+ },
22
+ "warehouse_id": {
23
+ "type": "string",
24
+ "description": "Identifier of the warehouse reporting the stock-out"
25
+ }
26
+ },
27
+ "required": ["event_id", "timestamp", "product_id"]
28
+ }
@@ -2,6 +2,7 @@
2
2
  id: OutOfStock
3
3
  name: Inventory out of stock
4
4
  version: 0.0.1
5
+ schemaPath: schema.json
5
6
  summary: |
6
7
  Indicates inventory is out of stock
7
8
  owners:
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "event_id": {
6
+ "type": "string",
7
+ "description": "Unique identifier for the event"
8
+ },
9
+ "timestamp": {
10
+ "type": "string",
11
+ "format": "date-time",
12
+ "description": "Timestamp when the out-of-stock condition was detected"
13
+ },
14
+ "product_id": {
15
+ "type": "string",
16
+ "description": "Identifier of the out-of-stock product"
17
+ },
18
+ "last_available_quantity": {
19
+ "type": "integer",
20
+ "description": "The last known available quantity before stock ran out"
21
+ },
22
+ "warehouse_id": {
23
+ "type": "string",
24
+ "description": "Identifier of the warehouse reporting the stock-out"
25
+ }
26
+ },
27
+ "required": ["event_id", "timestamp", "product_id"]
28
+ }
@@ -31,11 +31,11 @@ receives:
31
31
  - id: GetInventoryList
32
32
  sends:
33
33
  - id: InventoryAdjusted
34
- version: 0.0.4
34
+ version: 1.0.1
35
35
  to:
36
36
  - id: 'inventory.{env}.events'
37
37
  - id: OutOfStock
38
- version: 0.0.3
38
+ version: 0.0.4
39
39
  to:
40
40
  - id: 'inventory.{env}.events'
41
41
  repository:
@@ -31,11 +31,11 @@ receives:
31
31
  env: staging
32
32
  sends:
33
33
  - id: InventoryAdjusted
34
- version: 0.0.4
34
+ version: 1.0.1
35
35
  to:
36
36
  - id: 'inventory.{env}.events'
37
37
  - id: OutOfStock
38
- version: 0.0.3
38
+ version: 0.0.4
39
39
  to:
40
40
  - id: 'inventory.{env}.events'
41
41
  repository:
@@ -8,7 +8,7 @@ owners:
8
8
  - dboyne
9
9
  receives:
10
10
  - id: InventoryAdjusted
11
- version: 0.0.3
11
+ version: 1.0.1
12
12
  from:
13
13
  - id: 'inventory.{env}.events'
14
14
  - id: CreateReturnLabel
@@ -8,7 +8,7 @@ owners:
8
8
  - dboyne
9
9
  receives:
10
10
  - id: InventoryAdjusted
11
- version: 0.0.3
11
+ version: 1.0.1
12
12
  from:
13
13
  - id: 'inventory.{env}.events'
14
14
  sends:
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  id: Orders
3
3
  name: Orders
4
+ summary: Handles all operations related to customer orders, from creation to fulfillment
4
5
  version: 0.0.2
5
6
  owners:
6
7
  - dboyne
@@ -4,6 +4,8 @@ name: Address
4
4
  version: 1.0.0
5
5
  identifier: addressId
6
6
  summary: Represents shipping and billing addresses for customers and orders.
7
+ owners:
8
+ - dboyne
7
9
  properties:
8
10
  - name: addressId
9
11
  type: UUID
@@ -4,6 +4,8 @@ name: Invoice
4
4
  version: 1.0.0
5
5
  identifier: invoiceId
6
6
  summary: Represents a bill issued to a customer, detailing charges for products or services.
7
+ owners:
8
+ - dboyne
7
9
 
8
10
  properties:
9
11
  - name: invoiceId
@@ -5,6 +5,8 @@ version: 1.0.0
5
5
  identifier: paymentId
6
6
  aggregateRoot: true
7
7
  summary: Represents payment transactions for orders in the e-commerce system.
8
+ owners:
9
+ - dboyne
8
10
  properties:
9
11
  - name: paymentId
10
12
  type: UUID
@@ -4,6 +4,8 @@ name: PaymentMethod
4
4
  version: 1.0.0
5
5
  identifier: paymentMethodId
6
6
  summary: Represents a payment instrument a customer can use, like a credit card or bank account.
7
+ owners:
8
+ - dboyne
7
9
 
8
10
  properties:
9
11
  - name: paymentMethodId
@@ -4,6 +4,8 @@ name: Transaction
4
4
  version: 1.0.0
5
5
  identifier: transactionId
6
6
  summary: Represents a low-level interaction with a payment gateway or processor (e.g., authorize, capture, refund, void).
7
+ owners:
8
+ - dboyne
7
9
 
8
10
  properties:
9
11
  - name: transactionId
@@ -3,6 +3,8 @@ id: PaymentFlow
3
3
  name: Payment Flow for customers
4
4
  version: 1.0.0
5
5
  summary: Business flow for processing payments in an e-commerce platform
6
+ owners:
7
+ - dboyne
6
8
  steps:
7
9
  - id: "customer_place_order"
8
10
  title: Customer places order
@@ -66,9 +68,7 @@ steps:
66
68
  label: Retry payment process
67
69
  - id: "payment_complete"
68
70
  title: Payment Complete
69
- message:
70
- id: PaymentComplete
71
- version: 0.0.2
71
+ type: node
72
72
  next_step:
73
73
  id: "order-complete"
74
74
  label: Order completed
@@ -3,6 +3,8 @@ id: FraudCheckCompleted
3
3
  version: 0.0.1
4
4
  name: Fraud Check Completed
5
5
  summary: Emitted when a fraud check has been completed for a transaction
6
+ owners:
7
+ - dboyne
6
8
  tags:
7
9
  - payment
8
10
  - fraud
@@ -21,12 +21,8 @@ receives:
21
21
  sends:
22
22
  - id: FraudCheckCompleted
23
23
  version: 0.0.1
24
- - id: FraudDetected
25
- version: 0.0.1
26
- - id: RiskScoreCalculated
27
- version: 0.0.1
28
24
  owners:
29
- - riskTeam
25
+ - dboyne
30
26
  ---
31
27
 
32
28
  import Footer from '@catalog/components/footer.astro'
@@ -3,6 +3,8 @@ id: ProcessPayment
3
3
  version: 0.0.1
4
4
  name: Process Payment
5
5
  summary: Command to process a payment through the payment gateway
6
+ owners:
7
+ - dboyne
6
8
  tags:
7
9
  - payment
8
10
  - command
@@ -3,6 +3,8 @@ id: PaymentFailed
3
3
  version: 0.0.1
4
4
  name: Payment Failed
5
5
  summary: Emitted when a payment attempt fails
6
+ owners:
7
+ - dboyne
6
8
  badges:
7
9
  - content: Error Event
8
10
  backgroundColor: red
@@ -12,21 +12,13 @@ repository:
12
12
  receives:
13
13
  - id: ProcessPayment
14
14
  version: 0.0.1
15
- - id: RefundPayment
16
- version: 0.0.1
17
15
  - id: FraudCheckCompleted
18
16
  version: 0.0.1
19
17
  sends:
20
- - id: PaymentAuthorized
21
- version: 0.0.1
22
- - id: PaymentCaptured
23
- version: 0.0.1
24
18
  - id: PaymentFailed
25
19
  version: 0.0.1
26
- - id: RefundProcessed
27
- version: 0.0.1
28
20
  owners:
29
- - paymentsTeam
21
+ - dboyne
30
22
  ---
31
23
 
32
24
  import Footer from '@catalog/components/footer.astro'
@@ -2,6 +2,7 @@
2
2
  id: PaymentInitiated
3
3
  name: Payment Initiated
4
4
  version: 0.0.1
5
+ schemaPath: schema.json
5
6
  summary: Event is triggered when a user initiates a payment through the Payment Service
6
7
  owners:
7
8
  - dboyne
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "userId": {
6
+ "type": "string",
7
+ "format": "uuid",
8
+ "description": "Unique identifier of the user initiating the payment"
9
+ },
10
+ "orderId": {
11
+ "type": "string",
12
+ "format": "uuid",
13
+ "description": "Unique identifier of the associated order"
14
+ },
15
+ "amount": {
16
+ "type": "number",
17
+ "description": "Payment amount"
18
+ },
19
+ "paymentMethod": {
20
+ "type": "string",
21
+ "enum": ["CreditCard", "DebitCard", "BankTransfer", "PayPal"],
22
+ "description": "The payment method used"
23
+ },
24
+ "timestamp": {
25
+ "type": "string",
26
+ "format": "date-time",
27
+ "description": "When the payment was initiated"
28
+ }
29
+ },
30
+ "required": ["userId", "orderId", "amount", "paymentMethod", "timestamp"]
31
+ }
@@ -2,6 +2,7 @@
2
2
  id: PaymentProcessed
3
3
  name: Payment Processed
4
4
  version: 1.0.0
5
+ schemaPath: schema.json
5
6
  summary: Event is triggered after the payment has been successfully processed
6
7
  owners:
7
8
  - dboyne