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. """

algoliasearch/analytics/models/get_conversion_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 GetConversionRateResponse(BaseModel):
3737
GetConversionRateResponse
3838
"""
3939

40-
rate: float
40+
rate: Union[float, None]
4141
""" 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. """
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_purchase_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 GetPurchaseRateResponse(BaseModel):
3737
GetPurchaseRateResponse
3838
"""
3939

40-
rate: float
40+
rate: Union[float, None]
4141
""" 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. """
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_status_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, Optional
11+
from typing import Any, Dict, Optional, Union
1212

1313
from pydantic import BaseModel, ConfigDict
1414

@@ -32,7 +32,7 @@ class GetStatusResponse(BaseModel):
3232
GetStatusResponse
3333
"""
3434

35-
updated_at: str
35+
updated_at: Union[str, None]
3636
""" Date and time when the object was updated, in RFC 3339 format. """
3737

3838
model_config = ConfigDict(

algoliasearch/analytics/models/get_top_filters_no_results_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 GetTopFiltersNoResultsResponse(BaseModel):
3636
GetTopFiltersNoResultsResponse
3737
"""
3838

39-
values: List[GetTopFiltersNoResultsValues]
39+
values: Union[List[GetTopFiltersNoResultsValues], None]
4040
""" Filters for searches without any results. If null, the search term specified with the `search` parameter isn't a search without results, or the `search` parameter is absent from the request. """
4141

4242
model_config = ConfigDict(

algoliasearch/analytics/models/top_hit_with_analytics.py

Lines changed: 3 additions & 3 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

@@ -42,9 +42,9 @@ class TopHitWithAnalytics(BaseModel):
4242
""" Object ID of a record returned as a search result. """
4343
count: int
4444
""" Number of occurrences. """
45-
click_through_rate: float
45+
click_through_rate: Union[float, None]
4646
""" 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. """
47-
conversion_rate: float
47+
conversion_rate: Union[float, None]
4848
""" 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. """
4949
tracked_hit_count: int
5050
""" Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """

algoliasearch/analytics/models/top_hit_with_revenue_analytics.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

@@ -49,21 +49,21 @@ class TopHitWithRevenueAnalytics(BaseModel):
4949
""" Object ID of a record returned as a search result. """
5050
count: int
5151
""" Number of occurrences. """
52-
click_through_rate: float
52+
click_through_rate: Union[float, None]
5353
""" 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. """
54-
conversion_rate: float
54+
conversion_rate: Union[float, None]
5555
""" 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. """
5656
tracked_hit_count: int
5757
""" Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """
5858
click_count: int
5959
""" Number of clicks associated with this search. """
6060
conversion_count: int
6161
""" Number of conversions from this search. """
62-
add_to_cart_rate: float
62+
add_to_cart_rate: Union[float, None]
6363
""" 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. """
6464
add_to_cart_count: int
6565
""" Number of add-to-cart events from this search. """
66-
purchase_rate: float
66+
purchase_rate: Union[float, None]
6767
""" 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. """
6868
purchase_count: int
6969
""" Number of purchase events from this search. """

algoliasearch/analytics/models/top_search_with_analytics.py

Lines changed: 4 additions & 4 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

@@ -47,13 +47,13 @@ class TopSearchWithAnalytics(BaseModel):
4747
""" Search query. """
4848
count: int
4949
""" Number of searches. """
50-
click_through_rate: float
50+
click_through_rate: Union[float, None]
5151
""" 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. """
52-
average_click_position: float
52+
average_click_position: Union[float, None]
5353
""" 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. """
5454
click_positions: List[ClickPosition]
5555
""" List of positions in the search results and clicks associated with this search. """
56-
conversion_rate: float
56+
conversion_rate: Union[float, None]
5757
""" 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. """
5858
tracked_search_count: int
5959
""" Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """

algoliasearch/analytics/models/top_search_with_revenue_analytics.py

Lines changed: 6 additions & 6 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

@@ -53,13 +53,13 @@ class TopSearchWithRevenueAnalytics(BaseModel):
5353
""" Search query. """
5454
count: int
5555
""" Number of searches. """
56-
click_through_rate: float
56+
click_through_rate: Union[float, None]
5757
""" 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. """
58-
average_click_position: float
58+
average_click_position: Union[float, None]
5959
""" 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. """
6060
click_positions: List[ClickPosition]
6161
""" List of positions in the search results and clicks associated with this search. """
62-
conversion_rate: float
62+
conversion_rate: Union[float, None]
6363
""" 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. """
6464
tracked_search_count: int
6565
""" Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true. """
@@ -71,11 +71,11 @@ class TopSearchWithRevenueAnalytics(BaseModel):
7171
""" Number of results (hits). """
7272
currencies: Dict[str, CurrencyCode]
7373
""" Revenue associated with this search: broken down by currency. """
74-
add_to_cart_rate: float
74+
add_to_cart_rate: Union[float, None]
7575
""" 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. """
7676
add_to_cart_count: int
7777
""" Number of add-to-cart events from this search. """
78-
purchase_rate: float
78+
purchase_rate: Union[float, None]
7979
""" 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. """
8080
purchase_count: int
8181
""" Number of purchase events from this search. """

0 commit comments

Comments
 (0)