Skip to content

Commit ee83c81

Browse files
algolia-botraed667
andcommitted
feat(specs): add (optional) _automaticInsights to search result (generated)
algolia/api-clients-automation#3688 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Raed <[email protected]>
1 parent ce171eb commit ee83c81

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

algoliasearch/recommend/models/recommendations_results.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ class RecommendationsResults(BaseModel):
140140
description="Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).",
141141
alias="queryID",
142142
)
143+
automatic_insights: Optional[StrictBool] = Field(
144+
default=None,
145+
description="Whether automatic events collection is enabled for the application.",
146+
alias="_automaticInsights",
147+
)
143148
page: Annotated[int, Field(strict=True, ge=0)] = Field(
144149
description="Page of search results to retrieve."
145150
)
@@ -265,6 +270,7 @@ def from_dict(cls, obj: Dict) -> Self:
265270
"serverUsed": obj.get("serverUsed"),
266271
"userData": obj.get("userData"),
267272
"queryID": obj.get("queryID"),
273+
"_automaticInsights": obj.get("_automaticInsights"),
268274
"page": obj.get("page"),
269275
"nbHits": obj.get("nbHits"),
270276
"nbPages": obj.get("nbPages"),

algoliasearch/search/models/browse_response.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ class BrowseResponse(BaseModel):
140140
description="Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).",
141141
alias="queryID",
142142
)
143+
automatic_insights: Optional[StrictBool] = Field(
144+
default=None,
145+
description="Whether automatic events collection is enabled for the application.",
146+
alias="_automaticInsights",
147+
)
143148
page: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(
144149
default=0, description="Page of search results to retrieve."
145150
)
@@ -277,6 +282,7 @@ def from_dict(cls, obj: Dict) -> Self:
277282
"serverUsed": obj.get("serverUsed"),
278283
"userData": obj.get("userData"),
279284
"queryID": obj.get("queryID"),
285+
"_automaticInsights": obj.get("_automaticInsights"),
280286
"page": obj.get("page"),
281287
"nbHits": obj.get("nbHits"),
282288
"nbPages": obj.get("nbPages"),

algoliasearch/search/models/search_response.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ class SearchResponse(BaseModel):
140140
description="Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).",
141141
alias="queryID",
142142
)
143+
automatic_insights: Optional[StrictBool] = Field(
144+
default=None,
145+
description="Whether automatic events collection is enabled for the application.",
146+
alias="_automaticInsights",
147+
)
143148
page: Annotated[int, Field(strict=True, ge=0)] = Field(
144149
description="Page of search results to retrieve."
145150
)
@@ -183,6 +188,7 @@ class SearchResponse(BaseModel):
183188
"serverUsed",
184189
"userData",
185190
"queryID",
191+
"_automaticInsights",
186192
"page",
187193
"nbHits",
188194
"nbPages",
@@ -313,6 +319,7 @@ def from_dict(cls, obj: Dict) -> Self:
313319
"serverUsed": obj.get("serverUsed"),
314320
"userData": obj.get("userData"),
315321
"queryID": obj.get("queryID"),
322+
"_automaticInsights": obj.get("_automaticInsights"),
316323
"page": obj.get("page"),
317324
"nbHits": obj.get("nbHits"),
318325
"nbPages": obj.get("nbPages"),

0 commit comments

Comments
 (0)