wingify-fme-python-sdk 1.70.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tests/data/__init__.py +13 -0
- tests/data/dummy_test_data_reader.py +63 -0
- tests/data/user_storage.py +48 -0
- tests/e2e/__init__.py +13 -0
- tests/e2e/custom_bucketing_test.py +514 -0
- tests/e2e/force_users_test.py +368 -0
- tests/e2e/get_flag_test.py +195 -0
- tests/unit/__init__.py +13 -0
- tests/unit/packages/__init__.py +13 -0
- tests/unit/packages/decision_maker/__init__.py +13 -0
- tests/unit/packages/decision_maker/decision_maker_test.py +83 -0
- tests/unit/packages/segmentation_evaluator/__init__.py +13 -0
- tests/unit/packages/segmentation_evaluator/segmentation_evaluator_test.py +284 -0
- tests/unit/packages/segmentation_evaluator/segmentation_manager_test.py +215 -0
- tests/unit/packages/segmentation_evaluator/web_testing_segment_test.py +216 -0
- tests/unit/services/__init__.py +0 -0
- tests/unit/services/hooks_manager_test.py +80 -0
- tests/unit/services/internal_events_sampling_service_test.py +160 -0
- tests/unit/settings/__init__.py +13 -0
- tests/unit/settings/settings_schema_validation_test.py +67 -0
- tests/unit/utils/__init__.py +0 -0
- tests/unit/utils/campaign_util_test.py +248 -0
- tests/unit/utils/decision_util_force_users_test.py +790 -0
- tests/unit/utils/log_message_test.py +65 -0
- tests/unit/vwo_wingify_test.py +175 -0
- tests/unit/wingify_client_validation_test.py +72 -0
- vwo/__init__.py +35 -0
- vwo/models/__init__.py +13 -0
- vwo/models/batch_event_data.py +19 -0
- vwo/models/user/__init__.py +13 -0
- vwo/models/user/context_vwo_model.py +21 -0
- vwo/models/user/get_flag.py +19 -0
- vwo/models/vwo_options_model.py +21 -0
- vwo/packages/__init__.py +13 -0
- vwo/packages/logger/__init__.py +13 -0
- vwo/packages/logger/enums/__init__.py +13 -0
- vwo/packages/logger/enums/log_level_enum.py +19 -0
- vwo/packages/storage/__init__.py +13 -0
- vwo/packages/storage/connector.py +19 -0
- vwo/vwo.py +58 -0
- vwo/vwo_builder.py +21 -0
- vwo/vwo_client.py +22 -0
- wingify/__init__.py +36 -0
- wingify/api/__init__.py +13 -0
- wingify/api/get_flag_api.py +727 -0
- wingify/api/set_attribute_api.py +60 -0
- wingify/api/track_api.py +99 -0
- wingify/constants/Constants.py +94 -0
- wingify/constants/__init__.py +13 -0
- wingify/constants/sampled_debug_error_template_keys.py +34 -0
- wingify/decorators/__init__.py +13 -0
- wingify/decorators/storage_decorator.py +92 -0
- wingify/enums/__init__.py +13 -0
- wingify/enums/api_enum.py +26 -0
- wingify/enums/campaign_type_enum.py +22 -0
- wingify/enums/debug_category_enum.py +24 -0
- wingify/enums/event_enum.py +26 -0
- wingify/enums/headers_enum.py +21 -0
- wingify/enums/hooks_enum.py +24 -0
- wingify/enums/status_enum.py +21 -0
- wingify/enums/storage_enum.py +25 -0
- wingify/enums/url_enum.py +29 -0
- wingify/models/Alias.py +60 -0
- wingify/models/AliasSetResponse.py +43 -0
- wingify/models/__init__.py +13 -0
- wingify/models/batch_event_data.py +68 -0
- wingify/models/campaign/__init__.py +13 -0
- wingify/models/campaign/campaign_model.py +140 -0
- wingify/models/campaign/feature_model.py +95 -0
- wingify/models/campaign/holdout_model.py +94 -0
- wingify/models/campaign/impact_campaign_model.py +60 -0
- wingify/models/campaign/metric_model.py +42 -0
- wingify/models/campaign/rule_model.py +42 -0
- wingify/models/campaign/variable_model.py +44 -0
- wingify/models/campaign/variation_model.py +109 -0
- wingify/models/gateway_service_model.py +48 -0
- wingify/models/schemas/__init__.py +13 -0
- wingify/models/schemas/campaign_group_schema.py +19 -0
- wingify/models/schemas/campaign_metric_schema.py +26 -0
- wingify/models/schemas/campaign_schema.py +37 -0
- wingify/models/schemas/campaign_variation_schema.py +34 -0
- wingify/models/schemas/empty_object_schema.py +15 -0
- wingify/models/schemas/feature_schema.py +38 -0
- wingify/models/schemas/group_schema.py +37 -0
- wingify/models/schemas/holdout_schema.py +29 -0
- wingify/models/schemas/rule_schema.py +24 -0
- wingify/models/schemas/settings_schema.py +47 -0
- wingify/models/schemas/variable_schema.py +24 -0
- wingify/models/settings/__init__.py +13 -0
- wingify/models/settings/internal_event_sampling_settings_model.py +53 -0
- wingify/models/settings/settings_model.py +127 -0
- wingify/models/storage/__init__.py +13 -0
- wingify/models/storage/storage_model.py +84 -0
- wingify/models/user/__init__.py +13 -0
- wingify/models/user/context_model.py +113 -0
- wingify/models/user/context_vwo_model.py +34 -0
- wingify/models/user/get_flag.py +47 -0
- wingify/models/vwo_options_model.py +21 -0
- wingify/models/wingify_options_model.py +129 -0
- wingify/packages/__init__.py +13 -0
- wingify/packages/decision_maker/__init__.py +13 -0
- wingify/packages/decision_maker/decision_maker.py +89 -0
- wingify/packages/logger/__init__.py +13 -0
- wingify/packages/logger/core/__init__.py +13 -0
- wingify/packages/logger/core/log_manager.py +123 -0
- wingify/packages/logger/core/log_transport_manager.py +57 -0
- wingify/packages/logger/enums/__init__.py +13 -0
- wingify/packages/logger/enums/log_level_enum.py +24 -0
- wingify/packages/logger/enums/log_level_number_enum.py +21 -0
- wingify/packages/logger/log_message_builder.py +70 -0
- wingify/packages/logger/logger.py +38 -0
- wingify/packages/logger/transports/__init__.py +13 -0
- wingify/packages/logger/transports/console_transport.py +43 -0
- wingify/packages/network_layer/__init__.py +13 -0
- wingify/packages/network_layer/client/__init__.py +13 -0
- wingify/packages/network_layer/client/network_client.py +167 -0
- wingify/packages/network_layer/handlers/__init__.py +13 -0
- wingify/packages/network_layer/handlers/request_handler.py +40 -0
- wingify/packages/network_layer/manager/__init__.py +13 -0
- wingify/packages/network_layer/manager/network_manager.py +79 -0
- wingify/packages/network_layer/models/__init__.py +13 -0
- wingify/packages/network_layer/models/global_request_model.py +70 -0
- wingify/packages/network_layer/models/request_model.py +133 -0
- wingify/packages/network_layer/models/response_model.py +55 -0
- wingify/packages/segmentation_evaluator/__init__.py +13 -0
- wingify/packages/segmentation_evaluator/core/__init__.py +13 -0
- wingify/packages/segmentation_evaluator/core/segmentation_manager.py +140 -0
- wingify/packages/segmentation_evaluator/enums/__init__.py +13 -0
- wingify/packages/segmentation_evaluator/enums/segment_operand_regex_enum.py +31 -0
- wingify/packages/segmentation_evaluator/enums/segment_operand_value_enum.py +29 -0
- wingify/packages/segmentation_evaluator/enums/segment_operator_value_enum.py +37 -0
- wingify/packages/segmentation_evaluator/evaluators/__init__.py +13 -0
- wingify/packages/segmentation_evaluator/evaluators/segment_evaluator.py +237 -0
- wingify/packages/segmentation_evaluator/evaluators/segment_operand_evaluator.py +518 -0
- wingify/packages/segmentation_evaluator/utils/__init__.py +13 -0
- wingify/packages/segmentation_evaluator/utils/segment_util.py +33 -0
- wingify/packages/segmentation_evaluator/utils/web_testing_segment_util.py +295 -0
- wingify/packages/storage/__init__.py +13 -0
- wingify/packages/storage/connector.py +25 -0
- wingify/packages/storage/storage.py +39 -0
- wingify/resources/__init__.py +13 -0
- wingify/resources/debug-messages.json +21 -0
- wingify/resources/error-messages.json +62 -0
- wingify/resources/info-message.json +47 -0
- wingify/resources/trace-messages.json +1 -0
- wingify/resources/warn-messages.json +1 -0
- wingify/services/__init__.py +13 -0
- wingify/services/batch_event_queue.py +140 -0
- wingify/services/campaign_decision_service.py +268 -0
- wingify/services/hooks_manager.py +65 -0
- wingify/services/internal_events_sampling_service.py +62 -0
- wingify/services/settings_manager.py +293 -0
- wingify/services/storage_service.py +58 -0
- wingify/services/url_service.py +51 -0
- wingify/utils/__init__.py +13 -0
- wingify/utils/aliasing_util.py +108 -0
- wingify/utils/brand_context.py +26 -0
- wingify/utils/brand_util.py +37 -0
- wingify/utils/campaign_util.py +592 -0
- wingify/utils/data_type_util.py +125 -0
- wingify/utils/debugger_service_util.py +58 -0
- wingify/utils/decision_util.py +589 -0
- wingify/utils/event_util.py +85 -0
- wingify/utils/function_util.py +188 -0
- wingify/utils/gateway_service_util.py +179 -0
- wingify/utils/holdout_util.py +264 -0
- wingify/utils/impression_util.py +151 -0
- wingify/utils/internal_events_sampling_util.py +106 -0
- wingify/utils/log_message_util.py +95 -0
- wingify/utils/meg_util.py +561 -0
- wingify/utils/model_utils.py +136 -0
- wingify/utils/network_util.py +706 -0
- wingify/utils/rule_evaluation_util.py +102 -0
- wingify/utils/settings_util.py +39 -0
- wingify/utils/usage_stats_util.py +116 -0
- wingify/utils/uuid_util.py +81 -0
- wingify/vwo_client.py +21 -0
- wingify/wingify.py +159 -0
- wingify/wingify_builder.py +282 -0
- wingify/wingify_client.py +520 -0
- wingify_fme_python_sdk-1.70.0.dist-info/METADATA +1415 -0
- wingify_fme_python_sdk-1.70.0.dist-info/RECORD +186 -0
- wingify_fme_python_sdk-1.70.0.dist-info/WHEEL +5 -0
- wingify_fme_python_sdk-1.70.0.dist-info/licenses/LICENSE +202 -0
- wingify_fme_python_sdk-1.70.0.dist-info/licenses/NOTICE +18 -0
- wingify_fme_python_sdk-1.70.0.dist-info/top_level.txt +3 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from ..models.settings.settings_model import SettingsModel
|
|
17
|
+
from ..models.user.context_model import ContextModel
|
|
18
|
+
from ..models.user.context_model import ContextModel
|
|
19
|
+
from typing import Dict, Any
|
|
20
|
+
from ..models.settings.settings_model import SettingsModel
|
|
21
|
+
from ..models.user.context_model import ContextModel
|
|
22
|
+
from ..utils.network_util import (
|
|
23
|
+
get_events_base_properties,
|
|
24
|
+
get_attribute_payload_data,
|
|
25
|
+
send_post_api_request,
|
|
26
|
+
)
|
|
27
|
+
from ..enums.event_enum import EventEnum
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class SetAttributeApi:
|
|
32
|
+
def set_attribute(
|
|
33
|
+
self, settings: SettingsModel, attribute_map: Dict, context: ContextModel
|
|
34
|
+
):
|
|
35
|
+
self.create_and_send_impression_for_attribute(settings, attribute_map, context)
|
|
36
|
+
|
|
37
|
+
def create_and_send_impression_for_attribute(
|
|
38
|
+
self, settings: SettingsModel, attribute_map: Dict, context: ContextModel
|
|
39
|
+
):
|
|
40
|
+
properties = get_events_base_properties(
|
|
41
|
+
EventEnum.SYNC_VISITOR_PROP.value,
|
|
42
|
+
visitor_user_agent=context.get_user_agent(),
|
|
43
|
+
ip_address=context.get_ip_address(),
|
|
44
|
+
)
|
|
45
|
+
# Construct payload data for tracking the goal
|
|
46
|
+
payload = get_attribute_payload_data(
|
|
47
|
+
settings, context, EventEnum.SYNC_VISITOR_PROP.value, attribute_map
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
from wingify.wingify_client import WingifyClient as VWOClient
|
|
51
|
+
|
|
52
|
+
vwo_instance = VWOClient.get_instance()
|
|
53
|
+
|
|
54
|
+
# Check if batch events are enabled
|
|
55
|
+
if vwo_instance.batch_event_queue is not None:
|
|
56
|
+
# Enqueue the event to the batch queue
|
|
57
|
+
vwo_instance.batch_event_queue.enqueue(payload)
|
|
58
|
+
else:
|
|
59
|
+
# Send the event immediately if batch events are not enabled
|
|
60
|
+
send_post_api_request(properties, payload, context.get_id())
|
wingify/api/track_api.py
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from ..models.settings.settings_model import SettingsModel
|
|
17
|
+
from ..models.user.context_model import ContextModel
|
|
18
|
+
from ..models.user.context_model import ContextModel
|
|
19
|
+
from ..services.hooks_manager import HooksManager
|
|
20
|
+
from ..packages.logger.core.log_manager import LogManager
|
|
21
|
+
from typing import Dict, Any
|
|
22
|
+
from ..utils.function_util import does_event_belong_to_any_feature, does_event_belong_to_any_holdout
|
|
23
|
+
from ..models.settings.settings_model import SettingsModel
|
|
24
|
+
from ..models.user.context_model import ContextModel
|
|
25
|
+
from ..utils.network_util import (
|
|
26
|
+
get_events_base_properties,
|
|
27
|
+
get_track_goal_payload_data,
|
|
28
|
+
send_post_api_request,
|
|
29
|
+
)
|
|
30
|
+
from ..enums.api_enum import ApiEnum
|
|
31
|
+
from ..utils.log_message_util import error_messages
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class TrackApi:
|
|
35
|
+
def track(
|
|
36
|
+
self,
|
|
37
|
+
settings: SettingsModel,
|
|
38
|
+
event_name: str,
|
|
39
|
+
context: ContextModel,
|
|
40
|
+
event_properties: Dict[str, Any],
|
|
41
|
+
hook_manager: HooksManager,
|
|
42
|
+
) -> Dict:
|
|
43
|
+
"""
|
|
44
|
+
Tracks an event with given properties and context.
|
|
45
|
+
Checks if the event exists, creates an impression, and executes hooks.
|
|
46
|
+
|
|
47
|
+
:param settings: The settings file containing the account settings.
|
|
48
|
+
:param event_name: The name of the event to track.
|
|
49
|
+
:param event_properties: The properties of the event.
|
|
50
|
+
:param context: The context of the user.
|
|
51
|
+
:param hook_manager: The hook manager to execute hooks.
|
|
52
|
+
"""
|
|
53
|
+
if does_event_belong_to_any_feature(event_name, settings) or does_event_belong_to_any_holdout(event_name, settings):
|
|
54
|
+
self.create_and_send_impression_for_track(
|
|
55
|
+
settings, event_name, context, event_properties
|
|
56
|
+
)
|
|
57
|
+
hook_manager.set({"event_name": event_name, "api": ApiEnum.TRACK_EVENT.value})
|
|
58
|
+
hook_manager.execute(hook_manager.get())
|
|
59
|
+
return {event_name: True}
|
|
60
|
+
|
|
61
|
+
LogManager.get_instance().error_log("EVENT_NOT_FOUND", data={"eventName": event_name}, debug_data={"an": ApiEnum.TRACK_EVENT.value, "uuid": context.get_vwo_uuid(), "sId": context.get_session_id()})
|
|
62
|
+
return {event_name: False}
|
|
63
|
+
|
|
64
|
+
def create_and_send_impression_for_track(
|
|
65
|
+
self,
|
|
66
|
+
settings: SettingsModel,
|
|
67
|
+
event_name: str,
|
|
68
|
+
context: ContextModel,
|
|
69
|
+
event_properties: Dict[str, Any],
|
|
70
|
+
):
|
|
71
|
+
"""
|
|
72
|
+
Creates an impression for a track event and sends it via a POST API request.
|
|
73
|
+
|
|
74
|
+
:param settings: The settings file containing the account settings.
|
|
75
|
+
:param event_name: The name of the event to track.
|
|
76
|
+
:param context: The context of the user.
|
|
77
|
+
:param event_properties: The properties of the event.
|
|
78
|
+
"""
|
|
79
|
+
properties = get_events_base_properties(
|
|
80
|
+
event_name,
|
|
81
|
+
visitor_user_agent=context.get_user_agent(),
|
|
82
|
+
ip_address=context.get_ip_address(),
|
|
83
|
+
)
|
|
84
|
+
# Construct payload data for tracking the goal
|
|
85
|
+
payload = get_track_goal_payload_data(
|
|
86
|
+
settings, context, event_name, event_properties
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
from wingify.wingify_client import WingifyClient as VWOClient
|
|
90
|
+
|
|
91
|
+
vwo_instance = VWOClient.get_instance()
|
|
92
|
+
|
|
93
|
+
# Check if batch events are enabled
|
|
94
|
+
if vwo_instance.batch_event_queue is not None:
|
|
95
|
+
# Enqueue the event to the batch queue
|
|
96
|
+
vwo_instance.batch_event_queue.enqueue(payload)
|
|
97
|
+
else:
|
|
98
|
+
# Send the event immediately if batch events are not enabled
|
|
99
|
+
send_post_api_request(properties, payload, context.get_id())
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Constants:
|
|
17
|
+
# TODO: read from setup.py
|
|
18
|
+
sdk_meta = {
|
|
19
|
+
"name": "vwo-fme-python-sdk",
|
|
20
|
+
"version": "1.70.0",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
SDK_VERSION = sdk_meta["version"]
|
|
24
|
+
|
|
25
|
+
# Brand-specific values (runtime selection via is_via_vwo.
|
|
26
|
+
VWO_SDK_NAME = "vwo-fme-python-sdk"
|
|
27
|
+
WINGIFY_SDK_NAME = "wingify-fme-python-sdk"
|
|
28
|
+
|
|
29
|
+
VWO_HOST_NAME = "dev.visualwebsiteoptimizer.com"
|
|
30
|
+
WINGIFY_SETTINGS_HOST_NAME = "edge.wingify.net"
|
|
31
|
+
WINGIFY_COLLECTION_HOST_NAME = "collect.wingify.net"
|
|
32
|
+
|
|
33
|
+
VWO_LOG_PREFIX = "VWO-SDK"
|
|
34
|
+
WINGIFY_LOG_PREFIX = "Wingify-SDK"
|
|
35
|
+
|
|
36
|
+
VWO_BRAND_DISPLAY_NAME = "VWO"
|
|
37
|
+
WINGIFY_BRAND_DISPLAY_NAME = "Wingify"
|
|
38
|
+
|
|
39
|
+
PLATFORM = "server"
|
|
40
|
+
|
|
41
|
+
MAX_TRAFFIC_PERCENT = 100
|
|
42
|
+
MAX_TRAFFIC_VALUE = 10000
|
|
43
|
+
STATUS_RUNNING = "RUNNING"
|
|
44
|
+
|
|
45
|
+
SEED_VALUE = 1
|
|
46
|
+
MAX_EVENTS_PER_REQUEST = 5000
|
|
47
|
+
DEFAULT_REQUEST_TIME_INTERVAL = 600
|
|
48
|
+
DEFAULT_EVENTS_PER_REQUEST = 100
|
|
49
|
+
|
|
50
|
+
AP = "server"
|
|
51
|
+
|
|
52
|
+
SEED_URL = "https://example.com/seed"
|
|
53
|
+
HTTP_PROTOCOL = "http"
|
|
54
|
+
HTTPS_PROTOCOL = "https"
|
|
55
|
+
|
|
56
|
+
SETTINGS = "settings"
|
|
57
|
+
SETTINGS_EXPIRY = 10000000
|
|
58
|
+
SETTINGS_TIMEOUT = 50000
|
|
59
|
+
POLLING_INTERVAL = 600000
|
|
60
|
+
|
|
61
|
+
SETTINGS_ENDPOINT = "/server-side/v2-settings"
|
|
62
|
+
WEBHOOK_SETTINTS_ENDPOINT = "/server-side/v2-pull"
|
|
63
|
+
LOCATION_ENDPOINT = "/getLocation"
|
|
64
|
+
|
|
65
|
+
VWO_FS_ENVIRONMENT = "vwo_fs_environment"
|
|
66
|
+
|
|
67
|
+
RANDOM_ALGO = 1
|
|
68
|
+
|
|
69
|
+
VWO_META_MEG_KEY = "_vwo_meta_meg_"
|
|
70
|
+
|
|
71
|
+
THREAD_POOL_MAX_WORKERS = 5
|
|
72
|
+
SHOULD_USE_THREADING = True
|
|
73
|
+
|
|
74
|
+
MAX_RETRIES = 3
|
|
75
|
+
INITIAL_WAIT_TIME = 2
|
|
76
|
+
PRODUCT_NAME = "fme"
|
|
77
|
+
|
|
78
|
+
V2_SETTINGS = "v2-settings"
|
|
79
|
+
POLLING = "polling"
|
|
80
|
+
FLAG_DECISION_GIVEN = "FLAG_DECISION_GIVEN"
|
|
81
|
+
NETWORK_CALL_FAILURE_AFTER_MAX_RETRIES = "NETWORK_CALL_FAILURE_AFTER_MAX_RETRIES"
|
|
82
|
+
NETWORK_CALL_SUCCESS_WITH_RETRIES = "NETWORK_CALL_SUCCESS_WITH_RETRIES"
|
|
83
|
+
IMPACT_ANALYSIS = "IMPACT_ANALYSIS"
|
|
84
|
+
|
|
85
|
+
KEY_USER_ID = "userId"
|
|
86
|
+
KEY_ALIAS_ID = "aliasId"
|
|
87
|
+
|
|
88
|
+
VARIATION_IS_PART_OF_HOLDOUT = 1
|
|
89
|
+
VARIATION_NOT_PART_OF_HOLDOUT = 2
|
|
90
|
+
|
|
91
|
+
KEY_FORCED_USER_CHECK = "preSegmentationResult"
|
|
92
|
+
|
|
93
|
+
INTERNAL_EVENTS_DEFAULT_SAMPLING_PERCENT_SERVER = 10.0
|
|
94
|
+
INTERNAL_EVENTS_DEFAULT_ALWAYS_APPLY_SAMPLING = False
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
class SampledDebugErrorTemplateKeys:
|
|
16
|
+
"""
|
|
17
|
+
Debug error template keys (`msg_t`) that are subject to sampling.
|
|
18
|
+
Keys not listed here always send and bypass sampling.
|
|
19
|
+
"""
|
|
20
|
+
SAMPLED_KEYS = {
|
|
21
|
+
"EVENT_NOT_FOUND",
|
|
22
|
+
"FEATURE_NOT_FOUND",
|
|
23
|
+
"FEATURE_NOT_FOUND_WITH_ID"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@staticmethod
|
|
27
|
+
def contains(message_template_key: str) -> bool:
|
|
28
|
+
"""
|
|
29
|
+
Checks whether a debug error template key should be sampled before sending.
|
|
30
|
+
|
|
31
|
+
:param message_template_key: The `msg_t` value from the debug event
|
|
32
|
+
:return: `True` if the key is in the sampled set; `False` otherwise
|
|
33
|
+
"""
|
|
34
|
+
return message_template_key is not None and message_template_key in SampledDebugErrorTemplateKeys.SAMPLED_KEYS
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from ..models.user.context_model import ContextModel
|
|
17
|
+
from ..enums.storage_enum import StorageEnum
|
|
18
|
+
from ..models.campaign.variation_model import VariationModel
|
|
19
|
+
from typing import Any, Dict, Optional
|
|
20
|
+
from ..services.storage_service import StorageService
|
|
21
|
+
from ..packages.logger.core.log_manager import LogManager
|
|
22
|
+
from ..utils.log_message_util import error_messages
|
|
23
|
+
from ..enums.api_enum import ApiEnum
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class StorageDecorator:
|
|
27
|
+
def get_feature_from_storage(
|
|
28
|
+
self, feature_key: str, context: ContextModel, storage_service: StorageService
|
|
29
|
+
) -> Any:
|
|
30
|
+
campaign_map = storage_service.get_data_in_storage(feature_key, context)
|
|
31
|
+
|
|
32
|
+
if campaign_map.get("status") == StorageEnum.STORAGE_UNDEFINED.value:
|
|
33
|
+
return None # No storage defined
|
|
34
|
+
elif campaign_map.get("status") == StorageEnum.NO_DATA_FOUND.value:
|
|
35
|
+
return None # No data found in storage
|
|
36
|
+
elif campaign_map.get("status") == StorageEnum.INCORRECT_DATA.value:
|
|
37
|
+
return StorageEnum.INCORRECT_DATA.value # Incorrect data found
|
|
38
|
+
elif campaign_map.get("status") == StorageEnum.CAMPAIGN_PAUSED.value:
|
|
39
|
+
return None # Campaign is paused
|
|
40
|
+
elif campaign_map.get("status") == StorageEnum.VARIATION_NOT_FOUND.value:
|
|
41
|
+
return StorageEnum.VARIATION_NOT_FOUND.value # No variation found
|
|
42
|
+
elif campaign_map.get("status") == StorageEnum.WHITELISTED_VARIATION.value:
|
|
43
|
+
return None # Whitelisted variation, handle accordingly
|
|
44
|
+
else:
|
|
45
|
+
return campaign_map # Valid data found, return it
|
|
46
|
+
|
|
47
|
+
def set_data_in_storage(
|
|
48
|
+
self, data: Dict[Any, Any], storage_service: StorageService
|
|
49
|
+
) -> Optional[VariationModel]:
|
|
50
|
+
feature_key = data.get("featureKey")
|
|
51
|
+
context = data.get("context")
|
|
52
|
+
|
|
53
|
+
if not feature_key:
|
|
54
|
+
LogManager.get_instance().error_log("ERROR_STORING_DATA_IN_STORAGE",data={"key": "featureKey"}, debug_data={"an": ApiEnum.GET_FLAG.value, "uuid": context.get_vwo_uuid(), "sId": context.get_session_id()})
|
|
55
|
+
return None # Invalid feature key, return None
|
|
56
|
+
|
|
57
|
+
if not context or not context.get_id():
|
|
58
|
+
LogManager.get_instance().error_log("ERROR_STORING_DATA_IN_STORAGE",data={"key": "Context or Context.id"}, debug_data={"an": ApiEnum.GET_FLAG.value, "uuid": context.get_vwo_uuid(), "sId": context.get_session_id()})
|
|
59
|
+
return None # Invalid user ID, return None
|
|
60
|
+
|
|
61
|
+
if (
|
|
62
|
+
data.get("rolloutKey")
|
|
63
|
+
and not data.get("experimentKey")
|
|
64
|
+
and not data.get("rolloutVariationId")
|
|
65
|
+
):
|
|
66
|
+
LogManager.get_instance().error_log("ERROR_STORING_DATA_IN_STORAGE",data={"key": "rolloutKey or experimentKey or rolloutVariationId"}, debug_data={"an": ApiEnum.GET_FLAG.value, "uuid": context.get_vwo_uuid(), "sId": context.get_session_id()})
|
|
67
|
+
return None # Invalid rollout variation, return None
|
|
68
|
+
|
|
69
|
+
if data.get("experimentKey") and not data.get("experimentVariationId"):
|
|
70
|
+
LogManager.get_instance().error_log("ERROR_STORING_DATA_IN_STORAGE",data={"key": "Variation:(rolloutKey, experimentKey or rolloutVariationId)"}, debug_data={"an": ApiEnum.GET_FLAG.value, "uuid": context.get_vwo_uuid(), "sId": context.get_session_id()})
|
|
71
|
+
return None # Invalid experiment variation, return None
|
|
72
|
+
|
|
73
|
+
success = storage_service.set_data_in_storage(
|
|
74
|
+
{
|
|
75
|
+
"featureKey": feature_key,
|
|
76
|
+
"userId": context.get_id(),
|
|
77
|
+
"rolloutId": data.get("rolloutId"),
|
|
78
|
+
"rolloutKey": data.get("rolloutKey"),
|
|
79
|
+
"rolloutVariationId": data.get("rolloutVariationId"),
|
|
80
|
+
"experimentId": data.get("experimentId"),
|
|
81
|
+
"experimentKey": data.get("experimentKey"),
|
|
82
|
+
"experimentVariationId": data.get("experimentVariationId"),
|
|
83
|
+
"isInHoldoutId": data.get("isInHoldoutId"),
|
|
84
|
+
"notInHoldoutId": data.get("notInHoldoutId"),
|
|
85
|
+
},
|
|
86
|
+
context
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
if success:
|
|
90
|
+
return True
|
|
91
|
+
else:
|
|
92
|
+
return None
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from enum import Enum
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ApiEnum(Enum):
|
|
20
|
+
INIT = "init"
|
|
21
|
+
GET_FLAG = "getFlag"
|
|
22
|
+
TRACK_EVENT = "trackEvent"
|
|
23
|
+
SET_ATTRIBUTE = "setAttribute"
|
|
24
|
+
UPDATE_SETTINGS = "updateSettings"
|
|
25
|
+
FLUSH_EVENTS = "flushEvents"
|
|
26
|
+
SET_ALIAS = "setAlias"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from enum import Enum
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class CampaignTypeEnum(Enum):
|
|
20
|
+
ROLLOUT = "FLAG_ROLLOUT"
|
|
21
|
+
AB = "FLAG_TESTING"
|
|
22
|
+
PERSONALIZE = "FLAG_PERSONALIZE"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from enum import Enum
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class DebugCategoryEnum(Enum):
|
|
20
|
+
NETWORK = "network"
|
|
21
|
+
DECISION = "decision"
|
|
22
|
+
INITIALIZATION = "initialization"
|
|
23
|
+
RETRY = "retry"
|
|
24
|
+
ERROR = "error"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from enum import Enum
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class EventEnum(Enum):
|
|
20
|
+
VARIATION_SHOWN = "vwo_variationShown"
|
|
21
|
+
SYNC_VISITOR_PROP = "vwo_syncVisitorProp"
|
|
22
|
+
LOG_EVENT = "vwo_log"
|
|
23
|
+
SDK_INIT_EVENT = "vwo_fmeSdkInit"
|
|
24
|
+
USAGE_STATS = "vwo_sdkUsageStats"
|
|
25
|
+
DEBUGGER_EVENT = "vwo_sdkDebug"
|
|
26
|
+
TRACK_USAGE = "vwo_feTrackUsage"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from enum import Enum
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HeadersEnum(Enum):
|
|
20
|
+
USER_AGENT = "X-Device-User-Agent"
|
|
21
|
+
IP = "VWO-X-Forwarded-For"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from enum import Enum
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class DecisionTypes(Enum):
|
|
20
|
+
CAMPAIGN_DECISION = "CAMPAIGN_DECISION"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class HooksEnum:
|
|
24
|
+
DECISION_TYPES = DecisionTypes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from enum import Enum
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class StatusEnum(Enum):
|
|
20
|
+
PASSED = "passed"
|
|
21
|
+
FAILED = "failed"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from enum import Enum
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class StorageEnum(Enum):
|
|
20
|
+
STORAGE_UNDEFINED = "Storage is undefined"
|
|
21
|
+
INCORRECT_DATA = "Incorrect data"
|
|
22
|
+
NO_DATA_FOUND = "No data found"
|
|
23
|
+
CAMPAIGN_PAUSED = "Campaign paused"
|
|
24
|
+
VARIATION_NOT_FOUND = "Variation not found"
|
|
25
|
+
WHITELISTED_VARIATION = "Whitelisted variation"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
from enum import Enum
|
|
16
|
+
|
|
17
|
+
from wingify.constants.Constants import Constants
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class UrlEnum(Enum):
|
|
21
|
+
BASE_URL = Constants.WINGIFY_SETTINGS_HOST_NAME
|
|
22
|
+
SETTINGS_URL = "/server-side/settings"
|
|
23
|
+
# WEBHOOK_SETTINGS_URL = '/server-side/pull'
|
|
24
|
+
EVENTS = '/events/t'
|
|
25
|
+
ATTRIBUTE_CHECK = '/check-attribute'
|
|
26
|
+
GET_USER_DATA = '/get-user-details'
|
|
27
|
+
BATCH_EVENTS = '/server-side/batch-events-v2'
|
|
28
|
+
SET_ALIAS = '/user-alias/setUserAlias'
|
|
29
|
+
GET_ALIAS = '/user-alias/getAliasUserId'
|