|
8 | 8 |
|
9 | 9 | from json import loads |
10 | 10 | from sys import version_info |
11 | | -from typing import Any, Dict, Optional |
| 11 | +from typing import Any, Dict, Optional, Union |
12 | 12 |
|
13 | 13 | from pydantic import BaseModel, ConfigDict |
14 | 14 |
|
@@ -77,21 +77,21 @@ class Variant(BaseModel): |
77 | 77 | filter_effects: Optional[FilterEffects] = None |
78 | 78 | index: str |
79 | 79 | """ Index name of the A/B test variant (case-sensitive). """ |
80 | | - no_result_count: int |
| 80 | + no_result_count: Union[int, None] |
81 | 81 | """ Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for this variant. """ |
82 | 82 | purchase_count: int |
83 | 83 | """ Number of purchase events for this variant. """ |
84 | 84 | purchase_rate: Optional[float] = None |
85 | 85 | """ [Purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate) for this variant. """ |
86 | | - search_count: int |
| 86 | + search_count: Union[int, None] |
87 | 87 | """ Number of searches for this variant. """ |
88 | 88 | tracked_search_count: Optional[int] = None |
89 | 89 | """ Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """ |
90 | 90 | traffic_percentage: int |
91 | 91 | """ Percentage of search requests each variant receives. """ |
92 | | - user_count: int |
| 92 | + user_count: Union[int, None] |
93 | 93 | """ Number of users that made searches to this variant. """ |
94 | | - tracked_user_count: int |
| 94 | + tracked_user_count: Union[int, None] |
95 | 95 | """ Number of users that made tracked searches to this variant. """ |
96 | 96 |
|
97 | 97 | model_config = ConfigDict( |
|
0 commit comments