You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Represents the type of a Flagsmith feature. Multivariate features include multiple weighted values."""
14
14
@@ -79,7 +79,7 @@ class MultivariateFeatureStateValue(TypedDict):
79
79
80
80
id: NotRequired[int|None]
81
81
"""Unique identifier for the multivariate feature state value in Core. TODO: document why and when this can be `None`."""
82
-
mv_fs_value_uuid: NotRequired[UUID]
82
+
mv_fs_value_uuid: NotRequired[UUIDStr]
83
83
"""The UUID for this multivariate feature state value. Should be used if `id` is `None`."""
84
84
percentage_allocation: float
85
85
"""The percentage allocation for this multivariate feature state value. Should be between or equal to 0 and 100."""
@@ -105,7 +105,7 @@ class FeatureState(TypedDict):
105
105
"""The value for this feature state."""
106
106
django_id: NotRequired[int|None]
107
107
"""Unique identifier for the feature state in Core. TODO: document why and when this can be `None`."""
108
-
featurestate_uuid: NotRequired[UUID]
108
+
featurestate_uuid: NotRequired[UUIDStr]
109
109
"""The UUID for this feature state. Should be used if `django_id` is `None`. If not set, should be generated."""
110
110
feature_segment: NotRequired[FeatureSegment|None]
111
111
"""Segment override data, if this feature state is for a segment override."""
@@ -193,7 +193,7 @@ class Project(TypedDict):
193
193
"""List of feature IDs that are skipped when the SDK API serves flags for a public client-side key."""
194
194
enable_realtime_updates: NotRequired[bool]
195
195
"""Whether the SDK API should use real-time updates. Defaults to `False`. Not currently used neither by SDK APIs nor by SDKs themselves."""
196
-
hide_disabled_flags: NotRequired[bool]
196
+
hide_disabled_flags: NotRequired[bool|None]
197
197
"""Whether the SDK API should hide disabled flags for this project. Defaults to `False`."""
198
198
199
199
@@ -222,43 +222,89 @@ class Webhook(TypedDict):
222
222
"""Secret used to sign webhook payloads."""
223
223
224
224
225
+
class_EnvironmentFields(TypedDict):
226
+
"""Common fields for Environment documents."""
227
+
228
+
name: NotRequired[str]
229
+
"""Environment name. TODO: Can we drop NotRequired and adjust test data?"""
230
+
updated_at: NotRequired[DateTimeStr|None]
231
+
"""Last updated timestamp. If not set, current timestamp should be assumed."""
232
+
233
+
project: Project
234
+
"""Project-specific data for this environment."""
235
+
feature_states: list[FeatureState]
236
+
"""List of feature states representing the environment defaults."""
237
+
238
+
allow_client_traits: NotRequired[bool]
239
+
"""Whether the SDK API should allow clients to set traits for this environment. Identical to project-level's `persist_trait_data` setting. Defaults to `True`."""
240
+
hide_sensitive_data: NotRequired[bool]
241
+
"""Whether the SDK API should hide sensitive data for this environment. Defaults to `False`."""
242
+
hide_disabled_flags: NotRequired[bool|None]
243
+
"""Whether the SDK API should hide disabled flags for this environment. If `None`, the SDK API should fall back to project-level setting."""
"""List of identity overrides for this identity."""
@@ -268,45 +314,50 @@ class Identity(TypedDict):
268
314
"""Unique identifier for the identity in Core. TODO: document why and when this can be `None`."""
269
315
270
316
271
-
classEnvironment(TypedDict):
272
-
"""Represents a Flagsmith environment. Carries all necessary data for flag evaluation within the environment."""
317
+
classEnvironment(_EnvironmentFields):
318
+
"""Represents a Flagsmith environment. Carries all necessary data for flag evaluation within the environment.
319
+
320
+
**DynamoDB table**: `flagsmith_environments`
321
+
"""
273
322
274
323
id: int
275
324
"""Unique identifier for the environment in Core. **INDEXED**."""
276
325
api_key: str
277
326
"""Public client-side API key for the environment. **INDEXED**."""
278
-
name: NotRequired[str]
279
-
"""Environment name. TODO: Can we drop NotRequired and adjust test data?"""
280
-
updated_at: NotRequired[datetime|None]
281
-
"""Last updated timestamp. If not set, current timestamp should be assumed."""
282
327
283
-
project: Project
284
-
"""Project-specific data for this environment."""
285
-
feature_states: list[FeatureState]
286
-
"""List of feature states representing the environment defaults."""
287
328
288
-
allow_client_traits: NotRequired[bool]
289
-
"""Whether the SDK API should allow clients to set traits for this environment. Identical to project-level's `persist_trait_data` setting. Defaults to `True`."""
290
-
hide_sensitive_data: NotRequired[bool]
291
-
"""Whether the SDK API should hide sensitive data for this environment. Defaults to `False`."""
292
-
hide_disabled_flags: NotRequired[bool]
293
-
"""Whether the SDK API should hide disabled flags for this environment. If `None`, the SDK API should fall back to project-level setting."""
0 commit comments