@convertcom/js-sdk-rules 2.1.2 → 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
- results_per_page?: number | null;
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,60 +433,66 @@ 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
- matching?: BaseMatch & {
439
+ matching?: (BaseMatch & {
438
440
  match_type?: TextMatchingOptions;
439
- };
441
+ });
440
442
  };
441
443
  export type GenericNumericMatchRule = BaseRuleWithNumericValue & {
442
444
  rule_type: NumericMatchRulesTypes;
443
- matching?: BaseMatch & {
445
+ matching?: (BaseMatch & {
444
446
  match_type?: NumericMatchingOptions;
445
- };
447
+ });
446
448
  };
447
449
  export type GenericBoolMatchRule = BaseRuleWithBooleanValue & {
448
450
  rule_type: BoolMatchRulesTypes;
449
- matching?: BaseMatch & {
451
+ matching?: (BaseMatch & {
450
452
  match_type?: ChoiceMatchingOptions;
451
- };
453
+ });
452
454
  };
453
455
  export type GenericSetMatchRule = BaseRuleWithStringValue & {
454
456
  rule_type: string;
455
- matching?: BaseMatch & {
457
+ matching?: (BaseMatch & {
456
458
  match_type?: SetMatchingOptions;
457
- };
459
+ });
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
  };
465
467
  export type GenericTextKeyValueMatchRule = BaseRuleWithStringValue & {
466
468
  rule_type: GenericTextKeyValueMatchRulesTypes;
467
- matching?: BaseMatch & {
469
+ matching?: (BaseMatch & {
468
470
  match_type?: TextMatchingOptions;
469
- };
471
+ });
470
472
  } & GenericKey;
471
473
  export type GenericNumericKeyValueMatchRule = BaseRuleWithNumericValue & {
472
474
  rule_type: GenericNumericKeyValueMatchRulesTypes;
473
- matching?: BaseMatch & {
475
+ matching?: (BaseMatch & {
474
476
  match_type?: NumericMatchingOptions;
475
- };
477
+ });
476
478
  } & GenericKey;
