@convertcom/js-sdk-rules 2.1.2 → 2.1.3

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?: ((RuleObject) | 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.
@@ -69,7 +69,7 @@ export type ResultsPerPage = {
69
69
  * Defaults to 30 when not sent
70
70
  *
71
71
  */
72
- results_per_page?: number | null;
72
+ results_per_page?: (number) | null;
73
73
  };
74
74
  export type SortDirection = {
75
75
  /**
@@ -434,27 +434,27 @@ export declare const WeatherConditionMatchRulesTypes: {
434
434
  export type RulesTypes = TextMatchRulesTypes & NumericMatchRulesTypes & BoolMatchRulesTypes & KeyValueMatchRulesTypes & CookieMatchRulesTypes & CountryMatchRulesTypes & VisitorTypeMatchRulesTypes & LanguageMatchRulesTypes & GoalTriggeredMatchRulesTypes & SegmentBucketedMatchRulesTypes & DayOfWeekMatchRulesTypes & HourOfDayMatchRulesTypes & MinuteOfHourMatchRulesTypes & BrowserNameMatchRulesTypes & OsMatchRulesTypes & WeatherConditionMatchRulesTypes;
435
435
  export type GenericTextMatchRule = BaseRuleWithStringValue & {
436
436
  rule_type: TextMatchRulesTypes;
437
- matching?: BaseMatch & {
437
+ matching?: (BaseMatch & {
438
438
  match_type?: TextMatchingOptions;
439
- };
439
+ });
440
440
  };
441
441
  export type GenericNumericMatchRule = BaseRuleWithNumericValue & {
442
442
  rule_type: NumericMatchRulesTypes;
443
- matching?: BaseMatch & {
443
+ matching?: (BaseMatch & {
444
444
  match_type?: NumericMatchingOptions;
445
- };
445
+ });
446
446
  };
447
447
  export type GenericBoolMatchRule = BaseRuleWithBooleanValue & {
448
448
  rule_type: BoolMatchRulesTypes;
449
- matching?: BaseMatch & {
449
+ matching?: (BaseMatch & {
450
450
  match_type?: ChoiceMatchingOptions;
451
- };
451
+ });
452
452
  };
453
453
  export type GenericSetMatchRule = BaseRuleWithStringValue & {
454
454
  rule_type: string;
455
- matching?: BaseMatch & {
455
+ matching?: (BaseMatch & {
456
456
  match_type?: SetMatchingOptions;
457
- };
457
+ });
458
458
  };
459
459
  export type GenericKey = {
460
460
  /**
@@ -464,27 +464,27 @@ export type GenericKey = {
464
464
  };
465
465
  export type GenericTextKeyValueMatchRule = BaseRuleWithStringValue & {
466
466
  rule_type: GenericTextKeyValueMatchRulesTypes;
467
- matching?: BaseMatch & {
467
+ matching?: (BaseMatch & {
468
468
  match_type?: TextMatchingOptions;
469
- };
469
+ });
470
470
  } & GenericKey;
471
471
  export type GenericNumericKeyValueMatchRule = BaseRuleWithNumericValue & {
472
472
  rule_type: GenericNumericKeyValueMatchRulesTypes;
473
- matching?: BaseMatch & {
473
+ matching?: (BaseMatch & {
474
474
  match_type?: NumericMatchingOptions;
475
- };
475
+ });
476
476
  } & GenericKey;
477
477
  export type GenericBoolKeyValueMatchRule = BaseRuleWithBooleanValue & {
478
478
  rule_type: GenericBoolKeyValueMatchRulesTypes;
479
- matching?: BaseMatch & {
479
+ matching?: (BaseMatch & {
480
480
  match_type?: ChoiceMatchingOptions;
481
- };
481
+ });
482
482
  } & GenericKey;
483
483
  export type CookieMatchRule = BaseRuleWithStringValue & {
484
484
  rule_type: CookieMatchRulesTypes;
485
- matching?: BaseMatch & {
485
+ matching?: (BaseMatch & {
486
486
  match_type?: TextMatchingOptions;
487
- };
487
+ });
488
488
  /**
489
489
  * The name of the cookie which value is compared to the given rule value
490
490
  */
@@ -492,81 +492,81 @@ export type CookieMatchRule = BaseRuleWithStringValue & {
492
492
  };
493
493
  export type CountryMatchRule = BaseRuleWithCountryCodeValue & {
494
494
  rule_type: CountryMatchRulesTypes;
495
- matching?: BaseMatch & {
495
+ matching?: (BaseMatch & {
496
496
  match_type?: ChoiceMatchingOptions;
497
- };
497
+ });
498
498
  };
499
499
  export type JsConditionMatchRule = BaseRuleWithJsCodeValue & {
500
500
  rule_type: JsConditionMatchRulesTypes;
501
- matching?: BaseMatch & {
501
+ matching?: (BaseMatch & {
502
502
  match_type?: ChoiceMatchingOptions;
503
- };
503
+ });
504
504
  };
505
505
  export type VisitorTypeMatchRule = BaseRuleWithVisitorTypeValue & {
506
506
  rule_type: VisitorTypeMatchRulesTypes;
507
- matching?: BaseMatch & {
507
+ matching?: (BaseMatch & {
508
508
  match_type?: ChoiceMatchingOptions;
509
- };
509
+ });
510
510
  };
511
511
  export type LanguageMatchRule = BaseRuleWithLanguageCodeValue & {
512
512
  rule_type: LanguageMatchRulesTypes;
513
- matching?: BaseMatch & {
513
+ matching?: (BaseMatch & {
514
514
  match_type?: ChoiceMatchingOptions;
515
- };
515
+ });
516
516
  };
517
517
  export type GoalTriggeredMatchRule = BaseRuleWithGoalTriggeredValue & {
518
518
  rule_type: GoalTriggeredMatchRulesTypes;
519
- matching?: BaseMatch & {
519
+ matching?: (BaseMatch & {
520
520
  match_type?: ChoiceMatchingOptions;
521
- };
521
+ });
522
522
  };
523
523
  export type SegmentBucketedMatchRule = BaseRuleWithSegmentBucketedValue & {
524
524
  rule_type: SegmentBucketedMatchRulesTypes;
525
- matching?: BaseMatch & {
525
+ matching?: (BaseMatch & {
526
526
  match_type?: ChoiceMatchingOptions;
527
- };
527
+ });
528
528
  };
529
529
  export type ExperienceBucketedMatchRule = BaseRuleWithExperienceBucketedValue & {
530
530
  rule_type: string;
531
- matching?: BaseMatch & {
531
+ matching?: (BaseMatch & {
532
532
  match_type?: ChoiceMatchingOptions;
533
- };
533
+ });
534
534
  };
535
535
  export type DayOfWeekMatchRule = BaseRuleWithDayOfWeekValue & {
536
536
  rule_type: DayOfWeekMatchRulesTypes;
537
- matching?: BaseMatch & {
537
+ matching?: (BaseMatch & {
538
538
  match_type?: NumericMatchingOptions;
539
- };
539
+ });
540
540
  };
541
541
  export type HourOfDayMatchRule = BaseRuleWithHourOfDayValue & {
542
542
  rule_type: HourOfDayMatchRulesTypes;
543
- matching?: BaseMatch & {
543
+ matching?: (BaseMatch & {
544
544
  match_type?: NumericMatchingOptions;
545
- };
545
+ });
546
546
  };
547
547
  export type MinuteOfHourMatchRule = BaseRuleWithMinuteOfHourValue & {
548
548
  rule_type: MinuteOfHourMatchRulesTypes;
549
- matching?: BaseMatch & {
549
+ matching?: (BaseMatch & {
550
550
  match_type?: NumericMatchingOptions;
551
- };
551
+ });
552
552
  };
553
553
  export type BrowserNameMatchRule = BaseRuleWithBrowserNameValue & {
554
554
  rule_type: BrowserNameMatchRulesTypes;
555
- matching?: BaseMatch & {
555
+ matching?: (BaseMatch & {
556
556
  match_type?: ChoiceMatchingOptions;
557
- };
557
+ });
558
558
  };
559
559
  export type OsMatchRule = BaseRuleWithOsValue & {
560
560
  rule_type: OsMatchRulesTypes;
561
- matching?: BaseMatch & {
561
+ matching?: (BaseMatch & {
562
562
  match_type?: ChoiceMatchingOptions;
563
- };
563
+ });
564
564
  };
565
565
  export type WeatherConditionMatchRule = BaseRuleWithWeatherConditionValue & {
566
566
  rule_type: WeatherConditionMatchRulesTypes;
567
- matching?: BaseMatch & {
567
+ matching?: (BaseMatch & {
568
568
  match_type?: TextMatchingOptions;
569
- };
569
+ });
570
570
  };
571
571
  export type RuleElementNoUrl = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | CookieMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule;
572
572
  export type RuleElement = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CookieMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule;
@@ -657,23 +657,23 @@ export type ImportProjectDataSuccess = SuccessData & {
657
657
  /**
658
658
  * List of created experiences. Empty if nothing imported
659
659
  */
660
- experiences?: Array<number>;
660
+ experiences?: Array<(number)>;
661
661
  /**
662
662
  * List of created audiences. Empty if nothing imported
663
663
  */
664
- audiences?: Array<number>;
664
+ audiences?: Array<(number)>;
665
665
  /**
666
666
  * List of created locations. Empty if nothing imported
667
667
  */
668
- locations?: Array<number>;
668
+ locations?: Array<(number)>;
669
669
  /**
670
670
  * List of created goals. Empty if nothing imported
671
671
  */
672
- goals?: Array<number>;
672
+ goals?: Array<(number)>;
673
673
  /**
674
674
  * List of created hypothesis. Empty if nothing imported
675
675
  */
676
- hypothesis?: Array<number>;
676
+ hypothesis?: Array<(number)>;
677
677
  };
678
678
  };
679
679
  export type BulkSuccessData = SuccessData & {
@@ -708,7 +708,7 @@ export type IntegrationGA3 = {
708
708
  /**
709
709
  * Universal Analytics property to be used for tracking
710
710
  */
711
- property_UA?: string | null;
711
+ property_UA?: (string) | null;
712
712
  };
713
713
  export type type = 'ga3';
714
714
  export declare const type: {
@@ -746,6 +746,12 @@ export declare const GenericListMatchingOptions: {
746
746
  readonly ANY: "any";
747
747
  readonly ALL: "all";
748
748
  };
749
+ export type VisitorInsightsBase = {
750
+ /**
751
+ * Flag indicating whether Visitor Insights is enabled or not.
752
+ */
753
+ enabled?: boolean;
754
+ };
749
755
  /**
750
756
  * Type of the outlier detection mechanism
751
757
  */
@@ -785,8 +791,8 @@ export declare const detection_type2: {
785
791
  };
786
792
  export type NumericOutlierPercentile = NumericOutlierBase & {
787
793
  detection_type?: 'percentile';
788
- min?: unknown & Percentiles;
789
- max?: unknown & Percentiles;
794
+ min?: (unknown & Percentiles);
795
+ max?: (unknown & Percentiles);
790
796
  };
791
797
  export type detection_type3 = 'percentile';
792
798
  export declare const detection_type3: {
@@ -811,6 +817,17 @@ export declare const Percentiles: {
811
817
  readonly _95: 95;
812
818
  readonly _99: 99;
813
819
  };
820
+ export type TimeRange = {
821
+ /**
822
+ * Unix timestamp when reporting period should start, provided in the given **utc_time_offset**
823
+ */
824
+ start_time?: (number) | null;
825
+ /**
826
+ * Unix timestamp when reporting period should end, provided in the given **utc_time_offset**
827
+ */
828
+ end_time?: (number) | null;
829
+ utc_offset?: UTC_Offset;
830
+ };
814
831
  /**
815
832
  * Response containing project's config data needed in order to serve experiences
816
833
  */
@@ -843,7 +860,7 @@ export type ConfigResponseData = {
843
860
  /**
844
861
  * List of archived experiences inside this project, which were archived within the last 8 months
845
862
  */
846
- archived_experiences?: Array<string>;
863
+ archived_experiences?: Array<(string)>;
847
864
  /**
848
865
  * List of features inside this project. Presented only for fullstack projects
849
866
  */
@@ -863,6 +880,22 @@ export type ConfigMinimalResponseData = {
863
880
  */
864
881
  project_id?: string;
865
882
  } & ConfigProjectMinimalSettings;
883
+ /**
884
+ * Limited data containing optional properties required for decision-making when assembling and
885
+ * tracking various bundles (e.g., tracking scripts).
886
+ *
887
+ */
888
+ export type ConfigOptionalResponseData = {
889
+ /**
890
+ * Account ID
891
+ */
892
+ account_id?: string;
893
+ /**
894
+ * Project ID
895
+ */
896
+ project_id?: string;
897
+ visitor_insights?: VisitorInsightsData;
898
+ };
866
899
  /**
867
900
  * Object that represents the change done inside an experience
868
901
  */
@@ -937,15 +970,15 @@ export type ExperienceChangeDefaultCodeDataBase = ExperienceChangeBase & {
937
970
  /**
938
971
  * CSS code to be applied by this change
939
972
  */
940
- css?: string | null;
973
+ css?: (string) | null;
941
974
  /**
942
975
  * Javascript code generated by the visual editor or written in the same structure, to be applied by this experience change
943
976
  */
944
- js?: string | null;
977
+ js?: (string) | null;
945
978
  /**
946
979
  * Custom javascript code to be applied by this change
947
980
  */
948
- custom_js?: string | null;
981
+ custom_js?: (string) | null;
949
982
  };
950
983
  };
951
984
  export type type4 = 'defaultCode';
@@ -1027,15 +1060,15 @@ export type ExperienceChangeDefaultCodeMultipageDataBase = ExperienceChangeBase
1027
1060
  /**
1028
1061
  * CSS code to be applied by this change
1029
1062
  */
1030
- css?: string | null;
1063
+ css?: (string) | null;
1031
1064
  /**
1032
1065
  * Javascript code generated by the visual editor or written in the same structure, to be applied by this experience change
1033
1066
  */
1034
- js?: string | null;
1067
+ js?: (string) | null;
1035
1068
  /**
1036
1069
  * Custom javascript code to be applied by this change
1037
1070
  */
1038
- custom_js?: string | null;
1071
+ custom_js?: (string) | null;
1039
1072
  /**
1040
1073
  * The **id** of the page connected to this change.
1041
1074
  */
@@ -1076,7 +1109,7 @@ export type ExperienceChangeRichStructureDataBase = ExperienceChangeBase & {
1076
1109
  /**
1077
1110
  * Javascript code generated by the visual editor or written in the same structure, to be applied by this experience change
1078
1111
  */
1079
- js?: string | null;
1112
+ js?: (string) | null;
1080
1113
  /**
1081
1114
  * CSS selector of the element to which the change refers to, if this is a change concerning one DOM element
1082
1115
  */
@@ -1088,7 +1121,7 @@ export type ExperienceChangeRichStructureDataBase = ExperienceChangeBase & {
1088
1121
  /**
1089
1122
  * Various key - value data
1090
1123
  */
1091
- [key: string]: string | undefined;
1124
+ [key: string]: (string) | undefined;
1092
1125
  };
1093
1126
  };
1094
1127
  export type type7 = 'richStructure';
@@ -1125,11 +1158,11 @@ export type ExperienceChangeCustomCodeDataBase = ExperienceChangeBase & {
1125
1158
  /**
1126
1159
  * CSS code to be applied by this change
1127
1160
  */
1128
- css?: string | null;
1161
+ css?: (string) | null;
1129
1162
  /**
1130
1163
  * Custom javascript code to be applied by this change
1131
1164
  */
1132
- js?: string | null;
1165
+ js?: (string) | null;
1133
1166
  /**
1134
1167
  * The **id** of the page connected to this change, in case this is a **multi-page** experiment
1135
1168
  */
@@ -1236,7 +1269,7 @@ export type ExperienceIntegrationBase = {
1236
1269
  * to disable an integration, this flag needs to be passed as **false**. If not passed, integration is assumed to be **enabled=true**
1237
1270
  *
1238
1271
  */
1239
- enabled?: boolean | null;
1272
+ enabled?: (boolean) | null;
1240
1273
  };
1241
1274
  export type ExperienceIntegrationBaidu = ExperienceIntegrationBase & {
1242
1275
  /**
@@ -1274,7 +1307,7 @@ export type ExperienceIntegrationGA4 = ExperienceIntegrationGA4Base & Integratio
1274
1307
  * List of GA audiences created for each of this experience's variations
1275
1308
  */
1276
1309
  audiences?: {
1277
- [key: string]: string;
1310
+ [key: string]: (string);
1278
1311
  };
1279
1312
  };
1280
1313
  export type ExperienceIntegrationGoogleAnalytics = ExperienceIntegrationGA3 | ExperienceIntegrationGA4;
@@ -1319,19 +1352,23 @@ export type ConfigExperience = {
1319
1352
  /**
1320
1353
  * List of locations IDs on which this experience is presented. Either this or **site_area** is given but should not be both.
1321
1354
  */
1322
- locations?: Array<string> | null;
1355
+ locations?: Array<(string)> | null;
1323
1356
  /**
1324
1357
  * Rules that define where the experience is gonna run. Either this or **locations** is given but should not be both.
1325
1358
  */
1326
- site_area?: RuleObject | null;
1359
+ site_area?: ((RuleObject) | null);
1327
1360
  /**
1328
1361
  * List of audiences IDs to which this experience is presented to
1329
1362
  */
1330
- audiences?: Array<string> | null;
1363
+ audiences?: Array<(string)> | null;
1331
1364
  /**
1332
1365
  * List of goals IDs to which will be tracked for this experience
1333
1366
  */
1334
- goals?: Array<string>;
1367
+ goals?: Array<(string)>;
1368
+ /**
1369
+ * Only for multipage experience type
1370
+ */
1371
+ multipage_pages?: Array<MultipageExperiencePage>;
1335
1372
  status?: ExperienceStatuses;
1336
1373
  /**
1337
1374
  * Global Experience's JavaScript that will run for this experience before its changes are applied
@@ -1355,14 +1392,14 @@ export type ConfigExperience = {
1355
1392
  /**
1356
1393
  * List of integrations that this experience's data is sent to
1357
1394
  */
1358
- integrations?: Array<ExperienceIntegrationBaidu | ExperienceIntegrationClicktale | ExperienceIntegrationClicky | ExperienceIntegrationCnzz | ExperienceIntegrationCrazyegg | ExperienceIntegrationEconda | ExperienceIntegrationEulerian | ExperienceIntegrationGAServing | ExperienceIntegrationGosquared | ExperienceIntegrationHeapanalytics | ExperienceIntegrationHotjar | ExperienceIntegrationMixpanel | ExperienceIntegrationMouseflow | ExperienceIntegrationPiwik | ExperienceIntegrationSegmentio | ExperienceIntegrationSitecatalyst | ExperienceIntegrationWoopra | ExperienceIntegrationYsance>;
1395
+ integrations?: Array<(ExperienceIntegrationBaidu | ExperienceIntegrationClicktale | ExperienceIntegrationClicky | ExperienceIntegrationCnzz | ExperienceIntegrationCrazyegg | ExperienceIntegrationEconda | ExperienceIntegrationEulerian | ExperienceIntegrationGAServing | ExperienceIntegrationGosquared | ExperienceIntegrationHeapanalytics | ExperienceIntegrationHotjar | ExperienceIntegrationMixpanel | ExperienceIntegrationMouseflow | ExperienceIntegrationPiwik | ExperienceIntegrationSegmentio | ExperienceIntegrationSitecatalyst | ExperienceIntegrationWoopra | ExperienceIntegrationYsance)>;
1359
1396
  /**
1360
1397
  * List of environments that this experience is supposed to run on. The full list of available environments is defined at
1361
1398
  * project level. If this list is empty, the experience will run on all environments.
1362
1399
  *
1363
1400
  * @deprecated
1364
1401
  */
1365
- environments?: Array<string>;
1402
+ environments?: Array<(string)>;
1366
1403
  /**
1367
1404
  * The environment where this experience will run. It has to be one of the environments defined at the project level
1368
1405
  */
@@ -1388,11 +1425,23 @@ export type ConfigExperience = {
1388
1425
  /**
1389
1426
  * Order value outlier settings
1390
1427
  */
1391
- order_value?: NumericOutlier;
1428
+ order_value?: (NumericOutlier);
1392
1429
  /**
1393
1430
  * Products Ordered count outlier settings
1394
1431
  */
1395
- products_ordered_count?: NumericOutlier;
1432
+ products_ordered_count?: (NumericOutlier);
1433
+ };
1434
+ /**
1435
+ * A couple of settings only applicable to Split URL experiments
1436
+ */
1437
+ split_url_settings?: {
1438
+ /**
1439
+ * Whether regular expressions are supported in original/variation URLs of a split URL experiment or not.
1440
+ *
1441
+ * It only applies to **experience_type** - **split_url**
1442
+ *
1443
+ */
1444
+ split_regex_support?: boolean;
1396
1445
  };
1397
1446
  /**
1398
1447
  * Various settings used for matching the list of Audiences and Locations
@@ -1403,6 +1452,23 @@ export type ConfigExperience = {
1403
1452
  };
1404
1453
  };
1405
1454
  };
1455
+ /**
1456
+ * Multipage Experience Page object
1457
+ */
1458
+ export type MultipageExperiencePage = {
1459
+ /**
1460
+ * The ID of the page.
1461
+ */
1462
+ id?: string;
1463
+ /**
1464
+ * Name of the page
1465
+ */
1466
+ name?: string;
1467
+ /**
1468
+ * The url of page to load
1469
+ */
1470
+ url?: string;
1471
+ };
1406
1472
  /**
1407
1473
  * Variation Object
1408
1474
  */
@@ -1528,7 +1594,7 @@ export type ConfigGoalBase = {
1528
1594
  * List of goal types to be returned
1529
1595
  */
1530
1596
  type?: Array<GoalTypes>;
1531
- rules?: RuleObject | null;
1597
+ rules?: ((RuleObject) | null);
1532
1598
  };
1533
1599
  export type ConfigGoal = DomInteractionGoal | ScrollPercentageGoal | RevenueGoal | NoSettingsGoal | GaGoal | SubmitsFormGoal | ClicksLinkGoal | ClicksElementGoal;
1534
1600
  export type DomInteractionGoal = ConfigGoalBase & {
@@ -1800,7 +1866,7 @@ export type ConfigLocation = {
1800
1866
  */
1801
1867
  name?: string;
1802
1868
  trigger?: LocationTrigger;
1803
- rules?: RuleObject | null;
1869
+ rules?: ((RuleObject) | null);
1804
1870
  };
1805
1871
  export type ConfigProjectMinimalSettings = {
1806
1872
  /**
@@ -1819,7 +1885,7 @@ export type ConfigProjectMinimalSettings = {
1819
1885
  * 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
1886
  *
1821
1887
  */
1822
- readonly version?: string | null;
1888
+ readonly version?: (string) | null;
1823
1889
  tracking_script?: TrackingScriptReleaseBase;
1824
1890
  };
1825
1891
  /**
@@ -1869,8 +1935,8 @@ export type ConfigProject = {
1869
1935
  * experiences, goals, audiences etc.
1870
1936
  *
1871
1937
  */
1872
- global_javascript?: string | null;
1873
- settings?: {
1938
+ global_javascript?: (string) | null;
1939
+ settings?: ({
1874
1940
  /**
1875
1941
  * Flag indicating whether decoration of outgoing links (appending tracking cookies inside the link URL in order to
1876
1942
  * make cross domain tracking possible) is done automatically on page
@@ -1903,6 +1969,9 @@ export type ConfigProject = {
1903
1969
  */
1904
1970
  integrations?: {
1905
1971
  google_analytics?: GA_Settings;
1972
+ visitor_insights?: {
1973
+ tracking_id?: VisitorInsightsTrackingId;
1974
+ };
1906
1975
  kissmetrics?: {
1907
1976
  /**
1908
1977
  * Flag indicating whether Kissmetrics integration is enabled or not for this project
@@ -1927,13 +1996,13 @@ export type ConfigProject = {
1927
1996
  /**
1928
1997
  * Order value outlier settings
1929
1998
  */
1930
- order_value?: NumericOutlier;
1999
+ order_value?: (NumericOutlier);
1931
2000
  /**
1932
2001
  * Products Ordered count outlier settings
1933
2002
  */
1934
- products_ordered_count?: NumericOutlier;
2003
+ products_ordered_count?: (NumericOutlier);
1935
2004
  };
1936
- } & ConfigProjectMinimalSettings;
2005
+ } & ConfigProjectMinimalSettings);
1937
2006
  /**
1938
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.
1939
2008
  */
@@ -2008,8 +2077,19 @@ export type TrackingScriptReleaseBase = {
2008
2077
  /**
2009
2078
  * Latest available version of the tracking script bundle.
2010
2079
  */
2011
- readonly latest_version?: string | null;
2080
+ readonly latest_version?: (string) | null;
2012
2081
  } | null;
2082
+ /**
2083
+ * The tracking ID for Visitor Insights.
2084
+ */
2085
+ export type VisitorInsightsTrackingId = string;
2086
+ export type VisitorInsightsData = VisitorInsightsBase & {
2087
+ tracking_id?: VisitorInsightsTrackingId;
2088
+ /**
2089
+ * The sampling rate for tracking events.
2090
+ */
2091
+ sampling_rate?: number;
2092
+ };
2013
2093
  export type ProjectGASettingsBase = GA_SettingsBase & {
2014
2094
  /**
2015
2095
  * Attempt to pull revenue data from Google Analytics Revenue Tracking code.
@@ -2040,7 +2120,7 @@ export type ConfigSegment = {
2040
2120
  * Segment Name
2041
2121
  */
2042
2122
  name?: string;
2043
- rules?: RuleObject | null;
2123
+ rules?: ((RuleObject) | null);
2044
2124
  };
2045
2125
  /**
2046
2126
  * Tracking Request's data
@@ -2087,7 +2167,7 @@ export type VisitorTrackingEvents = {
2087
2167
  * Type of the event. It can be a bucketing or a conversion event
2088
2168
  */
2089
2169
  eventType?: 'bucketing' | 'conversion';
2090
- data?: BucketingEvent | ConversionEvent;
2170
+ data?: (BucketingEvent | ConversionEvent);
2091
2171
  };
2092
2172
  /**
2093
2173
  * Type of the event. It can be a bucketing or a conversion event
@@ -2130,11 +2210,11 @@ export type ConversionEvent = {
2130
2210
  /**
2131
2211
  * Key of the metric
2132
2212
  */
2133
- key?: 'amount' | 'productsCount' | 'transactionId';
2213
+ key?: 'amount' | 'productsCount' | 'transactionId' | 'customDimension1' | 'customDimension2' | 'customDimension3' | 'customDimension4' | 'customDimension5';
2134
2214
  /**
2135
2215
  * Value of the metric
2136
2216
  */
2137
- value?: number | string;
2217
+ value?: (number | string | Array<string>);
2138
2218
  }>;
2139
2219
  /**
2140
2220
  * 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 +2224,7 @@ export type ConversionEvent = {
2144
2224
  *
2145
2225
  */
2146
2226
  bucketingData?: {
2147
- [key: string]: string;
2227
+ [key: string]: (string);
2148
2228
  };
2149
2229
  };
2150
2230
  /**
@@ -2167,7 +2247,7 @@ export type VisitorSegments = {
2167
2247
  /**
2168
2248
  * List of device classes that the visitor device falls into
2169
2249
  */
2170
- devices?: Array<'ALLPH' | 'IPH' | 'OTHPH' | 'ALLTAB' | 'IPAD' | 'OTHTAB' | 'DESK' | 'OTHDEV'>;
2250
+ devices?: Array<('ALLPH' | 'IPH' | 'OTHPH' | 'ALLTAB' | 'IPAD' | 'OTHTAB' | 'DESK' | 'OTHDEV')>;
2171
2251
  /**
2172
2252
  * Traffic source
2173
2253
  */
@@ -2187,7 +2267,7 @@ export type VisitorSegments = {
2187
2267
  /**
2188
2268
  * Custom Segments as defined inside Convert app. This will be the list of segments' IDs
2189
2269
  */
2190
- customSegments?: Array<string>;
2270
+ customSegments?: Array<(string)>;
2191
2271
  };
2192
2272
  /**
2193
2273
  * Browser used:
@@ -2256,7 +2336,7 @@ export type GetProjectConfigData = {
2256
2336
  */
2257
2337
  projectId: number;
2258
2338
  };
2259
- export type GetProjectConfigResponse = ConfigResponseData;
2339
+ export type GetProjectConfigResponse = (ConfigResponseData);
2260
2340
  export type GetProjectConfigBySdkKeyData = {
2261
2341
  /**
2262
2342
  * Filter experiences based on environment.
@@ -2267,7 +2347,7 @@ export type GetProjectConfigBySdkKeyData = {
2267
2347
  */
2268
2348
  sdkKey: string;
2269
2349
  };
2270
- export type GetProjectConfigBySdkKeyResponse = ConfigResponseData;
2350
+ export type GetProjectConfigBySdkKeyResponse = (ConfigResponseData);
2271
2351
  export type GetProjectSettingsData = {
2272
2352
  /**
2273
2353
  * ID of the account that owns the retrieved/saved data
@@ -2278,7 +2358,18 @@ export type GetProjectSettingsData = {
2278
2358
  */
2279
2359
  projectId: number;
2280
2360
  };
2281
- export type GetProjectSettingsResponse = ConfigMinimalResponseData;
2361
+ export type GetProjectSettingsResponse = (ConfigMinimalResponseData);
2362
+ export type GetProjectOptionalSettingsData = {
2363
+ /**
2364
+ * ID of the account that owns the retrieved/saved data
2365
+ */
2366
+ accountId: number;
2367
+ /**
2368
+ * ID of the project to be retrieved
2369
+ */
2370
+ projectId: number;
2371
+ };
2372
+ export type GetProjectOptionalSettingsResponse = (ConfigOptionalResponseData);
2282
2373
  export type SendTrackingEventsSdkKeyData = {
2283
2374
  /**
2284
2375
  * A JSON object containing the tracking events sent to the Convert tracking servers.
@@ -2289,7 +2380,7 @@ export type SendTrackingEventsSdkKeyData = {
2289
2380
  */
2290
2381
  sdkKey: string;
2291
2382
  };
2292
- export type SendTrackingEventsSdkKeyResponse = SuccessData;
2383
+ export type SendTrackingEventsSdkKeyResponse = (SuccessData);
2293
2384
  export type SendTrackingEventsData = {
2294
2385
  /**
2295
2386
  * ID of the account that owns the given project
@@ -2304,7 +2395,7 @@ export type SendTrackingEventsData = {
2304
2395
  */
2305
2396
  requestBody: SendTrackingEventsRequestData;
2306
2397
  };
2307
- export type SendTrackingEventsResponse = SuccessData;
2398
+ export type SendTrackingEventsResponse = (SuccessData);
2308
2399
  export type $OpenApiTs = {
2309
2400
  '/config/{account_id}/{project_id}': {
2310
2401
  get: {
@@ -2354,7 +2445,23 @@ export type $OpenApiTs = {
2354
2445
  };
2355
2446
  };
2356
2447
  };
2357
- '/track/{sdkKey}': {
2448
+ '/project-optional-settings/{account_id}/{project_id}': {
2449
+ get: {
2450
+ req: GetProjectOptionalSettingsData;
2451
+ res: {
2452
+ /**
2453
+ * Object consumed by SDKs
2454
+ *
2455
+ */
2456
+ 200: ConfigOptionalResponseData;
2457
+ /**
2458
+ * A response signaling an error
2459
+ */
2460
+ default: ErrorData;
2461
+ };
2462
+ };
2463
+ };
2464
+ '/track/{sdk_key}': {
2358
2465
  post: {
2359
2466
  req: SendTrackingEventsSdkKeyData;
2360
2467
  res: {