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)]
|
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
|
#[serde(tag = "type", content = "data")]
|
||||||
pub enum InputItem {
|
pub enum InputItem {
|
||||||
Text {
|
Text {
|
||||||
text: String,
|
text: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user