@eventcatalog/create-eventcatalog 2.2.1 → 2.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 (48) hide show
  1. package/dist/index.js +19 -4
  2. package/package.json +1 -1
  3. package/templates/asyncapi/Dockerfile +23 -0
  4. package/templates/asyncapi/README-template.md +1 -0
  5. package/templates/asyncapi/asyncapi-files/messages/user-signed-up.yml +44 -0
  6. package/templates/asyncapi/asyncapi-files/orders-service.yml +272 -0
  7. package/templates/asyncapi/asyncapi-files/payment-service.yml +245 -0
  8. package/templates/asyncapi/asyncapi-files/user-service.yml +23 -0
  9. package/templates/asyncapi/dockerignore +8 -0
  10. package/templates/asyncapi/eventcatalog.config.js +55 -0
  11. package/templates/asyncapi/eventcatalog.styles.css +1 -0
  12. package/templates/asyncapi/gitignore +24 -0
  13. package/templates/asyncapi/npmrc +1 -0
  14. package/templates/asyncapi/public/logo.png +0 -0
  15. package/templates/asyncapi/teams/order-management.md +31 -0
  16. package/templates/asyncapi/teams/user-management.md +18 -0
  17. package/templates/asyncapi/users/aSmith.md +27 -0
  18. package/templates/asyncapi/users/alee.md +8 -0
  19. package/templates/asyncapi/users/azhang.md +11 -0
  20. package/templates/asyncapi/users/dboyne.md +32 -0
  21. package/templates/asyncapi/users/dkim.md +11 -0
  22. package/templates/asyncapi/users/jbrown.md +11 -0
  23. package/templates/asyncapi/users/mSmith.md +8 -0
  24. package/templates/index.ts +10 -0
  25. package/templates/openapi/Dockerfile +23 -0
  26. package/templates/openapi/README-template.md +1 -0
  27. package/templates/openapi/dockerignore +8 -0
  28. package/templates/openapi/eventcatalog.config.js +60 -0
  29. package/templates/openapi/eventcatalog.styles.css +1 -0
  30. package/templates/openapi/gitignore +24 -0
  31. package/templates/openapi/npmrc +1 -0
  32. package/templates/openapi/openapi-files/cart-api.yml +107 -0
  33. package/templates/openapi/openapi-files/order-api.yml +148 -0
  34. package/templates/openapi/openapi-files/order-history.yml +93 -0
  35. package/templates/openapi/openapi-files/payment-api.yml +74 -0
  36. package/templates/openapi/openapi-files/product-api.yml +68 -0
  37. package/templates/openapi/public/logo.png +0 -0
  38. package/templates/openapi/teams/order-management.md +31 -0
  39. package/templates/openapi/teams/payment-management.md +18 -0
  40. package/templates/openapi/teams/product-management.md +18 -0
  41. package/templates/openapi/users/aSmith.md +27 -0
  42. package/templates/openapi/users/alee.md +8 -0
  43. package/templates/openapi/users/azhang.md +11 -0
  44. package/templates/openapi/users/dboyne.md +32 -0
  45. package/templates/openapi/users/dkim.md +11 -0
  46. package/templates/openapi/users/jbrown.md +11 -0
  47. package/templates/openapi/users/mSmith.md +8 -0
  48. package/templates/types.ts +1 -1
