@eventcatalog/create-eventcatalog 2.2.7 → 3.0.1

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 (93) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/templates/default/domains/Subscriptions/flows/CancelSubscription/SubscriptionRenewed/index.mdx +301 -0
  4. /package/templates/asyncapi/teams/{order-management.md → order-management.mdx} +0 -0
  5. /package/templates/asyncapi/teams/{user-management.md → user-management.mdx} +0 -0
  6. /package/templates/asyncapi/users/{aSmith.md → aSmith.mdx} +0 -0
  7. /package/templates/asyncapi/users/{alee.md → alee.mdx} +0 -0
  8. /package/templates/asyncapi/users/{azhang.md → azhang.mdx} +0 -0
  9. /package/templates/asyncapi/users/{dboyne.md → dboyne.mdx} +0 -0
  10. /package/templates/asyncapi/users/{dkim.md → dkim.mdx} +0 -0
  11. /package/templates/asyncapi/users/{jbrown.md → jbrown.mdx} +0 -0
  12. /package/templates/asyncapi/users/{mSmith.md → mSmith.mdx} +0 -0
  13. /package/templates/default/channels/inventory.{env}.events/{index.md → index.mdx} +0 -0
  14. /package/templates/default/channels/orders.{env}.events/{index.md → index.mdx} +0 -0
  15. /package/templates/default/channels/payment.{env}.events/{index.md → index.mdx} +0 -0
  16. /package/templates/default/domains/Orders/{changelog.md → changelog.mdx} +0 -0
  17. /package/templates/default/domains/Orders/{index.md → index.mdx} +0 -0
  18. /package/templates/default/domains/Orders/services/InventoryService/{changelog.md → changelog.mdx} +0 -0
  19. /package/templates/default/domains/Orders/services/InventoryService/commands/AddInventory/{index.md → index.mdx} +0 -0
  20. /package/templates/default/domains/Orders/services/InventoryService/commands/PlaceOrder/{index.md → index.mdx} +0 -0
  21. /package/templates/default/domains/Orders/services/InventoryService/commands/UpdateInventory/{index.md → index.mdx} +0 -0
  22. /package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/{changelog.md → changelog.mdx} +0 -0
  23. /package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/{index.md → index.mdx} +0 -0
  24. /package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/{changelog.md → changelog.mdx} +0 -0
  25. /package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/0.0.1/{index.md → index.mdx} +0 -0
  26. /package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/{changelog.md → changelog.mdx} +0 -0
  27. /package/templates/default/domains/Orders/services/InventoryService/events/InventoryAdjusted/versioned/1.0.0/{index.md → index.mdx} +0 -0
  28. /package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/{index.md → index.mdx} +0 -0
  29. /package/templates/default/domains/Orders/services/InventoryService/events/OutOfStock/versioned/0.0.1/{index.md → index.mdx} +0 -0
  30. /package/templates/default/domains/Orders/services/InventoryService/{index.md → index.mdx} +0 -0
  31. /package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryList/{index.md → index.mdx} +0 -0
  32. /package/templates/default/domains/Orders/services/InventoryService/queries/GetInventoryStatus/{index.md → index.mdx} +0 -0
  33. /package/templates/default/domains/Orders/services/InventoryService/versioned/0.0.1/{index.md → index.mdx} +0 -0
  34. /package/templates/default/domains/Orders/services/NotificationService/{index.md → index.mdx} +0 -0
  35. /package/templates/default/domains/Orders/services/NotificationService/queries/GetNotificationDetails/{index.md → index.mdx} +0 -0
  36. /package/templates/default/domains/Orders/services/NotificationService/queries/GetUserNotifications/{index.md → index.mdx} +0 -0
  37. /package/templates/default/domains/Orders/services/OrdersService/{changelog.md → changelog.mdx} +0 -0
  38. /package/templates/default/domains/Orders/services/OrdersService/events/OrderAmended/{index.md → index.mdx} +0 -0
  39. /package/templates/default/domains/Orders/services/OrdersService/events/OrderCancelled/{index.md → index.mdx} +0 -0
  40. /package/templates/default/domains/Orders/services/OrdersService/events/OrderConfirmed/{index.md → index.mdx} +0 -0
  41. /package/templates/default/domains/Orders/services/OrdersService/{index.md → index.mdx} +0 -0
  42. /package/templates/default/domains/Orders/services/OrdersService/queries/GetOrder/{index.md → index.mdx} +0 -0
  43. /package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/{changelog.md → changelog.mdx} +0 -0
  44. /package/templates/default/domains/Orders/services/OrdersService/versioned/0.0.2/{index.md → index.mdx} +0 -0
  45. /package/templates/default/domains/Orders/services/ShippingService/commands/CancelShipment/{index.md → index.mdx} +0 -0
  46. /package/templates/default/domains/Orders/services/ShippingService/commands/CreateReturnLabel/{index.md → index.mdx} +0 -0
  47. /package/templates/default/domains/Orders/services/ShippingService/commands/CreateShipment/{index.md → index.mdx} +0 -0
  48. /package/templates/default/domains/Orders/services/ShippingService/commands/UpdateShipmentStatus/{index.md → index.mdx} +0 -0
  49. /package/templates/default/domains/Orders/services/ShippingService/events/DeliveryFailed/{index.md → index.mdx} +0 -0
  50. /package/templates/default/domains/Orders/services/ShippingService/events/ReturnInitiated/{index.md → index.mdx} +0 -0
  51. /package/templates/default/domains/Orders/services/ShippingService/events/ShipmentCreated/{index.md → index.mdx} +0 -0
  52. /package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDelivered/{index.md → index.mdx} +0 -0
  53. /package/templates/default/domains/Orders/services/ShippingService/events/ShipmentDispatched/{index.md → index.mdx} +0 -0
  54. /package/templates/default/domains/Orders/services/ShippingService/events/ShipmentInTransit/{index.md → index.mdx} +0 -0
  55. /package/templates/default/domains/Orders/services/ShippingService/{index.md → index.mdx} +0 -0
  56. /package/templates/default/domains/Orders/{ubiquitous-language.md → ubiquitous-language.mdx} +0 -0
  57. /package/templates/default/domains/Orders/versioned/0.0.1/{index.md → index.mdx} +0 -0
  58. /package/templates/default/domains/Orders/versioned/0.0.2/{index.md → index.mdx} +0 -0
  59. /package/templates/default/domains/Payment/flows/PaymentProcessed/{index.md → index.mdx} +0 -0
  60. /package/templates/default/domains/Payment/{index.md → index.mdx} +0 -0
  61. /package/templates/default/domains/Payment/services/PaymentService/events/PaymentInitiated/{index.md → index.mdx} +0 -0
  62. /package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/{index.md → index.mdx} +0 -0
  63. /package/templates/default/domains/Payment/services/PaymentService/events/PaymentProcessed/versioned/0.0.1/{index.md → index.mdx} +0 -0
  64. /package/templates/default/domains/Payment/services/PaymentService/{index.md → index.mdx} +0 -0
  65. /package/templates/default/domains/Payment/services/PaymentService/queries/GetPaymentStatus/{index.md → index.mdx} +0 -0
  66. /package/templates/default/domains/Payment/{ubiquitous-language.md → ubiquitous-language.mdx} +0 -0
  67. /package/templates/default/domains/Subscriptions/flows/CancelSubscription/{index.md → index.mdx} +0 -0
  68. /package/templates/default/domains/Subscriptions/flows/CancelSubscription/versioned/0.0.1/{index.md → index.mdx} +0 -0
  69. /package/templates/default/domains/Subscriptions/{index.md → index.mdx} +0 -0
  70. /package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/CancelSubscription/{index.md → index.mdx} +0 -0
  71. /package/templates/default/domains/Subscriptions/services/SubscriptionService/commands/SubscribeUser/{index.md → index.mdx} +0 -0
  72. /package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionCancelled/{index.md → index.mdx} +0 -0
  73. /package/templates/default/domains/Subscriptions/services/SubscriptionService/events/UserSubscriptionStarted/{index.md → index.mdx} +0 -0
  74. /package/templates/default/domains/Subscriptions/services/SubscriptionService/{index.md → index.mdx} +0 -0
  75. /package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/{index.md → index.mdx} +0 -0
  76. /package/templates/default/domains/Subscriptions/services/SubscriptionService/queries/GetSubscriptionStatus/versioned/0.0.1/{index.md → index.mdx} +0 -0
  77. /package/templates/default/domains/Subscriptions/{ubiquitous-language.md → ubiquitous-language.mdx} +0 -0
  78. /package/templates/default/pages/{index.md → index.mdx} +0 -0
  79. /package/templates/default/teams/{full-stack.md → full-stack.mdx} +0 -0
  80. /package/templates/default/teams/{mobile-devs.md → mobile-devs.mdx} +0 -0
  81. /package/templates/default/users/{aSmith.md → aSmith.mdx} +0 -0
  82. /package/templates/default/users/{dboyne.md → dboyne.mdx} +0 -0
  83. /package/templates/default/users/{mSmith.md → mSmith.mdx} +0 -0
  84. /package/templates/openapi/teams/{order-management.md → order-management.mdx} +0 -0
  85. /package/templates/openapi/teams/{payment-management.md → payment-management.mdx} +0 -0
  86. /package/templates/openapi/teams/{product-management.md → product-management.mdx} +0 -0
  87. /package/templates/openapi/users/{aSmith.md → aSmith.mdx} +0 -0
  88. /package/templates/openapi/users/{alee.md → alee.mdx} +0 -0
  89. /package/templates/openapi/users/{azhang.md → azhang.mdx} +0 -0
  90. /package/templates/openapi/users/{dboyne.md → dboyne.mdx} +0 -0
  91. /package/templates/openapi/users/{dkim.md → dkim.mdx} +0 -0
  92. /package/templates/openapi/users/{jbrown.md → jbrown.mdx} +0 -0
  93. /package/templates/openapi/users/{mSmith.md → mSmith.mdx} +0 -0
