Skip to content

Commit b40ca02

Browse files
feat(api): api update
1 parent 9afcd88 commit b40ca02

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

Diff for: .stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 15
2-
openapi_spec_hash: 9a0b363025305f6b086bcdfe43274830
2+
openapi_spec_hash: c01d40349b63e0d636eb3ae352a41341
33
config_hash: 21fb9730d1cdc9e3fd38724c4774b894

Diff for: src/openlayer/types/commits/test_result_list_response.py

+16-3
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,34 @@
88

99
from ..._models import BaseModel
1010

11-
__all__ = ["TestResultListResponse", "Item", "ItemGoal", "ItemGoalThreshold"]
11+
__all__ = ["TestResultListResponse", "Item", "ItemGoal", "ItemGoalThreshold", "ItemGoalThresholdInsightParameter"]
12+
13+
14+
class ItemGoalThresholdInsightParameter(BaseModel):
15+
name: str
16+
"""The name of the insight filter."""
17+
18+
value: object
1219

1320

1421
class ItemGoalThreshold(BaseModel):
1522
insight_name: Optional[str] = FieldInfo(alias="insightName", default=None)
1623
"""The insight name to be evaluated."""
1724

18-
insight_parameters: Optional[List[object]] = FieldInfo(alias="insightParameters", default=None)
25+
insight_parameters: Optional[List[ItemGoalThresholdInsightParameter]] = FieldInfo(
26+
alias="insightParameters", default=None
27+
)
28+
"""The insight parameters. Required only for some test subtypes."""
1929

2030
measurement: Optional[str] = None
2131
"""The measurement to be evaluated."""
2232

23-
operator: Optional[str] = None
33+
operator: Optional[Literal["is", ">", ">=", "<", "<=", "!="]] = None
2434
"""The operator to be used for the evaluation."""
2535

36+
threshold_mode: Optional[Literal["automatic", "manual"]] = FieldInfo(alias="thresholdMode", default=None)
37+
"""Whether to use automatic anomaly detection or manual thresholds"""
38+
2639
value: Union[float, bool, str, List[str], None] = None
2740
"""The value to be compared."""
2841

Diff for: src/openlayer/types/inference_pipelines/test_result_list_response.py

+16-3
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,34 @@
88

99
from ..._models import BaseModel
1010

11-
__all__ = ["TestResultListResponse", "Item", "ItemGoal", "ItemGoalThreshold"]
11+
__all__ = ["TestResultListResponse", "Item", "ItemGoal", "ItemGoalThreshold", "ItemGoalThresholdInsightParameter"]
12+
13+
14+
class ItemGoalThresholdInsightParameter(BaseModel):
15+
name: str
16+
"""The name of the insight filter."""
17+
18+
value: object
1219

1320

1421
class ItemGoalThreshold(BaseModel):
1522
insight_name: Optional[str] = FieldInfo(alias="insightName", default=None)
1623
"""The insight name to be evaluated."""
1724

18-
insight_parameters: Optional[List[object]] = FieldInfo(alias="insightParameters", default=None)
25+
insight_parameters: Optional[List[ItemGoalThresholdInsightParameter]] = FieldInfo(
26+
alias="insightParameters", default=None
27+
)
28+
"""The insight parameters. Required only for some test subtypes."""
1929

2030
measurement: Optional[str] = None
2131
"""The measurement to be evaluated."""
2232

23-
operator: Optional[str] = None
33+
operator: Optional[Literal["is", ">", ">=", "<", "<=", "!="]] = None
2434
"""The operator to be used for the evaluation."""
2535

36+
threshold_mode: Optional[Literal["automatic", "manual"]] = FieldInfo(alias="thresholdMode", default=None)
37+
"""Whether to use automatic anomaly detection or manual thresholds"""
38+
2639
value: Union[float, bool, str, List[str], None] = None
2740
"""The value to be compared."""
2841

0 commit comments

Comments
 (0)