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 <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Raed <raed.chammam@algolia.com>
  • Loading branch information
algolia-bot and raed667 committed Sep 11, 2024
1 parent ce171eb commit ee83c81
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions algoliasearch/recommend/models/recommendations_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ class RecommendationsResults(BaseModel):
description="Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).",
alias="queryID",
)
automatic_insights: Optional[StrictBool] = Field(
default=None,
description="Whether automatic events collection is enabled for the application.",
alias="_automaticInsights",
)
page: Annotated[int, Field(strict=True, ge=0)] = Field(
description="Page of search results to retrieve."
)
Expand Down Expand Up @@ -265,6 +270,7 @@ def from_dict(cls, obj: Dict) -> Self:
"serverUsed": obj.get("serverUsed"),
"userData": obj.get("userData"),
"queryID": obj.get("queryID"),
"_automaticInsights": obj.get("_automaticInsights"),
"page": obj.get("page"),
"nbHits": obj.get("nbHits"),
"nbPages": obj.get("nbPages"),
Expand Down
6 changes: 6 additions & 0 deletions algoliasearch/search/models/browse_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ class BrowseResponse(BaseModel):
description="Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).",
alias="queryID",
)
automatic_insights: Optional[StrictBool] = Field(
default=None,
description="Whether automatic events collection is enabled for the application.",
alias="_automaticInsights",
)
page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(
default=0, description="Page of search results to retrieve."
)
Expand Down Expand Up @@ -277,6 +282,7 @@ def from_dict(cls, obj: Dict) -> Self:
"serverUsed": obj.get("serverUsed"),
"userData": obj.get("userData"),
"queryID": obj.get("queryID"),
"_automaticInsights": obj.get("_automaticInsights"),
"page": obj.get("page"),
"nbHits": obj.get("nbHits"),
"nbPages": obj.get("nbPages"),
Expand Down
7 changes: 7 additions & 0 deletions algoliasearch/search/models/search_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ class SearchResponse(BaseModel):
description="Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).",
alias="queryID",
)
automatic_insights: Optional[StrictBool] = Field(
default=None,
description="Whether automatic events collection is enabled for the application.",
alias="_automaticInsights",
)
page: Annotated[int, Field(strict=True, ge=0)] = Field(
description="Page of search results to retrieve."
)
Expand Down Expand Up @@ -183,6 +188,7 @@ class SearchResponse(BaseModel):
"serverUsed",
"userData",
"queryID",
"_automaticInsights",
"page",
"nbHits",
"nbPages",
Expand Down Expand Up @@ -313,6 +319,7 @@ def from_dict(cls, obj: Dict) -> Self:
"serverUsed": obj.get("serverUsed"),
"userData": obj.get("userData"),
"queryID": obj.get("queryID"),
"_automaticInsights": obj.get("_automaticInsights"),
"page": obj.get("page"),
"nbHits": obj.get("nbHits"),
"nbPages": obj.get("nbPages"),
Expand Down

0 comments on commit ee83c81

Please sign in to comment.