@@ -0,0 +1,93 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Order History API
4
+ description: API for retrieving a history of past orders.
5
+ version: 1.0.0
6
+ servers:
7
+ - url: https://api.yourshoppingapp.com/order-history
8
+ description: Order History API Server
9
+ paths:
10
+ /:
11
+ get:
12
+ summary: Retrieve order history
13
+ description: Fetch a list of past orders with optional filters like date range and status.
14
+ x-eventcatalog-message-type: query
15
+ operationId: getOrderHistory
16
+ parameters:
17
+ - name: startDate
18
+ in: query
19
+ description: Start date for the order history range (YYYY-MM-DD)
20
+ schema:
21
+ type: string
22
+ format: date
23
+ - name: endDate
24
+ in: query
25
+ description: End date for the order history range (YYYY-MM-DD)
26
+ schema:
27
+ type: string
28
+ format: date
29
+ - name: status
30
+ in: query
31
+ description: Filter orders by status (pending, shipped, delivered, canceled)
32
+ schema:
33
+ type: string
34
+ enum: [pending, shipped, delivered, canceled]
35
+ - name: customerId
36
+ in: query
37
+ description: Customer ID for retrieving specific customer order history (optional if authenticated user)
38
+ schema:
39
+ type: string
40
+ responses:
41
+ '200':
42
+ description: A list of past orders
43
+ content:
44
+ application/json:
45
+ schema:
46
+ type: array
47
+ items:
48
+ $ref: '#/components/schemas/Order'
49
+ '400':
50
+ description: Invalid date range or other input
51
+ components:
52
+ schemas:
53
+ Order:
54
+ type: object
55
+ properties:
56
+ id:
57
+ type: string
58
+ items:
59
+ type: array
60
+ items:
61
+ $ref: '#/components/schemas/CartItem'
62
+ status:
63
+ type: string
64
+ enum: [pending, shipped, delivered, canceled]
65
+ totalAmount:
66
+ type: number
67
+ format: float
68
+ orderDate:
69
+ type: string
70
+ format: date
71
+ required:
72
+ - id
73
+ - items
74
+ - status
75
+ - totalAmount
76
+ - orderDate
77
+ CartItem:
78
+ type: object
79
+ properties:
80
+ productId:
81
+ type: string
82
+ name:
83
+ type: string
84
+ quantity:
85
+ type: integer
86
+ price:
87
+ type: number
88
+ format: float
89
+ required:
90
+ - productId
91
+ - name
92
+ - quantity
93
+ - price
@@ -0,0 +1,74 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Payment API
4
+ description: API for handling payment transactions.
5
+ version: 1.0.0
6
+ servers:
7
+ - url: https://api.yourshoppingapp.com/payments
8
+ description: Payment API Server
9
+ paths:
10
+ /:
11
+ post:
12
+ summary: Initiate payment
13
+ description: Start a payment process for an order.
14
+ x-eventcatalog-message-type: command
15
+ operationId: initiatePayment
16
+ requestBody:
17
+ description: Payment details
18
+ required: true
19
+ content:
20
+ application/json:
21
+ schema:
22
+ $ref: '#/components/schemas/PaymentRequest'
23
+ responses:
24
+ '201':
25
+ description: Payment initiated
26
+ '400':
27
+ description: Invalid payment request
28
+ /{paymentId}:
29
+ get:
30
+ summary: Get payment status
31
+ operationId: getPaymentStatus
32
+ description: Check the status of a specific payment by its ID.
33
+ x-eventcatalog-message-type: query
34
+ parameters:
35
+ - name: paymentId
36
+ in: path
37
+ required: true
38
+ schema:
39
+ type: string
40
+ responses:
41
+ '200':
42
+ description: Payment status details
43
+ content:
44
+ application/json:
45
+ schema:
46
+ $ref: '#/components/schemas/PaymentStatus'
47
+ components:
48
+ schemas:
49
+ PaymentRequest:
50
+ type: object
51
+ properties:
52
+ orderId:
53
+ type: string
54
+ amount:
55
+ type: number
56
+ format: float
57
+ paymentMethod:
58
+ type: string
59
+ enum: [credit_card, paypal, bank_transfer]
60
+ required:
61
+ - orderId
62
+ - amount
63
+ - paymentMethod
64
+ PaymentStatus:
65
+ type: object
66
+ properties:
67
+ id:
68
+ type: string
69
+ status:
70
+ type: string
71
+ enum: [pending, successful, failed]
72
+ required:
73
+ - id
74
+ - status
@@ -0,0 +1,68 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Product API
4
+ description: API for managing and retrieving product details in the shopping application.
5
+ version: 1.0.0
6
+ servers:
7
+ - url: https://api.yourshoppingapp.com/products
8
+ description: Product API Server
9
+ paths:
10
+ /:
11
+ get:
12
+ summary: List all products
13
+ description: Retrieve a list of all available products.
14
+ x-eventcatalog-message-type: query
15
+ operationId: listProducts
16
+ responses:
17
+ '200':
18
+ description: A list of products
19
+ content:
20
+ application/json:
21
+ schema:
22
+ type: array
23
+ items:
24
+ $ref: '#/components/schemas/Product'
25
+ /{productId}:
26
+ get:
27
+ summary: Get a product by ID
28
+ description: Retrieve details of a specific product by its ID.
29
+ x-eventcatalog-message-type: query
30
+ operationId: getProductById
31
+ parameters:
32
+ - name: productId
33
+ in: path
34
+ required: true
35
+ schema:
36
+ type: string
37
+ responses:
38
+ '200':
39
+ description: A single product
40
+ content:
41
+ application/json:
42
+ schema:
43
+ $ref: '#/components/schemas/Product'
44
+ '404':
45
+ description: Product not found
46
+ components:
47
+ schemas:
48
+ Product:
49
+ type: object
50
+ properties:
51
+ id:
52
+ type: string
53
+ name:
54
+ type: string
55
+ description:
56
+ type: string
57
+ price:
58
+ type: number
59
+ format: float
60
+ category:
61
+ type: string
62
+ imageUrl:
63
+ type: string
64
+ required:
65
+ - id
66
+ - name
67
+ - price
68
+ - category
@@ -0,0 +1,31 @@
1
+ ---
2
+ id: order-management
3
+ name: Order Management
4
+ summmary: Order Management team based in London, UK
5
+ members:
6
+ - dboyne
7
+ - asmith
8
+ - msmith
9
+ - alee
10
+ - azhang
11
+ email: test@test.com
12
+ slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
13
+ ---
14
+
15
+ ## Overview
16
+
17
+ The Order Management team is responsible for managing orders, inventory, shipment and payment.
18
+
19
+ ## Responsibilities
20
+
21
+ - Manage orders and order processing
22
+ - Manage inventory and inventory processing
23
+ - Manage shipment and shipment processing
24
+ - Manage payment and payment processing
25
+ - Manage user and user processing
26
+
27
+ ## Key Contacts
28
+
29
+ - David Boyne
30
+ - Alice Smith
31
+ - Mike Smith
@@ -0,0 +1,18 @@
1
+ ---
2
+ id: payment-management
3
+ name: Payment Management
4
+ members:
5
+ - dboyne
6
+ - jbrown
7
+ - dkim
8
+ ---
9
+
10
+ The payment management team is responsible for managing payments and payment accounts.
11
+
12
+ ## Responsibilities
13
+
14
+ - Manage payment and payment account management
15
+ - Manage payment and payment account provisioning
16
+ - Manage payment and payment account deprovisioning
17
+ - Manage user and user account password management
18
+ - Manage user and user account role management
@@ -0,0 +1,18 @@
1
+ ---
2
+ id: product-management
3
+ name: Product Management
4
+ members:
5
+ - dboyne
6
+ - jbrown
7
+ - dkim
8
+ ---
9
+
10
+ The product management team is responsible for managing products and product accounts.
11
+
12
+ ## Responsibilities
13
+
14
+ - Manage product and product account management
15
+ - Manage product and product account provisioning
16
+ - Manage product and product account deprovisioning
17
+ - Manage product and product account password management
18
+ - Manage product and product account role management
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: asmith
3
+ name: Amy Smith
4
+ avatarUrl: https://randomuser.me/api/portraits/women/48.jpg
5
+ role: Product owner
6
+ ---
7
+
8
+ Hello! I'm Amy Smith, the Product Owner of the innovative Full Stackers team. With a strong focus on delivering exceptional value, I specialize in connecting business objectives with technical solutions to create products that users love.
9
+
10
+ ### About Me
11
+
12
+ With a comprehensive background in product management and a solid understanding of software development, I bring a unique perspective to the table. My career has been driven by a passion for understanding user needs, defining clear product visions, and leading teams to successful product deliveries.
13
+
14
+ ### What I Do
15
+
16
+ As the Product Owner for Full Stackers, my role involves a wide range of responsibilities aimed at ensuring our products are both high-quality and user-centric. Key aspects of my role include:
17
+
18
+ - **Product Vision & Strategy**: Defining and communicating the long-term vision and strategy for our products, ensuring alignment with the company's objectives and market demands.
19
+ - **Roadmap Planning**: Developing and maintaining a product roadmap that highlights key features and milestones, prioritizing tasks based on their business value and user feedback.
20
+ - **Stakeholder Management**: Engaging with stakeholders across the organization to gather requirements, provide updates, and ensure everyone is aligned on the product's direction.
21
+ - **User-Centric Design**: Championing the end-users by conducting user research, analyzing feedback, and ensuring our products effectively solve their problems.
22
+ - **Agile Leadership**: Leading the development process using Agile methodologies, facilitating sprint planning, and ensuring the team has clear priorities and objectives.
23
+
24
+ My mission is to deliver products that not only meet but exceed customer expectations. I thrive on the challenge of translating complex requirements into simple, intuitive solutions.
25
+
26
+ If you’re interested in product management, user experience, or discussing the latest trends in technology, feel free to reach out!
27
+
@@ -0,0 +1,8 @@
1
+ ---
2
+ id: alee
3
+ name: Alice Lee
4
+ avatarUrl: https://randomuser.me/api/portraits/women/91.jpg
5
+ role: Technical Writer
6
+ ---
7
+
8
+ As a Technical Writer on the Documentation team, I create clear, comprehensive documentation for our products and APIs. My focus is on making complex technical concepts accessible to developers and end-users alike. I collaborate with engineering teams to ensure our documentation stays current and accurate.
@@ -0,0 +1,11 @@
1
+ ---
2
+ id: azhang
3
+ name: Alice Zhang
4
+ avatarUrl: https://randomuser.me/api/portraits/women/97.jpg
5
+ role: Data Engineer
6
+ email: azhang@company.com
7
+ slackDirectMessageUrl: https://yourteam.slack.com/channels/azhang
8
+ msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/0?users=azhang@company.com
9
+ ---
10
+
11
+ Building and maintaining data pipelines and infrastructure...
@@ -0,0 +1,32 @@
1
+ ---
2
+ id: dboyne
3
+ name: David Boyne
4
+ avatarUrl: "https://pbs.twimg.com/profile_images/1262283153563140096/DYRDqKg6_400x400.png"
5
+ role: Lead developer
6
+ email: test@test.com
7
+ slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
8
+ ---
9
+
10
+ Hello! I'm David Boyne, the Tech Lead of an amazing team called Full Stackers. With a passion for building robust and scalable systems, I specialize in designing and implementing event-driven architectures that power modern, responsive applications.
11
+
12
+ ### About Me
13
+
14
+ With over a decade of experience in the tech industry, I have honed my skills in full-stack development, cloud computing, and distributed systems. My journey has taken me through various roles, from software engineer to architect, and now as a tech lead, I am committed to driving innovation and excellence within my team.
15
+
16
+ ### What I Do
17
+
18
+ At Full Stackers, we focus on creating seamless and efficient event-driven architectures that enhance the performance and scalability of our applications. My role involves:
19
+
20
+ - **Architecture Design**: Crafting scalable and resilient system architectures using event-driven paradigms.
21
+ - **Team Leadership**: Guiding a talented team of developers, fostering a collaborative and innovative environment.
22
+ - **Code Reviews & Mentorship**: Ensuring code quality and sharing knowledge to help the team grow.
23
+ - **Stakeholder Collaboration**: Working closely with other teams and stakeholders to align our technical solutions with business goals.
24
+ - **Continuous Improvement**: Advocating for best practices in software development, deployment, and monitoring.
25
+
26
+ I am passionate about leveraging the power of events to build systems that are not only highly responsive but also easier to maintain and extend. In an ever-evolving tech landscape, I strive to stay ahead of the curve, continuously learning and adapting to new technologies and methodologies.
27
+
28
+ Feel free to connect with me to discuss all things tech, event-driven architectures, or to exchange ideas on building better software systems!
29
+
30
+ ---
31
+ *David Boyne*
32
+ *Tech Lead, Full Stackers*
@@ -0,0 +1,11 @@
1
+ ---
2
+ id: dkim
3
+ name: David Kim
4
+ avatarUrl: https://randomuser.me/api/portraits/men/96.jpg
5
+ role: Performance Engineer
6
+ email: dkim@company.com
7
+ slackDirectMessageUrl: https://yourteam.slack.com/channels/dkim
8
+ msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/0?users=dkim@company.com
9
+ ---
10
+
11
+ Optimizing application performance and user experience...
@@ -0,0 +1,11 @@
1
+ ---
2
+ id: jbrown
3
+ name: Jessica Brown
4
+ avatarUrl: https://randomuser.me/api/portraits/women/95.jpg
5
+ role: UI/UX Designer
6
+ email: jbrown@company.com
7
+ slackDirectMessageUrl: https://yourteam.slack.com/channels/jbrown
8
+ msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/0?users=jbrown@company.com
9
+ ---
10
+
11
+ Creating intuitive and engaging user interfaces...
@@ -0,0 +1,8 @@
1
+ ---
2
+ id: msmith
3
+ name: Martin Smith
4
+ avatarUrl: "https://randomuser.me/api/portraits/men/51.jpg"
5
+ role: Senior software engineer
6
+ ---
7
+
8
+ As a Senior Mobile Developer on The Mobile Devs team, I play a key role in designing, developing, and maintaining our company’s mobile applications. My focus is on creating a seamless and intuitive user experience for our customers on both iOS and Android platforms. I work closely with cross-functional teams, including backend developers, UX/UI designers, and product managers, to deliver high-quality mobile solutions that meet business objectives and exceed user expectations.
@@ -1,6 +1,6 @@
1
1
  import { PackageManager } from "../helpers/get-pkg-manager";
2
2
 
3
- export type TemplateType = "default" | "app" | "empty";
3
+ export type TemplateType = "default" | "app" | "empty" | "asyncapi" | "openapi";
4
4
  export type TemplateMode = "js" | "ts";
5
5
 
6
6
  export interface GetTemplateFileArgs {