@convertcom/js-sdk-rules 2.1.3 → 2.1.4

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.
@@ -15,7 +15,7 @@ export type ConfigAudience = {
15
15
  */
16
16
  name?: string;
17
17
  type?: ConfigAudienceTypes;
18
- rules?: ((RuleObject) | null);
18
+ rules?: ((RuleObjectAudience) | null);
19
19
  };
20
20
  /**
21
21
  * Type of the Audience. Can be one of the following: `permanent`, `transient`. For full-stack projects, `transient` is the only valid option, the rest will be ignored.
@@ -36,61 +36,61 @@ export declare const ConfigAudienceTypes: {
36
36
  };
37
37
  export type PageNumber = {
38
38
  /**
39
- * Describes the page number of the fetched results. "results_per_page" results are gonna be returned for each page
40
- *
41
- * Defaults to 1 when not sent
39
+ * The page number for paginated results. For example, if `results_per_page` is 30, `page: 2` will retrieve items 31-60.
40
+ * Defaults to 1 if not specified.
42
41
  *
43
42
  */
44
43
  page?: number;
45
44
  };
46
45
  export type Pagination = {
47
46
  /**
48
- * Current page number
47
+ * The current page number being displayed from the paginated set.
49
48
  */
50
49
  current_page?: number;
51
50
  /**
52
- * Total number of records
51
+ * The total number of items available across all pages for the current filter criteria.
53
52
  */
54
53
  items_count?: number;
55
54
  /**
56
- * Number of records per page
55
+ * The number of items included in the current page of results (matches `results_per_page` from the request).
57
56
  */
58
57
  items_per_page?: number;
59
58
  /**
60
- * Limitation number of records per page
59
+ * The total number of pages available for the current filter criteria and `results_per_page` setting.
61
60
  */
62
61
  pages_count?: number;
63
62
  };
64
63
  export type ResultsPerPage = {
65
64
  /**
66
- * A value that would be used for setting the number of records that
67
- * would be returned per page.
68
- *
69
- * Defaults to 30 when not sent
65
+ * Specifies the maximum number of items to return in a single page of results.
66
+ * Used for pagination. Default is 30, maximum is 50.
70
67
  *
71
68
  */
72
69
  results_per_page?: (number) | null;
73
70
  };
74
71
  export type SortDirection = {
75
72
  /**
76
- * Data sorting direction using "sort_by" field. "asc" for ascending direction, "desc" for descending direction
77
- *
78
- * Defaults to **desc** when not sent in a request
73
+ * The direction for sorting the list results, based on the `sort_by` field.
74
+ * - `asc`: Ascending order (e.g., A-Z, 1-10, oldest to newest).
75
+ * - `desc`: Descending order (e.g., Z-A, 10-1, newest to oldest).
76
+ * Defaults to `desc` (newest/highest first) if not specified.
79
77
  *
80
78
  */
81
79
  sort_direction?: ('asc' | 'desc') | null;
82
80
  };
83
81
  /**
84
- * Data sorting direction using "sort_by" field. "asc" for ascending direction, "desc" for descending direction
85
- *
86
- * Defaults to **desc** when not sent in a request
82
+ * The direction for sorting the list results, based on the `sort_by` field.
83
+ * - `asc`: Ascending order (e.g., A-Z, 1-10, oldest to newest).
84
+ * - `desc`: Descending order (e.g., Z-A, 10-1, newest to oldest).
85
+ * Defaults to `desc` (newest/highest first) if not specified.
87
86
  *
88
87
  */
89
88
  export type sort_direction = 'asc' | 'desc';
90
89
  /**
91
- * Data sorting direction using "sort_by" field. "asc" for ascending direction, "desc" for descending direction
92
- *
93
- * Defaults to **desc** when not sent in a request
90
+ * The direction for sorting the list results, based on the `sort_by` field.
91
+ * - `asc`: Ascending order (e.g., A-Z, 1-10, oldest to newest).
92
+ * - `desc`: Descending order (e.g., Z-A, 10-1, newest to oldest).
93
+ * Defaults to `desc` (newest/highest first) if not specified.
94
94
  *
95
95
  */
