Skip to content

Commit

Permalink
feat(specs): add (optional) _automaticInsights to search result (gene…
Browse files Browse the repository at this point in the history
…rated)

algolia/api-clients-automation#3688

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Raed <[email protected]>
  • Loading branch information
algolia-bot and raed667 committed Sep 11, 2024
1 parent 2130dc9 commit 641316f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ
* @param queryID
* Unique identifier for the query. This is used for [click
* analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
* @param automaticInsights
* Whether automatic events collection is enabled for the application.
*/
case class BaseSearchResponse(
abTestID: Option[Int] = scala.None,
Expand All @@ -105,6 +107,7 @@ case class BaseSearchResponse(
serverUsed: Option[String] = scala.None,
userData: Option[Any] = scala.None,
queryID: Option[String] = scala.None,
automaticInsights: Option[Boolean] = scala.None,
additionalProperties: Option[List[JField]] = None
)

Expand Down Expand Up @@ -142,7 +145,8 @@ class BaseSearchResponseSerializer extends Serializer[BaseSearchResponse] {
"serverTimeMS",
"serverUsed",
"userData",
"queryID"
"queryID",
"automaticInsights"
)
val additionalProperties = jobject removeField {
case (name, _) if fields.contains(name) => true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ package algoliasearch.recommend
* @param queryID
* Unique identifier for the query. This is used for [click
* analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
* @param automaticInsights
* Whether automatic events collection is enabled for the application.
* @param page
* Page of search results to retrieve.
* @param nbHits
Expand Down Expand Up @@ -110,6 +112,7 @@ case class RecommendationsResults(
serverUsed: Option[String] = scala.None,
userData: Option[Any] = scala.None,
queryID: Option[String] = scala.None,
automaticInsights: Option[Boolean] = scala.None,
page: Int,
nbHits: Int,
nbPages: Int,
Expand Down
6 changes: 5 additions & 1 deletion src/main/scala/algoliasearch/search/BaseSearchResponse.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ import org.json4s.{Extraction, Formats, JField, JObject, JValue, Serializer, Typ
* @param queryID
* Unique identifier for the query. This is used for [click
* analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
* @param automaticInsights
* Whether automatic events collection is enabled for the application.
*/
case class BaseSearchResponse(
abTestID: Option[Int] = scala.None,
Expand All @@ -109,6 +111,7 @@ case class BaseSearchResponse(
serverUsed: Option[String] = scala.None,
userData: Option[Any] = scala.None,
queryID: Option[String] = scala.None,
automaticInsights: Option[Boolean] = scala.None,
additionalProperties: Option[List[JField]] = None
)

Expand Down Expand Up @@ -146,7 +149,8 @@ class BaseSearchResponseSerializer extends Serializer[BaseSearchResponse] {
"serverTimeMS",
"serverUsed",
"userData",
"queryID"
"queryID",
"automaticInsights"
)
val additionalProperties = jobject removeField {
case (name, _) if fields.contains(name) => true
Expand Down
3 changes: 3 additions & 0 deletions src/main/scala/algoliasearch/search/BrowseResponse.scala
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ package algoliasearch.search
* @param queryID
* Unique identifier for the query. This is used for [click
* analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
* @param automaticInsights
* Whether automatic events collection is enabled for the application.
* @param page
* Page of search results to retrieve.
* @param nbHits
Expand Down Expand Up @@ -124,6 +126,7 @@ case class BrowseResponse(
serverUsed: Option[String] = scala.None,
userData: Option[Any] = scala.None,
queryID: Option[String] = scala.None,
automaticInsights: Option[Boolean] = scala.None,
page: Option[Int] = scala.None,
nbHits: Option[Int] = scala.None,
nbPages: Option[Int] = scala.None,
Expand Down
3 changes: 3 additions & 0 deletions src/main/scala/algoliasearch/search/SearchResponse.scala
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ package algoliasearch.search
* @param queryID
* Unique identifier for the query. This is used for [click
* analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
* @param automaticInsights
* Whether automatic events collection is enabled for the application.
* @param page
* Page of search results to retrieve.
* @param nbHits
Expand Down Expand Up @@ -121,6 +123,7 @@ case class SearchResponse(
serverUsed: Option[String] = scala.None,
userData: Option[Any] = scala.None,
queryID: Option[String] = scala.None,
automaticInsights: Option[Boolean] = scala.None,
page: Int,
nbHits: Int,
nbPages: Int,
Expand Down

0 comments on commit 641316f

Please sign in to comment.