-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathtypes.py
More file actions
69 lines (46 loc) · 1.59 KB
/
types.py
File metadata and controls
69 lines (46 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import typing
from flag_engine.segments.types import ConditionOperator, RuleType
from typing_extensions import NotRequired
class SegmentConditionModel(typing.TypedDict):
operator: ConditionOperator
property_: str
value: str
class SegmentRuleModel(typing.TypedDict):
conditions: "list[SegmentConditionModel]"
rules: "list[SegmentRuleModel]"
type: RuleType
class SegmentModel(typing.TypedDict):
id: int
name: str
rules: list[SegmentRuleModel]
feature_states: "NotRequired[list[FeatureStateModel]]"
class ProjectModel(typing.TypedDict):
segments: list[SegmentModel]
class FeatureModel(typing.TypedDict):
id: int
name: str
class FeatureSegmentModel(typing.TypedDict):
priority: int
class MultivariateFeatureOptionModel(typing.TypedDict):
value: str
class MultivariateFeatureStateValueModel(typing.TypedDict):
id: typing.Optional[int]
multivariate_feature_option: MultivariateFeatureOptionModel
mv_fs_value_uuid: str
percentage_allocation: float
class FeatureStateModel(typing.TypedDict):
enabled: bool
feature_segment: NotRequired[typing.Optional[FeatureSegmentModel]]
feature_state_value: object
feature: FeatureModel
featurestate_uuid: str
multivariate_feature_state_values: list[MultivariateFeatureStateValueModel]
class IdentityModel(typing.TypedDict):
identifier: str
identity_features: list[FeatureStateModel]
class EnvironmentModel(typing.TypedDict):
api_key: str
feature_states: list[FeatureStateModel]
identity_overrides: list[IdentityModel]
name: str
project: ProjectModel