55use serde:: { Deserialize , Serialize } ;
66
77// Locales supported by Merino Curated Reccomendations
8- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Enum ) ]
8+ #[ derive( Debug , Serialize , PartialEq , uniffi:: Enum ) ]
99pub enum Locale {
1010 #[ serde( rename = "fr" ) ]
1111 Fr ,
@@ -48,7 +48,7 @@ pub struct SectionSettings {
4848}
4949
5050// Information required to request curated recommendations
51- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
51+ #[ derive( Debug , Serialize , PartialEq , uniffi:: Record ) ]
5252pub struct CuratedRecommendationsRequest {
5353 pub locale : Locale ,
5454 #[ uniffi( default = None ) ]
@@ -70,7 +70,7 @@ pub struct CuratedRecommendationsRequest {
7070}
7171
7272// Response schema for a list of curated recommendations
73- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
73+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
7474pub struct CuratedRecommendationsResponse {
7575 #[ serde( rename = "recommendedAt" ) ]
7676 pub recommended_at : i32 ,
@@ -80,7 +80,7 @@ pub struct CuratedRecommendationsResponse {
8080}
8181
8282// Multiple list of curated recoummendations
83- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
83+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
8484pub struct Feeds {
8585 #[ uniffi( default = None ) ]
8686 pub need_to_know : Option < CuratedRecommendationsBucket > ,
@@ -125,7 +125,7 @@ pub struct Feeds {
125125}
126126
127127// Curated Recommendation Information
128- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
128+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
129129pub struct ReccomendationDataItem {
130130 #[ serde( rename = "corpusItemId" ) ]
131131 pub corpus_item_id : String ,
@@ -148,15 +148,15 @@ pub struct ReccomendationDataItem {
148148}
149149
150150// Ranked list of curated recommendations
151- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
151+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
152152pub struct CuratedRecommendationsBucket {
153153 pub recommendations : Vec < ReccomendationDataItem > ,
154- #[ uniffi( default = None ) ]
154+ #[ uniffi( default = None ) ]
155155 pub title : Option < String > ,
156156}
157157
158158// Fakespot product reccomendations
159- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
159+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
160160pub struct FakespotFeed {
161161 pub products : Vec < FakespotProduct > ,
162162 #[ serde( rename = "defaultCategoryName" ) ]
@@ -169,7 +169,7 @@ pub struct FakespotFeed {
169169}
170170
171171// Fakespot product details
172- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
172+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
173173pub struct FakespotProduct {
174174 id : String ,
175175 title : String ,
@@ -180,21 +180,21 @@ pub struct FakespotProduct {
180180}
181181
182182// Fakespot CTA
183- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
183+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
184184pub struct FakespotCta {
185185 #[ serde( rename = "ctaCopy" ) ]
186186 pub cta_copy : String ,
187187 pub url : String ,
188188}
189189
190190// Ranked list of curated recommendations with responsive layout configs
191- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
191+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
192192pub struct FeedSection {
193193 #[ serde( rename = "receivedFeedRank" ) ]
194194 pub received_feed_rank : i32 ,
195195 pub recommendations : Vec < ReccomendationDataItem > ,
196196 pub title : String ,
197- #[ uniffi( default = None ) ]
197+ #[ uniffi( default = None ) ]
198198 pub subtitle : Option < String > ,
199199 pub layout : Layout ,
200200 #[ serde( rename = "isFollowed" ) ]
@@ -204,22 +204,22 @@ pub struct FeedSection {
204204}
205205
206206// Representation of a responsive layout configuration with multiple column layouts
207- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
207+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
208208pub struct Layout {
209209 pub name : String ,
210210 #[ serde( rename = "responsiveLayouts" ) ]
211211 pub responsive_layouts : Vec < ResponsiveLayout > ,
212212}
213213
214214// Layout configurations within a column
215- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
215+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
216216pub struct ResponsiveLayout {
217217 #[ serde( rename = "columnCount" ) ]
218218 pub column_count : i32 ,
219219 pub tiles : Vec < Tile > ,
220220}
221221// Properties for a single tile in a responsive layout
222- #[ derive( Debug , Serialize , Deserialize , PartialEq , uniffi:: Record ) ]
222+ #[ derive( Debug , Deserialize , PartialEq , uniffi:: Record ) ]
223223pub struct Tile {
224224 pub size : String ,
225225 pub position : i32 ,
0 commit comments