package/dist/index.js CHANGED
@@ -22466,7 +22466,7 @@ var import_os2 = __toESM(require("os"));
22466
22466
  var package_default = {
22467
22467
  name: "@eventcatalog/create-eventcatalog",
22468
22468
  description: "Create EventCatalog with one command",
22469
- version: "2.2.7",
22469
+ version: "3.0.1",
22470
22470
  bin: {
22471
22471
  "create-catalog": "./dist/index.js"
22472
22472
  },
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": "2.2.7",
4
+ "version": "3.0.1",
5
5
  "bin": {
6
6
  "create-catalog": "./dist/index.js"
7
7
  },
@@ -0,0 +1,301 @@
1
+ ---
2
+ id: "SubscriptionRenewed"
3
+ name: "Subscription Renewal Flow"
4
+ version: "1.0.0"
5
+ summary: "Business flow for automatic subscription renewals and related processes"
6
+ steps:
7
+ - id: "renewal_timer_triggered"
8
+ title: "Renewal Period Reached"
9
+ custom:
10
+ title: "Renewal Timer"
11
+ color: "orange"
12
+ icon: "ClockIcon"
13
+ type: "Scheduler"
14
+ summary: "Automated timer triggers the subscription renewal process"
15
+ height: 8
16
+ properties:
17
+ subscription_id: "sub_12345678"
18
+ renewal_type: "Automatic"
19
+ billing_cycle: "Monthly"
20
+ next_billing_date: "2024-08-01"
21
+ menu:
22
+ - label: "View scheduler configuration"
23
+ url: "https://docs.example.com/scheduler"
24
+ - label: "Subscription timing documentation"
25
+ url: "https://docs.example.com/subscription-timing"
26
+ next_step:
27
+ id: "check_subscription_status"
28
+ label: "Verify subscription status"
29
+
30
+ - id: "check_subscription_status"
31
+ title: "Check Subscription Status"
32
+ service:
33
+ id: "SubscriptionService"
34
+ version: "0.0.1"
35
+ next_steps:
36
+ - id: "payment_approval_check"
37
+ label: "Subscription active, proceed to payment"
38
+ - id: "subscription_expired"
39
+ label: "Subscription has expired"
40
+ - id: "subscription_canceled"
41
+ label: "Subscription was canceled"
42
+
43
+ - id: "subscription_expired"
44
+ title: "Subscription Expired"
45
+ type: "node"
46
+ next_step:
47
+ id: "send_renewal_notification"
48
+ label: "Notify customer to renew"
49
+
50
+ - id: "subscription_canceled"
51
+ title: "Subscription Canceled"
52
+ type: "node"
53
+ next_step:
54
+ id: "send_reactivation_offer"
55
+ label: "Send special reactivation offer"
56
+
57
+ - id: "send_renewal_notification"
58
+ title: "Send Renewal Notification"
59
+ service:
60
+ id: "NotificationService"
61
+ version: "0.0.2"
62
+ next_step:
63
+ id: "await_customer_action"
64
+ label: "Wait for customer response"
65
+
66
+ - id: "send_reactivation_offer"
67
+ title: "Send Reactivation Offer"
68
+ service:
69
+ id: "NotificationService"
70
+ version: "0.0.2"
71
+ next_step:
72
+ id: "await_customer_action"
73
+ label: "Wait for customer response"
74
+
75
+ - id: "await_customer_action"
76
+ title: "Await Customer Action"
77
+ custom:
78
+ title: "Customer Decision Point"
79
+ color: "purple"
80
+ icon: "UserIcon"
81
+ type: "Decision"
82
+ height: 8
83
+ summary: "Waiting period for customer to take action on notification"
84
+ properties:
85
+ timeout_period: "7 days"
86
+ options: "Renew, Upgrade, Cancel, Ignore"
87
+ next_steps:
88
+ - id: "manual_renewal_flow"
89
+ label: "Customer manually renews"
90
+ - id: "flow_ends"
91
+ label: "No action taken"
92
+
93
+ - id: "manual_renewal_flow"
94
+ title: "Manual Renewal Flow"
95
+ type: "node"
96
+ next_step:
97
+ id: "payment_initiated"
98
+ label: "Process payment"
99
+
100
+ - id: "payment_approval_check"
101
+ title: "Check Payment Approval"
102
+ message:
103
+ id: "GetPaymentStatus"
104
+ version: "0.0.1"
105
+ next_steps:
106
+ - id: "payment_initiated"
107
+ label: "Payment approved, proceed with billing"
108
+ - id: "payment_method_invalid"
109
+ label: "Invalid payment method"
110
+
111
+ - id: "payment_method_invalid"
112
+ title: "Invalid Payment Method"
113
+ type: "node"
114
+ next_step:
115
+ id: "request_payment_update"
116
+ label: "Request updated payment method"
117
+
118
+ - id: "request_payment_update"
119
+ title: "Request Payment Update"
120
+ service:
121
+ id: "NotificationService"
122
+ version: "0.0.2"
123
+ next_step:
124
+ id: "await_updated_payment"
125
+ label: "Wait for payment update"
126
+
127
+ - id: "await_updated_payment"
128
+ title: "Await Updated Payment Method"
129
+ actor:
130
+ name: "Customer"
131
+ next_steps:
132
+ - id: "payment_initiated"
133
+ label: "Payment method updated"
134
+ - id: "subscription_grace_period"
135
+ label: "No update received"
136
+
137
+ - id: "subscription_grace_period"
138
+ title: "Grace Period"
139
+ custom:
140
+ title: "Subscription Grace Period"
141
+ color: "yellow"
142
+ icon: "ShieldExclamationIcon"
143
+ type: "Timer"
144
+ summary: "Limited period where subscription remains active despite payment failure"
145
+ properties:
146
+ duration: "7 days"
147
+ status: "At risk"
148
+ next_steps:
149
+ - id: "payment_initiated"
150
+ label: "Payment updated during grace period"
151
+ - id: "subscription_suspended"
152
+ label: "Grace period expired"
153
+
154
+ - id: "subscription_suspended"
155
+ title: "Subscription Suspended"
156
+ message:
157
+ id: "UserSubscriptionCancelled"
158
+ version: "0.0.1"
159
+ next_step:
160
+ id: "send_suspension_notification"
161
+ label: "Notify customer of suspension"
162
+
163
+ - id: "send_suspension_notification"
164
+ title: "Send Suspension Notification"
165
+ service:
166
+ id: "NotificationService"
167
+ version: "0.0.2"
168
+ next_step:
169
+ id: "flow_ends"
170
+ label: "Flow ends"
171
+
172
+ - id: "payment_initiated"
173
+ title: "Process Payment"
174
+ message:
175
+ id: "PaymentInitiated"
176
+ version: "0.0.1"
177
+ next_step:
178
+ id: "payment_gateway"
179
+ label: "Send to payment gateway"
180
+
181
+ - id: "payment_gateway"
182
+ title: "Payment Gateway"
183
+ externalSystem:
184
+ name: "Stripe"
185
+ summary: "3rd party payment processor"
186
+ url: "https://stripe.com/"
187
+ next_steps:
188
+ - id: "payment_processed"
189
+ label: "Payment successful"
190
+ - id: "payment_failed"
191
+ label: "Payment failed"
192
+
193
+ - id: "payment_failed"
194
+ title: "Payment Failed"
195
+ type: "node"
196
+ next_step:
197
+ id: "retry_payment"
198
+ label: "Retry payment"
199
+
200
+ - id: "retry_payment"
201
+ title: "Retry Payment"
202
+ custom:
203
+ title: "Payment Retry Logic"
204
+ color: "red"
205
+ icon: "ArrowPathIcon"
206
+ type: "Processor"
207
+ summary: "Automated retry logic for failed payments"
208
+ properties:
209
+ max_attempts: 3
210
+ backoff_interval: "24 hours"
211
+ current_attempt: 1
212
+ next_steps:
213
+ - id: "payment_initiated"
214
+ label: "Retry payment"
215
+ - id: "subscription_grace_period"
216
+ label: "Max retries exceeded"
217
+
218
+ - id: "payment_processed"
219
+ title: "Payment Processed"
220
+ message:
221
+ id: "PaymentProcessed"
222
+ version: "1.0.0"
223
+ next_step:
224
+ id: "update_subscription_status"
225
+ label: "Update subscription"
226
+
227
+ - id: "update_subscription_status"
228
+ title: "Update Subscription"
229
+ service:
230
+ id: "SubscriptionService"
231
+ version: "0.0.1"
232
+ next_step:
233
+ id: "send_renewal_confirmation"
234
+ label: "Confirm renewal to customer"
235
+
236
+ - id: "send_renewal_confirmation"
237
+ title: "Send Renewal Confirmation"
238
+ service:
239
+ id: "NotificationService"
240
+ version: "0.0.2"
241
+ next_step:
242
+ id: "analyze_customer_usage"
243
+ label: "Analyze customer usage patterns"
244
+
245
+ - id: "analyze_customer_usage"
246
+ title: "Analyze Usage Patterns"
247
+ custom:
248
+ title: "Usage Analytics"
249
+ color: "blue"
250
+ icon: "ChartBarIcon"
251
+ type: "Analytics"
252
+ summary: "Analyze customer usage patterns to identify upsell opportunities"
253
+ properties:
254
+ metrics_analyzed: "Feature usage, Resource consumption, Access patterns"
255
+ lookback_period: "90 days"
256
+ menu:
257
+ - label: "View analytics dashboard"
258
+ url: "https://analytics.example.com/subscriptions"
259
+ - label: "Documentation"
260
+ url: "https://docs.example.com/analytics"
261
+ next_steps:
262
+ - id: "send_upgrade_recommendation"
263
+ label: "Usage suggests upgrade opportunity"
264
+ - id: "flow_ends"
265
+ label: "No upgrade opportunity identified"
266
+
267
+ - id: "send_upgrade_recommendation"
268
+ title: "Send Upgrade Recommendation"
269
+ service:
270
+ id: "NotificationService"
271
+ version: "0.0.2"
272
+ next_step:
273
+ id: "flow_ends"
274
+ label: "Flow completed"
275
+
276
+ - id: "flow_ends"
277
+ title: "Flow Completed"
278
+ type: "node"
279
+
280
+ ---
281
+
282
+ ## Subscription Renewal Flow
283
+
284
+ This flow documents the process of automatic subscription renewals, including handling various edge cases such as payment failures, expired subscriptions, and customer interactions.
285
+
286
+ <NodeGraph />
287
+
288
+ ### Key Components
289
+
290
+ * **Automatic Renewal Process**: Triggered by a scheduled timer when the subscription renewal period is reached
291
+ * **Payment Processing**: Integration with payment gateway and handling of payment failures
292
+ * **Customer Notifications**: Various notifications sent throughout the process
293
+ * **Grace Period Handling**: Special handling when payments fail with a grace period before subscription suspension
294
+ * **Usage Analytics**: Analysis of customer usage patterns to identify upgrade opportunities
295
+
296
+ ### Business Rules
297
+
298
+ 1. Subscriptions are renewed automatically unless explicitly canceled
299
+ 2. Failed payments trigger a retry process (up to 3 attempts)
300
+ 3. Customers receive a 7-day grace period before subscription suspension
301
+ 4. Usage patterns are analyzed to provide personalized upgrade recommendations
File without changes
File without changes
File without changes
File without changes
File without changes