@@ -101,7 +101,7 @@ pub struct Content {
101101#[ derive( Debug , Deserialize , Serialize ) ]
102102pub struct ContentText {
103103 pub value : String ,
104- pub annotations : Vec < String > ,
104+ pub annotations : Vec < ContentTextAnnotations > ,
105105}
106106
107107#[ derive( Debug , Deserialize , Serialize ) ]
@@ -132,3 +132,38 @@ pub struct ListMessageFile {
132132 pub has_more : bool ,
133133 pub headers : Option < HashMap < String , String > > ,
134134}
135+
136+ #[ derive( Debug , Deserialize , Serialize ) ]
137+ #[ serde( tag = "type" ) ]
138+ #[ serde( rename_all = "snake_case" ) ]
139+ pub enum ContentTextAnnotations {
140+ FileCitation ( ContentTextAnnotationsFileCitationObject ) ,
141+ FilePath ( ContentTextAnnotationsFilePathObject ) ,
142+ }
143+
144+ #[ derive( Debug , Deserialize , Serialize ) ]
145+ pub struct ContentTextAnnotationsFileCitationObject {
146+ pub text : String ,
147+ pub file_citation : FileCitation ,
148+ pub start_index : u32 ,
149+ pub end_index : u32 ,
150+ }
151+
152+ #[ derive( Debug , Deserialize , Serialize ) ]
153+ pub struct FileCitation {
154+ pub file_id : String ,
155+ pub quote : Option < String > ,
156+ }
157+
158+ #[ derive( Debug , Deserialize , Serialize ) ]
159+ pub struct ContentTextAnnotationsFilePathObject {
160+ pub text : String ,
161+ pub file_path : FilePath ,
162+ pub start_index : u32 ,
163+ pub end_index : u32 ,
164+ }
165+
166+ #[ derive( Debug , Deserialize , Serialize ) ]
167+ pub struct FilePath {
168+ pub file_id : String ,
169+ }
0 commit comments