Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit a3a3dfd

Browse files
committed
feat: add event bus message form
1 parent 25bbbae commit a3a3dfd

File tree

4 files changed

+76
-15
lines changed

4 files changed

+76
-15
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { extend, extract } from '../../../src/index.js'
2+
3+
export default [extend('presets/base/typescript-cdk'), extract()]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<p align="center">
2+
<a href="https://buttonize.io">
3+
<img width="350" alt="Buttonize.io" src="https://user-images.githubusercontent.com/6282843/212024942-9fd50774-ea26-48ba-b2cf-ca2584498c9a.png">
4+
</a>
5+
</p>
6+
7+
---
8+
9+
## Event Bus Message Form
10+
11+
[![Event Bus Message Form](https://github.com/buttonize/create-buttonize/assets/6282843/7ea788b0-1c93-4e2c-8a26-9ba74f8af16b)](https://buttonize.io/library/event-bus-message-form)
12+
13+
Learn more about Event Bus Message Form Construct [here](https://buttonize.io/library/event-bus-message-form).
14+
15+
## CDK
16+
17+
The `cdk.json` file tells the CDK Toolkit how to execute your app.
18+
19+
### Useful commands
20+
21+
* `npm run build` compile typescript to js
22+
* `npm run watch` watch for changes and compile
23+
* `npx cdk deploy` deploy this stack to your default AWS account/region
24+
* `npx cdk diff` compare deployed stack with current state
25+
* `npx cdk synth` emits the synthesized CloudFormation template
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import * as cdk from 'aws-cdk-lib'
2+
import { Buttonize, Input } from 'buttonize/cdk'
3+
import { EventBusMessageForm } from 'buttonize/library'
4+
import { Construct } from 'constructs'
5+
6+
export class ExampleStack extends cdk.Stack {
7+
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
8+
super(scope, id, props)
9+
10+
Buttonize.init(this, {
11+
apiKey: '@@apiKey'
12+
})
13+
14+
new EventBusMessageForm(this, 'EventBusMessageForm', {
15+
name: 'Product cache invalidation panel',
16+
description:
17+
'Trigger invalidation of a product in all the caches in the in the company systems',
18+
submitButtonLabel: 'Invalidate',
19+
20+
fields: [
21+
Input.text({
22+
id: 'id',
23+
label: 'Product ID'
24+
}),
25+
Input.select({
26+
id: 'reason',
27+
label: 'Reason',
28+
options: [
29+
{ label: 'New manual update', value: 'manual_update' },
30+
{ label: 'System bug', value: 'bug' }
31+
]
32+
})
33+
],
34+
35+
source: 'product-service',
36+
detailType: 'create-invalidation',
37+
38+
detail: {
39+
product: {
40+
pid: '{{id}}'
41+
},
42+
metadata: {
43+
reasonStatement: '{{reason.value}}'
44+
}
45+
}
46+
})
47+
}
48+
}

presets/library/sns-topic-message-form/templates/src/discount-generator.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)