Tag InputItem (#2304)
Instead of:
```
{ Text: { text: string } }
```
It is now:
```
{ type: "text", data: { text: string } }
```
which makes for cleaner discriminated unions
This commit is contained in:
@@ -144,6 +144,7 @@ pub struct RemoveConversationListenerParams {
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[serde(tag = "type", content = "data")]
|
||||
pub enum InputItem {
|
||||
Text {
|
||||
text: String,
|
||||
|
||||
Reference in New Issue
Block a user