UNPKG

@simonecoelhosfo/optimizely-mcp-server

Version:

Optimizely MCP Server for AI assistants with integrated CLI tools

1,591 lines 53.3 kB
// Complete Field Mappings for Micro-Kernel Query Planner // Generated from analysis of 6 denormalized SQL views // Total mappings: 104 unique fields across 6 views export const FIELD_MAPPINGS = { // =================================== // PAGE-RELATED FIELDS // =================================== // From pages_standalone_flat & experiment_pages_flat 'page_id': { viewColumn: 'page_id', type: 'number', views: ['pages_standalone_flat', 'pages_flat', 'experiment_pages_flat'] }, 'page_key': { viewColumn: 'page_key', type: 'string', views: ['pages_standalone_flat', 'pages_flat', 'experiment_pages_flat'] }, 'page_name': { viewColumn: 'page_name', type: 'string', views: ['pages_standalone_flat', 'pages_flat', 'experiment_pages_flat'] }, 'edit_url': { viewColumn: 'edit_url', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'page_edit_url': { viewColumn: 'page_edit_url', type: 'string', views: ['experiment_pages_flat'] }, 'activation_type': { viewColumn: 'activation_type', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'page_activation_type': { viewColumn: 'page_activation_type', type: 'string', views: ['experiment_pages_flat'] }, 'activation_code': { viewColumn: 'activation_code', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'page_activation_code': { viewColumn: 'page_activation_code', type: 'string', views: ['experiment_pages_flat'] }, 'category': { viewColumn: 'category', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'page_category': { viewColumn: 'page_category', type: 'string', views: ['experiment_pages_flat'] }, 'page_type': { viewColumn: 'page_type', type: 'string', views: ['pages_standalone_flat', 'pages_flat', 'experiment_pages_flat'] }, 'page_archived': { viewColumn: 'page_archived', type: 'boolean', views: ['experiment_pages_flat'] }, 'page_created_time': { viewColumn: 'page_created_time', type: 'date', views: ['experiment_pages_flat'] }, 'page_updated_time': { viewColumn: 'page_updated_time', type: 'date', views: ['experiment_pages_flat'] }, 'page_conditions_raw': { viewColumn: 'page_conditions_raw', type: 'string', views: ['experiment_pages_flat'] }, 'conditions_raw': { viewColumn: 'conditions_raw', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'condition_depth': { viewColumn: 'condition_depth', type: 'number', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat'] }, 'root_operator': { viewColumn: 'root_operator', type: 'string', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat'] }, 'condition_operator': { viewColumn: 'condition_operator', type: 'string', views: ['experiment_pages_flat', 'experiment_audiences_flat'] }, 'primary_condition_type': { viewColumn: 'primary_condition_type', type: 'string', views: ['pages_standalone_flat', 'pages_flat', 'experiment_audiences_flat'] }, 'condition_type': { viewColumn: 'condition_type', type: 'string', views: ['experiment_pages_flat'] }, 'primary_condition_value': { viewColumn: 'primary_condition_value', type: 'string', views: ['pages_standalone_flat', 'pages_flat', 'experiment_audiences_flat'] }, 'condition_value': { viewColumn: 'condition_value', type: 'string', views: ['experiment_pages_flat'] }, 'primary_match_type': { viewColumn: 'primary_match_type', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'condition_match_type': { viewColumn: 'condition_match_type', type: 'string', views: ['experiment_pages_flat'] }, 'secondary_condition_type': { viewColumn: 'secondary_condition_type', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'secondary_condition_value': { viewColumn: 'secondary_condition_value', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'target_url': { viewColumn: 'target_url', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'target_url_pattern': { viewColumn: 'target_url_pattern', type: 'string', views: ['experiment_pages_flat'] }, 'target_domain': { viewColumn: 'target_domain', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'condition_array': { viewColumn: 'condition_array', type: 'string', views: ['experiment_pages_flat'] }, 'has_url_targeting': { viewColumn: 'has_url_targeting', type: 'boolean', views: ['pages_standalone_flat', 'pages_flat', 'experiment_pages_flat'] }, 'has_cookie_targeting': { viewColumn: 'has_cookie_targeting', type: 'boolean', views: ['pages_standalone_flat', 'pages_flat', 'experiment_pages_flat'] }, 'has_query_targeting': { viewColumn: 'has_query_targeting', type: 'boolean', views: ['pages_standalone_flat', 'pages_flat', 'experiment_pages_flat'] }, 'has_referrer_targeting': { viewColumn: 'has_referrer_targeting', type: 'boolean', views: ['pages_standalone_flat', 'pages_flat', 'experiment_pages_flat'] }, 'has_event_targeting': { viewColumn: 'has_event_targeting', type: 'boolean', views: ['pages_standalone_flat', 'pages_flat'] }, 'primary_match_type_category': { viewColumn: 'primary_match_type_category', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'match_type_category': { viewColumn: 'match_type_category', type: 'string', views: ['experiment_pages_flat'] }, 'total_pages_in_experiment': { viewColumn: 'total_pages_in_experiment', type: 'number', views: ['experiment_pages_flat'] }, // =================================== // AUDIENCE-RELATED FIELDS // =================================== // From audiences_standalone_flat & experiment_audiences_flat 'audience_id': { viewColumn: 'audience_id', type: 'number', views: ['audiences_standalone_flat', 'audiences_flat', 'experiment_audiences_flat'] }, 'audience_name': { viewColumn: 'audience_name', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat', 'experiment_audiences_flat'] }, 'audience_description': { viewColumn: 'audience_description', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat', 'experiment_audiences_flat'] }, 'audience_archived': { viewColumn: 'audience_archived', type: 'boolean', views: ['experiment_audiences_flat'] }, 'audience_created_time': { viewColumn: 'audience_created_time', type: 'date', views: ['experiment_audiences_flat'] }, 'audience_last_modified': { viewColumn: 'audience_last_modified', type: 'date', views: ['experiment_audiences_flat'] }, 'audience_conditions_raw': { viewColumn: 'audience_conditions_raw', type: 'string', views: ['experiment_audiences_flat'] }, 'has_language_targeting': { viewColumn: 'has_language_targeting', type: 'boolean', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'has_device_targeting': { viewColumn: 'has_device_targeting', type: 'boolean', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'has_browser_targeting': { viewColumn: 'has_browser_targeting', type: 'boolean', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'has_location_targeting': { viewColumn: 'has_location_targeting', type: 'boolean', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'has_custom_attribute_targeting': { viewColumn: 'has_custom_attribute_targeting', type: 'boolean', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'targets_language': { viewColumn: 'targets_language', type: 'boolean', views: ['experiment_audiences_flat'] }, 'targets_device': { viewColumn: 'targets_device', type: 'boolean', views: ['experiment_audiences_flat'] }, 'targets_browser': { viewColumn: 'targets_browser', type: 'boolean', views: ['experiment_audiences_flat'] }, 'targets_location': { viewColumn: 'targets_location', type: 'boolean', views: ['experiment_audiences_flat'] }, 'targets_custom_attribute': { viewColumn: 'targets_custom_attribute', type: 'boolean', views: ['experiment_audiences_flat'] }, 'targets_cookie': { viewColumn: 'targets_cookie', type: 'boolean', views: ['experiment_audiences_flat'] }, 'targets_query': { viewColumn: 'targets_query', type: 'boolean', views: ['experiment_audiences_flat'] }, 'targets_referrer': { viewColumn: 'targets_referrer', type: 'boolean', views: ['experiment_audiences_flat'] }, 'primary_targeting_type': { viewColumn: 'primary_targeting_type', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'language_value': { viewColumn: 'language_value', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat', 'experiment_audiences_flat'] }, 'device_value': { viewColumn: 'device_value', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat', 'experiment_audiences_flat'] }, 'browser_value': { viewColumn: 'browser_value', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat', 'experiment_audiences_flat'] }, 'custom_attribute_name': { viewColumn: 'custom_attribute_name', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat', 'experiment_audiences_flat'] }, 'custom_attribute_value': { viewColumn: 'custom_attribute_value', type: 'string', views: ['experiment_audiences_flat'] }, 'total_condition_count': { viewColumn: 'total_condition_count', type: 'number', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'condition_count': { viewColumn: 'condition_count', type: 'number', views: ['experiment_audiences_flat'] }, 'audience_complexity': { viewColumn: 'audience_complexity', type: 'string', views: ['experiment_audiences_flat'] }, 'complexity_level': { viewColumn: 'complexity_level', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'total_audiences_in_experiment': { viewColumn: 'total_audiences_in_experiment', type: 'number', views: ['experiment_audiences_flat'] }, // =================================== // EXPERIMENT-RELATED FIELDS // =================================== // From experiment_pages_flat, experiment_audiences_flat, experiment_events_flat 'experiment_id': { viewColumn: 'experiment_id', type: 'number', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat'] }, 'experiment_name': { viewColumn: 'experiment_name', type: 'string', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat'] }, 'experiment_description': { viewColumn: 'experiment_description', type: 'string', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat'] }, 'experiment_status': { viewColumn: 'experiment_status', type: 'string', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat'] }, 'experiment_type': { viewColumn: 'experiment_type', type: 'string', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat'] }, 'experiment_archived': { viewColumn: 'experiment_archived', type: 'boolean', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat'] }, 'experiment_created_time': { viewColumn: 'experiment_created_time', type: 'date', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat'] }, 'experiment_updated_time': { viewColumn: 'experiment_updated_time', type: 'date', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat'] }, 'campaign_id': { viewColumn: 'campaign_id', type: 'number', views: ['experiment_pages_flat'] }, 'platform': { viewColumn: 'platform', type: 'string', views: ['experiment_audiences_flat', 'experiment_events_flat', 'experiments_unified_view'] }, // =================================== // EVENT-RELATED FIELDS // =================================== // From experiment_events_flat 'event_id': { viewColumn: 'event_id', type: 'number', views: ['experiment_events_flat'] }, 'event_key': { viewColumn: 'event_key', type: 'string', views: ['experiment_events_flat'] }, 'event_name': { viewColumn: 'event_name', type: 'string', views: ['experiment_events_flat'] }, 'event_description': { viewColumn: 'event_description', type: 'string', views: ['experiment_events_flat'] }, 'event_type': { viewColumn: 'event_type', type: 'string', views: ['experiment_events_flat'] }, 'event_category': { viewColumn: 'event_category', type: 'string', views: ['experiment_events_flat'] }, 'event_archived': { viewColumn: 'event_archived', type: 'boolean', views: ['experiment_events_flat'] }, 'event_created_time': { viewColumn: 'event_created_time', type: 'date', views: ['experiment_events_flat'] }, 'event_updated_time': { viewColumn: 'event_updated_time', type: 'date', views: ['experiment_events_flat'] }, 'event_selector': { viewColumn: 'event_selector', type: 'string', views: ['experiment_events_flat'] }, 'event_xpath': { viewColumn: 'event_xpath', type: 'string', views: ['experiment_events_flat'] }, 'event_trigger': { viewColumn: 'event_trigger', type: 'string', views: ['experiment_events_flat'] }, 'url_match_type': { viewColumn: 'url_match_type', type: 'string', views: ['experiment_events_flat'] }, 'url_conditions': { viewColumn: 'url_conditions', type: 'string', views: ['experiment_events_flat'] }, 'event_category_type': { viewColumn: 'event_category_type', type: 'string', views: ['experiment_events_flat'] }, 'is_click_event': { viewColumn: 'is_click_event', type: 'boolean', views: ['experiment_events_flat'] }, 'is_pageview_event': { viewColumn: 'is_pageview_event', type: 'boolean', views: ['experiment_events_flat'] }, 'is_custom_event': { viewColumn: 'is_custom_event', type: 'boolean', views: ['experiment_events_flat'] }, 'is_submission_event': { viewColumn: 'is_submission_event', type: 'boolean', views: ['experiment_events_flat'] }, 'is_interaction_event': { viewColumn: 'is_interaction_event', type: 'boolean', views: ['experiment_events_flat'] }, 'has_css_selector': { viewColumn: 'has_css_selector', type: 'boolean', views: ['experiment_events_flat'] }, 'selector_type': { viewColumn: 'selector_type', type: 'string', views: ['experiment_events_flat'] }, 'has_url_conditions': { viewColumn: 'has_url_conditions', type: 'boolean', views: ['experiment_events_flat'] }, 'metric_aggregator': { viewColumn: 'metric_aggregator', type: 'string', views: ['experiment_events_flat'] }, 'metric_scope': { viewColumn: 'metric_scope', type: 'string', views: ['experiment_events_flat'] }, 'winning_direction': { viewColumn: 'winning_direction', type: 'string', views: ['experiment_events_flat'] }, 'metric_field': { viewColumn: 'metric_field', type: 'string', views: ['experiment_events_flat'] }, 'metric_type': { viewColumn: 'metric_type', type: 'string', views: ['experiment_events_flat'] }, 'metric_scope_type': { viewColumn: 'metric_scope_type', type: 'string', views: ['experiment_events_flat'] }, 'event_usage_status': { viewColumn: 'event_usage_status', type: 'string', views: ['experiment_events_flat'] }, 'total_metrics_in_experiment': { viewColumn: 'total_metrics_in_experiment', type: 'number', views: ['experiment_events_flat'] }, // =================================== // FLAG-RELATED FIELDS // =================================== // From flag_variations_flat 'flag_id': { viewColumn: 'flag_id', type: 'number', views: ['flags_unified_view', 'flag_variations_flat'] }, 'flag_key': { viewColumn: 'flag_key', type: 'string', views: ['flags_unified_view', 'flag_variations_flat'] }, 'flag_name': { viewColumn: 'flag_name', type: 'string', views: ['flags_unified_view', 'flag_variations_flat'] }, 'flag_description': { viewColumn: 'flag_description', type: 'string', views: ['flags_unified_view', 'flag_variations_flat'] }, 'flag_archived': { viewColumn: 'flag_archived', type: 'boolean', views: ['flags_unified_view', 'flag_variations_flat'] }, 'flag_created_time': { viewColumn: 'flag_created_time', type: 'date', views: ['flags_unified_view', 'flag_variations_flat'] }, 'flag_updated_time': { viewColumn: 'flag_updated_time', type: 'date', views: ['flags_unified_view', 'flag_variations_flat'] }, 'flag_data_json': { viewColumn: 'flag_data_json', type: 'string', views: ['flag_variations_flat'] }, 'variable_definitions_raw': { viewColumn: 'variable_definitions_raw', type: 'string', views: ['flag_variations_flat'] }, 'variable_count': { viewColumn: 'variable_count', type: 'number', views: ['flag_variations_flat'] }, 'total_variations_in_flag': { viewColumn: 'total_variations_in_flag', type: 'number', views: ['flag_variations_flat'] }, // =================================== // VARIATION-RELATED FIELDS // =================================== // From flag_variations_flat 'variation_id': { viewColumn: 'variation_id', type: 'number', views: ['flag_variations_flat'] }, // =================================== // SEMANTIC FIELD ALIASES // =================================== // Common vocabulary terms that map to specific database columns 'enabled': { viewColumn: 'enabled', // flags_unified_view has 'enabled' column type: 'boolean', views: ['flags_unified_view', 'flag_variations_flat'] }, 'disabled': { viewColumn: 'enabled', // Same column, different semantic meaning type: 'boolean', views: ['flags_unified_view', 'flag_variations_flat'] }, 'status': { viewColumn: 'enabled', // Status typically means enabled/disabled type: 'boolean', views: ['flags_unified_view', 'flag_variations_flat'] }, 'state': { viewColumn: 'enabled', // State typically means enabled/disabled type: 'boolean', views: ['flags_unified_view', 'flag_variations_flat'] }, 'environment_key': { viewColumn: 'environment_key', type: 'string', views: ['flags_unified_view'] }, 'environment_name': { viewColumn: 'environment_name', type: 'string', views: ['flags_unified_view'] }, 'flag_enabled': { viewColumn: 'flag_enabled', type: 'boolean', views: ['flag_state_history_view', 'flag_variation_variables', 'flags_unified_view'] }, 'variation_key': { viewColumn: 'variation_key', type: 'string', views: ['flag_variations_flat'] }, 'variation_name': { viewColumn: 'variation_name', type: 'string', views: ['flag_variations_flat', 'code_search_patterns_view'] }, 'variation_description': { viewColumn: 'variation_description', type: 'string', views: ['flag_variations_flat'] }, 'variation_enabled': { viewColumn: 'variation_enabled', type: 'boolean', views: ['flag_variations_flat'] }, 'variation_archived': { viewColumn: 'variation_archived', type: 'boolean', views: ['flag_variations_flat'] }, 'variation_created_time': { viewColumn: 'variation_created_time', type: 'date', views: ['flag_variations_flat'] }, 'variation_updated_time': { viewColumn: 'variation_updated_time', type: 'date', views: ['flag_variations_flat'] }, 'variables_raw': { viewColumn: 'variables_raw', type: 'string', views: ['flag_variations_flat'] }, 'variable_color': { viewColumn: 'variable_color', type: 'string', views: ['flag_variations_flat'] }, 'variable_text': { viewColumn: 'variable_text', type: 'string', views: ['flag_variations_flat'] }, 'variable_number': { viewColumn: 'variable_number', type: 'number', views: ['flag_variations_flat'] }, 'variable_boolean': { viewColumn: 'variable_boolean', type: 'boolean', views: ['flag_variations_flat'] }, 'variable_string': { viewColumn: 'variable_string', type: 'string', views: ['flag_variations_flat'] }, 'variable_json': { viewColumn: 'variable_json', type: 'string', views: ['flag_variations_flat'] }, 'variable_integer': { viewColumn: 'variable_integer', type: 'number', views: ['flag_variations_flat'] }, 'variable_double': { viewColumn: 'variable_double', type: 'number', views: ['flag_variations_flat'] }, 'has_color_variable': { viewColumn: 'has_color_variable', type: 'boolean', views: ['flag_variations_flat'] }, 'has_text_variable': { viewColumn: 'has_text_variable', type: 'boolean', views: ['flag_variations_flat'] }, 'has_numeric_variable': { viewColumn: 'has_numeric_variable', type: 'boolean', views: ['flag_variations_flat'] }, 'has_boolean_variable': { viewColumn: 'has_boolean_variable', type: 'boolean', views: ['flag_variations_flat'] }, 'has_json_variable': { viewColumn: 'has_json_variable', type: 'boolean', views: ['flag_variations_flat'] }, 'variation_variable_count': { viewColumn: 'variation_variable_count', type: 'number', views: ['flag_variations_flat'] }, 'variation_status': { viewColumn: 'variation_status', type: 'string', views: ['flag_variations_flat'] }, 'is_control_variation': { viewColumn: 'is_control_variation', type: 'boolean', views: ['flag_variations_flat'] }, 'rule_usage_count': { viewColumn: 'rule_usage_count', type: 'number', views: ['flag_variations_flat'] }, 'active_rule_usage_count': { viewColumn: 'active_rule_usage_count', type: 'number', views: ['flag_variations_flat'] }, 'average_traffic_allocation': { viewColumn: 'average_traffic_allocation', type: 'number', views: ['flag_variations_flat'] }, // =================================== // COMMON FIELDS (SHARED ACROSS VIEWS) // =================================== 'project_id': { viewColumn: 'project_id', type: 'number', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat', 'experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat', 'flag_variations_flat', 'change_history_flat', 'code_search_patterns_view', 'project_code_security_view'] }, 'project_name': { viewColumn: 'project_name', type: 'string', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat', 'experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat', 'flag_variations_flat', 'project_code_security_view', 'code_search_patterns_view'] }, 'archived': { viewColumn: 'archived', type: 'boolean', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat'] }, 'created_time': { viewColumn: 'created_time', type: 'date', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat'] }, 'updated_time': { viewColumn: 'updated_time', type: 'date', views: ['pages_standalone_flat', 'pages_flat'] }, 'last_modified': { viewColumn: 'last_modified', type: 'date', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'usage_status': { viewColumn: 'usage_status', type: 'string', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat'] }, 'is_orphaned': { viewColumn: 'is_orphaned', type: 'boolean', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat'] }, 'days_since_created': { viewColumn: 'days_since_created', type: 'number', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat', 'flag_variations_flat'] }, 'days_since_updated': { viewColumn: 'days_since_updated', type: 'number', views: ['pages_standalone_flat', 'pages_flat', 'flag_variations_flat'] }, 'days_since_modified': { viewColumn: 'days_since_modified', type: 'number', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'relationship_type': { viewColumn: 'relationship_type', type: 'string', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat', 'flag_variations_flat'] }, 'view_updated_at': { viewColumn: 'view_updated_at', type: 'date', views: ['experiment_pages_flat', 'experiment_audiences_flat', 'experiment_events_flat', 'flag_variations_flat'] }, // =================================== // USAGE STATISTICS FIELDS // =================================== 'total_experiment_count': { viewColumn: 'total_experiment_count', type: 'number', views: ['pages_standalone_flat', 'pages_flat'] }, 'active_experiment_count': { viewColumn: 'active_experiment_count', type: 'number', views: ['pages_standalone_flat', 'pages_flat', 'audiences_standalone_flat', 'audiences_flat'] }, 'active_experiment_names': { viewColumn: 'active_experiment_names', type: 'string', views: ['pages_standalone_flat', 'pages_flat'] }, 'experiment_usage_count': { viewColumn: 'experiment_usage_count', type: 'number', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'flag_usage_count': { viewColumn: 'flag_usage_count', type: 'number', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'active_flag_count': { viewColumn: 'active_flag_count', type: 'number', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'total_usage_count': { viewColumn: 'total_usage_count', type: 'number', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'sample_experiment_names': { viewColumn: 'sample_experiment_names', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'sample_flag_names': { viewColumn: 'sample_flag_names', type: 'string', views: ['audiences_standalone_flat', 'audiences_flat'] }, 'total_experiment_usage': { viewColumn: 'total_experiment_usage', type: 'number', views: ['experiment_events_flat'] }, 'active_experiment_usage': { viewColumn: 'active_experiment_usage', type: 'number', views: ['experiment_events_flat'] }, // =================================== // VARIABLE DEFINITIONS FIELDS // =================================== // From variable_definitions table 'variable_definition_key': { viewColumn: 'key', type: 'string', views: ['variable_definitions'] }, 'variable_definition_type': { viewColumn: 'type', type: 'string', views: ['variable_definitions'] }, 'variable_definition_description': { viewColumn: 'description', type: 'string', views: ['variable_definitions'] }, 'variable_default_value': { viewColumn: 'default_value', type: 'string', views: ['variable_definitions'] }, 'variable_definitions': { viewColumn: 'data_json', // The full JSON data for variable definitions type: 'string', views: ['variable_definitions'] }, 'variable_created_time': { viewColumn: 'created_time', type: 'date', views: ['variable_definitions'] }, 'variable_updated_time': { viewColumn: 'updated_time', type: 'date', views: ['variable_definitions'] }, // =================================== // CHANGE HISTORY FIELDS // =================================== 'change_id': { viewColumn: 'change_id', type: 'string', views: ['change_history_flat', 'flag_state_history_view'] }, 'entity_type': { viewColumn: 'entity_type', type: 'string', views: ['change_history_flat', 'entity_usage_view'] }, 'entity_id': { viewColumn: 'entity_id', type: 'string', views: ['change_history_flat', 'code_search_patterns_view'] }, 'change_type': { viewColumn: 'change_type', type: 'string', views: ['change_history_flat', 'flag_state_history_view'] }, 'change_timestamp': { viewColumn: 'change_timestamp', type: 'date', views: ['change_history_flat', 'flag_state_history_view'] }, 'changed_by': { viewColumn: 'changed_by', type: 'string', views: ['change_history_flat'] }, 'change_summary': { viewColumn: 'change_summary', type: 'string', views: ['change_history_flat', 'flag_state_history_view'] }, 'entity_name': { viewColumn: 'entity_name', type: 'string', views: ['change_history_flat', 'code_search_patterns_view', 'entity_usage_view'] }, 'change_category': { viewColumn: 'change_category', type: 'string', views: ['change_history_flat'] }, // =================================== // PROJECT CODE SECURITY VIEW FIELDS // =================================== // Note: project_id in this view is stored as string, not number 'project_id_str': { viewColumn: 'project_id', type: 'string', views: ['project_code_security_view'] }, 'project_status': { viewColumn: 'project_status', type: 'string', views: ['project_code_security_view'] }, 'project_javascript': { viewColumn: 'project_javascript', type: 'string', views: ['project_code_security_view'] }, 'project_js_length': { viewColumn: 'project_js_length', type: 'number', views: ['project_code_security_view'] }, 'project_js_has_script_tag': { viewColumn: 'project_js_has_script_tag', type: 'number', views: ['project_code_security_view'] }, 'project_js_has_eval': { viewColumn: 'project_js_has_eval', type: 'number', views: ['project_code_security_view'] }, 'project_js_has_document_write': { viewColumn: 'project_js_has_document_write', type: 'number', views: ['project_code_security_view'] }, 'experiments_with_security_flags': { viewColumn: 'experiments_with_security_flags', type: 'number', views: ['project_code_security_view'] }, 'total_script_tags': { viewColumn: 'total_script_tags', type: 'number', views: ['project_code_security_view'] }, 'total_eval_usage': { viewColumn: 'total_eval_usage', type: 'number', views: ['project_code_security_view'] }, 'snippets_with_external_urls': { viewColumn: 'snippets_with_external_urls', type: 'number', views: ['project_code_security_view'] }, 'experiments_with_javascript': { viewColumn: 'experiments_with_javascript', type: 'number', views: ['project_code_security_view'] }, 'total_javascript_snippets': { viewColumn: 'total_javascript_snippets', type: 'number', views: ['experiment_code_analysis_view', 'project_code_security_view'] }, 'total_html_snippets': { viewColumn: 'total_html_snippets', type: 'number', views: ['project_code_security_view'] }, 'largest_code_snippet_size': { viewColumn: 'largest_code_snippet_size', type: 'number', views: ['project_code_security_view'] }, 'project_created': { viewColumn: 'project_created', type: 'date', views: ['project_code_security_view'] }, 'project_updated': { viewColumn: 'project_updated', type: 'date', views: ['project_code_security_view'] }, // =================================== // CODE SEARCH PATTERNS VIEW FIELDS // =================================== 'source_type': { viewColumn: 'source_type', type: 'string', views: ['code_search_patterns_view'] }, 'code_location': { viewColumn: 'code_location', type: 'string', views: ['code_search_patterns_view', 'experiment_code_snippets_flat'] }, 'code_type': { viewColumn: 'code_type', type: 'string', views: ['code_search_patterns_view', 'experiment_code_snippets_flat', 'project_code_security_view'] }, 'code_preview': { viewColumn: 'code_preview', type: 'string', views: ['code_search_patterns_view'] }, 'code_length': { viewColumn: 'code_length', type: 'number', views: ['code_search_patterns_view', 'experiment_code_snippets_flat'] }, 'has_script_tag': { viewColumn: 'has_script_tag', type: 'number', views: ['code_search_patterns_view'] }, 'has_closing_script_tag': { viewColumn: 'has_closing_script_tag', type: 'number', views: ['code_search_patterns_view'] }, 'has_javascript_protocol': { viewColumn: 'has_javascript_protocol', type: 'number', views: ['code_search_patterns_view'] }, 'has_vbscript_protocol': { viewColumn: 'has_vbscript_protocol', type: 'number', views: ['code_search_patterns_view'] }, 'has_inline_event_handler': { viewColumn: 'has_inline_event_handler', type: 'number', views: ['code_search_patterns_view'] }, 'uses_eval': { viewColumn: 'uses_eval', type: 'number', views: ['code_search_patterns_view'] }, 'uses_function_constructor': { viewColumn: 'uses_function_constructor', type: 'number', views: ['code_search_patterns_view'] }, 'uses_settimeout': { viewColumn: 'uses_settimeout', type: 'number', views: ['code_search_patterns_view'] }, 'uses_setinterval': { viewColumn: 'uses_setinterval', type: 'number', views: ['code_search_patterns_view'] }, 'uses_document_write': { viewColumn: 'uses_document_write', type: 'number', views: ['code_search_patterns_view'] }, 'uses_innerhtml': { viewColumn: 'uses_innerhtml', type: 'number', views: ['code_search_patterns_view'] }, 'uses_outerhtml': { viewColumn: 'uses_outerhtml', type: 'number', views: ['code_search_patterns_view'] }, 'has_http_url': { viewColumn: 'has_http_url', type: 'number', views: ['code_search_patterns_view'] }, 'has_https_url': { viewColumn: 'has_https_url', type: 'number', views: ['code_search_patterns_view'] }, 'has_protocol_relative_url': { viewColumn: 'has_protocol_relative_url', type: 'number', views: ['code_search_patterns_view'] }, 'references_external_files': { viewColumn: 'references_external_files', type: 'number', views: ['code_search_patterns_view', 'experiment_code_snippets_flat'] }, 'uses_fetch': { viewColumn: 'uses_fetch', type: 'number', views: ['code_search_patterns_view'] }, 'uses_xmlhttprequest': { viewColumn: 'uses_xmlhttprequest', type: 'number', views: ['code_search_patterns_view'] }, 'uses_jquery_ajax': { viewColumn: 'uses_jquery_ajax', type: 'number', views: ['code_search_patterns_view'] }, 'uses_sendbeacon': { viewColumn: 'uses_sendbeacon', type: 'number', views: ['code_search_patterns_view'] }, 'accesses_cookies': { viewColumn: 'accesses_cookies', type: 'number', views: ['code_search_patterns_view'] }, 'uses_localstorage': { viewColumn: 'uses_localstorage', type: 'number', views: ['code_search_patterns_view'] }, 'uses_sessionstorage': { viewColumn: 'uses_sessionstorage', type: 'number', views: ['code_search_patterns_view'] }, 'creates_elements': { viewColumn: 'creates_elements', type: 'number', views: ['code_search_patterns_view'] }, 'appends_children': { viewColumn: 'appends_children', type: 'number', views: ['code_search_patterns_view'] }, 'uses_insertadjacenthtml': { viewColumn: 'uses_insertadjacenthtml', type: 'number', views: ['code_search_patterns_view'] }, 'has_iframe': { viewColumn: 'has_iframe', type: 'number', views: ['code_search_patterns_view'] }, 'accesses_parent_frame': { viewColumn: 'accesses_parent_frame', type: 'number', views: ['code_search_patterns_view'] }, 'has_base64_content': { viewColumn: 'has_base64_content', type: 'number', views: ['code_search_patterns_view'] }, 'security_concern_score': { viewColumn: 'security_concern_score', type: 'number', views: ['code_search_patterns_view'] }, // =================================== // EXPERIMENT CODE ANALYSIS VIEW FIELDS // =================================== 'has_shared_code': { viewColumn: 'has_shared_code', type: 'number', views: ['experiment_code_analysis_view'] }, 'shared_javascript_code': { viewColumn: 'shared_javascript_code', type: 'string', views: ['experiment_code_analysis_view'] }, 'shared_css_code': { viewColumn: 'shared_css_code', type: 'string', views: ['experiment_code_analysis_view'] }, 'shared_code_count': { viewColumn: 'shared_code_count', type: 'number', views: ['experiment_code_analysis_view'] }, 'variations_json': { viewColumn: 'variations_json', type: 'string', views: ['experiment_code_analysis_view'] }, 'has_variation_javascript': { viewColumn: 'has_variation_javascript', type: 'number', views: ['experiment_code_analysis_view'] }, 'variations_with_javascript_count': { viewColumn: 'variations_with_javascript_count', type: 'number', views: ['experiment_code_analysis_view'] }, 'uses_extensions': { viewColumn: 'uses_extensions', type: 'number', views: ['experiment_code_analysis_view', 'experiments_unified_view'] }, // =================================== // EXPERIMENT CODE SNIPPETS FLAT FIELDS // =================================== 'action_id': { viewColumn: 'action_id', type: 'string', views: ['experiment_code_snippets_flat'] }, 'code_content': { viewColumn: 'code_content', type: 'string', views: ['experiment_code_snippets_flat'] }, 'contains_script_tag': { viewColumn: 'contains_script_tag', type: 'number', views: ['experiment_code_snippets_flat', 'code_search_patterns_view'] }, 'contains_eval': { viewColumn: 'contains_eval', type: 'number', views: ['experiment_code_snippets_flat', 'code_search_patterns_view'] }, 'contains_document_write': { viewColumn: 'contains_document_write', type: 'number', views: ['experiment_code_snippets_flat', 'code_search_patterns_view'] }, 'contains_innerhtml': { viewColumn: 'contains_innerhtml', type: 'number', views: ['experiment_code_snippets_flat', 'code_search_patterns_view'] }, 'contains_javascript_protocol': { viewColumn: 'contains_javascript_protocol', type: 'number', views: ['experiment_code_snippets_flat'] }, 'contains_event_handlers': { viewColumn: 'contains_event_handlers', type: 'number', views: ['experiment_code_snippets_flat'] }, 'contains_external_urls': { viewColumn: 'contains_external_urls', type: 'number', views: ['experiment_code_snippets_flat', 'code_search_patterns_view'] }, 'is_async': { viewColumn: 'is_async', type: 'number', views: ['experiment_code_snippets_flat'] }, 'css_selector': { viewColumn: 'css_selector', type: 'string', views: ['experiment_code_snippets_flat'] }, 'experiment_created': { viewColumn: 'experiment_created', type: 'date', views: ['experiment_code_snippets_flat'] }, 'experiment_updated': { viewColumn: 'experiment_updated', type: 'date', views: ['experiment_code_snippets_flat'] }, // =================================== // FLAG VARIATION VARIABLES FIELDS // =================================== 'rule_id': { viewColumn: 'rule_id', type: 'string', views: ['flag_variation_variables'] }, 'rule_key': { viewColumn: 'rule_key', type: 'string', views: ['flag_variation_variables'] }, 'rule_type': { viewColumn: 'rule_type', type: 'string', views: ['flag_variation_variables'] }, 'rule_name': { viewColumn: 'rule_name', type: 'string', views: ['flag_variation_variables'] }, 'variation_percentage': { viewColumn: 'variation_percentage', type: 'number', views: ['flag_variation_variables'] }, 'variable_key': { viewColumn: 'variable_key', type: 'string', views: ['flag_variation_variables', 'flag_variables_summary'] }, 'variable_type': { viewColumn: 'variable_type', type: 'string', views: ['flag_variation_variables', 'flag_variables_summary'] }, 'default_value': { viewColumn: 'default_value', type: 'string', views: ['flag_variation_variables', 'flag_variables_summary'] }, 'variable_description': { viewColumn: 'variable_description', type: 'string', views: ['flag_variation_variables', 'flag_variables_summary'] }, 'variable_value': { viewColumn: 'variable_value', type: 'string', views: ['flag_variation_variables'] }, 'value_source': { viewColumn: 'value_source', type: 'string', views: ['flag_variation_variables'] }, 'rule_enabled': { viewColumn: 'rule_enabled', type: 'number', views: ['flag_variation_variables'] }, 'effective_status': { viewColumn: 'effective_status', type: 'string', views: ['flag_variation_variables'] }, 'rule_created_time': { viewColumn: 'rule_created_time', type: 'date', views: ['flag_variation_variables'] }, 'rule_updated_time': { viewColumn: 'rule_updated_time', type: 'date', views: ['flag_variation_variables'] }, 'variation_json': { viewColumn: 'variation_json', type: 'string', views: ['flag_variation_variables'] }, 'variable_definition_json': { viewColumn: 'variable_definition_json', type: 'string', views: ['flag_variation_variables'] }, // =================================== // EXPERIMENTS UNIFIED VIEW FIELDS // =================================== 'traffic_percentage': { viewColumn: 'traffic_percentage', type: 'number', views: ['experiments_unified_view'] }, 'variation_count': { viewColumn: 'variation_count', type: 'number', views: ['experiments_unified_view', 'flags_unified_view'] }, 'metric_count': { viewColumn: 'metric_count', type: 'number', views: ['experiments_unified_view'] }, 'audience_count': { viewColumn: 'audience_count', type: 'number', views: ['experiments_unified_view'] }, 'url_condition_count': { viewColumn: 'url_condition_count', type: 'number', views: ['experiments_unified_view'] }, 'status_category': { viewColumn: 'status_category', type: 'string', views: ['experiments_unified_view'] }, 'days_running': { viewColumn: 'days_running', type: 'number', views: ['experiments_unified_view'] }, 'days_since_update': { viewColumn: 'days_since_update', type: 'number', views: ['experiments_unified_view'] }, 'page_targeting_type': { viewColumn: 'page_targeting_type', type: 'string', views: ['experiments_unified_view'] }, // =================================== // FLAG STATE HISTORY VIEW FIELDS // =================================== 'old_value': { viewColumn: 'old_value', type: 'string', views: ['flag_state_history_view', 'change_history_flat'] }, 'new_value': { viewColumn: 'new_value', type: 'string', views: ['flag_state_history_view', 'change_history_flat'] }, 'hours_since_change': { viewColumn: 'hours_since_change', type: 'number', views: ['flag_state_history_view'] }, // =================================== // ENTITY USAGE VIEW FIELDS // =================================== 'entity_key': { viewColumn: 'entity_key', type: 'string', views: ['entity_usage_view', 'change_history_flat'] }, 'usage_count': { viewColumn: 'usage_count', type: 'number', views: ['entity_usage_view'] }, 'used_by_experiments': { viewColumn: 'used_by_experiments', type: 'string', views: ['entity_usage_view'] }, 'used_by_flags': { viewColumn: 'used_by_flags', type: 'string', views: ['entity_usage_view'] }, 'is_arch