|
| 1 | +# AUTO-GENERATED FROM backend apiDoc/serving — DO NOT EDIT. Regenerate via the serving workflow. |
| 2 | + |
| 3 | +# TypedDict stubs for the Convert serving config response. |
| 4 | +# Generated from dist/types.gen.ts (already discriminator-corrected by fix-discriminants.js). |
| 5 | +# Entity field sets are REFLECTED from the TypeScript AST (qs-03 D1 / F14) — never |
| 6 | +# hand-listed. A backend field rename/removal changes the reflected TypedDict, which |
| 7 | +# the python-sdk contract probe catches via mypy/pyright on the probe that subscripts |
| 8 | +# the renamed/removed key. Discriminator unions (goal_type, ga_integration_type, |
| 9 | +# feature_variable_type) are sourced from the corrected TS and preserved per-variant |
| 10 | +# (ConfigGoal admits all 10 type values — AC4). |
| 11 | +# |
| 12 | +# All TypedDict classes use total=False so every field is Optional — real config |
| 13 | +# carrying extra/undeclared fields never false-positives (AC2). The probe binds |
| 14 | +# SYNTHETIC values and accesses only the spec-declared fields the SDK depends on. |
| 15 | +# TypedDict literal-key subscription (config["field"]) is the drift signal. |
| 16 | + |
| 17 | +from __future__ import annotations |
| 18 | + |
| 19 | +from typing import Any, List, Literal, Optional, TypedDict |
| 20 | + |
| 21 | + |
| 22 | +class ConfigResponseData(TypedDict, total=False): |
| 23 | + account_id: Optional[str] |
| 24 | + project: Optional[ConfigProject] |
| 25 | + goals: Optional[List[ConfigGoal]] |
| 26 | + locations: Optional[List[ConfigLocation]] |
| 27 | + audiences: Optional[List[ConfigAudience]] |
| 28 | + segments: Optional[List[ConfigSegment]] |
| 29 | + experiences: Optional[List[ConfigExperience]] |
| 30 | + archived_experiences: Optional[List[str]] |
| 31 | + features: Optional[List[ConfigFeature]] |
| 32 | + is_debug: Optional[bool] |
| 33 | + |
| 34 | +class ConfigProjectCustomDomain(TypedDict, total=False): |
| 35 | + domain: Optional[str] |
| 36 | + version: Optional[str] |
| 37 | + |
| 38 | +class ConfigProjectDomains(TypedDict, total=False): |
| 39 | + tld: Optional[str] |
| 40 | + hosts: Optional[Any] |
| 41 | + |
| 42 | +class ConfigProjectSettingsIntegrationsVisitorInsights(TypedDict, total=False): |
| 43 | + tracking_id: Optional[Any] |
| 44 | + |
| 45 | +class ConfigProjectSettingsIntegrationsKissmetrics(TypedDict, total=False): |
| 46 | + enabled: Optional[bool] |
| 47 | + |
| 48 | +class ConfigProjectSettingsIntegrations(TypedDict, total=False): |
| 49 | + google_analytics: Optional[Any] |
| 50 | + visitor_insights: Optional[ConfigProjectSettingsIntegrationsVisitorInsights] |
| 51 | + kissmetrics: Optional[ConfigProjectSettingsIntegrationsKissmetrics] |
| 52 | + |
| 53 | +class ConfigProjectSettingsOutliers(TypedDict, total=False): |
| 54 | + order_value: Optional[Any] |
| 55 | + products_ordered_count: Optional[Any] |
| 56 | + |
| 57 | +class ConfigProjectSettings(TypedDict, total=False): |
| 58 | + allow_crossdomain_tracking: Optional[bool] |
| 59 | + data_anonymization: Optional[bool] |
| 60 | + do_not_track: Optional[str] |
| 61 | + global_privacy_control: Optional[str] |
| 62 | + do_not_track_referral: Optional[bool] |
| 63 | + integrations: Optional[ConfigProjectSettingsIntegrations] |
| 64 | + min_order_value: Optional[float] |
| 65 | + max_order_value: Optional[float] |
| 66 | + outliers: Optional[ConfigProjectSettingsOutliers] |
| 67 | + placeholders: Optional[List[str]] |
| 68 | + global_javascript_placeholders: Optional[List[str]] |
| 69 | + include_jquery: Optional[bool] |
| 70 | + include_jquery_v1: Optional[bool] |
| 71 | + disable_spa_functionality: Optional[bool] |
| 72 | + version: Optional[str] |
| 73 | + tracking_script: Optional[Any] |
| 74 | + |
| 75 | +class ConfigProject(TypedDict, total=False): |
| 76 | + id: Optional[str] |
| 77 | + name: Optional[str] |
| 78 | + type: Optional[str] |
| 79 | + utc_offset: Optional[Any] |
| 80 | + custom_domain: Optional[ConfigProjectCustomDomain] |
| 81 | + domains: Optional[List[ConfigProjectDomains]] |
| 82 | + global_javascript: Optional[str] |
| 83 | + settings: Optional[ConfigProjectSettings] |
| 84 | + |
| 85 | +class ConfigExperienceSettingsOutliers(TypedDict, total=False): |
| 86 | + order_value: Optional[Any] |
| 87 | + products_ordered_count: Optional[Any] |
| 88 | + |
| 89 | +class ConfigExperienceSettingsSplitUrlSettings(TypedDict, total=False): |
| 90 | + split_regex_support: Optional[bool] |
| 91 | + |
| 92 | +class ConfigExperienceSettingsMatchingOptions(TypedDict, total=False): |
| 93 | + audiences: Optional[Any] |
| 94 | + locations: Optional[Any] |
| 95 | + |
| 96 | +class ConfigExperienceSettings(TypedDict, total=False): |
| 97 | + min_order_value: Optional[float] |
| 98 | + max_order_value: Optional[float] |
| 99 | + outliers: Optional[ConfigExperienceSettingsOutliers] |
| 100 | + placeholders: Optional[List[str]] |
| 101 | + split_url_settings: Optional[ConfigExperienceSettingsSplitUrlSettings] |
| 102 | + matching_options: Optional[ConfigExperienceSettingsMatchingOptions] |
| 103 | + |
| 104 | +class ConfigExperience(TypedDict, total=False): |
| 105 | + id: Optional[str] |
| 106 | + name: Optional[str] |
| 107 | + key: Optional[str] |
| 108 | + locations: Optional[List[str]] |
| 109 | + site_area: Optional[Any] |
| 110 | + audiences: Optional[List[str]] |
| 111 | + goals: Optional[List[str]] |
| 112 | + multipage_pages: Optional[List[Any]] |
| 113 | + status: Optional[Any] |
| 114 | + global_js: Optional[str] |
| 115 | + global_css: Optional[str] |
| 116 | + type: Optional[Any] |
| 117 | + version: Optional[float] |
| 118 | + variations: Optional[List[ExperienceVariation]] |
| 119 | + integrations: Optional[List[Any]] |
| 120 | + environments: Optional[List[str]] |
| 121 | + environment: Optional[str] |
| 122 | + settings: Optional[ConfigExperienceSettings] |
| 123 | + |
| 124 | +class ExperienceVariation(TypedDict, total=False): |
| 125 | + id: Optional[str] |
| 126 | + name: Optional[str] |
| 127 | + key: Optional[str] |
| 128 | + traffic_allocation: Optional[float] |
| 129 | + status: Optional[Any] |
| 130 | + changes: Optional[List[FeatureChangeData]] |
| 131 | + |
| 132 | +class FeatureChangeDataData(TypedDict, total=False): |
| 133 | + feature_id: Optional[float] |
| 134 | + variables_data: Optional[Any] |
| 135 | + |
| 136 | +class FeatureChangeData(TypedDict, total=False): |
| 137 | + id: Optional[float] |
| 138 | + type: Optional[str] |
| 139 | + data: Optional[FeatureChangeDataData] |
| 140 | + |
| 141 | +class ConfigGoal(TypedDict, total=False): |
| 142 | + id: Optional[str] |
| 143 | + name: Optional[str] |
| 144 | + key: Optional[str] |
| 145 | + type: Optional[Literal["dom_interaction", "scroll_percentage", "revenue", "advanced", "visits_page", "code_trigger", "ga_import", "submits_form", "clicks_link", "clicks_element"]] |
| 146 | + rules: Optional[Any] |
| 147 | + |
| 148 | +class ConfigAudience(TypedDict, total=False): |
| 149 | + id: Optional[str] |
| 150 | + key: Optional[str] |
| 151 | + name: Optional[str] |
| 152 | + type: Optional[Any] |
| 153 | + rules: Optional[Any] |
| 154 | + |
| 155 | +class ConfigLocation(TypedDict, total=False): |
| 156 | + id: Optional[str] |
| 157 | + key: Optional[str] |
| 158 | + name: Optional[str] |
| 159 | + trigger: Optional[Any] |
| 160 | + rules: Optional[Any] |
| 161 | + |
| 162 | +class ConfigSegment(TypedDict, total=False): |
| 163 | + id: Optional[str] |
| 164 | + key: Optional[str] |
| 165 | + name: Optional[str] |
| 166 | + rules: Optional[Any] |
| 167 | + |
| 168 | +class ConfigFeature(TypedDict, total=False): |
| 169 | + id: Optional[str] |
| 170 | + name: Optional[str] |
| 171 | + key: Optional[str] |
| 172 | + variables: Optional[List[FeatureVariable]] |
| 173 | + |
| 174 | +class FeatureVariable(TypedDict, total=False): |
| 175 | + key: Optional[str] |
| 176 | + type: Optional[Literal["boolean", "float", "json", "integer", "string"]] |
| 177 | + |
| 178 | +class ExperienceIntegrationGaServing(TypedDict, total=False): |
| 179 | + enabled: Optional[bool] |
| 180 | + provider: Optional[Any] |
| 181 | + type: Optional[Literal["ga3", "ga4"]] |
| 182 | + measurementId: Optional[str] |
| 183 | + |
| 184 | +class GaSettings(TypedDict, total=False): |
| 185 | + enabled: Optional[bool] |
| 186 | + auto_revenue_tracking: Optional[bool] |
| 187 | + track_first_exposure_only: Optional[bool] |
| 188 | + type: Optional[Literal["ga3", "ga4"]] |
| 189 | + measurementId: Optional[str] |
| 190 | + no_wait_pageview: Optional[bool] |
0 commit comments