Bernhard
07/28/2026, 7:22 AMArtem Kobzar
07/28/2026, 7:25 AMBernhard
07/28/2026, 7:28 AMinterface HelloWorld {
type: "hello_world";
payload: {
greeting: string;
}
}
interface OrderCreated {
type: "order_created";
payload: {
orderId: string;
customerId: string;
}
}
function publish(event: HelloWorld | OrderCreated) {
// POST to /endpoint {event: "hello_world", body: {...}}
}Bernhard
07/28/2026, 7:29 AMBernhard
07/28/2026, 7:30 AMArtem Kobzar
07/28/2026, 7:36 AMTsType or somthing like that to inject a specific TypeScript for a declarationBernhard
07/28/2026, 7:40 AM@TsType("\"order_created\"")
private type: String
would cover 80%; still tough to think about how to design the APIs