477
479
  export type GenericBoolKeyValueMatchRule = BaseRuleWithBooleanValue & {
478
480
  rule_type: GenericBoolKeyValueMatchRulesTypes;
479
- matching?: BaseMatch & {
481
+ matching?: (BaseMatch & {
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
- matching?: BaseMatch & {
493
+ matching?: (BaseMatch & {
486
494
  match_type?: TextMatchingOptions;
487
- };
495
+ });
488
496
  /**
489
497
  * The name of the cookie which value is compared to the given rule value
490
498
  */
@@ -492,84 +500,85 @@ export type CookieMatchRule = BaseRuleWithStringValue & {
492
500
  };
493
501
  export type CountryMatchRule = BaseRuleWithCountryCodeValue & {
494
502
  rule_type: CountryMatchRulesTypes;
495
- matching?: BaseMatch & {
503
+ matching?: (BaseMatch & {
496
504
  match_type?: ChoiceMatchingOptions;
497
- };
505
+ });
498
506
  };
499
507
  export type JsConditionMatchRule = BaseRuleWithJsCodeValue & {
500
508
  rule_type: JsConditionMatchRulesTypes;
501
- matching?: BaseMatch & {
509
+ matching?: (BaseMatch & {
502
510
  match_type?: ChoiceMatchingOptions;
503
- };
511
+ });
504
512
  };
505
513
  export type VisitorTypeMatchRule = BaseRuleWithVisitorTypeValue & {
506
514
  rule_type: VisitorTypeMatchRulesTypes;
507
- matching?: BaseMatch & {
515
+ matching?: (BaseMatch & {
508
516
  match_type?: ChoiceMatchingOptions;
509
- };
517
+ });
510
518
  };
511
519
  export type LanguageMatchRule = BaseRuleWithLanguageCodeValue & {
512
520
  rule_type: LanguageMatchRulesTypes;
513
- matching?: BaseMatch & {
521
+ matching?: (BaseMatch & {
514
522
  match_type?: ChoiceMatchingOptions;
515
- };
523
+ });
516
524
  };
517
525
  export type GoalTriggeredMatchRule = BaseRuleWithGoalTriggeredValue & {
518
526
  rule_type: GoalTriggeredMatchRulesTypes;
519
- matching?: BaseMatch & {
527
+ matching?: (BaseMatch & {
520
528
  match_type?: ChoiceMatchingOptions;
521
- };
529
+ });
522
530
  };
523
531
  export type SegmentBucketedMatchRule = BaseRuleWithSegmentBucketedValue & {
524
532
  rule_type: SegmentBucketedMatchRulesTypes;
525
- matching?: BaseMatch & {
533
+ matching?: (BaseMatch & {
526
534
  match_type?: ChoiceMatchingOptions;
527
- };
535
+ });
528
536
  };
529
537
  export type ExperienceBucketedMatchRule = BaseRuleWithExperienceBucketedValue & {
530
538
  rule_type: string;
531
- matching?: BaseMatch & {
539
+ matching?: (BaseMatch & {
532
540
  match_type?: ChoiceMatchingOptions;
533
- };
541
+ });
534
542
  };
535
543
  export type DayOfWeekMatchRule = BaseRuleWithDayOfWeekValue & {
536
544
  rule_type: DayOfWeekMatchRulesTypes;
537
- matching?: BaseMatch & {
545
+ matching?: (BaseMatch & {
538
546
  match_type?: NumericMatchingOptions;
539
- };
547
+ });
540
548
  };
541
549
  export type HourOfDayMatchRule = BaseRuleWithHourOfDayValue & {
542
550
  rule_type: HourOfDayMatchRulesTypes;
543
- matching?: BaseMatch & {
551
+ matching?: (BaseMatch & {
544
552
  match_type?: NumericMatchingOptions;
545
- };
553
+ });
546
554
  };
547
555
  export type MinuteOfHourMatchRule = BaseRuleWithMinuteOfHourValue & {
548
556
  rule_type: MinuteOfHourMatchRulesTypes;
549
- matching?: BaseMatch & {
557
+ matching?: (BaseMatch & {
550
558
  match_type?: NumericMatchingOptions;
551
- };
559
+ });
552
560
  };
553
561
  export type BrowserNameMatchRule = BaseRuleWithBrowserNameValue & {
554
562
  rule_type: BrowserNameMatchRulesTypes;
555
- matching?: BaseMatch & {
563
+ matching?: (BaseMatch & {
556
564
  match_type?: ChoiceMatchingOptions;
557
- };
565
+ });
558
566
  };
559
567
  export type OsMatchRule = BaseRuleWithOsValue & {
560
568
  rule_type: OsMatchRulesTypes;
561
- matching?: BaseMatch & {
569
+ matching?: (BaseMatch & {
562
570
  match_type?: ChoiceMatchingOptions;
563
- };
571
+ });
564
572
  };
565
573
  export type WeatherConditionMatchRule = BaseRuleWithWeatherConditionValue & {
566
574
  rule_type: WeatherConditionMatchRulesTypes;
567
- matching?: BaseMatch & {
575
+ matching?: (BaseMatch & {
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
  };
@@ -657,23 +692,23 @@ export type ImportProjectDataSuccess = SuccessData & {
657
692
  /**
658
693
  * List of created experiences. Empty if nothing imported
659
694
  */
660
- experiences?: Array<number>;
695
+ experiences?: Array<(number)>;
661
696
  /**
662
697
  * List of created audiences. Empty if nothing imported
663
698
  */
664
- audiences?: Array<number>;
699
+ audiences?: Array<(number)>;
665
700
  /**
666
701
  * List of created locations. Empty if nothing imported
667
702
  */
668
- locations?: Array<number>;
703
+ locations?: Array<(number)>;
669
704
  /**
670
705
  * List of created goals. Empty if nothing imported
671
706
  */
672
- goals?: Array<number>;
707
+ goals?: Array<(number)>;
673
708
  /**
674
709
  * List of created hypothesis. Empty if nothing imported
675
710
  */
676
- hypothesis?: Array<number>;
711
+ hypothesis?: Array<(number)>;
677
712
  };
678
713
  };
679
714
  export type BulkSuccessData = SuccessData & {
@@ -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,16 +734,16 @@ 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
- property_UA?: string | null;
746
+ property_UA?: (string) | null;
712
747
  };
713
748
  export type type = 'ga3';
714
749
  export declare const type: {
@@ -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,26 +767,50 @@ 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: {
746
785
  readonly ANY: "any";
747
786
  readonly ALL: "all";
748
787
  };
788
+ export type VisitorInsightsBase = {
789
+ /**
790
+ * If true, Convert Signals™ is enabled for the project, allowing the system to capture sessions exhibiting user frustration or usability issues.
791
+ *
792
+ */
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;
799
+ };
749
800
  /**
750
- * 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
+ *
751
806
  */
752
807
  export type NumericOutlierTypes = 'none' | 'min_max' | 'percentile';
753
808
  /**
754
- * 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
+ *
755
814
  */
756
815
  export declare const NumericOutlierTypes: {
757
816
  readonly NONE: "none";
@@ -785,8 +844,8 @@ export declare const detection_type2: {
785
844
  };
786
845
  export type NumericOutlierPercentile = NumericOutlierBase & {
787
846
  detection_type?: 'percentile';
788
- min?: unknown & Percentiles;
789
- max?: unknown & Percentiles;
847
+ min?: (unknown & Percentiles);
848
+ max?: (unknown & Percentiles);
790
849
  };
791
850
  export type detection_type3 = 'percentile';
792
851
  export declare const detection_type3: {
@@ -794,11 +853,15 @@ export declare const detection_type3: {
794
853
  };
795
854
  export type NumericOutlier = NumericOutlierNone | NumericOutlierMinMax | NumericOutlierPercentile;
796
855
  /**
797
- * 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
+ *
798
859
  */
799
860
  export type Percentiles = 1 | 5 | 10 | 25 | 50 | 75 | 90 | 95 | 99;
800
861
  /**
801
- * 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
+ *
802
865
  */
803
866
  export declare const Percentiles: {
804
867
  readonly _1: 1;
@@ -811,6 +874,38 @@ export declare const Percentiles: {
811
874
  readonly _95: 95;
812
875
  readonly _99: 99;
813
876
  };
877
+ export type TimeRange = {
878
+ /**
879
+ * Unix timestamp (seconds since epoch, UTC) marking the beginning of the time range. If null, implies from the beginning of data.
880
+ */
881
+ start_time?: (number) | null;
882
+ /**
883
+ * Unix timestamp (seconds since epoch, UTC) marking the end of the time range. If null, implies up to the current time.
884
+ */
885
+ end_time?: (number) | null;
886
+ utc_offset?: UTC_Offset;
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;
814
909
  /**
815
910
  * Response containing project's config data needed in order to serve experiences
816
911
  */
@@ -843,7 +938,7 @@ export type ConfigResponseData = {
843
938
  /**
844
939
  * List of archived experiences inside this project, which were archived within the last 8 months
845
940
  */
846
- archived_experiences?: Array<string>;
941
+ archived_experiences?: Array<(string)>;
847
942
  /**
848
943
  * List of features inside this project. Presented only for fullstack projects
849
944
  */
@@ -864,18 +959,30 @@ export type ConfigMinimalResponseData = {
864
959
  project_id?: string;
865
960
  } & ConfigProjectMinimalSettings;
866
961
  /**
867
- * Object that represents the change done inside an experience
962
+ * Limited data containing optional properties required for decision-making when assembling and
963
+ * tracking various bundles (e.g., tracking scripts).
964
+ *
965
+ */
966
+ export type ConfigOptionalResponseData = {
967
+ /**
968
+ * Account ID
969
+ */
970
+ account_id?: string;
971
+ /**
972
+ * Project ID
973
+ */
974
+ project_id?: string;
975
+ visitor_insights?: VisitorInsightsData;
976
+ };
977
+ /**
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.
868
979
  */
869
980
  export type ExperienceChangeBase = {
870
981
  type?: 'richStructure' | 'customCode' | 'defaultCode' | 'defaultCodeMultipage' | 'defaultRedirect' | 'fullStackFeature';
871
982
  /**
872
- * This contains all data of this change, any code, settings etc
873
- *
874
- * This is sent by default in the following requests responses: **getExperienceChange**;
875
- *
876
- * All other responses that return this field, will only return it if "include" request parameter contains its name
877
- *
878
- * 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.
879
986
  *
880
987
  */
881
988
  data?: {
@@ -892,41 +999,45 @@ export declare const type3: {
892
999
  readonly FULL_STACK_FEATURE: "fullStackFeature";
893
1000
  };
894
1001
  /**
895
- * 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.
896
1003
  */
897
1004
  export type ExperienceChangeId = {
898
1005
  /**
899
- * The ID of the experience change
1006
+ * The unique numerical identifier for this specific change.
900
1007
  */
901
1008
  id: number;
902
1009
  };
903
1010
  /**
904
- * 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.
905
1012
  */
906
1013
  export type ExperienceChangeIdReadOnly = {
907
1014
  /**
908
- * The ID of the experience change
1015
+ * The unique numerical identifier for this specific change.
909
1016
  */
910
1017
  readonly id?: number;
911
1018
  };
912
1019
  /**
913
1020
  * Object that represents one change done inside an experience
914
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
+ */
915
1026
  export type ExperienceChange = ExperienceChangeDefaultCodeData | ExperienceChangeDefaultCodeMultipageData | ExperienceChangeDefaultRedirectData | ExperienceChangeCustomCodeData | ExperienceChangeRichStructureData | ExperienceChangeFullStackFeature;
916
1027
  /**
917
- * 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.
918
1029
  */
919
1030
  export type ExperienceChangeAdd = ExperienceChangeDefaultCodeDataAdd | ExperienceChangeDefaultCodeMultipageDataAdd | ExperienceChangeDefaultRedirectDataAdd | ExperienceChangeCustomCodeDataAdd | ExperienceChangeRichStructureDataAdd | ExperienceChangeFullStackFeatureAdd;
920
1031
  /**
921
- * 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.
922
1033
  */
923
1034
  export type ExperienceChangeUpdate = ExperienceChangeDefaultCodeDataUpdate | ExperienceChangeDefaultCodeMultipageDataUpdate | ExperienceChangeDefaultRedirectDataUpdate | ExperienceChangeRichStructureDataUpdate | ExperienceChangeCustomCodeDataUpdate | ExperienceChangeFullStackFeatureUpdate;
924
1035
  /**
925
- * 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.
926
1037
  */
927
1038
  export type ExperienceChangeUpdateNoId = ExperienceChangeDefaultCodeDataUpdateNoId | ExperienceChangeDefaultCodeMultipageDataUpdateNoId | ExperienceChangeDefaultRedirectDataUpdateNoId | ExperienceChangeRichStructureDataUpdateNoId | ExperienceChangeCustomCodeDataUpdateNoId | ExperienceChangeFullStackFeatureUpdateNoId;
928
1039
  /**
929
- * 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.
930
1041
  */
931
1042
  export type ExperienceChangeDefaultCodeDataBase = ExperienceChangeBase & {
932
1043
  type?: 'defaultCode';
@@ -937,41 +1048,51 @@ export type ExperienceChangeDefaultCodeDataBase = ExperienceChangeBase & {
937
1048
  /**
938
1049
  * CSS code to be applied by this change
939
1050
  */
940
- css?: string | null;
1051
+ css?: (string) | null;
941
1052
  /**
942
1053
  * Javascript code generated by the visual editor or written in the same structure, to be applied by this experience change
943
1054
  */
944
- js?: string | null;
1055
+ js?: (string) | null;
945
1056
  /**
946
1057
  * Custom javascript code to be applied by this change
947
1058
  */
948
- custom_js?: string | null;
1059
+ custom_js?: (string) | null;
949
1060
  };
950
1061
  };
951
1062
  export type type4 = 'defaultCode';
952
1063
  export declare const type4: {
953
1064
  readonly DEFAULT_CODE: "defaultCode";
954
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
+ };
955
1072
  /**
956
1073
  * Describes structure for "defaultCode" type of experience change
957
1074
  */
958
- export type ExperienceChangeDefaultCodeData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeDataBase;
1075
+ export type ExperienceChangeDefaultCodeDataServing = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeDataBase;
959
1076
  /**
960
- * Describes structure for adding a "defaultCode" type of experience change
1077
+ * Data for creating a new 'defaultCode' type change.
961
1078
  */
962
1079
  export type ExperienceChangeDefaultCodeDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeDataBase & {
963
1080
  data: unknown;
964
1081
  };
965
1082
  /**
966
- * Describes structure for "defaultCode" type of experience change
1083
+ * Data for updating a 'defaultCode' type change when its ID is managed externally.
967
1084
  */
968
- export type ExperienceChangeDefaultCodeDataUpdateNoId = ExperienceChangeDefaultCodeDataBase & unknown;
1085
+ export type ExperienceChangeDefaultCodeDataUpdateNoId = ExperienceChangeDefaultCodeDataBase & {
1086
+ concurrency_key?: ConcurrencyKey;
1087
+ } & unknown;
969
1088
  /**
970
- * Describes structure for "defaultCode" type of experience change
1089
+ * Data for updating an existing 'defaultCode' type change, identified by its `id`.
971
1090
  */
972
- export type ExperienceChangeDefaultCodeDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeDataBase & unknown;
1091
+ export type ExperienceChangeDefaultCodeDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeDataBase & {
1092
+ concurrency_key?: ConcurrencyKey;
1093
+ } & unknown;
973
1094
  /**
974
- * 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.
975
1096
  */
976
1097
  export type ExperienceChangeDefaultRedirectDataBase = ExperienceChangeBase & {
977
1098
  type?: 'defaultRedirect';
@@ -998,25 +1119,35 @@ export declare const type5: {
998
1119
  readonly DEFAULT_REDIRECT: "defaultRedirect";
999
1120
  };
1000
1121
  /**
1001
- * Describes structure for "defaultRedirect" type of experience change
1122
+ * Represents a 'defaultRedirect' type change, including its system-assigned ID.
1002
1123
  */
1003
- export type ExperienceChangeDefaultRedirectData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase;
1124
+ export type ExperienceChangeDefaultRedirectData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase & {
1125
+ concurrency_key?: ConcurrencyKey;
1126
+ };
1004
1127
  /**
1005
1128
  * Describes structure for "defaultRedirect" type of experience change
1006
1129
  */
1130
+ export type ExperienceChangeDefaultRedirectDataServing = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase;
1131
+ /**
1132
+ * Data for creating a new 'defaultRedirect' type change.
1133
+ */
1007
1134
  export type ExperienceChangeDefaultRedirectDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase & {
1008
1135
  data: unknown;
1009
1136
  };
1010
1137
  /**
1011
- * Describes structure for "defaultRedirect" type of experience change
1138
+ * Data for updating a 'defaultRedirect' type change when its ID is managed externally.
1012
1139
  */
1013
- export type ExperienceChangeDefaultRedirectDataUpdateNoId = ExperienceChangeDefaultRedirectDataBase & unknown;
1140
+ export type ExperienceChangeDefaultRedirectDataUpdateNoId = ExperienceChangeDefaultRedirectDataBase & {
1141
+ concurrency_key?: ConcurrencyKey;
1142
+ } & unknown;
1014
1143
  /**
1015
- * Describes structure for "defaultRedirect" type of experience change
1144
+ * Data for updating an existing 'defaultRedirect' type change, identified by its `id`.
1016
1145
  */
1017
- export type ExperienceChangeDefaultRedirectDataUpdate = ExperienceChangeId & ExperienceChangeDefaultRedirectDataBase & unknown;
1146
+ export type ExperienceChangeDefaultRedirectDataUpdate = ExperienceChangeId & ExperienceChangeDefaultRedirectDataBase & {
1147
+ concurrency_key?: ConcurrencyKey;
1148
+ } & unknown;
1018
1149
  /**
1019
- * 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.
1020
1151
  */
1021
1152
  export type ExperienceChangeDefaultCodeMultipageDataBase = ExperienceChangeBase & {
1022
1153
  type?: 'defaultCodeMultipage';
@@ -1027,15 +1158,15 @@ export type ExperienceChangeDefaultCodeMultipageDataBase = ExperienceChangeBase
1027
1158
  /**
1028
1159
  * CSS code to be applied by this change
1029
1160
  */
1030
- css?: string | null;
1161
+ css?: (string) | null;
1031
1162
  /**
1032
1163
  * Javascript code generated by the visual editor or written in the same structure, to be applied by this experience change
1033
1164
  */
1034
- js?: string | null;
1165
+ js?: (string) | null;
1035
1166
  /**
1036
1167
  * Custom javascript code to be applied by this change
1037
1168
  */
1038
- custom_js?: string | null;
1169
+ custom_js?: (string) | null;
1039
1170
  /**
1040
1171
  * The **id** of the page connected to this change.
1041
1172
  */
@@ -1047,25 +1178,35 @@ export declare const type6: {
1047
1178
  readonly DEFAULT_CODE_MULTIPAGE: "defaultCodeMultipage";
1048
1179
  };
1049
1180
  /**
1050
- * Describes structure for "defaultCodeMultipage" type of experience change
1181
+ * Represents a 'defaultCodeMultipage' type change, including its system-assigned ID.
1051
1182
  */
1052
- export type ExperienceChangeDefaultCodeMultipageData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase;
1183
+ export type ExperienceChangeDefaultCodeMultipageData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase & {
1184
+ concurrency_key?: ConcurrencyKey;
1185
+ };
1053
1186
  /**
1054
1187
  * Describes structure for "defaultCodeMultipage" type of experience change
1055
1188
  */
1189
+ export type ExperienceChangeDefaultCodeMultipageDataServing = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase;
1190
+ /**
1191
+ * Data for creating a new 'defaultCodeMultipage' type change.
1192
+ */
1056
1193
  export type ExperienceChangeDefaultCodeMultipageDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase & {
1057
1194
  data: unknown;
1058
1195
  };
1059
1196
  /**
1060
- * Describes structure for "defaultCodeMultipage" type of experience change
1197
+ * Data for updating a 'defaultCodeMultipage' type change when its ID is managed externally.
1061
1198
  */
1062
- export type ExperienceChangeDefaultCodeMultipageDataUpdateNoId = ExperienceChangeDefaultCodeMultipageDataBase & unknown;
1199
+ export type ExperienceChangeDefaultCodeMultipageDataUpdateNoId = ExperienceChangeDefaultCodeMultipageDataBase & {
1200
+ concurrency_key?: ConcurrencyKey;
1201
+ } & unknown;
1063
1202
  /**
1064
- * Describes structure for "defaultCodeMultipage" type of experience change
1203
+ * Data for updating an existing 'defaultCodeMultipage' type change, identified by its `id`.
1065
1204
  */
1066
- export type ExperienceChangeDefaultCodeMultipageDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeMultipageDataBase & unknown;
1205
+ export type ExperienceChangeDefaultCodeMultipageDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeMultipageDataBase & {
1206
+ concurrency_key?: ConcurrencyKey;
1207
+ } & unknown;
1067
1208
  /**
1068
- * 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).
1069
1210
  */
1070
1211
  export type ExperienceChangeRichStructureDataBase = ExperienceChangeBase & {
1071
1212
  type?: 'richStructure';
@@ -1076,7 +1217,7 @@ export type ExperienceChangeRichStructureDataBase = ExperienceChangeBase & {
1076
1217
  /**
1077
1218
  * Javascript code generated by the visual editor or written in the same structure, to be applied by this experience change
1078
1219
  */
1079
- js?: string | null;
1220
+ js?: (string) | null;
1080
1221
  /**
1081
1222
  * CSS selector of the element to which the change refers to, if this is a change concerning one DOM element
1082
1223
  */
@@ -1088,7 +1229,7 @@ export type ExperienceChangeRichStructureDataBase = ExperienceChangeBase & {
1088
1229
  /**
1089
1230
  * Various key - value data
1090
1231
  */
1091
- [key: string]: string | undefined;
1232
+ [key: string]: (string) | undefined;
1092
1233
  };
1093
1234
  };
1094
1235
  export type type7 = 'richStructure';
@@ -1096,25 +1237,35 @@ export declare const type7: {
1096
1237
  readonly RICH_STRUCTURE: "richStructure";
1097
1238
  };
1098
1239
  /**
1099
- * Describes structure for "defaultCode" type of experience change
1240
+ * Represents a 'richStructure' type change, including its system-assigned ID.
1100
1241
  */
1101
- export type ExperienceChangeRichStructureData = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase;
1242
+ export type ExperienceChangeRichStructureData = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase & {
1243
+ concurrency_key?: ConcurrencyKey;
1244
+ };
1102
1245
  /**
1103
1246
  * Describes structure for "defaultCode" type of experience change
1104
1247
  */
1248
+ export type ExperienceChangeRichStructureDataServing = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase;
1249
+ /**
1250
+ * Data for creating a new 'richStructure' type change.
1251
+ */
1105
1252
  export type ExperienceChangeRichStructureDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase & {
1106
1253
  data: unknown;
1107
1254
  };
1108
1255
  /**
1109
- * Describes structure for "defaultCode" type of experience change
1256
+ * Data for updating a 'richStructure' type change when its ID is managed externally.
1110
1257
  */
1111
- export type ExperienceChangeRichStructureDataUpdateNoId = ExperienceChangeRichStructureDataBase & unknown;
1258
+ export type ExperienceChangeRichStructureDataUpdateNoId = ExperienceChangeRichStructureDataBase & {
1259
+ concurrency_key?: ConcurrencyKey;
1260
+ } & unknown;
1112
1261
  /**
1113
- * Describes structure for "defaultCode" type of experience change
1262
+ * Data for updating an existing 'richStructure' type change, identified by its `id`.
1114
1263
  */
1115
- export type ExperienceChangeRichStructureDataUpdate = ExperienceChangeId & ExperienceChangeRichStructureDataBase & unknown;
1264
+ export type ExperienceChangeRichStructureDataUpdate = ExperienceChangeId & ExperienceChangeRichStructureDataBase & {
1265
+ concurrency_key?: ConcurrencyKey;
1266
+ } & unknown;
1116
1267
  /**
1117
- * 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.
1118
1269
  */
1119
1270
  export type ExperienceChangeCustomCodeDataBase = ExperienceChangeBase & {
1120
1271
  type?: 'customCode';
@@ -1125,11 +1276,11 @@ export type ExperienceChangeCustomCodeDataBase = ExperienceChangeBase & {
1125
1276
  /**
1126
1277
  * CSS code to be applied by this change
1127
1278
  */
1128
- css?: string | null;
1279
+ css?: (string) | null;
1129
1280
  /**
1130
1281
  * Custom javascript code to be applied by this change
1131
1282
  */
1132
- js?: string | null;
1283
+ js?: (string) | null;
1133
1284
  /**
1134
1285
  * The **id** of the page connected to this change, in case this is a **multi-page** experiment
1135
1286
  */
@@ -1141,25 +1292,35 @@ export declare const type8: {
1141
1292
  readonly CUSTOM_CODE: "customCode";
1142
1293
  };
1143
1294
  /**
1144
- * Describes structure for "defaultCode" type of experience change
1295
+ * Represents a 'customCode' type change, including its system-assigned ID.
1145
1296
  */
1146
- export type ExperienceChangeCustomCodeData = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase;
1297
+ export type ExperienceChangeCustomCodeData = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase & {
1298
+ concurrency_key?: ConcurrencyKey;
1299
+ };
1147
1300
  /**
1148
1301
  * Describes structure for "defaultCode" type of experience change
1149
1302
  */
1303
+ export type ExperienceChangeCustomCodeDataServing = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase;
1304
+ /**
1305
+ * Data for creating a new 'customCode' type change.
1306
+ */
1150
1307
  export type ExperienceChangeCustomCodeDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase & {
1151
1308
  data: unknown;
1152
1309
  };
1153
1310
  /**
1154
- * Describes structure for "customCode" type of experience change
1311
+ * Data for updating a 'customCode' type change when its ID is managed externally.
1155
1312
  */
1156
- export type ExperienceChangeCustomCodeDataUpdateNoId = ExperienceChangeCustomCodeDataBase & unknown;
1313
+ export type ExperienceChangeCustomCodeDataUpdateNoId = ExperienceChangeCustomCodeDataBase & {
1314
+ concurrency_key?: ConcurrencyKey;
1315
+ } & unknown;
1157
1316
  /**
1158
- * Describes structure for "customCode" type of experience change
1317
+ * Data for updating an existing 'customCode' type change, identified by its `id`.
1159
1318
  */
1160
- export type ExperienceChangeCustomCodeDataUpdate = ExperienceChangeId & ExperienceChangeCustomCodeDataBase & unknown;
1319
+ export type ExperienceChangeCustomCodeDataUpdate = ExperienceChangeId & ExperienceChangeCustomCodeDataBase & {
1320
+ concurrency_key?: ConcurrencyKey;
1321
+ } & unknown;
1161
1322
  /**
1162
- * 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.
1163
1324
  */
1164
1325
  export type ExperienceChangeFullStackFeatureBase = ExperienceChangeBase & {
1165
1326
  type?: 'fullStackFeature';
@@ -1184,30 +1345,46 @@ export declare const type9: {
1184
1345
  readonly FULL_STACK_FEATURE: "fullStackFeature";
1185
1346
  };
1186
1347
  /**
1187
- * Describes structure for "fullStackFeature" type of experience change
1348
+ * Represents a 'fullStackFeature' type change, including its system-assigned ID.
1188
1349
  */
1189
- export type ExperienceChangeFullStackFeature = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase;
1350
+ export type ExperienceChangeFullStackFeature = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase & {
1351
+ concurrency_key?: ConcurrencyKey;
1352
+ };
1190
1353
  /**
1191
1354
  * Describes structure for "fullStackFeature" type of experience change
1192
1355
  */
1356
+ export type ExperienceChangeFullStackFeatureServing = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase;
1357
+ /**
1358
+ * Data for creating a new 'fullStackFeature' type change.
1359
+ */
1193
1360
  export type ExperienceChangeFullStackFeatureAdd = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase & {
1194
1361
  data: unknown;
1195
1362
  };
1196
1363
  /**
1197
- * Describes structure for "fullStackFeature" type of experience change
1364
+ * Data for updating an existing 'fullStackFeature' type change, identified by its `id`.
1198
1365
  */
1199
- export type ExperienceChangeFullStackFeatureUpdate = ExperienceChangeId & ExperienceChangeFullStackFeatureBase & unknown;
1366
+ export type ExperienceChangeFullStackFeatureUpdate = ExperienceChangeId & ExperienceChangeFullStackFeatureBase & {
1367
+ concurrency_key?: ConcurrencyKey;
1368
+ } & unknown;
1200
1369
  /**
1201
- * Describes structure for "fullStackFeature" type of experience change
1370
+ * Data for updating a 'fullStackFeature' type change when its ID is managed externally.
1202
1371
  */
1203
- export type ExperienceChangeFullStackFeatureUpdateNoId = ExperienceChangeFullStackFeatureBase & unknown;
1372
+ export type ExperienceChangeFullStackFeatureUpdateNoId = ExperienceChangeFullStackFeatureBase & {
1373
+ concurrency_key?: ConcurrencyKey;
1374
+ } & unknown;
1204
1375
  export type UpdateExperienceChangeRequestData = ExperienceChangeAdd;
1205
1376
  /**
1206
- * 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
+ *
1207
1381
  */
1208
1382
  export type IntegrationProvider = 'baidu' | 'clicktale' | 'clicky' | 'cnzz' | 'crazyegg' | 'econda' | 'eulerian' | 'google_analytics' | 'gosquared' | 'heapanalytics' | 'hotjar' | 'mixpanel' | 'mouseflow' | 'piwik' | 'segmentio' | 'sitecatalyst' | 'woopra' | 'ysance';
1209
1383
  /**
1210
- * 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
+ *
1211
1388
  */
1212
1389
  export declare const IntegrationProvider: {
1213
1390
  readonly BAIDU: "baidu";
@@ -1232,11 +1409,11 @@ export declare const IntegrationProvider: {
1232
1409
  export type ExperienceIntegrationBase = {
1233
1410
  provider: IntegrationProvider;
1234
1411
  /**
1235
- * Boolean flag indicating whether the integration is enabled or not. When updating experience's integrations,
1236
- * 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.
1237
1414
  *
1238
1415
  */
1239
- enabled?: boolean | null;
1416
+ enabled?: (boolean) | null;
1240
1417
  };
1241
1418
  export type ExperienceIntegrationBaidu = ExperienceIntegrationBase & {
1242
1419
  /**
@@ -1253,10 +1430,9 @@ export type ExperienceIntegrationCnzz = ExperienceIntegrationBase & {
1253
1430
  custom_dimension: string;
1254
1431
  };
1255
1432
  /**
1256
- * Crazyegg integration requires API key and secret which are set at the project level and can be
1257
- * updated using updateProject operation
1258
- *
1259
- * **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".
1260
1436
  *
1261
1437
  */
1262
1438
  export type ExperienceIntegrationCrazyegg = ExperienceIntegrationBase;
@@ -1274,7 +1450,7 @@ export type ExperienceIntegrationGA4 = ExperienceIntegrationGA4Base & Integratio
1274
1450
  * List of GA audiences created for each of this experience's variations
1275
1451
  */
1276
1452
  audiences?: {
1277
- [key: string]: string;
1453
+ [key: string]: (string);
1278
1454
  };
1279
1455
  };
1280
1456
  export type ExperienceIntegrationGoogleAnalytics = ExperienceIntegrationGA3 | ExperienceIntegrationGA4;
@@ -1319,19 +1495,23 @@ export type ConfigExperience = {
1319
1495
  /**
1320
1496
  * List of locations IDs on which this experience is presented. Either this or **site_area** is given but should not be both.
1321
1497
  */
1322
- locations?: Array<string> | null;
1498
+ locations?: Array<(string)> | null;
1323
1499
  /**
1324
1500
  * Rules that define where the experience is gonna run. Either this or **locations** is given but should not be both.
1325
1501
  */
1326
- site_area?: RuleObject | null;
1502
+ site_area?: ((RuleObject) | null);
1327
1503
  /**
1328
1504
  * List of audiences IDs to which this experience is presented to
1329
1505
  */
1330
- audiences?: Array<string> | null;
1506
+ audiences?: Array<(string)> | null;
1331
1507
  /**
1332
1508
  * List of goals IDs to which will be tracked for this experience
1333
1509
  */
1334
- goals?: Array<string>;
1510
+ goals?: Array<(string)>;
1511
+ /**
1512
+ * Only for multipage experience type
1513
+ */
1514
+ multipage_pages?: Array<MultipageExperiencePage>;
1335
1515
  status?: ExperienceStatuses;
1336
1516
  /**
1337
1517
  * Global Experience's JavaScript that will run for this experience before its changes are applied
@@ -1355,14 +1535,14 @@ export type ConfigExperience = {
1355
1535
  /**
1356
1536
  * List of integrations that this experience's data is sent to
1357
1537
  */
1358
- integrations?: Array<ExperienceIntegrationBaidu | ExperienceIntegrationClicktale | ExperienceIntegrationClicky | ExperienceIntegrationCnzz | ExperienceIntegrationCrazyegg | ExperienceIntegrationEconda | ExperienceIntegrationEulerian | ExperienceIntegrationGAServing | ExperienceIntegrationGosquared | ExperienceIntegrationHeapanalytics | ExperienceIntegrationHotjar | ExperienceIntegrationMixpanel | ExperienceIntegrationMouseflow | ExperienceIntegrationPiwik | ExperienceIntegrationSegmentio | ExperienceIntegrationSitecatalyst | ExperienceIntegrationWoopra | ExperienceIntegrationYsance>;
1538
+ integrations?: Array<(ExperienceIntegrationBaidu | ExperienceIntegrationClicktale | ExperienceIntegrationClicky | ExperienceIntegrationCnzz | ExperienceIntegrationCrazyegg | ExperienceIntegrationEconda | ExperienceIntegrationEulerian | ExperienceIntegrationGAServing | ExperienceIntegrationGosquared | ExperienceIntegrationHeapanalytics | ExperienceIntegrationHotjar | ExperienceIntegrationMixpanel | ExperienceIntegrationMouseflow | ExperienceIntegrationPiwik | ExperienceIntegrationSegmentio | ExperienceIntegrationSitecatalyst | ExperienceIntegrationWoopra | ExperienceIntegrationYsance)>;
1359
1539
  /**
1360
1540
  * List of environments that this experience is supposed to run on. The full list of available environments is defined at
1361
1541
  * project level. If this list is empty, the experience will run on all environments.
1362
1542
  *
1363
1543
  * @deprecated
1364
1544
  */
1365
- environments?: Array<string>;
1545
+ environments?: Array<(string)>;
1366
1546
  /**
1367
1547
  * The environment where this experience will run. It has to be one of the environments defined at the project level
1368
1548
  */
@@ -1388,11 +1568,27 @@ export type ConfigExperience = {
1388
1568
  /**
1389
1569
  * Order value outlier settings
1390
1570
  */
1391
- order_value?: NumericOutlier;
1571
+ order_value?: (NumericOutlier);
1392
1572
  /**
1393
1573
  * Products Ordered count outlier settings
1394
1574
  */
1395
- products_ordered_count?: NumericOutlier;
1575
+ products_ordered_count?: (NumericOutlier);
1576
+ };
1577
+ /**
1578
+ * List of placeholders used by this experience (from changes, global_js, and global_css)
1579
+ */
1580
+ placeholders?: Array<(string)>;
1581
+ /**
1582
+ * A couple of settings only applicable to Split URL experiments
1583
+ */
1584
+ split_url_settings?: {
1585
+ /**
1586
+ * Whether regular expressions are supported in original/variation URLs of a split URL experiment or not.
1587
+ *
1588
+ * It only applies to **experience_type** - **split_url**
1589
+ *
1590
+ */
1591
+ split_regex_support?: boolean;
1396
1592
  };
1397
1593
  /**
1398
1594
  * Various settings used for matching the list of Audiences and Locations
@@ -1403,6 +1599,23 @@ export type ConfigExperience = {
1403
1599
  };
1404
1600
  };
1405
1601
  };
1602
+ /**
1603
+ * Multipage Experience Page object
1604
+ */
1605
+ export type MultipageExperiencePage = {
1606
+ /**
1607
+ * The ID of the page.
1608
+ */
1609
+ id?: string;
1610
+ /**
1611
+ * Name of the page
1612
+ */
1613
+ name?: string;
1614
+ /**
1615
+ * The url of page to load
1616
+ */
1617
+ url?: string;
1618
+ };
1406
1619
  /**
1407
1620
  * Variation Object
1408
1621
  */
@@ -1429,7 +1642,7 @@ export type ExperienceVariationConfig = {
1429
1642
  /**
1430
1643
  * List of changes that this variation is exposing.
1431
1644
  */
1432
- changes?: Array<ExperienceChange>;
1645
+ changes?: Array<ExperienceChangeServing>;
1433
1646
  };
1434
1647
  export type ExperienceStatuses = 'draft' | 'active' | 'paused' | 'completed' | 'scheduled';
1435
1648
  export declare const ExperienceStatuses: {
@@ -1528,7 +1741,7 @@ export type ConfigGoalBase = {
1528
1741
  * List of goal types to be returned
1529
1742
  */
1530
1743
  type?: Array<GoalTypes>;
1531
- rules?: RuleObject | null;
1744
+ rules?: ((RuleObject) | null);
1532
1745
  };
1533
1746
  export type ConfigGoal = DomInteractionGoal | ScrollPercentageGoal | RevenueGoal | NoSettingsGoal | GaGoal | SubmitsFormGoal | ClicksLinkGoal | ClicksElementGoal;
1534
1747
  export type DomInteractionGoal = ConfigGoalBase & {
@@ -1672,6 +1885,10 @@ export type ClicksElementGoalSettings = {
1672
1885
  * Css selector that identifies the DOM element(s) on which will track clicks in order to fire the goal.
1673
1886
  */
1674
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;
1675
1892
  };
1676
1893
  /**
1677
1894
  * Goals type, one of below.
@@ -1688,18 +1905,29 @@ export declare const GoalTypes: {
1688
1905
  readonly REVENUE: "revenue";
1689
1906
  };
1690
1907
  /**
1691
- * 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
+ *
1692
1912
  */
1693
1913
  export type LocationTrigger = LocationTriggerDomElement | LocationTriggerCallback | LocationTriggerManual | LocationTriggerUponRun;
1694
1914
  /**
1695
- * Describes possible location trigger types.
1696
- * 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.
1697
1921
  *
1698
1922
  */
1699
1923
  export type LocationTriggerTypes = 'upon_run' | 'manual' | 'dom_element' | 'callback';
1700
1924
  /**
1701
- * Describes possible location trigger types.
1702
- * 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.
1703
1931
  *
1704
1932
  */
1705
1933
  export declare const LocationTriggerTypes: {
@@ -1726,11 +1954,21 @@ export declare const type20: {
1726
1954
  readonly MANUAL: "manual";
1727
1955
  };
1728
1956
  /**
1729
- * 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
+ *
1730
1963
  */
1731
1964
  export type LocationDomTriggerEvents = 'click' | 'hover' | 'in_view' | 'change';
1732
1965
  /**
1733
- * 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
+ *
1734
1972
  */
1735
1973
  export declare const LocationDomTriggerEvents: {
1736
1974
  readonly CLICK: "click";
@@ -1757,19 +1995,19 @@ export type LocationTriggerCallback = LocationTriggerBase & {
1757
1995
  type?: 'callback';
1758
1996
  /**
1759
1997
  * Describes the js callback that will be executed in order to fire the experience.
1998
+ *
1760
1999
  * It is called with two arguments:
1761
2000
  * - `activate` - a function that should be called when the experience should be activated
1762
2001
  * - `options` - an object with the following properties:
1763
2002
  * - `locationId` - id of the location that is being activated
1764
2003
  * - `isActive` - boolean flag that indicates if the location is active
1765
- *
1766
2004
  * Example:
1767
2005
  * ```
1768
2006
  * function(activate, options) {
1769
2007
  * if (options.isActive) {
1770
2008
  * setTimeout(function() {
1771
2009
  * * it activates the experiences 1 second after the
1772
- * location trigger is initialized - at the load of the tracking script*
2010
+ * location trigger is initialized - at the load of the tracking script *
1773
2011
  * activate();
1774
2012
  * }, 1000);
1775
2013
  * }
@@ -1800,7 +2038,7 @@ export type ConfigLocation = {
1800
2038
  */
1801
2039
  name?: string;
1802
2040
  trigger?: LocationTrigger;
1803
- rules?: RuleObject | null;
2041
+ rules?: ((RuleObject) | null);
1804
2042
  };
1805
2043
  export type ConfigProjectMinimalSettings = {
1806
2044
  /**
@@ -1819,7 +2057,7 @@ export type ConfigProjectMinimalSettings = {
1819
2057
  * Tracks the project's version, updated with each change done inside the project, which would affect the config of that project. The format is [ISO_datetime]-[incremental_number].
1820
2058
  *
1821
2059
  */
1822
- readonly version?: string | null;
2060
+ readonly version?: (string) | null;
1823
2061
  tracking_script?: TrackingScriptReleaseBase;
1824
2062
  };
1825
2063
  /**
@@ -1865,12 +2103,14 @@ export type ConfigProject = {
1865
2103
  }>;
1866
2104
  /**
1867
2105
  * The global javascript code that will be loaded on all pages where
1868
- * the tracking script is installed, prior do processing any of
1869
- * 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.
1870
2110
  *
1871
2111
  */
1872
- global_javascript?: string | null;
1873
- settings?: {
2112
+ global_javascript?: (string) | null;
2113
+ settings?: ({
1874
2114
  /**
1875
2115
  * Flag indicating whether decoration of outgoing links (appending tracking cookies inside the link URL in order to
1876
2116
  * make cross domain tracking possible) is done automatically on page
@@ -1903,6 +2143,9 @@ export type ConfigProject = {
1903
2143
  */
1904
2144
  integrations?: {
1905
2145
  google_analytics?: GA_Settings;
2146
+ visitor_insights?: {
2147
+ tracking_id?: VisitorInsightsTrackingId;
2148
+ };
1906
2149
  kissmetrics?: {
1907
2150
  /**
1908
2151
  * Flag indicating whether Kissmetrics integration is enabled or not for this project
@@ -1927,28 +2170,21 @@ export type ConfigProject = {
1927
2170
  /**
1928
2171
  * Order value outlier settings
1929
2172
  */
1930
- order_value?: NumericOutlier;
2173
+ order_value?: (NumericOutlier);
1931
2174
  /**
1932
2175
  * Products Ordered count outlier settings
1933
2176
  */
1934
- products_ordered_count?: NumericOutlier;
2177
+ products_ordered_count?: (NumericOutlier);
1935
2178
  };
1936
- } & ConfigProjectMinimalSettings;
1937
- /**
1938
- * 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.
1939
- */
1940
- environments?: {
1941
- [key: string]: {
1942
- /**
1943
- * The display name of the environment.
1944
- */
1945
- label: string;
1946
- /**
1947
- * Specifies whether this environment is set as the default environment for the project.
1948
- */
1949
- is_default: boolean;
1950
- };
1951
- };
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)>;
2187
+ } & ConfigProjectMinimalSettings);
1952
2188
  };
1953
2189
  /**
1954
2190
  * Value which describes project product type
@@ -2008,8 +2244,19 @@ export type TrackingScriptReleaseBase = {
2008
2244
  /**
2009
2245
  * Latest available version of the tracking script bundle.
2010
2246
  */
2011
- readonly latest_version?: string | null;
2247
+ readonly latest_version?: (string) | null;
2012
2248
  } | null;
2249
+ /**
2250
+ * The tracking ID for Visitor Insights.
2251
+ */
2252
+ export type VisitorInsightsTrackingId = string;
2253
+ export type VisitorInsightsData = VisitorInsightsBase & {
2254
+ tracking_id?: VisitorInsightsTrackingId;
2255
+ /**
2256
+ * The sampling rate for tracking events.
2257
+ */
2258
+ sampling_rate?: number;
2259
+ };
2013
2260
  export type ProjectGASettingsBase = GA_SettingsBase & {
2014
2261
  /**
2015
2262
  * Attempt to pull revenue data from Google Analytics Revenue Tracking code.
@@ -2040,7 +2287,7 @@ export type ConfigSegment = {
2040
2287
  * Segment Name
2041
2288
  */
2042
2289
  name?: string;
2043
- rules?: RuleObject | null;
2290
+ rules?: ((RuleObject) | null);
2044
2291
  };
2045
2292
  /**
2046
2293
  * Tracking Request's data
@@ -2087,7 +2334,7 @@ export type VisitorTrackingEvents = {
2087
2334
  * Type of the event. It can be a bucketing or a conversion event
2088
2335
  */
2089
2336
  eventType?: 'bucketing' | 'conversion';
2090
- data?: BucketingEvent | ConversionEvent;
2337
+ data?: (BucketingEvent | ConversionEvent);
2091
2338
  };
2092
2339
  /**
2093
2340
  * Type of the event. It can be a bucketing or a conversion event
@@ -2130,11 +2377,11 @@ export type ConversionEvent = {
2130
2377
  /**
2131
2378
  * Key of the metric
2132
2379
  */
2133
- key?: 'amount' | 'productsCount' | 'transactionId';
2380
+ key?: 'amount' | 'productsCount' | 'transactionId' | 'customDimension1' | 'customDimension2' | 'customDimension3' | 'customDimension4' | 'customDimension5';
2134
2381
  /**
2135
2382
  * Value of the metric
2136
2383
  */
2137
- value?: number | string;
2384
+ value?: (number | string | Array<(string)>);
2138
2385
  }>;
2139
2386
  /**
2140
2387
  * Bucketing data (experiences that this visitor is currently part of) for the visitor. In case that **enrichData=true** flag is being sent and
@@ -2144,7 +2391,7 @@ export type ConversionEvent = {
2144
2391
  *
2145
2392
  */
2146
2393
  bucketingData?: {
2147
- [key: string]: string;
2394
+ [key: string]: (string);
2148
2395
  };
2149
2396
  };
2150
2397
  /**
@@ -2167,7 +2414,7 @@ export type VisitorSegments = {
2167
2414
  /**
2168
2415
  * List of device classes that the visitor device falls into
2169
2416
  */
2170
- devices?: Array<'ALLPH' | 'IPH' | 'OTHPH' | 'ALLTAB' | 'IPAD' | 'OTHTAB' | 'DESK' | 'OTHDEV'>;
2417
+ devices?: Array<('ALLPH' | 'IPH' | 'OTHPH' | 'ALLTAB' | 'IPAD' | 'OTHTAB' | 'DESK' | 'OTHDEV')>;
2171
2418
  /**
2172
2419
  * Traffic source
2173
2420
  */
@@ -2187,7 +2434,7 @@ export type VisitorSegments = {
2187
2434
  /**
2188
2435
  * Custom Segments as defined inside Convert app. This will be the list of segments' IDs
2189
2436
  */
2190
- customSegments?: Array<string>;
2437
+ customSegments?: Array<(string)>;
2191
2438
  };
2192
2439
  /**
2193
2440
  * Browser used:
@@ -2242,6 +2489,25 @@ export declare const visitorType: {
2242
2489
  readonly NEW: "new";
2243
2490
  readonly RETURNING: "returning";
2244
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
+ };
2245
2511
  export type GetProjectConfigData = {
2246
2512
  /**
2247
2513
  * ID of the account that owns the retrieved/saved data
@@ -2256,7 +2522,7 @@ export type GetProjectConfigData = {
2256
2522
  */
2257
2523
  projectId: number;
2258
2524
  };
2259
- export type GetProjectConfigResponse = ConfigResponseData;
2525
+ export type GetProjectConfigResponse = (ConfigResponseData);
2260
2526
  export type GetProjectConfigBySdkKeyData = {
2261
2527
  /**
2262
2528
  * Filter experiences based on environment.
@@ -2267,7 +2533,7 @@ export type GetProjectConfigBySdkKeyData = {
2267
2533
  */
2268
2534
  sdkKey: string;
2269
2535
  };
2270
- export type GetProjectConfigBySdkKeyResponse = ConfigResponseData;
2536
+ export type GetProjectConfigBySdkKeyResponse = (ConfigResponseData);
2271
2537
  export type GetProjectSettingsData = {
2272
2538
  /**
2273
2539
  * ID of the account that owns the retrieved/saved data
@@ -2278,7 +2544,18 @@ export type GetProjectSettingsData = {
2278
2544
  */
2279
2545
  projectId: number;
2280
2546
  };
2281
- export type GetProjectSettingsResponse = ConfigMinimalResponseData;
2547
+ export type GetProjectSettingsResponse = (ConfigMinimalResponseData);
2548
+ export type GetProjectOptionalSettingsData = {
2549
+ /**
2550
+ * ID of the account that owns the retrieved/saved data
2551
+ */
2552
+ accountId: number;
2553
+ /**
2554
+ * ID of the project to be retrieved
2555
+ */
2556
+ projectId: number;
2557
+ };
2558
+ export type GetProjectOptionalSettingsResponse = (ConfigOptionalResponseData);
2282
2559
  export type SendTrackingEventsSdkKeyData = {
2283
2560
  /**
2284
2561
  * A JSON object containing the tracking events sent to the Convert tracking servers.
@@ -2289,7 +2566,7 @@ export type SendTrackingEventsSdkKeyData = {
2289
2566
  */
2290
2567
  sdkKey: string;
2291
2568
  };
2292
- export type SendTrackingEventsSdkKeyResponse = SuccessData;
2569
+ export type SendTrackingEventsSdkKeyResponse = (SuccessData);
2293
2570
  export type SendTrackingEventsData = {
2294
2571
  /**
2295
2572
  * ID of the account that owns the given project
@@ -2304,7 +2581,33 @@ export type SendTrackingEventsData = {
2304
2581
  */
2305
2582
  requestBody: SendTrackingEventsRequestData;
2306
2583
  };
2307
- export type SendTrackingEventsResponse = SuccessData;
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);
2308
2611
  export type $OpenApiTs = {
2309
2612
  '/config/{account_id}/{project_id}': {
2310
2613
  get: {
@@ -2354,7 +2657,23 @@ export type $OpenApiTs = {
2354
2657
  };
2355
2658
  };
2356
2659
  };
2357
- '/track/{sdkKey}': {
2660
+ '/project-optional-settings/{account_id}/{project_id}': {
2661
+ get: {
2662
+ req: GetProjectOptionalSettingsData;
2663
+ res: {
2664
+ /**
2665
+ * Object consumed by SDKs
2666
+ *
2667
+ */
2668
+ 200: ConfigOptionalResponseData;
2669
+ /**
2670
+ * A response signaling an error
2671
+ */
2672
+ default: ErrorData;
2673
+ };
2674
+ };
2675
+ };
2676
+ '/track/{sdk_key}': {
2358
2677
  post: {
2359
2678
  req: SendTrackingEventsSdkKeyData;
2360
2679
  res: {
@@ -2384,4 +2703,36 @@ export type $OpenApiTs = {
2384
2703
  };
2385
2704
  };
2386
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
+ };
2387
2738
  };