Skip to content

Commit a8a7f08

Browse files
algolia-botmillotp
andcommitted
fix(specs): event.status can be null (generated)
algolia/api-clients-automation#4727 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 777c0ec commit a8a7f08

23 files changed

+62
-62
lines changed

algoliasearch/abtesting/models/list_ab_tests_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, List, Optional
11+
from typing import Any, Dict, List, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -36,7 +36,7 @@ class ListABTestsResponse(BaseModel):
3636
ListABTestsResponse
3737
"""
3838

39-
abtests: List[ABTest]
39+
abtests: Union[List[ABTest], None]
4040
""" The list of A/B tests, null if no A/B tests are configured for this application. """
4141
count: int
4242
""" Number of A/B tests. """

algoliasearch/abtesting/models/variant.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, Optional
11+
from typing import Any, Dict, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -77,21 +77,21 @@ class Variant(BaseModel):
7777
filter_effects: Optional[FilterEffects] = None
7878
index: str
7979
""" Index name of the A/B test variant (case-sensitive). """
80-
no_result_count: int
80+
no_result_count: Union[int, None]
8181
""" Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for this variant. """
8282
purchase_count: int
8383
""" Number of purchase events for this variant. """
8484
purchase_rate: Optional[float] = None
8585
""" [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]
8787
""" Number of searches for this variant. """
8888
tracked_search_count: Optional[int] = None
8989
""" Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """
9090
traffic_percentage: int
9191
""" Percentage of search requests each variant receives. """
92-
user_count: int
92+
user_count: Union[int, None]
9393
""" Number of users that made searches to this variant. """
94-
tracked_user_count: int
94+
tracked_user_count: Union[int, None]
9595
""" Number of users that made tracked searches to this variant. """
9696

9797
model_config = ConfigDict(

algoliasearch/analytics/models/daily_add_to_cart_rates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, Optional
11+
from typing import Any, Dict, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -35,7 +35,7 @@ class DailyAddToCartRates(BaseModel):
3535
DailyAddToCartRates
3636
"""
3737

38-
rate: float
38+
rate: Union[float, None]
3939
""" Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. """
4040
tracked_search_count: int
4141
""" Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """

algoliasearch/analytics/models/daily_average_clicks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, Optional
11+
from typing import Any, Dict, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -34,7 +34,7 @@ class DailyAverageClicks(BaseModel):
3434
DailyAverageClicks
3535
"""
3636

37-
average: float
37+
average: Union[float, None]
3838
""" Average position of a clicked search result in the list of search results. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. """
3939
click_count: int
4040
""" Number of clicks associated with this search. """

algoliasearch/analytics/models/daily_click_through_rates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, Optional
11+
from typing import Any, Dict, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -35,7 +35,7 @@ class DailyClickThroughRates(BaseModel):
3535
DailyClickThroughRates
3636
"""
3737

38-
rate: float
38+
rate: Union[float, None]
3939
""" Click-through rate: calculated as the number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. """
4040
click_count: int
4141
""" Number of clicks associated with this search. """

algoliasearch/analytics/models/daily_conversion_rates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, Optional
11+
from typing import Any, Dict, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -35,7 +35,7 @@ class DailyConversionRates(BaseModel):
3535
DailyConversionRates
3636
"""
3737

38-
rate: float
38+
rate: Union[float, None]
3939
""" Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. """
4040
tracked_search_count: int
4141
""" Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """

algoliasearch/analytics/models/daily_purchase_rates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, Optional
11+
from typing import Any, Dict, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -35,7 +35,7 @@ class DailyPurchaseRates(BaseModel):
3535
DailyPurchaseRates
3636
"""
3737

38-
rate: float
38+
rate: Union[float, None]
3939
""" Purchase rate: calculated as the number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. """
4040
tracked_search_count: int
4141
""" Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """

algoliasearch/analytics/models/get_add_to_cart_rate_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, List, Optional
11+
from typing import Any, Dict, List, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -37,7 +37,7 @@ class GetAddToCartRateResponse(BaseModel):
3737
GetAddToCartRateResponse
3838
"""
3939

40-
rate: float
40+
rate: Union[float, None]
4141
""" Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. """
4242
tracked_search_count: int
4343
""" Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """

algoliasearch/analytics/models/get_average_click_position_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, List, Optional
11+
from typing import Any, Dict, List, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -36,7 +36,7 @@ class GetAverageClickPositionResponse(BaseModel):
3636
GetAverageClickPositionResponse
3737
"""
3838

39-
average: float
39+
average: Union[float, None]
4040
""" Average position of a clicked search result in the list of search results. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. """
4141
click_count: int
4242
""" Number of clicks associated with this search. """

algoliasearch/analytics/models/get_click_through_rate_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from json import loads
1010
from sys import version_info
11-
from typing import Any, Dict, List, Optional
11+
from typing import Any, Dict, List, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -39,7 +39,7 @@ class GetClickThroughRateResponse(BaseModel):
3939
GetClickThroughRateResponse
4040
"""
4141

42-
rate: float
42+
rate: Union[float, None]
4343
""" Click-through rate: calculated as the number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true. """
4444
click_count: int
4545
""" Number of clicks associated with this search. """

0 commit comments

Comments
 (0)