96
96
  export declare const sort_direction: {
@@ -99,7 +99,8 @@ export declare const sort_direction: {
99
99
  };
100
100
  export type OnlyCount = {
101
101
  /**
102
- * When provided in requests that allow it, the response would only contain count of records and no real records' data
102
+ * If set to `true` in a list request, the response will only contain the total count of matching items (`extra.pagination.items_count`)
103
+ * and will not include the actual item data. Useful for quickly getting totals without fetching full datasets.
103
104
  *
104
105
  */
105
106
  onlyCount?: boolean;
@@ -109,7 +110,9 @@ export type Extra = {
109
110
  };
110
111
  export type BaseRule = {
111
112
  /**
112
- * It defines the type of the rule
113
+ * The specific attribute or condition to evaluate. Examples: 'url', 'cookie', 'browser_name', 'js_condition', 'page_tag_product_price'.
114
+ * The allowed `rule_type` values depend on whether the rule is for an Audience (which can use visitor and page content attributes if it's a 'segmentation' type) or a Location (typically URL or page tag based).
115
+ *
113
116
  */
114
117
  rule_type: string;
115
118
  };
@@ -122,6 +125,7 @@ export type BaseRuleWithStringValue = BaseRule & {
122
125
  export type BaseRuleWithJsCodeValue = BaseRule & {
123
126
  /**
124
127
  * The JS code that would be executed when rule is checked. The return value of this JS code is what is gonna be matched
128
+ *
125
129
  * against **true**(or **false** if **matching.negated = true** is provided)
126
130
  *
127
131
  */
@@ -251,6 +255,7 @@ export declare const value3: {
251
255
  export type BaseRuleWithWeatherConditionValue = BaseRule & {
252
256
  /**
253
257
  * Weather Condition name used for matching. Full or partial condition.
258
+ *
254
259
  * The weather provider used by Convert detects the following conditions:
255
260
  * - Blizzard
256
261
  * - Blowing snow
@@ -269,24 +274,16 @@ export type BaseRuleWithWeatherConditionValue = BaseRule & {
269
274
  * - Moderate rain at times
270
275
  * - Overcast
271
276
  * - Partly cloudy
272
- * - Patchy freezing drizzle possible
273
- * - Patchy light drizzle
274
- * - Patchy light rain
275
- * - Patchy rain possible
276
- * - Patchy sleet possible
277
- * - Patchy snow possible
278
- * - Sunny
279
- * - Thundery outbreaks possible
280
277
  *
281
278
  */
282
279
  value?: string;
283
280
  };
284
281
  /**
285
- * Weather Conditions
282
+ * Standardized weather condition strings used for targeting.
286
283
  */
287
284
  export type WeatherConditions = 'Blizzard' | 'Blowing snow' | 'Cloudy' | 'Fog' | 'Freezing drizzle' | 'Freezing fog' | 'Heavy freezing drizzle' | 'Heavy rain' | 'Heavy rain at times' | 'Light drizzle' | 'Light freezing rain' | 'Light rain' | 'Mist' | 'Moderate rain' | 'Moderate rain at times' | 'Overcast' | 'Partly cloudy' | 'Patchy freezing drizzle possible' | 'Patchy light drizzle' | 'Patchy light rain' | 'Patchy rain possible' | 'Patchy sleet possible' | 'Patchy snow possible' | 'Sunny' | 'Thundery outbreaks possible';
288
285
  /**
289
- * Weather Conditions
286
+ * Standardized weather condition strings used for targeting.
290
287
  */
291
288
  export declare const WeatherConditions: {
292
289
  readonly BLIZZARD: "Blizzard";
@@ -317,13 +314,13 @@ export declare const WeatherConditions: {
317
314
  };
318
315
  export type BaseMatch = {
319
316
  /**
320
- * When true, the rule result is gonna be negated.
321
- * example: `url contains "test"` with *negated* = true becomes `url does not contain "test"`
317
+ * If `true`, the logical result of the match is inverted.
318
+ * For example, if `match_type` is 'contains' and `value` is 'apple', `negated: true` means the rule matches if the attribute *does not* contain 'apple'.
322
319
  *
323
320
  */
324
321
  negated?: boolean;
325
322
  };
326
- export type TextMatchRulesTypes = 'url' | 'url_with_query' | 'query_string' | 'campaign' | 'keyword' | 'medium' | 'source_name' | 'city' | 'region' | 'browser_version' | 'user_agent' | 'page_tag_page_type' | 'page_tag_category_id' | 'page_tag_category_name' | 'page_tag_product_sku' | 'page_tag_product_name' | 'page_tag_customer_id' | 'page_tag_custom_1' | 'page_tag_custom_2' | 'page_tag_custom_3' | 'page_tag_custom_4';
323
+ export type TextMatchRulesTypes = 'url' | 'url_with_query' | 'query_string' | 'campaign' | 'keyword' | 'medium' | 'source_name' | 'city' | 'region' | 'browser_version' | 'user_agent' | 'page_tag_page_type' | 'page_tag_category_id' | 'page_tag_category_name' | 'page_tag_product_sku' | 'page_tag_product_name' | 'page_tag_customer_id' | 'page_tag_custom_1' | 'page_tag_custom_2' | 'page_tag_custom_3' | 'page_tag_custom_4' | 'visitor_id';
327
324
  export declare const TextMatchRulesTypes: {
328
325
  readonly URL: "url";
329
326
  readonly URL_WITH_QUERY: "url_with_query";
@@ -346,6 +343,7 @@ export declare const TextMatchRulesTypes: {
346
343
  readonly PAGE_TAG_CUSTOM_2: "page_tag_custom_2";
347
344
  readonly PAGE_TAG_CUSTOM_3: "page_tag_custom_3";
348
345
  readonly PAGE_TAG_CUSTOM_4: "page_tag_custom_4";
346
+ readonly VISITOR_ID: "visitor_id";
349
347
  };
350
348
  export type NumericMatchRulesTypes = 'avg_time_page' | 'days_since_last_visit' | 'pages_visited_count' | 'visit_duration' | 'visits_count' | 'page_tag_product_price';
351
349
  export declare const NumericMatchRulesTypes: {
@@ -375,6 +373,10 @@ export type GenericBoolKeyValueMatchRulesTypes = 'generic_bool_key_value';
375
373
  export declare const GenericBoolKeyValueMatchRulesTypes: {
376
374
  readonly GENERIC_BOOL_KEY_VALUE: "generic_bool_key_value";
377
375
  };
376
+ export type VisitorDataExistsMatchRulesTypes = 'visitor_data_exists';
377
+ export declare const VisitorDataExistsMatchRulesTypes: {
378
+ readonly VISITOR_DATA_EXISTS: "visitor_data_exists";
379
+ };
378
380
  export type JsConditionMatchRulesTypes = 'js_condition';
379
381
  export declare const JsConditionMatchRulesTypes: {
380
382
  readonly JS_CONDITION: "js_condition";
@@ -431,7 +433,7 @@ export type WeatherConditionMatchRulesTypes = 'weather_condition';
431
433
  export declare const WeatherConditionMatchRulesTypes: {
432
434
  readonly WEATHER_CONDITION: "weather_condition";
433
435
  };
434
- export type RulesTypes = TextMatchRulesTypes & NumericMatchRulesTypes & BoolMatchRulesTypes & KeyValueMatchRulesTypes & CookieMatchRulesTypes & CountryMatchRulesTypes & VisitorTypeMatchRulesTypes & LanguageMatchRulesTypes & GoalTriggeredMatchRulesTypes & SegmentBucketedMatchRulesTypes & DayOfWeekMatchRulesTypes & HourOfDayMatchRulesTypes & MinuteOfHourMatchRulesTypes & BrowserNameMatchRulesTypes & OsMatchRulesTypes & WeatherConditionMatchRulesTypes;
436
+ export type RulesTypes = TextMatchRulesTypes & NumericMatchRulesTypes & BoolMatchRulesTypes & KeyValueMatchRulesTypes & VisitorDataExistsMatchRulesTypes & CookieMatchRulesTypes & CountryMatchRulesTypes & VisitorTypeMatchRulesTypes & LanguageMatchRulesTypes & GoalTriggeredMatchRulesTypes & SegmentBucketedMatchRulesTypes & DayOfWeekMatchRulesTypes & HourOfDayMatchRulesTypes & MinuteOfHourMatchRulesTypes & BrowserNameMatchRulesTypes & OsMatchRulesTypes & WeatherConditionMatchRulesTypes;
435
437
  export type GenericTextMatchRule = BaseRuleWithStringValue & {
436
438
  rule_type: TextMatchRulesTypes;
437
439
  matching?: (BaseMatch & {
@@ -458,7 +460,7 @@ export type GenericSetMatchRule = BaseRuleWithStringValue & {
458
460
  };
459
461
  export type GenericKey = {
460
462
  /**
461
- * The key used to identify the data that would be matched against rule **value**
463
+ * The name of the key whose value will be retrieved and compared against the rule's `value`.
462
464
  */
463
465
  key?: string;
464
466
  };
@@ -480,6 +482,12 @@ export type GenericBoolKeyValueMatchRule = BaseRuleWithBooleanValue & {
480
482
  match_type?: ChoiceMatchingOptions;
481
483
  });
482
484
  } & GenericKey;
485
+ export type VisitorDataExistsMatchRule = BaseRuleWithBooleanValue & {
486
+ rule_type: VisitorDataExistsMatchRulesTypes;
487
+ matching?: (BaseMatch & {
488
+ match_type?: ChoiceMatchingOptions;
489
+ });
490
+ };
483
491
  export type CookieMatchRule = BaseRuleWithStringValue & {
484
492
  rule_type: CookieMatchRulesTypes;
485
493
  matching?: (BaseMatch & {
@@ -568,8 +576,9 @@ export type WeatherConditionMatchRule = BaseRuleWithWeatherConditionValue & {
568
576
  match_type?: TextMatchingOptions;
569
577
  });
570
578
  };
571
- export type RuleElementNoUrl = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | CookieMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule;
579
+ export type RuleElementNoUrl = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | CookieMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule | VisitorDataExistsMatchRule;
572
580
  export type RuleElement = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CookieMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule;
581
+ export type RuleElementAudience = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CookieMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule | VisitorDataExistsMatchRule;
573
582
  export type TextMatchingOptions = 'matches' | 'regexMatches' | 'contains' | 'endsWith' | 'startsWith';
574
583
  export declare const TextMatchingOptions: {
575
584
  readonly MATCHES: "matches";
@@ -597,28 +606,54 @@ export declare const SetMatchingOptions: {
597
606
  readonly IS_IN: "isIn";
598
607
  };
599
608
  /**
600
- * This one describes a logical rule that is being used inside the app for triggering goals, matching audiences etc
609
+ * Defines the logical structure for combining multiple rule conditions. It uses a nested OR -> AND -> OR_WHEN structure.
610
+ * - The top-level `OR` array means if *any* of its contained AND blocks evaluate to true, the entire rule set is true.
611
+ * - Each object within the `OR` array has an `AND` array. For this AND block to be true, *all* of its contained OR_WHEN blocks must evaluate to true.
612
+ * - Each object within the `AND` array has an `OR_WHEN` array. For this OR_WHEN block to be true, *any* of its individual `RuleElement` conditions must evaluate to true.
613
+ * This structure allows for complex logical expressions like `(CondA AND CondB) OR (CondC AND CondD)`.
614
+ *
601
615
  */
602
616
  export type RuleObject = {
603
617
  /**
604
- * This describes an outer set of blocks which are evaluated using OR's between them
618
+ * An array of AND-blocks. The overall rule matches if any of these AND-blocks match.
605
619
  */
606
620
  OR?: Array<{
607
621
  /**
608
- * This describes a colections of logical blocks which are evaluated using AND's between them
622
+ * An array of OR_WHEN-blocks. This AND-block matches if all its OR_WHEN-blocks match.
609
623
  */
610
624
  AND?: Array<{
611
625
  /**
612
- * This describes a colections of logical blocks which are evaluated using OR's between them
626
+ * An array of individual rule elements. This OR_WHEN-block matches if any of its rule elements match.
613
627
  */
614
628
  OR_WHEN?: Array<RuleElement>;
615
629
  }>;
616
630
  }>;
617
631
  } | null;
618
632
  /**
619
- * This one describes a logical rule that is being used inside the app for triggering goals, matching audiences etc
633
+ * Similar to `RuleObject`, but the individual `RuleElementNoUrl` conditions within `OR_WHEN` arrays cannot include URL-based matching types.
634
+ * Used for 'permanent' or 'transient' audiences where URL context is not persistently evaluated or relevant for the audience type.
635
+ *
620
636
  */
621
637
  export type RuleObjectNoUrl = {
638
+ /**
639
+ * An array of AND-blocks.
640
+ */
641
+ OR?: Array<{
642
+ /**
643
+ * An array of OR_WHEN-blocks.
644
+ */
645
+ AND?: Array<{
646
+ /**
647
+ * An array of individual rule elements that do not involve URL matching.
648
+ */
649
+ OR_WHEN?: Array<RuleElementNoUrl>;
650
+ }>;
651
+ }>;
652
+ } | null;
653
+ /**
654
+ * This one describes a logical rule that is being used inside the app for triggering goals, matching audiences etc
655
+ */
656
+ export type RuleObjectAudience = {
622
657
  /**
623
658
  * This describes an outer set of blocks which are evaluated using OR's between them
624
659
  */
@@ -630,13 +665,13 @@ export type RuleObjectNoUrl = {
630
665
  /**
631
666
  * This describes a colections of logical blocks which are evaluated using OR's between them
632
667
  */
633
- OR_WHEN?: Array<RuleElementNoUrl>;
668
+ OR_WHEN?: Array<RuleElementAudience>;
634
669
  }>;
635
670
  }>;
636
671
  } | null;
637
672
  export type Base64Image = {
638
673
  /**
639
- * Image's content, base64 encoded
674
+ * The base64 encoded string representation of the image's binary data.
640
675
  */
641
676
  data?: string;
642
677
  };
@@ -685,11 +720,11 @@ export type BulkSuccessData = SuccessData & {
685
720
  };
686
721
  export type BulkEntityError = {
687
722
  /**
688
- * ID of entity which has not been processed
723
+ * The unique identifier of the entity that could not be processed.
689
724
  */
690
725
  id?: number;
691
726
  /**
692
- * A reason explaining why entity has not been processed
727
+ * A message explaining the reason for the failure for this specific entity.
693
728
  */
694
729
  message?: string;
695
730
  };
@@ -699,14 +734,14 @@ export type BulkEntityError = {
699
734
  export type UTC_Offset = number;
700
735
  export type GA_SettingsBase = {
701
736
  /**
702
- * Flag indicating whether Google Analytics integration is enabled or not.
737
+ * If true, integration with Google Analytics is enabled for this project or experience, allowing experiment data to be sent to GA.
703
738
  */
704
739
  enabled?: boolean;
705
740
  };
706
741
  export type IntegrationGA3 = {
707
742
  type?: 'ga3';
708
743
  /**
709
- * Universal Analytics property to be used for tracking
744
+ * The Universal Analytics Property ID (e.g., "UA-XXXXXXXX-Y") to which Convert experiment data will be sent.
710
745
  */
711
746
  property_UA?: (string) | null;
712
747
  };
@@ -717,7 +752,7 @@ export declare const type: {
717
752
  export type IntegrationGA4Base = {
718
753
  type?: 'ga4';
719
754
  /**
720
- * ID of the ga4 property where data will be sent. Used internally for API calls to GoogleAnalytics
755
+ * The GA4 Measurement ID (e.g., "G-XXXXXXXXXX") for the data stream where Convert experiment data will be sent.
721
756
  */
722
757
  measurementId?: string;
723
758
  };
@@ -732,14 +767,18 @@ export type IntegrationGA4 = IntegrationGA4Base & {
732
767
  propertyId?: string;
733
768
  };
734
769
  /**
735
- * The way the list is processed. `any` means at least one element in the list is matched.
736
- * `all` means all elements in the list are matched. Default is any.
770
+ * Defines how multiple conditions within a list (e.g., multiple audiences or locations linked to an experience) are logically combined:
771
+ * - `any`: The overall condition is met if *at least one* item in the list matches (logical OR).
772
+ * - `all`: The overall condition is met only if *all* items in the list match (logical AND).
773
+ * Default is typically 'any' (OR).
737
774
  *
738
775
  */
739
776
  export type GenericListMatchingOptions = 'any' | 'all';
740
777
  /**
741
- * The way the list is processed. `any` means at least one element in the list is matched.
742
- * `all` means all elements in the list are matched. Default is any.
778
+ * Defines how multiple conditions within a list (e.g., multiple audiences or locations linked to an experience) are logically combined:
779
+ * - `any`: The overall condition is met if *at least one* item in the list matches (logical OR).
780
+ * - `all`: The overall condition is met only if *all* items in the list match (logical AND).
781
+ * Default is typically 'any' (OR).
743
782
  *
744
783
  */
745
784
  export declare const GenericListMatchingOptions: {
@@ -748,16 +787,30 @@ export declare const GenericListMatchingOptions: {
748
787
  };
749
788
  export type VisitorInsightsBase = {
750
789
  /**
751
- * Flag indicating whether Visitor Insights is enabled or not.
790
+ * If true, Convert Signals™ is enabled for the project, allowing the system to capture sessions exhibiting user frustration or usability issues.
791
+ *
752
792
  */
753
793
  enabled?: boolean;
794
+ /**
795
+ * True when all text elements (apart from placeholders) should be obfuscated inside a recording.
796
+ *
797
+ */
798
+ obfuscate_text?: boolean;
754
799
  };
755
800
  /**
756
- * Type of the outlier detection mechanism
801
+ * The method used for detecting and handling order outliers in revenue or product count tracking:
802
+ * - `none`: No outlier detection is applied.
803
+ * - `min_max`: Orders with values below a specified minimum or above a specified maximum are capped at those boundaries.
804
+ * - `percentile`: Orders falling below a lower percentile or above an upper percentile are capped at the values corresponding to those percentiles.
805
+ *
757
806
  */
758
807
  export type NumericOutlierTypes = 'none' | 'min_max' | 'percentile';
759
808
  /**
760
- * Type of the outlier detection mechanism
809
+ * The method used for detecting and handling order outliers in revenue or product count tracking:
810
+ * - `none`: No outlier detection is applied.
811
+ * - `min_max`: Orders with values below a specified minimum or above a specified maximum are capped at those boundaries.
812
+ * - `percentile`: Orders falling below a lower percentile or above an upper percentile are capped at the values corresponding to those percentiles.
813
+ *
761
814
  */
762
815
  export declare const NumericOutlierTypes: {
763
816
  readonly NONE: "none";
@@ -800,11 +853,15 @@ export declare const detection_type3: {
800
853
  };
801
854
  export type NumericOutlier = NumericOutlierNone | NumericOutlierMinMax | NumericOutlierPercentile;
802
855
  /**
803
- * List of supported percentiles
856
+ * Standard percentile values used for outlier detection thresholds.
857
+ * For example, a `min` of 5 and `max` of 95 means orders in the bottom 5% and top 5% of values are considered outliers and capped.
858
+ *
804
859
  */
805
860
  export type Percentiles = 1 | 5 | 10 | 25 | 50 | 75 | 90 | 95 | 99;
806
861
  /**
807
- * List of supported percentiles
862
+ * Standard percentile values used for outlier detection thresholds.
863
+ * For example, a `min` of 5 and `max` of 95 means orders in the bottom 5% and top 5% of values are considered outliers and capped.
864
+ *
808
865
  */
809
866
  export declare const Percentiles: {
810
867
  readonly _1: 1;
@@ -819,15 +876,36 @@ export declare const Percentiles: {
819
876
  };
820
877
  export type TimeRange = {
821
878
  /**
822
- * Unix timestamp when reporting period should start, provided in the given **utc_time_offset**
879
+ * Unix timestamp (seconds since epoch, UTC) marking the beginning of the time range. If null, implies from the beginning of data.
823
880
  */
824
881
  start_time?: (number) | null;
825
882
  /**
826
- * Unix timestamp when reporting period should end, provided in the given **utc_time_offset**
883
+ * Unix timestamp (seconds since epoch, UTC) marking the end of the time range. If null, implies up to the current time.
827
884
  */
828
885
  end_time?: (number) | null;
829
886
  utc_offset?: UTC_Offset;
830
887
  };
888
+ /**
889
+ * File Object
890
+ */
891
+ export type UploadedFileData = {
892
+ /**
893
+ * Storage key of the uploaded file.
894
+ */
895
+ key?: string;
896
+ /**
897
+ * Original name of the uploaded file.
898
+ */
899
+ name?: string;
900
+ /**
901
+ * Endpoint to access the file resource associated with the project.
902
+ */
903
+ readonly url?: string;
904
+ };
905
+ /**
906
+ * A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios.
907
+ */
908
+ export type ConcurrencyKey = (string) | null;
831
909
  /**
832
910
  * Response containing project's config data needed in order to serve experiences
833
911
  */
@@ -897,18 +975,14 @@ export type ConfigOptionalResponseData = {
897
975
  visitor_insights?: VisitorInsightsData;
898
976
  };
899
977
  /**
900
- * Object that represents the change done inside an experience
978
+ * The fundamental structure representing a single modification applied within an experience's variation. The specific content and behavior of the change are determined by its `type` and detailed in the `data` object.
901
979
  */
902
980
  export type ExperienceChangeBase = {
903
981
  type?: 'richStructure' | 'customCode' | 'defaultCode' | 'defaultCodeMultipage' | 'defaultRedirect' | 'fullStackFeature';
904
982
  /**
905
- * This contains all data of this change, any code, settings etc
906
- *
907
- * This is sent by default in the following requests responses: **getExperienceChange**;
908
- *
909
- * All other responses that return this field, will only return it if "include" request parameter contains its name
910
- *
911
- * Data object structure will correspond to the "type" field
983
+ * A flexible object containing the specific details and content for this change, structured according to the change `type`.
984
+ * For example, for `customCode`, it would contain `js` and `css` strings. For `defaultRedirect`, it would contain `original_pattern` and `variation_pattern`.
985
+ * This field is included by default when fetching a single `ExperienceChange` but might be omitted in list views unless specified in an `include` parameter.
912
986
  *
913
987
  */
914
988
  data?: {
@@ -925,41 +999,45 @@ export declare const type3: {
925
999
  readonly FULL_STACK_FEATURE: "fullStackFeature";
926
1000
  };
927
1001
  /**
928
- * Object that represents id of the change done inside an experience
1002
+ * Represents the unique identifier of an existing change within an experience variation. Used when updating or referencing a specific change.
929
1003
  */
930
1004
  export type ExperienceChangeId = {
931
1005
  /**
932
- * The ID of the experience change
1006
+ * The unique numerical identifier for this specific change.
933
1007
  */
934
1008
  id: number;
935
1009
  };
936
1010
  /**
937
- * Object that represents id of the change done inside an experience
1011
+ * Represents the unique identifier of a change, typically when returned by the API after creation or in a list.
938
1012
  */
939
1013
  export type ExperienceChangeIdReadOnly = {
940
1014
  /**
941
- * The ID of the experience change
1015
+ * The unique numerical identifier for this specific change.
942
1016
  */
943
1017
  readonly id?: number;
944
1018
  };
945
1019
  /**
946
1020
  * Object that represents one change done inside an experience
947
1021
  */
1022
+ export type ExperienceChangeServing = ExperienceChangeDefaultCodeDataServing | ExperienceChangeDefaultCodeMultipageDataServing | ExperienceChangeDefaultRedirectDataServing | ExperienceChangeCustomCodeDataServing | ExperienceChangeRichStructureDataServing | ExperienceChangeFullStackFeatureServing;
1023
+ /**
1024
+ * Represents a single, specific modification applied as part of an experience's variation. The exact structure and content depend on the `type` of change.
1025
+ */
948
1026
  export type ExperienceChange = ExperienceChangeDefaultCodeData | ExperienceChangeDefaultCodeMultipageData | ExperienceChangeDefaultRedirectData | ExperienceChangeCustomCodeData | ExperienceChangeRichStructureData | ExperienceChangeFullStackFeature;
949
1027
  /**
950
- * Object that represents one change done inside an experience, used when adding changes
1028
+ * Data structure for adding a new change to an experience variation. The `id` field is omitted as it will be assigned upon creation.
951
1029
  */
952
1030
  export type ExperienceChangeAdd = ExperienceChangeDefaultCodeDataAdd | ExperienceChangeDefaultCodeMultipageDataAdd | ExperienceChangeDefaultRedirectDataAdd | ExperienceChangeCustomCodeDataAdd | ExperienceChangeRichStructureDataAdd | ExperienceChangeFullStackFeatureAdd;
953
1031
  /**
954
- * Object that represents one change done inside an experience
1032
+ * Data structure for updating an existing change within an experience variation. Requires the `id` of the change to be modified.
955
1033
  */
956
1034
  export type ExperienceChangeUpdate = ExperienceChangeDefaultCodeDataUpdate | ExperienceChangeDefaultCodeMultipageDataUpdate | ExperienceChangeDefaultRedirectDataUpdate | ExperienceChangeRichStructureDataUpdate | ExperienceChangeCustomCodeDataUpdate | ExperienceChangeFullStackFeatureUpdate;
957
1035
  /**
958
- * Object that represents one change done inside an experience
1036
+ * Data structure for defining a change when updating a collection of changes (e.g., within a variation update), where the `id` might be part of a parent object or implied.
959
1037
  */
960
1038
  export type ExperienceChangeUpdateNoId = ExperienceChangeDefaultCodeDataUpdateNoId | ExperienceChangeDefaultCodeMultipageDataUpdateNoId | ExperienceChangeDefaultRedirectDataUpdateNoId | ExperienceChangeRichStructureDataUpdateNoId | ExperienceChangeCustomCodeDataUpdateNoId | ExperienceChangeFullStackFeatureUpdateNoId;
961
1039
  /**
962
- * Describes structure for "defaultCode" type of experience change
1040
+ * Defines a standard code-based change, typically generated by the Visual Editor for modifications like text replacement, style changes, or element removal. It can include CSS, Convert's internal JS representation, and custom JS.
963
1041
  */
964
1042
  export type ExperienceChangeDefaultCodeDataBase = ExperienceChangeBase & {
965
1043
  type?: 'defaultCode';
@@ -985,26 +1063,36 @@ export type type4 = 'defaultCode';
985
1063
  export declare const type4: {
986
1064
  readonly DEFAULT_CODE: "defaultCode";
987
1065
  };
1066
+ /**
1067
+ * Represents a 'defaultCode' type change, including its system-assigned ID.
1068
+ */
1069
+ export type ExperienceChangeDefaultCodeData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeDataBase & {
1070
+ concurrency_key?: ConcurrencyKey;
1071
+ };
988
1072
  /**
989
1073
  * Describes structure for "defaultCode" type of experience change
990
1074
  */
991
- export type ExperienceChangeDefaultCodeData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeDataBase;
1075
+ export type ExperienceChangeDefaultCodeDataServing = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeDataBase;
992
1076
  /**
993
- * Describes structure for adding a "defaultCode" type of experience change
1077
+ * Data for creating a new 'defaultCode' type change.
994
1078
  */
995
1079
  export type ExperienceChangeDefaultCodeDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeDataBase & {
996
1080
  data: unknown;
997
1081
  };
998
1082
  /**
999
- * Describes structure for "defaultCode" type of experience change
1083
+ * Data for updating a 'defaultCode' type change when its ID is managed externally.
1000
1084
  */
1001
- export type ExperienceChangeDefaultCodeDataUpdateNoId = ExperienceChangeDefaultCodeDataBase & unknown;
1085
+ export type ExperienceChangeDefaultCodeDataUpdateNoId = ExperienceChangeDefaultCodeDataBase & {
1086
+ concurrency_key?: ConcurrencyKey;
1087
+ } & unknown;
1002
1088
  /**
1003
- * Describes structure for "defaultCode" type of experience change
1089
+ * Data for updating an existing 'defaultCode' type change, identified by its `id`.
1004
1090
  */
1005
- export type ExperienceChangeDefaultCodeDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeDataBase & unknown;
1091
+ export type ExperienceChangeDefaultCodeDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeDataBase & {
1092
+ concurrency_key?: ConcurrencyKey;
1093
+ } & unknown;
1006
1094
  /**
1007
- * Describes structure for "defaultRedirect" type of experience change
1095
+ * Defines a URL redirect, typically used in Split URL experiments. It specifies how to match an original URL and construct the URL for the variation page.
1008
1096
  */
1009
1097
  export type ExperienceChangeDefaultRedirectDataBase = ExperienceChangeBase & {
1010
1098
  type?: 'defaultRedirect';
@@ -1031,25 +1119,35 @@ export declare const type5: {
1031
1119
  readonly DEFAULT_REDIRECT: "defaultRedirect";
1032
1120
  };
1033
1121
  /**
1034
- * Describes structure for "defaultRedirect" type of experience change
1122
+ * Represents a 'defaultRedirect' type change, including its system-assigned ID.
1035
1123
  */
1036
- export type ExperienceChangeDefaultRedirectData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase;
1124
+ export type ExperienceChangeDefaultRedirectData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase & {
1125
+ concurrency_key?: ConcurrencyKey;
1126
+ };
1037
1127
  /**
1038
1128
  * Describes structure for "defaultRedirect" type of experience change
1039
1129
  */
1130
+ export type ExperienceChangeDefaultRedirectDataServing = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase;
1131
+ /**
1132
+ * Data for creating a new 'defaultRedirect' type change.
1133
+ */
1040
1134
  export type ExperienceChangeDefaultRedirectDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase & {
1041
1135
  data: unknown;
1042
1136
  };
1043
1137
  /**
1044
- * Describes structure for "defaultRedirect" type of experience change
1138
+ * Data for updating a 'defaultRedirect' type change when its ID is managed externally.
1045
1139
  */
1046
- export type ExperienceChangeDefaultRedirectDataUpdateNoId = ExperienceChangeDefaultRedirectDataBase & unknown;
1140
+ export type ExperienceChangeDefaultRedirectDataUpdateNoId = ExperienceChangeDefaultRedirectDataBase & {
1141
+ concurrency_key?: ConcurrencyKey;
1142
+ } & unknown;
1047
1143
  /**
1048
- * Describes structure for "defaultRedirect" type of experience change
1144
+ * Data for updating an existing 'defaultRedirect' type change, identified by its `id`.
1049
1145
  */
1050
- export type ExperienceChangeDefaultRedirectDataUpdate = ExperienceChangeId & ExperienceChangeDefaultRedirectDataBase & unknown;
1146
+ export type ExperienceChangeDefaultRedirectDataUpdate = ExperienceChangeId & ExperienceChangeDefaultRedirectDataBase & {
1147
+ concurrency_key?: ConcurrencyKey;
1148
+ } & unknown;
1051
1149
  /**
1052
- * Describes structure for "defaultCodeMultipage" type of experience change
1150
+ * Defines a standard code-based change that applies to a specific page within a Multi-page Funnel experiment. This allows different code (CSS, JS) to be applied to different steps of the funnel for the same variation.
1053
1151
  */
1054
1152
  export type ExperienceChangeDefaultCodeMultipageDataBase = ExperienceChangeBase & {
1055
1153
  type?: 'defaultCodeMultipage';
@@ -1080,25 +1178,35 @@ export declare const type6: {
1080
1178
  readonly DEFAULT_CODE_MULTIPAGE: "defaultCodeMultipage";
1081
1179
  };
1082
1180
  /**
1083
- * Describes structure for "defaultCodeMultipage" type of experience change
1181
+ * Represents a 'defaultCodeMultipage' type change, including its system-assigned ID.
1084
1182
  */
1085
- export type ExperienceChangeDefaultCodeMultipageData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase;
1183
+ export type ExperienceChangeDefaultCodeMultipageData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase & {
1184
+ concurrency_key?: ConcurrencyKey;
1185
+ };
1086
1186
  /**
1087
1187
  * Describes structure for "defaultCodeMultipage" type of experience change
1088
1188
  */
1189
+ export type ExperienceChangeDefaultCodeMultipageDataServing = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase;
1190
+ /**
1191
+ * Data for creating a new 'defaultCodeMultipage' type change.
1192
+ */
1089
1193
  export type ExperienceChangeDefaultCodeMultipageDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase & {
1090
1194
  data: unknown;
1091
1195
  };
1092
1196
  /**
1093
- * Describes structure for "defaultCodeMultipage" type of experience change
1197
+ * Data for updating a 'defaultCodeMultipage' type change when its ID is managed externally.
1094
1198
  */
1095
- export type ExperienceChangeDefaultCodeMultipageDataUpdateNoId = ExperienceChangeDefaultCodeMultipageDataBase & unknown;
1199
+ export type ExperienceChangeDefaultCodeMultipageDataUpdateNoId = ExperienceChangeDefaultCodeMultipageDataBase & {
1200
+ concurrency_key?: ConcurrencyKey;
1201
+ } & unknown;
1096
1202
  /**
1097
- * Describes structure for "defaultCodeMultipage" type of experience change
1203
+ * Data for updating an existing 'defaultCodeMultipage' type change, identified by its `id`.
1098
1204
  */
1099
- export type ExperienceChangeDefaultCodeMultipageDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeMultipageDataBase & unknown;
1205
+ export type ExperienceChangeDefaultCodeMultipageDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeMultipageDataBase & {
1206
+ concurrency_key?: ConcurrencyKey;
1207
+ } & unknown;
1100
1208
  /**
1101
- * Describes structure for "defaultCode" type of experience change
1209
+ * Defines a complex change, often involving multiple DOM manipulations or structured data, typically generated by advanced Visual Editor interactions or specific integrations. (Primarily for internal or advanced programmatic use).
1102
1210
  */
1103
1211
  export type ExperienceChangeRichStructureDataBase = ExperienceChangeBase & {
1104
1212
  type?: 'richStructure';
@@ -1129,25 +1237,35 @@ export declare const type7: {
1129
1237
  readonly RICH_STRUCTURE: "richStructure";
1130
1238
  };
1131
1239
  /**
1132
- * Describes structure for "defaultCode" type of experience change
1240
+ * Represents a 'richStructure' type change, including its system-assigned ID.
1133
1241
  */
1134
- export type ExperienceChangeRichStructureData = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase;
1242
+ export type ExperienceChangeRichStructureData = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase & {
1243
+ concurrency_key?: ConcurrencyKey;
1244
+ };
1135
1245
  /**
1136
1246
  * Describes structure for "defaultCode" type of experience change
1137
1247
  */
1248
+ export type ExperienceChangeRichStructureDataServing = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase;
1249
+ /**
1250
+ * Data for creating a new 'richStructure' type change.
1251
+ */
1138
1252
  export type ExperienceChangeRichStructureDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase & {
1139
1253
  data: unknown;
1140
1254
  };
1141
1255
  /**
1142
- * Describes structure for "defaultCode" type of experience change
1256
+ * Data for updating a 'richStructure' type change when its ID is managed externally.
1143
1257
  */
1144
- export type ExperienceChangeRichStructureDataUpdateNoId = ExperienceChangeRichStructureDataBase & unknown;
1258
+ export type ExperienceChangeRichStructureDataUpdateNoId = ExperienceChangeRichStructureDataBase & {
1259
+ concurrency_key?: ConcurrencyKey;
1260
+ } & unknown;
1145
1261
  /**
1146
- * Describes structure for "defaultCode" type of experience change
1262
+ * Data for updating an existing 'richStructure' type change, identified by its `id`.
1147
1263
  */
1148
- export type ExperienceChangeRichStructureDataUpdate = ExperienceChangeId & ExperienceChangeRichStructureDataBase & unknown;
1264
+ export type ExperienceChangeRichStructureDataUpdate = ExperienceChangeId & ExperienceChangeRichStructureDataBase & {
1265
+ concurrency_key?: ConcurrencyKey;
1266
+ } & unknown;
1149
1267
  /**
1150
- * Describes structure for "defaultCode" type of experience change
1268
+ * Defines a change applied purely through custom-written CSS and/or JavaScript code, bypassing the Visual Editor's generated code. This offers maximum flexibility for developers.
1151
1269
  */
1152
1270
  export type ExperienceChangeCustomCodeDataBase = ExperienceChangeBase & {
1153
1271
  type?: 'customCode';
@@ -1174,25 +1292,35 @@ export declare const type8: {
1174
1292
  readonly CUSTOM_CODE: "customCode";
1175
1293
  };
1176
1294
  /**
1177
- * Describes structure for "defaultCode" type of experience change
1295
+ * Represents a 'customCode' type change, including its system-assigned ID.
1178
1296
  */
1179
- export type ExperienceChangeCustomCodeData = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase;
1297
+ export type ExperienceChangeCustomCodeData = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase & {
1298
+ concurrency_key?: ConcurrencyKey;
1299
+ };
1180
1300
  /**
1181
1301
  * Describes structure for "defaultCode" type of experience change
1182
1302
  */
1303
+ export type ExperienceChangeCustomCodeDataServing = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase;
1304
+ /**
1305
+ * Data for creating a new 'customCode' type change.
1306
+ */
1183
1307
  export type ExperienceChangeCustomCodeDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase & {
1184
1308
  data: unknown;
1185
1309
  };
1186
1310
  /**
1187
- * Describes structure for "customCode" type of experience change
1311
+ * Data for updating a 'customCode' type change when its ID is managed externally.
1188
1312
  */
1189
- export type ExperienceChangeCustomCodeDataUpdateNoId = ExperienceChangeCustomCodeDataBase & unknown;
1313
+ export type ExperienceChangeCustomCodeDataUpdateNoId = ExperienceChangeCustomCodeDataBase & {
1314
+ concurrency_key?: ConcurrencyKey;
1315
+ } & unknown;
1190
1316
  /**
1191
- * Describes structure for "customCode" type of experience change
1317
+ * Data for updating an existing 'customCode' type change, identified by its `id`.
1192
1318
  */
1193
- export type ExperienceChangeCustomCodeDataUpdate = ExperienceChangeId & ExperienceChangeCustomCodeDataBase & unknown;
1319
+ export type ExperienceChangeCustomCodeDataUpdate = ExperienceChangeId & ExperienceChangeCustomCodeDataBase & {
1320
+ concurrency_key?: ConcurrencyKey;
1321
+ } & unknown;
1194
1322
  /**
1195
- * Describes structure for "fullStackFeature" type of experience change
1323
+ * Defines a change for a Full Stack experiment that involves enabling or configuring a specific 'Feature' and its variables for this variation.
1196
1324
  */
1197
1325
  export type ExperienceChangeFullStackFeatureBase = ExperienceChangeBase & {
1198
1326
  type?: 'fullStackFeature';
@@ -1217,30 +1345,46 @@ export declare const type9: {
1217
1345
  readonly FULL_STACK_FEATURE: "fullStackFeature";
1218
1346
  };
1219
1347
  /**
1220
- * Describes structure for "fullStackFeature" type of experience change
1348
+ * Represents a 'fullStackFeature' type change, including its system-assigned ID.
1221
1349
  */
1222
- export type ExperienceChangeFullStackFeature = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase;
1350
+ export type ExperienceChangeFullStackFeature = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase & {
1351
+ concurrency_key?: ConcurrencyKey;
1352
+ };
1223
1353
  /**
1224
1354
  * Describes structure for "fullStackFeature" type of experience change
1225
1355
  */
1356
+ export type ExperienceChangeFullStackFeatureServing = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase;
1357
+ /**
1358
+ * Data for creating a new 'fullStackFeature' type change.
1359
+ */
1226
1360
  export type ExperienceChangeFullStackFeatureAdd = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase & {
1227
1361
  data: unknown;
1228
1362
  };
1229
1363
  /**
1230
- * Describes structure for "fullStackFeature" type of experience change
1364
+ * Data for updating an existing 'fullStackFeature' type change, identified by its `id`.
1231
1365
  */
1232
- export type ExperienceChangeFullStackFeatureUpdate = ExperienceChangeId & ExperienceChangeFullStackFeatureBase & unknown;
1366
+ export type ExperienceChangeFullStackFeatureUpdate = ExperienceChangeId & ExperienceChangeFullStackFeatureBase & {
1367
+ concurrency_key?: ConcurrencyKey;
1368
+ } & unknown;
1233
1369
  /**
1234
- * Describes structure for "fullStackFeature" type of experience change
1370
+ * Data for updating a 'fullStackFeature' type change when its ID is managed externally.
1235
1371
  */
1236
- export type ExperienceChangeFullStackFeatureUpdateNoId = ExperienceChangeFullStackFeatureBase & unknown;
1372
+ export type ExperienceChangeFullStackFeatureUpdateNoId = ExperienceChangeFullStackFeatureBase & {
1373
+ concurrency_key?: ConcurrencyKey;
1374
+ } & unknown;
1237
1375
  export type UpdateExperienceChangeRequestData = ExperienceChangeAdd;
1238
1376
  /**
1239
- * Describes the provider with which Convert integrates to send experience data
1377
+ * Identifies the third-party analytics, heatmap, or data platform with which Convert Experiences is integrated for this specific experience.
1378
+ * This allows experiment data (like experience ID and variation ID/name) to be sent to the selected provider.
1379
+ * Knowledge Base has many articles on integrations, e.g., "Integrate Convert Experiences with Google Analytics", "Hotjar Integration".
1380
+ *
1240
1381
  */
1241
1382
  export type IntegrationProvider = 'baidu' | 'clicktale' | 'clicky' | 'cnzz' | 'crazyegg' | 'econda' | 'eulerian' | 'google_analytics' | 'gosquared' | 'heapanalytics' | 'hotjar' | 'mixpanel' | 'mouseflow' | 'piwik' | 'segmentio' | 'sitecatalyst' | 'woopra' | 'ysance';
1242
1383
  /**
1243
- * Describes the provider with which Convert integrates to send experience data
1384
+ * Identifies the third-party analytics, heatmap, or data platform with which Convert Experiences is integrated for this specific experience.
1385
+ * This allows experiment data (like experience ID and variation ID/name) to be sent to the selected provider.
1386
+ * Knowledge Base has many articles on integrations, e.g., "Integrate Convert Experiences with Google Analytics", "Hotjar Integration".
1387
+ *
1244
1388
  */
1245
1389
  export declare const IntegrationProvider: {
1246
1390
  readonly BAIDU: "baidu";
@@ -1265,8 +1409,8 @@ export declare const IntegrationProvider: {
1265
1409
  export type ExperienceIntegrationBase = {
1266
1410
  provider: IntegrationProvider;
1267
1411
  /**
1268
- * Boolean flag indicating whether the integration is enabled or not. When updating experience's integrations,
1269
- * to disable an integration, this flag needs to be passed as **false**. If not passed, integration is assumed to be **enabled=true**
1412
+ * If `true`, this integration is active for the experience, and Convert will attempt to send experiment data to the specified provider.
1413
+ * If `false` or omitted when updating, the integration is disabled.
1270
1414
  *
1271
1415
  */
1272
1416
  enabled?: (boolean) | null;
@@ -1286,10 +1430,9 @@ export type ExperienceIntegrationCnzz = ExperienceIntegrationBase & {
1286
1430
  custom_dimension: string;
1287
1431
  };
1288
1432
  /**
1289
- * Crazyegg integration requires API key and secret which are set at the project level and can be
1290
- * updated using updateProject operation
1291
- *
1292
- * **Important:** Not having API key and secret set for the project, would cause integration to fail
1433
+ * Configuration for integrating with Crazy Egg. Convert sends experiment and variation data to allow segmentation of Crazy Egg heatmaps and recordings by variation.
1434
+ * Project-level API key and secret for Crazy Egg might be required for some functionalities (not specified here, but in KB for other tools).
1435
+ * KB: "Integrate Convert Experiences with Crazy Egg".
1293
1436
  *
1294
1437
  */
1295
1438
  export type ExperienceIntegrationCrazyegg = ExperienceIntegrationBase;
@@ -1431,6 +1574,10 @@ export type ConfigExperience = {
1431
1574
  */
1432
1575
  products_ordered_count?: (NumericOutlier);
1433
1576
  };
1577
+ /**
1578
+ * List of placeholders used by this experience (from changes, global_js, and global_css)
1579
+ */
1580
+ placeholders?: Array<(string)>;
1434
1581
  /**
1435
1582
  * A couple of settings only applicable to Split URL experiments
1436
1583
  */
@@ -1495,7 +1642,7 @@ export type ExperienceVariationConfig = {
1495
1642
  /**
1496
1643
  * List of changes that this variation is exposing.
1497
1644
  */
1498
- changes?: Array<ExperienceChange>;
1645
+ changes?: Array<ExperienceChangeServing>;
1499
1646
  };
1500
1647
  export type ExperienceStatuses = 'draft' | 'active' | 'paused' | 'completed' | 'scheduled';
1501
1648
  export declare const ExperienceStatuses: {
@@ -1738,6 +1885,10 @@ export type ClicksElementGoalSettings = {
1738
1885
  * Css selector that identifies the DOM element(s) on which will track clicks in order to fire the goal.
1739
1886
  */
1740
1887
  selector: string;
1888
+ /**
1889
+ * If true, triggers only on pages where the associated experience runs (Experience Location). Does not apply sitewide or to unrelated pages.
1890
+ */
1891
+ only_where_experience_runs?: boolean;
1741
1892
  };
1742
1893
  /**
1743
1894
  * Goals type, one of below.
@@ -1754,18 +1905,29 @@ export declare const GoalTypes: {
1754
1905
  readonly REVENUE: "revenue";
1755
1906
  };
1756
1907
  /**
1757
- * This one describes a logical triggering rule that is being used inside the app
1908
+ * Defines how and when an experience associated with this location should be activated for a visitor who matches the location's rules.
1909
+ * The `type` determines the activation mechanism.
1910
+ * Knowledge Base: "Locations" - "Dynamic Website Triggers".
1911
+ *
1758
1912
  */
1759
1913
  export type LocationTrigger = LocationTriggerDomElement | LocationTriggerCallback | LocationTriggerManual | LocationTriggerUponRun;
1760
1914
  /**
1761
- * Describes possible location trigger types.
1762
- * Note that `upon_run` is always the case for **fullstack** projects.
1915
+ * Specifies the mechanism that activates an experience when its location rules are met:
1916
+ * - `upon_run`: (Default) The experience activates as soon as the Convert tracking script loads and evaluates that the visitor matches the location's rules (e.g., URL match). This is the standard behavior for most A/B tests.
1917
+ * - `manual`: The experience only activates when explicitly triggered by a JavaScript call (`window._conv_q.push({ what: 'triggerLocation', params: { locationId: '...' } })`). Gives precise programmatic control over activation.
1918
+ * - `dom_element`: The experience activates upon a specific user interaction (e.g., 'click', 'hover', 'in_view', 'change') with a defined DOM element (identified by a CSS `selector`). Useful for testing changes related to interactive elements.
1919
+ * - `callback`: The experience activates when a custom JavaScript `callback` function (provided in `js`) calls the `activate()` function passed to it. Allows for complex asynchronous activation logic, e.g., after an API response or a specific SPA state change.
1920
+ * Note: For Full Stack projects, `upon_run` is effectively the only mode, as activation is handled by the SDK.
1763
1921
  *
1764
1922
  */
1765
1923
  export type LocationTriggerTypes = 'upon_run' | 'manual' | 'dom_element' | 'callback';
1766
1924
  /**
1767
- * Describes possible location trigger types.
1768
- * Note that `upon_run` is always the case for **fullstack** projects.
1925
+ * Specifies the mechanism that activates an experience when its location rules are met:
1926
+ * - `upon_run`: (Default) The experience activates as soon as the Convert tracking script loads and evaluates that the visitor matches the location's rules (e.g., URL match). This is the standard behavior for most A/B tests.
1927
+ * - `manual`: The experience only activates when explicitly triggered by a JavaScript call (`window._conv_q.push({ what: 'triggerLocation', params: { locationId: '...' } })`). Gives precise programmatic control over activation.
1928
+ * - `dom_element`: The experience activates upon a specific user interaction (e.g., 'click', 'hover', 'in_view', 'change') with a defined DOM element (identified by a CSS `selector`). Useful for testing changes related to interactive elements.
1929
+ * - `callback`: The experience activates when a custom JavaScript `callback` function (provided in `js`) calls the `activate()` function passed to it. Allows for complex asynchronous activation logic, e.g., after an API response or a specific SPA state change.
1930
+ * Note: For Full Stack projects, `upon_run` is effectively the only mode, as activation is handled by the SDK.
1769
1931
  *
1770
1932
  */
1771
1933
  export declare const LocationTriggerTypes: {
@@ -1792,11 +1954,21 @@ export declare const type20: {
1792
1954
  readonly MANUAL: "manual";
1793
1955
  };
1794
1956
  /**
1795
- * Allowed events for LocationTriggerDomElement
1957
+ * The type of user interaction with a DOM element that will trigger the experience:
1958
+ * - `click`: Activates when the element is clicked.
1959
+ * - `hover`: Activates when the mouse pointer hovers over the element (mouseenter).
1960
+ * - `in_view`: Activates when the element becomes visible in the browser's viewport (e.g., user scrolls to it). KB: "Launch Experiments Using Custom JavaScript When Elements Appear in DOM".
1961
+ * - `change`: Activates when the value of a form element (like input, select, textarea) changes.
1962
+ *
1796
1963
  */
1797
1964
  export type LocationDomTriggerEvents = 'click' | 'hover' | 'in_view' | 'change';
1798
1965
  /**
1799
- * Allowed events for LocationTriggerDomElement
1966
+ * The type of user interaction with a DOM element that will trigger the experience:
1967
+ * - `click`: Activates when the element is clicked.
1968
+ * - `hover`: Activates when the mouse pointer hovers over the element (mouseenter).
1969
+ * - `in_view`: Activates when the element becomes visible in the browser's viewport (e.g., user scrolls to it). KB: "Launch Experiments Using Custom JavaScript When Elements Appear in DOM".
1970
+ * - `change`: Activates when the value of a form element (like input, select, textarea) changes.
1971
+ *
1800
1972
  */
1801
1973
  export declare const LocationDomTriggerEvents: {
1802
1974
  readonly CLICK: "click";
@@ -1823,19 +1995,19 @@ export type LocationTriggerCallback = LocationTriggerBase & {
1823
1995
  type?: 'callback';
1824
1996
  /**
1825
1997
  * Describes the js callback that will be executed in order to fire the experience.
1998
+ *
1826
1999
  * It is called with two arguments:
1827
2000
  * - `activate` - a function that should be called when the experience should be activated
1828
2001
  * - `options` - an object with the following properties:
1829
2002
  * - `locationId` - id of the location that is being activated
1830
2003
  * - `isActive` - boolean flag that indicates if the location is active
1831
- *
1832
2004
  * Example:
1833
2005
  * ```
1834
2006
  * function(activate, options) {
1835
2007
  * if (options.isActive) {
1836
2008
  * setTimeout(function() {
1837
2009
  * * it activates the experiences 1 second after the
1838
- * location trigger is initialized - at the load of the tracking script*
2010
+ * location trigger is initialized - at the load of the tracking script *
1839
2011
  * activate();
1840
2012
  * }, 1000);
1841
2013
  * }
@@ -1931,8 +2103,10 @@ export type ConfigProject = {
1931
2103
  }>;
1932
2104
  /**
1933
2105
  * The global javascript code that will be loaded on all pages where
1934
- * the tracking script is installed, prior do processing any of
1935
- * experiences, goals, audiences etc.
2106
+ * the tracking script is installed, prior to processing any of
2107
+ * experiences, goals, audiences etc. When an environment is specified in the request,
2108
+ * this will be combined with the environment-specific global_js (if any) by appending
2109
+ * the environment's code with a newline character.
1936
2110
  *
1937
2111
  */
1938
2112
  global_javascript?: (string) | null;
@@ -2002,22 +2176,15 @@ export type ConfigProject = {
2002
2176
  */
2003
2177
  products_ordered_count?: (NumericOutlier);
2004
2178
  };
2179
+ /**
2180
+ * List of active placeholders which are used in experiences for the project
2181
+ */
2182
+ placeholders?: Array<(string)>;
2183
+ /**
2184
+ * List of placeholders used in project's Global JavaScript (convertPlaceholders.<key>)
2185
+ */
2186
+ global_javascript_placeholders?: Array<(string)>;
2005
2187
  } & ConfigProjectMinimalSettings);
2006
- /**
2007
- * A user-defined key-value object which describes environments available for the project. The number of environments a user can add depends on their plan, by default only one environment is allowed.
2008
- */
2009
- environments?: {
2010
- [key: string]: {
2011
- /**
2012
- * The display name of the environment.
2013
- */
2014
- label: string;
2015
- /**
2016
- * Specifies whether this environment is set as the default environment for the project.
2017
- */
2018
- is_default: boolean;
2019
- };
2020
- };
2021
2188
  };
2022
2189
  /**
2023
2190
  * Value which describes project product type
@@ -2214,7 +2381,7 @@ export type ConversionEvent = {
2214
2381
  /**
2215
2382
  * Value of the metric
2216
2383
  */
2217
- value?: (number | string | Array<string>);
2384
+ value?: (number | string | Array<(string)>);
2218
2385
  }>;
2219
2386
  /**
2220
2387
  * Bucketing data (experiences that this visitor is currently part of) for the visitor. In case that **enrichData=true** flag is being sent and
@@ -2322,6 +2489,25 @@ export declare const visitorType: {
2322
2489
  readonly NEW: "new";
2323
2490
  readonly RETURNING: "returning";
2324
2491
  };
2492
+ /**
2493
+ * Response containing project's visitor data
2494
+ */
2495
+ export type VisitorDataResponse = {
2496
+ [key: string]: (string);
2497
+ };
2498
+ /**
2499
+ * Response containing project's visitor data with default values
2500
+ */
2501
+ export type VisitorDataDefaultResponse = {
2502
+ [key: string]: (string);
2503
+ };
2504
+ /**
2505
+ * Response containing project's visitor data
2506
+ */
2507
+ export type VisitorDataResponseData = {
2508
+ data?: VisitorDataResponse;
2509
+ default?: VisitorDataDefaultResponse;
2510
+ };
2325
2511
  export type GetProjectConfigData = {
2326
2512
  /**
2327
2513
  * ID of the account that owns the retrieved/saved data
@@ -2396,6 +2582,32 @@ export type SendTrackingEventsData = {
2396
2582
  requestBody: SendTrackingEventsRequestData;
2397
2583
  };
2398
2584
  export type SendTrackingEventsResponse = (SuccessData);
2585
+ export type GetVisitorDataData = {
2586
+ /**
2587
+ * ID of the account that owns the retrieved/saved data
2588
+ */
2589
+ accountId: number;
2590
+ /**
2591
+ * ID of the project to be retrieved
2592
+ */
2593
+ projectId: number;
2594
+ /**
2595
+ * ID of the visitor to be retrieved
2596
+ */
2597
+ visitorId: string;
2598
+ };
2599
+ export type GetVisitorDataResponse = (VisitorDataResponseData);
2600
+ export type GetVisitorDataBySdkKeyData = {
2601
+ /**
2602
+ * The SDK key used to retrieve the project's visitor data
2603
+ */
2604
+ sdkKey: string;
2605
+ /**
2606
+ * ID of the visitor to be retrieved
2607
+ */
2608
+ visitorId: string;
2609
+ };
2610
+ export type GetVisitorDataBySdkKeyResponse = (VisitorDataResponseData);
2399
2611
  export type $OpenApiTs = {
2400
2612
  '/config/{account_id}/{project_id}': {
2401
2613
  get: {
@@ -2491,4 +2703,36 @@ export type $OpenApiTs = {
2491
2703
  };
2492
2704
  };
2493
2705
  };
2706
+ '/visitor-data/{account_id}/{project_id}/{visitor_id}': {
2707
+ get: {
2708
+ req: GetVisitorDataData;
2709
+ res: {
2710
+ /**
2711
+ * Object consumed by SDKs
2712
+ *
2713
+ */
2714
+ 200: VisitorDataResponseData;
2715
+ /**
2716
+ * A response signaling an error
2717
+ */
2718
+ default: ErrorData;
2719
+ };
2720
+ };
2721
+ };
2722
+ '/visitor-data/{sdk_key}/{visitor_id}': {
2723
+ get: {
2724
+ req: GetVisitorDataBySdkKeyData;
2725
+ res: {
2726
+ /**
2727
+ * Object consumed by SDKs
2728
+ *
2729
+ */
2730
+ 200: VisitorDataResponseData;
2731
+ /**
2732
+ * A response signaling an error
2733
+ */
2734
+ default: ErrorData;
2735
+ };
2736
+ };
2737
+ };
2494
2738
  };