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:
parent
cf7a7e63a3
commit
cdd33b2c04
1 changed files with 1 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue