@convertcom/js-sdk-rules 2.1.0 → 2.1.2

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.
Files changed (214) hide show
  1. package/lib/enums/src/dictionary.d.ts +3 -0
  2. package/lib/index.d.ts +2 -1
  3. package/lib/index.js +196 -157
  4. package/lib/index.js.map +1 -1
  5. package/lib/index.min.js +1 -1
  6. package/lib/index.min.js.map +1 -1
  7. package/lib/index.min.mjs +1 -1
  8. package/lib/index.min.mjs.map +1 -1
  9. package/lib/index.mjs +196 -157
  10. package/lib/index.mjs.map +1 -1
  11. package/lib/legacy/index.js +173 -134
  12. package/lib/legacy/index.js.map +1 -1
  13. package/lib/legacy/index.min.js +1 -1
  14. package/lib/legacy/index.min.js.map +1 -1
  15. package/lib/package.json +5 -5
  16. package/lib/rules/src/interfaces/rule-manager.d.ts +1 -0
  17. package/lib/rules/src/rule-manager.d.ts +1 -1
  18. package/lib/types/index.d.ts +1 -0
  19. package/lib/types/src/config/index.d.ts +1 -192
  20. package/lib/types/src/config/types.gen.d.ts +2387 -0
  21. package/lib/utils/src/string-utils.d.ts +12 -0
  22. package/package.json +5 -5
  23. package/lib/types/src/config/models/Base64Image.d.ts +0 -6
  24. package/lib/types/src/config/models/BaseMatch.d.ts +0 -8
  25. package/lib/types/src/config/models/BaseRule.d.ts +0 -6
  26. package/lib/types/src/config/models/BaseRuleWithBooleanValue.d.ts +0 -7
  27. package/lib/types/src/config/models/BaseRuleWithBrowserNameValue.d.ts +0 -21
  28. package/lib/types/src/config/models/BaseRuleWithCountryCodeValue.d.ts +0 -7
  29. package/lib/types/src/config/models/BaseRuleWithDayOfWeekValue.d.ts +0 -7
  30. package/lib/types/src/config/models/BaseRuleWithExperienceBucketedValue.d.ts +0 -7
  31. package/lib/types/src/config/models/BaseRuleWithGoalTriggeredValue.d.ts +0 -7
  32. package/lib/types/src/config/models/BaseRuleWithHourOfDayValue.d.ts +0 -7
  33. package/lib/types/src/config/models/BaseRuleWithJsCodeValue.d.ts +0 -9
  34. package/lib/types/src/config/models/BaseRuleWithLanguageCodeValue.d.ts +0 -7
  35. package/lib/types/src/config/models/BaseRuleWithMinuteOfHourValue.d.ts +0 -7
  36. package/lib/types/src/config/models/BaseRuleWithNumericValue.d.ts +0 -7
  37. package/lib/types/src/config/models/BaseRuleWithOsValue.d.ts +0 -21
  38. package/lib/types/src/config/models/BaseRuleWithSegmentBucketedValue.d.ts +0 -7
  39. package/lib/types/src/config/models/BaseRuleWithStringValue.d.ts +0 -7
  40. package/lib/types/src/config/models/BaseRuleWithVisitorTypeValue.d.ts +0 -16
  41. package/lib/types/src/config/models/BaseRuleWithWeatherConditionValue.d.ts +0 -34
  42. package/lib/types/src/config/models/BoolMatchRulesTypes.d.ts +0 -6
  43. package/lib/types/src/config/models/BrowserNameMatchRule.d.ts +0 -10
  44. package/lib/types/src/config/models/BrowserNameMatchRulesTypes.d.ts +0 -3
  45. package/lib/types/src/config/models/BucketingEvent.d.ts +0 -15
  46. package/lib/types/src/config/models/ChoiceContainsOptions.d.ts +0 -3
  47. package/lib/types/src/config/models/ChoiceMatchingOptions.d.ts +0 -3
  48. package/lib/types/src/config/models/ClicksElementGoal.d.ts +0 -11
  49. package/lib/types/src/config/models/ClicksElementGoalSettings.d.ts +0 -6
  50. package/lib/types/src/config/models/ClicksLinkGoal.d.ts +0 -11
  51. package/lib/types/src/config/models/ClicksLinkGoalSettings.d.ts +0 -6
  52. package/lib/types/src/config/models/ConfigAudience.d.ts +0 -21
  53. package/lib/types/src/config/models/ConfigAudienceTypes.d.ts +0 -10
  54. package/lib/types/src/config/models/ConfigExperience.d.ts +0 -98
  55. package/lib/types/src/config/models/ConfigFeature.d.ts +0 -22
  56. package/lib/types/src/config/models/ConfigGoal.d.ts +0 -9
  57. package/lib/types/src/config/models/ConfigGoalBase.d.ts +0 -24
  58. package/lib/types/src/config/models/ConfigLocation.d.ts +0 -21
  59. package/lib/types/src/config/models/ConfigProject.d.ts +0 -151
  60. package/lib/types/src/config/models/ConfigResponseData.d.ts +0 -45
  61. package/lib/types/src/config/models/ConfigSegment.d.ts +0 -19
  62. package/lib/types/src/config/models/ConversionEvent.d.ts +0 -30
  63. package/lib/types/src/config/models/CookieMatchRule.d.ts +0 -14
  64. package/lib/types/src/config/models/CookieMatchRulesTypes.d.ts +0 -3
  65. package/lib/types/src/config/models/CountryMatchRule.d.ts +0 -10
  66. package/lib/types/src/config/models/CountryMatchRulesTypes.d.ts +0 -3
  67. package/lib/types/src/config/models/DayOfWeekMatchRule.d.ts +0 -10
  68. package/lib/types/src/config/models/DayOfWeekMatchRulesTypes.d.ts +0 -4
  69. package/lib/types/src/config/models/DomInteractionGoal.d.ts +0 -11
  70. package/lib/types/src/config/models/DomInteractionGoalSettings.d.ts +0 -15
  71. package/lib/types/src/config/models/ErrorData.d.ts +0 -5
  72. package/lib/types/src/config/models/ExperienceBucketedMatchRule.d.ts +0 -9
  73. package/lib/types/src/config/models/ExperienceChange.d.ts +0 -10
  74. package/lib/types/src/config/models/ExperienceChangeAdd.d.ts +0 -10
  75. package/lib/types/src/config/models/ExperienceChangeBase.d.ts +0 -27
  76. package/lib/types/src/config/models/ExperienceChangeCustomCodeData.d.ts +0 -6
  77. package/lib/types/src/config/models/ExperienceChangeCustomCodeDataAdd.d.ts +0 -6
  78. package/lib/types/src/config/models/ExperienceChangeCustomCodeDataBase.d.ts +0 -29
  79. package/lib/types/src/config/models/ExperienceChangeCustomCodeDataUpdate.d.ts +0 -6
  80. package/lib/types/src/config/models/ExperienceChangeCustomCodeDataUpdateNoId.d.ts +0 -5
  81. package/lib/types/src/config/models/ExperienceChangeDefaultCodeData.d.ts +0 -6
  82. package/lib/types/src/config/models/ExperienceChangeDefaultCodeDataAdd.d.ts +0 -6
  83. package/lib/types/src/config/models/ExperienceChangeDefaultCodeDataBase.d.ts +0 -29
  84. package/lib/types/src/config/models/ExperienceChangeDefaultCodeDataUpdate.d.ts +0 -6
  85. package/lib/types/src/config/models/ExperienceChangeDefaultCodeDataUpdateNoId.d.ts +0 -5
  86. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageData.d.ts +0 -6
  87. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageDataAdd.d.ts +0 -6
  88. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageDataBase.d.ts +0 -33
  89. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageDataUpdate.d.ts +0 -6
  90. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageDataUpdateNoId.d.ts +0 -5
  91. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectData.d.ts +0 -6
  92. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectDataAdd.d.ts +0 -6
  93. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectDataBase.d.ts +0 -29
  94. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectDataUpdate.d.ts +0 -6
  95. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectDataUpdateNoId.d.ts +0 -5
  96. package/lib/types/src/config/models/ExperienceChangeFullStackFeature.d.ts +0 -6
  97. package/lib/types/src/config/models/ExperienceChangeFullStackFeatureAdd.d.ts +0 -6
  98. package/lib/types/src/config/models/ExperienceChangeFullStackFeatureBase.d.ts +0 -25
  99. package/lib/types/src/config/models/ExperienceChangeFullStackFeatureUpdate.d.ts +0 -6
  100. package/lib/types/src/config/models/ExperienceChangeFullStackFeatureUpdateNoId.d.ts +0 -5
  101. package/lib/types/src/config/models/ExperienceChangeId.d.ts +0 -9
  102. package/lib/types/src/config/models/ExperienceChangeIdReadOnly.d.ts +0 -9
  103. package/lib/types/src/config/models/ExperienceChangeRichStructureData.d.ts +0 -6
  104. package/lib/types/src/config/models/ExperienceChangeRichStructureDataAdd.d.ts +0 -6
  105. package/lib/types/src/config/models/ExperienceChangeRichStructureDataBase.d.ts +0 -16
  106. package/lib/types/src/config/models/ExperienceChangeRichStructureDataUpdate.d.ts +0 -6
  107. package/lib/types/src/config/models/ExperienceChangeRichStructureDataUpdateNoId.d.ts +0 -5
  108. package/lib/types/src/config/models/ExperienceChangeUpdate.d.ts +0 -10
  109. package/lib/types/src/config/models/ExperienceChangeUpdateNoId.d.ts +0 -10
  110. package/lib/types/src/config/models/ExperienceIntegrationBaidu.d.ts +0 -7
  111. package/lib/types/src/config/models/ExperienceIntegrationBase.d.ts +0 -10
  112. package/lib/types/src/config/models/ExperienceIntegrationClicktale.d.ts +0 -2
  113. package/lib/types/src/config/models/ExperienceIntegrationClicky.d.ts +0 -2
  114. package/lib/types/src/config/models/ExperienceIntegrationCnzz.d.ts +0 -7
  115. package/lib/types/src/config/models/ExperienceIntegrationCrazyegg.d.ts +0 -9
  116. package/lib/types/src/config/models/ExperienceIntegrationEconda.d.ts +0 -2
  117. package/lib/types/src/config/models/ExperienceIntegrationEulerian.d.ts +0 -2
  118. package/lib/types/src/config/models/ExperienceIntegrationGA3.d.ts +0 -9
  119. package/lib/types/src/config/models/ExperienceIntegrationGA4.d.ts +0 -8
  120. package/lib/types/src/config/models/ExperienceIntegrationGA4Base.d.ts +0 -4
  121. package/lib/types/src/config/models/ExperienceIntegrationGAServing.d.ts +0 -3
  122. package/lib/types/src/config/models/ExperienceIntegrationGoogleAnalytics.d.ts +0 -3
  123. package/lib/types/src/config/models/ExperienceIntegrationGosquared.d.ts +0 -2
  124. package/lib/types/src/config/models/ExperienceIntegrationHeapanalytics.d.ts +0 -2
  125. package/lib/types/src/config/models/ExperienceIntegrationHotjar.d.ts +0 -2
  126. package/lib/types/src/config/models/ExperienceIntegrationMixpanel.d.ts +0 -2
  127. package/lib/types/src/config/models/ExperienceIntegrationMouseflow.d.ts +0 -2
  128. package/lib/types/src/config/models/ExperienceIntegrationPiwik.d.ts +0 -7
  129. package/lib/types/src/config/models/ExperienceIntegrationSegmentio.d.ts +0 -2
  130. package/lib/types/src/config/models/ExperienceIntegrationSitecatalyst.d.ts +0 -7
  131. package/lib/types/src/config/models/ExperienceIntegrationWoopra.d.ts +0 -2
  132. package/lib/types/src/config/models/ExperienceIntegrationYsance.d.ts +0 -7
  133. package/lib/types/src/config/models/ExperienceTypes.d.ts +0 -8
  134. package/lib/types/src/config/models/ExperienceVariationConfig.d.ts +0 -30
  135. package/lib/types/src/config/models/Extra.d.ts +0 -4
  136. package/lib/types/src/config/models/FeatureVariableItemData.d.ts +0 -25
  137. package/lib/types/src/config/models/GA_Settings.d.ts +0 -3
  138. package/lib/types/src/config/models/GA_SettingsBase.d.ts +0 -6
  139. package/lib/types/src/config/models/GaGoal.d.ts +0 -11
  140. package/lib/types/src/config/models/GaGoalSettings.d.ts +0 -6
  141. package/lib/types/src/config/models/GenericBoolKeyValueMatchRule.d.ts +0 -11
  142. package/lib/types/src/config/models/GenericBoolKeyValueMatchRulesTypes.d.ts +0 -3
  143. package/lib/types/src/config/models/GenericBoolMatchRule.d.ts +0 -10
  144. package/lib/types/src/config/models/GenericKey.d.ts +0 -6
  145. package/lib/types/src/config/models/GenericNumericKeyValueMatchRule.d.ts +0 -11
  146. package/lib/types/src/config/models/GenericNumericKeyValueMatchRulesTypes.d.ts +0 -3
  147. package/lib/types/src/config/models/GenericNumericMatchRule.d.ts +0 -10
  148. package/lib/types/src/config/models/GenericSetMatchRule.d.ts +0 -9
  149. package/lib/types/src/config/models/GenericTextKeyValueMatchRule.d.ts +0 -11
  150. package/lib/types/src/config/models/GenericTextKeyValueMatchRulesTypes.d.ts +0 -3
  151. package/lib/types/src/config/models/GenericTextMatchRule.d.ts +0 -10
  152. package/lib/types/src/config/models/GoalTriggeredMatchRule.d.ts +0 -10
  153. package/lib/types/src/config/models/GoalTriggeredMatchRulesTypes.d.ts +0 -3
  154. package/lib/types/src/config/models/GoalTypes.d.ts +0 -10
  155. package/lib/types/src/config/models/HourOfDayMatchRule.d.ts +0 -10
  156. package/lib/types/src/config/models/HourOfDayMatchRulesTypes.d.ts +0 -4
  157. package/lib/types/src/config/models/IntegrationGA3.d.ts +0 -12
  158. package/lib/types/src/config/models/IntegrationGA4.d.ts +0 -7
  159. package/lib/types/src/config/models/IntegrationGA4Base.d.ts +0 -12
  160. package/lib/types/src/config/models/IntegrationProvider.d.ts +0 -23
  161. package/lib/types/src/config/models/JsConditionMatchRule.d.ts +0 -10
  162. package/lib/types/src/config/models/JsConditionMatchRulesTypes.d.ts +0 -3
  163. package/lib/types/src/config/models/KeyValueMatchRulesTypes.d.ts +0 -4
  164. package/lib/types/src/config/models/LanguageMatchRule.d.ts +0 -10
  165. package/lib/types/src/config/models/LanguageMatchRulesTypes.d.ts +0 -3
  166. package/lib/types/src/config/models/LocationTrigger.d.ts +0 -5
  167. package/lib/types/src/config/models/LocationTriggerBase.d.ts +0 -14
  168. package/lib/types/src/config/models/LocationTriggerCallback.d.ts +0 -13
  169. package/lib/types/src/config/models/LocationTriggerDomChange.d.ts +0 -17
  170. package/lib/types/src/config/models/LocationTriggerManual.d.ts +0 -9
  171. package/lib/types/src/config/models/LocationTriggerUrlChange.d.ts +0 -9
  172. package/lib/types/src/config/models/MinuteOfHourMatchRule.d.ts +0 -10
  173. package/lib/types/src/config/models/MinuteOfHourMatchRulesTypes.d.ts +0 -4
  174. package/lib/types/src/config/models/NoSettingsGoal.d.ts +0 -11
  175. package/lib/types/src/config/models/NumericMatchRulesTypes.d.ts +0 -8
  176. package/lib/types/src/config/models/NumericMatchingOptions.d.ts +0 -5
  177. package/lib/types/src/config/models/OnlyCount.d.ts +0 -7
  178. package/lib/types/src/config/models/OsMatchRule.d.ts +0 -10
  179. package/lib/types/src/config/models/OsMatchRulesTypes.d.ts +0 -3
  180. package/lib/types/src/config/models/PageNumber.d.ts +0 -9
  181. package/lib/types/src/config/models/Pagination.d.ts +0 -18
  182. package/lib/types/src/config/models/ProjectGASettingsBase.d.ts +0 -7
  183. package/lib/types/src/config/models/ProjectIntegrationGA3.d.ts +0 -3
  184. package/lib/types/src/config/models/ProjectIntegrationGA4.d.ts +0 -8
  185. package/lib/types/src/config/models/ResultsPerPage.d.ts +0 -10
  186. package/lib/types/src/config/models/RevenueGoal.d.ts +0 -11
  187. package/lib/types/src/config/models/RevenueGoalSettings.d.ts +0 -25
  188. package/lib/types/src/config/models/RuleElement.d.ts +0 -20
  189. package/lib/types/src/config/models/RuleElementNoUrl.d.ts +0 -20
  190. package/lib/types/src/config/models/RuleObject.d.ts +0 -20
  191. package/lib/types/src/config/models/RuleObjectNoUrl.d.ts +0 -20
  192. package/lib/types/src/config/models/RulesTypes.d.ts +0 -17
  193. package/lib/types/src/config/models/ScrollPercentageGoal.d.ts +0 -11
  194. package/lib/types/src/config/models/ScrollPercentageGoalSettings.d.ts +0 -6
  195. package/lib/types/src/config/models/SegmentBucketedMatchRule.d.ts +0 -10
  196. package/lib/types/src/config/models/SegmentBucketedMatchRulesTypes.d.ts +0 -3
  197. package/lib/types/src/config/models/SendTrackingEventsRequestData.d.ts +0 -39
  198. package/lib/types/src/config/models/SetMatchingOptions.d.ts +0 -3
  199. package/lib/types/src/config/models/SortDirection.d.ts +0 -21
  200. package/lib/types/src/config/models/SubmitsFormGoal.d.ts +0 -11
  201. package/lib/types/src/config/models/SubmitsFormGoalSettings.d.ts +0 -6
  202. package/lib/types/src/config/models/SuccessData.d.ts +0 -4
  203. package/lib/types/src/config/models/TextMatchRulesTypes.d.ts +0 -23
  204. package/lib/types/src/config/models/TextMatchingOptions.d.ts +0 -7
  205. package/lib/types/src/config/models/UTC_Offset.d.ts +0 -4
  206. package/lib/types/src/config/models/UpdateExperienceChangeRequestData.d.ts +0 -2
  207. package/lib/types/src/config/models/VariationStatuses.d.ts +0 -7
  208. package/lib/types/src/config/models/VisitorSegments.d.ts +0 -78
  209. package/lib/types/src/config/models/VisitorTrackingEvents.d.ts +0 -21
  210. package/lib/types/src/config/models/VisitorTypeMatchRule.d.ts +0 -10
  211. package/lib/types/src/config/models/VisitorTypeMatchRulesTypes.d.ts +0 -3
  212. package/lib/types/src/config/models/WeatherConditionMatchRule.d.ts +0 -10
  213. package/lib/types/src/config/models/WeatherConditionMatchRulesTypes.d.ts +0 -3
  214. package/lib/types/src/config/models/WeatherConditions.d.ts +0 -30
@@ -0,0 +1,2387 @@
1
+ /**
2
+ * Base Audience object
3
+ */
4
+ export type ConfigAudience = {
5
+ /**
6
+ * Audience ID
7
+ */
8
+ id?: string;
9
+ /**
10
+ * Audience unique key
11
+ */
12
+ key?: string;
13
+ /**
14
+ * Audience Name
15
+ */
16
+ name?: string;
17
+ type?: ConfigAudienceTypes;
18
+ rules?: RuleObject | null;
19
+ };
20
+ /**
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.
22
+ * * **permanent** - A permanent audience is one that is checked only at the time the user is being bucketed into the experience
23
+ * * **transient** - A transient audience is one that is checked every time the user is being bucketed into the experience
24
+ *
25
+ */
26
+ export type ConfigAudienceTypes = 'permanent' | 'transient';
27
+ /**
28
+ * 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.
29
+ * * **permanent** - A permanent audience is one that is checked only at the time the user is being bucketed into the experience
30
+ * * **transient** - A transient audience is one that is checked every time the user is being bucketed into the experience
31
+ *
32
+ */
33
+ export declare const ConfigAudienceTypes: {
34
+ readonly PERMANENT: "permanent";
35
+ readonly TRANSIENT: "transient";
36
+ };
37
+ export type PageNumber = {
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
42
+ *
43
+ */
44
+ page?: number;
45
+ };
46
+ export type Pagination = {
47
+ /**
48
+ * Current page number
49
+ */
50
+ current_page?: number;
51
+ /**
52
+ * Total number of records
53
+ */
54
+ items_count?: number;
55
+ /**
56
+ * Number of records per page
57
+ */
58
+ items_per_page?: number;
59
+ /**
60
+ * Limitation number of records per page
61
+ */
62
+ pages_count?: number;
63
+ };
64
+ export type ResultsPerPage = {
65
+ /**
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
70
+ *
71
+ */
72
+ results_per_page?: number | null;
73
+ };
74
+ export type SortDirection = {
75
+ /**
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
79
+ *
80
+ */
81
+ sort_direction?: ('asc' | 'desc') | null;
82
+ };
83
+ /**
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
87
+ *
88
+ */
89
+ export type sort_direction = 'asc' | 'desc';
90
+ /**
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
94
+ *
95
+ */
96
+ export declare const sort_direction: {
97
+ readonly ASC: "asc";
98
+ readonly DESC: "desc";
99
+ };
100
+ export type OnlyCount = {
101
+ /**
102
+ * When provided in requests that allow it, the response would only contain count of records and no real records' data
103
+ *
104
+ */
105
+ onlyCount?: boolean;
106
+ };
107
+ export type Extra = {
108
+ pagination?: Pagination;
109
+ };
110
+ export type BaseRule = {
111
+ /**
112
+ * It defines the type of the rule
113
+ */
114
+ rule_type: string;
115
+ };
116
+ export type BaseRuleWithStringValue = BaseRule & {
117
+ /**
118
+ * The value used to match against 'rule_type' using 'matching'
119
+ */
120
+ value?: string;
121
+ };
122
+ export type BaseRuleWithJsCodeValue = BaseRule & {
123
+ /**
124
+ * The JS code that would be executed when rule is checked. The return value of this JS code is what is gonna be matched
125
+ * against **true**(or **false** if **matching.negated = true** is provided)
126
+ *
127
+ */
128
+ value?: string;
129
+ };
130
+ export type BaseRuleWithBooleanValue = BaseRule & {
131
+ /**
132
+ * The value used to match against 'rule_type' using 'matching'
133
+ */
134
+ value?: boolean;
135
+ };
136
+ export type BaseRuleWithNumericValue = BaseRule & {
137
+ /**
138
+ * The value used to match against 'rule_type' using 'matching'
139
+ */
140
+ value?: number;
141
+ };
142
+ export type BaseRuleWithCountryCodeValue = BaseRule & {
143
+ /**
144
+ * The 2 letter ISO country code used for matching
145
+ */
146
+ value?: string;
147
+ };
148
+ export type BaseRuleWithLanguageCodeValue = BaseRule & {
149
+ /**
150
+ * The 2 letter ISO language code used for matching
151
+ */
152
+ value?: string;
153
+ };
154
+ export type BaseRuleWithGoalTriggeredValue = BaseRule & {
155
+ /**
156
+ * ID of the goal used for matching
157
+ */
158
+ value?: number;
159
+ };
160
+ export type BaseRuleWithVisitorTypeValue = BaseRule & {
161
+ /**
162
+ * Type of the visitors
163
+ */
164
+ value?: 'new' | 'returning';
165
+ };
166
+ /**
167
+ * Type of the visitors
168
+ */
169
+ export type value = 'new' | 'returning';
170
+ /**
171
+ * Type of the visitors
172
+ */
173
+ export declare const value: {
174
+ readonly NEW: "new";
175
+ readonly RETURNING: "returning";
176
+ };
177
+ export type BaseRuleWithExperienceBucketedValue = BaseRule & {
178
+ /**
179
+ * ID of the experience used for matching
180
+ */
181
+ value?: number;
182
+ };
183
+ export type BaseRuleWithSegmentBucketedValue = BaseRule & {
184
+ /**
185
+ * ID of the segment used for matching
186
+ */
187
+ value?: number;
188
+ };
189
+ export type BaseRuleWithDayOfWeekValue = BaseRule & {
190
+ /**
191
+ * Day of week used for matching
192
+ */
193
+ value?: number;
194
+ };
195
+ export type BaseRuleWithHourOfDayValue = BaseRule & {
196
+ /**
197
+ * Hour of day used for matching
198
+ */
199
+ value?: number;
200
+ };
201
+ export type BaseRuleWithMinuteOfHourValue = BaseRule & {
202
+ /**
203
+ * Minute of hour used for matching
204
+ */
205
+ value?: number;
206
+ };
207
+ export type BaseRuleWithBrowserNameValue = BaseRule & {
208
+ /**
209
+ * Browser name used for matching
210
+ */
211
+ value?: 'chrome' | 'microsoft_ie' | 'firefox' | 'microsoft_edge' | 'mozilla' | 'opera' | 'safari';
212
+ };
213
+ /**
214
+ * Browser name used for matching
215
+ */
216
+ export type value2 = 'chrome' | 'microsoft_ie' | 'firefox' | 'microsoft_edge' | 'mozilla' | 'opera' | 'safari';
217
+ /**
218
+ * Browser name used for matching
219
+ */
220
+ export declare const value2: {
221
+ readonly CHROME: "chrome";
222
+ readonly MICROSOFT_IE: "microsoft_ie";
223
+ readonly FIREFOX: "firefox";
224
+ readonly MICROSOFT_EDGE: "microsoft_edge";
225
+ readonly MOZILLA: "mozilla";
226
+ readonly OPERA: "opera";
227
+ readonly SAFARI: "safari";
228
+ };
229
+ export type BaseRuleWithOsValue = BaseRule & {
230
+ /**
231
+ * Operating System name used for matching
232
+ */
233
+ value?: 'android' | 'iphone' | 'ipod' | 'ipad' | 'windows' | 'macos' | 'linux';
234
+ };
235
+ /**
236
+ * Operating System name used for matching
237
+ */
238
+ export type value3 = 'android' | 'iphone' | 'ipod' | 'ipad' | 'windows' | 'macos' | 'linux';
239
+ /**
240
+ * Operating System name used for matching
241
+ */
242
+ export declare const value3: {
243
+ readonly ANDROID: "android";
244
+ readonly IPHONE: "iphone";
245
+ readonly IPOD: "ipod";
246
+ readonly IPAD: "ipad";
247
+ readonly WINDOWS: "windows";
248
+ readonly MACOS: "macos";
249
+ readonly LINUX: "linux";
250
+ };
251
+ export type BaseRuleWithWeatherConditionValue = BaseRule & {
252
+ /**
253
+ * Weather Condition name used for matching. Full or partial condition.
254
+ * The weather provider used by Convert detects the following conditions:
255
+ * - Blizzard
256
+ * - Blowing snow
257
+ * - Cloudy
258
+ * - Fog
259
+ * - Freezing drizzle
260
+ * - Freezing fog
261
+ * - Heavy freezing drizzle
262
+ * - Heavy rain
263
+ * - Heavy rain at times
264
+ * - Light drizzle
265
+ * - Light freezing rain
266
+ * - Light rain
267
+ * - Mist
268
+ * - Moderate rain
269
+ * - Moderate rain at times
270
+ * - Overcast
271
+ * - 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
+ *
281
+ */
282
+ value?: string;
283
+ };
284
+ /**
285
+ * Weather Conditions
286
+ */
287
+ 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
+ /**
289
+ * Weather Conditions
290
+ */
291
+ export declare const WeatherConditions: {
292
+ readonly BLIZZARD: "Blizzard";
293
+ readonly BLOWING_SNOW: "Blowing snow";
294
+ readonly CLOUDY: "Cloudy";
295
+ readonly FOG: "Fog";
296
+ readonly FREEZING_DRIZZLE: "Freezing drizzle";
297
+ readonly FREEZING_FOG: "Freezing fog";
298
+ readonly HEAVY_FREEZING_DRIZZLE: "Heavy freezing drizzle";
299
+ readonly HEAVY_RAIN: "Heavy rain";
300
+ readonly HEAVY_RAIN_AT_TIMES: "Heavy rain at times";
301
+ readonly LIGHT_DRIZZLE: "Light drizzle";
302
+ readonly LIGHT_FREEZING_RAIN: "Light freezing rain";
303
+ readonly LIGHT_RAIN: "Light rain";
304
+ readonly MIST: "Mist";
305
+ readonly MODERATE_RAIN: "Moderate rain";
306
+ readonly MODERATE_RAIN_AT_TIMES: "Moderate rain at times";
307
+ readonly OVERCAST: "Overcast";
308
+ readonly PARTLY_CLOUDY: "Partly cloudy";
309
+ readonly PATCHY_FREEZING_DRIZZLE_POSSIBLE: "Patchy freezing drizzle possible";
310
+ readonly PATCHY_LIGHT_DRIZZLE: "Patchy light drizzle";
311
+ readonly PATCHY_LIGHT_RAIN: "Patchy light rain";
312
+ readonly PATCHY_RAIN_POSSIBLE: "Patchy rain possible";
313
+ readonly PATCHY_SLEET_POSSIBLE: "Patchy sleet possible";
314
+ readonly PATCHY_SNOW_POSSIBLE: "Patchy snow possible";
315
+ readonly SUNNY: "Sunny";
316
+ readonly THUNDERY_OUTBREAKS_POSSIBLE: "Thundery outbreaks possible";
317
+ };
318
+ export type BaseMatch = {
319
+ /**
320
+ * When true, the rule result is gonna be negated.
321
+ * example: `url contains "test"` with *negated* = true becomes `url does not contain "test"`
322
+ *
323
+ */
324
+ negated?: boolean;
325
+ };
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';
327
+ export declare const TextMatchRulesTypes: {
328
+ readonly URL: "url";
329
+ readonly URL_WITH_QUERY: "url_with_query";
330
+ readonly QUERY_STRING: "query_string";
331
+ readonly CAMPAIGN: "campaign";
332
+ readonly KEYWORD: "keyword";
333
+ readonly MEDIUM: "medium";
334
+ readonly SOURCE_NAME: "source_name";
335
+ readonly CITY: "city";
336
+ readonly REGION: "region";
337
+ readonly BROWSER_VERSION: "browser_version";
338
+ readonly USER_AGENT: "user_agent";
339
+ readonly PAGE_TAG_PAGE_TYPE: "page_tag_page_type";
340
+ readonly PAGE_TAG_CATEGORY_ID: "page_tag_category_id";
341
+ readonly PAGE_TAG_CATEGORY_NAME: "page_tag_category_name";
342
+ readonly PAGE_TAG_PRODUCT_SKU: "page_tag_product_sku";
343
+ readonly PAGE_TAG_PRODUCT_NAME: "page_tag_product_name";
344
+ readonly PAGE_TAG_CUSTOMER_ID: "page_tag_customer_id";
345
+ readonly PAGE_TAG_CUSTOM_1: "page_tag_custom_1";
346
+ readonly PAGE_TAG_CUSTOM_2: "page_tag_custom_2";
347
+ readonly PAGE_TAG_CUSTOM_3: "page_tag_custom_3";
348
+ readonly PAGE_TAG_CUSTOM_4: "page_tag_custom_4";
349
+ };
350
+ export type NumericMatchRulesTypes = 'avg_time_page' | 'days_since_last_visit' | 'pages_visited_count' | 'visit_duration' | 'visits_count' | 'page_tag_product_price';
351
+ export declare const NumericMatchRulesTypes: {
352
+ readonly AVG_TIME_PAGE: "avg_time_page";
353
+ readonly DAYS_SINCE_LAST_VISIT: "days_since_last_visit";
354
+ readonly PAGES_VISITED_COUNT: "pages_visited_count";
355
+ readonly VISIT_DURATION: "visit_duration";
356
+ readonly VISITS_COUNT: "visits_count";
357
+ readonly PAGE_TAG_PRODUCT_PRICE: "page_tag_product_price";
358
+ };
359
+ export type BoolMatchRulesTypes = 'bucketed_into_experience' | 'is_desktop' | 'is_mobile' | 'is_tablet';
360
+ export declare const BoolMatchRulesTypes: {
361
+ readonly BUCKETED_INTO_EXPERIENCE: "bucketed_into_experience";
362
+ readonly IS_DESKTOP: "is_desktop";
363
+ readonly IS_MOBILE: "is_mobile";
364
+ readonly IS_TABLET: "is_tablet";
365
+ };
366
+ export type GenericTextKeyValueMatchRulesTypes = 'generic_text_key_value';
367
+ export declare const GenericTextKeyValueMatchRulesTypes: {
368
+ readonly GENERIC_TEXT_KEY_VALUE: "generic_text_key_value";
369
+ };
370
+ export type GenericNumericKeyValueMatchRulesTypes = 'generic_numeric_key_value';
371
+ export declare const GenericNumericKeyValueMatchRulesTypes: {
372
+ readonly GENERIC_NUMERIC_KEY_VALUE: "generic_numeric_key_value";
373
+ };
374
+ export type GenericBoolKeyValueMatchRulesTypes = 'generic_bool_key_value';
375
+ export declare const GenericBoolKeyValueMatchRulesTypes: {
376
+ readonly GENERIC_BOOL_KEY_VALUE: "generic_bool_key_value";
377
+ };
378
+ export type JsConditionMatchRulesTypes = 'js_condition';
379
+ export declare const JsConditionMatchRulesTypes: {
380
+ readonly JS_CONDITION: "js_condition";
381
+ };
382
+ export type KeyValueMatchRulesTypes = GenericTextKeyValueMatchRulesTypes & GenericNumericKeyValueMatchRulesTypes & GenericBoolKeyValueMatchRulesTypes;
383
+ export type CookieMatchRulesTypes = 'cookie';
384
+ export declare const CookieMatchRulesTypes: {
385
+ readonly COOKIE: "cookie";
386
+ };
387
+ export type CountryMatchRulesTypes = 'country';
388
+ export declare const CountryMatchRulesTypes: {
389
+ readonly COUNTRY: "country";
390
+ };
391
+ export type VisitorTypeMatchRulesTypes = 'visitor_type';
392
+ export declare const VisitorTypeMatchRulesTypes: {
393
+ readonly VISITOR_TYPE: "visitor_type";
394
+ };
395
+ export type LanguageMatchRulesTypes = 'language';
396
+ export declare const LanguageMatchRulesTypes: {
397
+ readonly LANGUAGE: "language";
398
+ };
399
+ export type GoalTriggeredMatchRulesTypes = 'goal_triggered';
400
+ export declare const GoalTriggeredMatchRulesTypes: {
401
+ readonly GOAL_TRIGGERED: "goal_triggered";
402
+ };
403
+ export type SegmentBucketedMatchRulesTypes = 'bucketed_into_segment';
404
+ export declare const SegmentBucketedMatchRulesTypes: {
405
+ readonly BUCKETED_INTO_SEGMENT: "bucketed_into_segment";
406
+ };
407
+ export type DayOfWeekMatchRulesTypes = 'local_time_day_of_week' | 'project_time_day_of_week';
408
+ export declare const DayOfWeekMatchRulesTypes: {
409
+ readonly LOCAL_TIME_DAY_OF_WEEK: "local_time_day_of_week";
410
+ readonly PROJECT_TIME_DAY_OF_WEEK: "project_time_day_of_week";
411
+ };
412
+ export type HourOfDayMatchRulesTypes = 'local_time_hour_of_day' | 'project_time_hour_of_day';
413
+ export declare const HourOfDayMatchRulesTypes: {
414
+ readonly LOCAL_TIME_HOUR_OF_DAY: "local_time_hour_of_day";
415
+ readonly PROJECT_TIME_HOUR_OF_DAY: "project_time_hour_of_day";
416
+ };
417
+ export type MinuteOfHourMatchRulesTypes = 'local_time_minute_of_hour' | 'project_time_minute_of_hour';
418
+ export declare const MinuteOfHourMatchRulesTypes: {
419
+ readonly LOCAL_TIME_MINUTE_OF_HOUR: "local_time_minute_of_hour";
420
+ readonly PROJECT_TIME_MINUTE_OF_HOUR: "project_time_minute_of_hour";
421
+ };
422
+ export type BrowserNameMatchRulesTypes = 'browser_name';
423
+ export declare const BrowserNameMatchRulesTypes: {
424
+ readonly BROWSER_NAME: "browser_name";
425
+ };
426
+ export type OsMatchRulesTypes = 'os';
427
+ export declare const OsMatchRulesTypes: {
428
+ readonly OS: "os";
429
+ };
430
+ export type WeatherConditionMatchRulesTypes = 'weather_condition';
431
+ export declare const WeatherConditionMatchRulesTypes: {
432
+ readonly WEATHER_CONDITION: "weather_condition";
433
+ };
434
+ export type RulesTypes = TextMatchRulesTypes & NumericMatchRulesTypes & BoolMatchRulesTypes & KeyValueMatchRulesTypes & CookieMatchRulesTypes & CountryMatchRulesTypes & VisitorTypeMatchRulesTypes & LanguageMatchRulesTypes & GoalTriggeredMatchRulesTypes & SegmentBucketedMatchRulesTypes & DayOfWeekMatchRulesTypes & HourOfDayMatchRulesTypes & MinuteOfHourMatchRulesTypes & BrowserNameMatchRulesTypes & OsMatchRulesTypes & WeatherConditionMatchRulesTypes;
435
+ export type GenericTextMatchRule = BaseRuleWithStringValue & {
436
+ rule_type: TextMatchRulesTypes;
437
+ matching?: BaseMatch & {
438
+ match_type?: TextMatchingOptions;
439
+ };
440
+ };
441
+ export type GenericNumericMatchRule = BaseRuleWithNumericValue & {
442
+ rule_type: NumericMatchRulesTypes;
443
+ matching?: BaseMatch & {
444
+ match_type?: NumericMatchingOptions;
445
+ };
446
+ };
447
+ export type GenericBoolMatchRule = BaseRuleWithBooleanValue & {
448
+ rule_type: BoolMatchRulesTypes;
449
+ matching?: BaseMatch & {
450
+ match_type?: ChoiceMatchingOptions;
451
+ };
452
+ };
453
+ export type GenericSetMatchRule = BaseRuleWithStringValue & {
454
+ rule_type: string;
455
+ matching?: BaseMatch & {
456
+ match_type?: SetMatchingOptions;
457
+ };
458
+ };
459
+ export type GenericKey = {
460
+ /**
461
+ * The key used to identify the data that would be matched against rule **value**
462
+ */
463
+ key?: string;
464
+ };
465
+ export type GenericTextKeyValueMatchRule = BaseRuleWithStringValue & {
466
+ rule_type: GenericTextKeyValueMatchRulesTypes;
467
+ matching?: BaseMatch & {
468
+ match_type?: TextMatchingOptions;
469
+ };
470
+ } & GenericKey;
471
+ export type GenericNumericKeyValueMatchRule = BaseRuleWithNumericValue & {
472
+ rule_type: GenericNumericKeyValueMatchRulesTypes;
473
+ matching?: BaseMatch & {
474
+ match_type?: NumericMatchingOptions;
475
+ };
476
+ } & GenericKey;
477
+ export type GenericBoolKeyValueMatchRule = BaseRuleWithBooleanValue & {
478
+ rule_type: GenericBoolKeyValueMatchRulesTypes;
479
+ matching?: BaseMatch & {
480
+ match_type?: ChoiceMatchingOptions;
481
+ };
482
+ } & GenericKey;
483
+ export type CookieMatchRule = BaseRuleWithStringValue & {
484
+ rule_type: CookieMatchRulesTypes;
485
+ matching?: BaseMatch & {
486
+ match_type?: TextMatchingOptions;
487
+ };
488
+ /**
489
+ * The name of the cookie which value is compared to the given rule value
490
+ */
491
+ key?: string;
492
+ };
493
+ export type CountryMatchRule = BaseRuleWithCountryCodeValue & {
494
+ rule_type: CountryMatchRulesTypes;
495
+ matching?: BaseMatch & {
496
+ match_type?: ChoiceMatchingOptions;
497
+ };
498
+ };
499
+ export type JsConditionMatchRule = BaseRuleWithJsCodeValue & {
500
+ rule_type: JsConditionMatchRulesTypes;
501
+ matching?: BaseMatch & {
502
+ match_type?: ChoiceMatchingOptions;
503
+ };
504
+ };
505
+ export type VisitorTypeMatchRule = BaseRuleWithVisitorTypeValue & {
506
+ rule_type: VisitorTypeMatchRulesTypes;
507
+ matching?: BaseMatch & {
508
+ match_type?: ChoiceMatchingOptions;
509
+ };
510
+ };
511
+ export type LanguageMatchRule = BaseRuleWithLanguageCodeValue & {
512
+ rule_type: LanguageMatchRulesTypes;
513
+ matching?: BaseMatch & {
514
+ match_type?: ChoiceMatchingOptions;
515
+ };
516
+ };
517
+ export type GoalTriggeredMatchRule = BaseRuleWithGoalTriggeredValue & {
518
+ rule_type: GoalTriggeredMatchRulesTypes;
519
+ matching?: BaseMatch & {
520
+ match_type?: ChoiceMatchingOptions;
521
+ };
522
+ };
523
+ export type SegmentBucketedMatchRule = BaseRuleWithSegmentBucketedValue & {
524
+ rule_type: SegmentBucketedMatchRulesTypes;
525
+ matching?: BaseMatch & {
526
+ match_type?: ChoiceMatchingOptions;
527
+ };
528
+ };
529
+ export type ExperienceBucketedMatchRule = BaseRuleWithExperienceBucketedValue & {
530
+ rule_type: string;
531
+ matching?: BaseMatch & {
532
+ match_type?: ChoiceMatchingOptions;
533
+ };
534
+ };
535
+ export type DayOfWeekMatchRule = BaseRuleWithDayOfWeekValue & {
536
+ rule_type: DayOfWeekMatchRulesTypes;
537
+ matching?: BaseMatch & {
538
+ match_type?: NumericMatchingOptions;
539
+ };
540
+ };
541
+ export type HourOfDayMatchRule = BaseRuleWithHourOfDayValue & {
542
+ rule_type: HourOfDayMatchRulesTypes;
543
+ matching?: BaseMatch & {
544
+ match_type?: NumericMatchingOptions;
545
+ };
546
+ };
547
+ export type MinuteOfHourMatchRule = BaseRuleWithMinuteOfHourValue & {
548
+ rule_type: MinuteOfHourMatchRulesTypes;
549
+ matching?: BaseMatch & {
550
+ match_type?: NumericMatchingOptions;
551
+ };
552
+ };
553
+ export type BrowserNameMatchRule = BaseRuleWithBrowserNameValue & {
554
+ rule_type: BrowserNameMatchRulesTypes;
555
+ matching?: BaseMatch & {
556
+ match_type?: ChoiceMatchingOptions;
557
+ };
558
+ };
559
+ export type OsMatchRule = BaseRuleWithOsValue & {
560
+ rule_type: OsMatchRulesTypes;
561
+ matching?: BaseMatch & {
562
+ match_type?: ChoiceMatchingOptions;
563
+ };
564
+ };
565
+ export type WeatherConditionMatchRule = BaseRuleWithWeatherConditionValue & {
566
+ rule_type: WeatherConditionMatchRulesTypes;
567
+ matching?: BaseMatch & {
568
+ match_type?: TextMatchingOptions;
569
+ };
570
+ };
571
+ export type RuleElementNoUrl = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | CookieMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule;
572
+ export type RuleElement = GenericTextMatchRule | GenericNumericMatchRule | GenericBoolMatchRule | GenericTextKeyValueMatchRule | GenericNumericKeyValueMatchRule | GenericBoolKeyValueMatchRule | CookieMatchRule | CountryMatchRule | LanguageMatchRule | GoalTriggeredMatchRule | SegmentBucketedMatchRule | DayOfWeekMatchRule | HourOfDayMatchRule | MinuteOfHourMatchRule | BrowserNameMatchRule | OsMatchRule | WeatherConditionMatchRule | VisitorTypeMatchRule | JsConditionMatchRule;
573
+ export type TextMatchingOptions = 'matches' | 'regexMatches' | 'contains' | 'endsWith' | 'startsWith';
574
+ export declare const TextMatchingOptions: {
575
+ readonly MATCHES: "matches";
576
+ readonly REGEX_MATCHES: "regexMatches";
577
+ readonly CONTAINS: "contains";
578
+ readonly ENDS_WITH: "endsWith";
579
+ readonly STARTS_WITH: "startsWith";
580
+ };
581
+ export type NumericMatchingOptions = 'equalsNumber' | 'less' | 'lessEqual';
582
+ export declare const NumericMatchingOptions: {
583
+ readonly EQUALS_NUMBER: "equalsNumber";
584
+ readonly LESS: "less";
585
+ readonly LESS_EQUAL: "lessEqual";
586
+ };
587
+ export type ChoiceMatchingOptions = 'equals';
588
+ export declare const ChoiceMatchingOptions: {
589
+ readonly EQUALS: "equals";
590
+ };
591
+ export type ChoiceContainsOptions = 'contains';
592
+ export declare const ChoiceContainsOptions: {
593
+ readonly CONTAINS: "contains";
594
+ };
595
+ export type SetMatchingOptions = 'isIn';
596
+ export declare const SetMatchingOptions: {
597
+ readonly IS_IN: "isIn";
598
+ };
599
+ /**
600
+ * This one describes a logical rule that is being used inside the app for triggering goals, matching audiences etc
601
+ */
602
+ export type RuleObject = {
603
+ /**
604
+ * This describes an outer set of blocks which are evaluated using OR's between them
605
+ */
606
+ OR?: Array<{
607
+ /**
608
+ * This describes a colections of logical blocks which are evaluated using AND's between them
609
+ */
610
+ AND?: Array<{
611
+ /**
612
+ * This describes a colections of logical blocks which are evaluated using OR's between them
613
+ */
614
+ OR_WHEN?: Array<RuleElement>;
615
+ }>;
616
+ }>;
617
+ } | null;
618
+ /**
619
+ * This one describes a logical rule that is being used inside the app for triggering goals, matching audiences etc
620
+ */
621
+ export type RuleObjectNoUrl = {
622
+ /**
623
+ * This describes an outer set of blocks which are evaluated using OR's between them
624
+ */
625
+ OR?: Array<{
626
+ /**
627
+ * This describes a colections of logical blocks which are evaluated using AND's between them
628
+ */
629
+ AND?: Array<{
630
+ /**
631
+ * This describes a colections of logical blocks which are evaluated using OR's between them
632
+ */
633
+ OR_WHEN?: Array<RuleElementNoUrl>;
634
+ }>;
635
+ }>;
636
+ } | null;
637
+ export type Base64Image = {
638
+ /**
639
+ * Image's content, base64 encoded
640
+ */
641
+ data?: string;
642
+ };
643
+ export type ErrorData = {
644
+ code?: number;
645
+ message?: string;
646
+ fields?: string;
647
+ };
648
+ export type SuccessData = {
649
+ code?: number;
650
+ message?: string;
651
+ };
652
+ export type ImportProjectDataSuccess = SuccessData & {
653
+ /**
654
+ * List of imported objects
655
+ */
656
+ imported?: {
657
+ /**
658
+ * List of created experiences. Empty if nothing imported
659
+ */
660
+ experiences?: Array<number>;
661
+ /**
662
+ * List of created audiences. Empty if nothing imported
663
+ */
664
+ audiences?: Array<number>;
665
+ /**
666
+ * List of created locations. Empty if nothing imported
667
+ */
668
+ locations?: Array<number>;
669
+ /**
670
+ * List of created goals. Empty if nothing imported
671
+ */
672
+ goals?: Array<number>;
673
+ /**
674
+ * List of created hypothesis. Empty if nothing imported
675
+ */
676
+ hypothesis?: Array<number>;
677
+ };
678
+ };
679
+ export type BulkSuccessData = SuccessData & {
680
+ code?: number;
681
+ /**
682
+ * List of unprocessed entities. Would be empty, if all passed entities processed
683
+ */
684
+ errors?: Array<BulkEntityError>;
685
+ };
686
+ export type BulkEntityError = {
687
+ /**
688
+ * ID of entity which has not been processed
689
+ */
690
+ id?: number;
691
+ /**
692
+ * A reason explaining why entity has not been processed
693
+ */
694
+ message?: string;
695
+ };
696
+ /**
697
+ * Offset in seconds, from UTC time, for the give timezone
698
+ */
699
+ export type UTC_Offset = number;
700
+ export type GA_SettingsBase = {
701
+ /**
702
+ * Flag indicating whether Google Analytics integration is enabled or not.
703
+ */
704
+ enabled?: boolean;
705
+ };
706
+ export type IntegrationGA3 = {
707
+ type?: 'ga3';
708
+ /**
709
+ * Universal Analytics property to be used for tracking
710
+ */
711
+ property_UA?: string | null;
712
+ };
713
+ export type type = 'ga3';
714
+ export declare const type: {
715
+ readonly GA3: "ga3";
716
+ };
717
+ export type IntegrationGA4Base = {
718
+ type?: 'ga4';
719
+ /**
720
+ * ID of the ga4 property where data will be sent. Used internally for API calls to GoogleAnalytics
721
+ */
722
+ measurementId?: string;
723
+ };
724
+ export type type2 = 'ga4';
725
+ export declare const type2: {
726
+ readonly GA4: "ga4";
727
+ };
728
+ export type IntegrationGA4 = IntegrationGA4Base & {
729
+ /**
730
+ * ID of the ga4 property where data will be sent. Used internally for API calls to GoogleAnalytics
731
+ */
732
+ propertyId?: string;
733
+ };
734
+ /**
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.
737
+ *
738
+ */
739
+ export type GenericListMatchingOptions = 'any' | 'all';
740
+ /**
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.
743
+ *
744
+ */
745
+ export declare const GenericListMatchingOptions: {
746
+ readonly ANY: "any";
747
+ readonly ALL: "all";
748
+ };
749
+ /**
750
+ * Type of the outlier detection mechanism
751
+ */
752
+ export type NumericOutlierTypes = 'none' | 'min_max' | 'percentile';
753
+ /**
754
+ * Type of the outlier detection mechanism
755
+ */
756
+ export declare const NumericOutlierTypes: {
757
+ readonly NONE: "none";
758
+ readonly MIN_MAX: "min_max";
759
+ readonly PERCENTILE: "percentile";
760
+ };
761
+ export type NumericOutlierBase = {
762
+ detection_type: NumericOutlierTypes;
763
+ };
764
+ export type NumericOutlierNone = NumericOutlierBase & {
765
+ detection_type?: 'none';
766
+ };
767
+ export type detection_type = 'none';
768
+ export declare const detection_type: {
769
+ readonly NONE: "none";
770
+ };
771
+ export type NumericOutlierMinMax = NumericOutlierBase & {
772
+ detection_type?: 'min_max';
773
+ /**
774
+ * Minimum value for the outlier detection, under which, the value is considered an outlier
775
+ */
776
+ min?: number;
777
+ /**
778
+ * Maximum value for the outlier detection, over which, the value is considered an outlier
779
+ */
780
+ max?: number;
781
+ };
782
+ export type detection_type2 = 'min_max';
783
+ export declare const detection_type2: {
784
+ readonly MIN_MAX: "min_max";
785
+ };
786
+ export type NumericOutlierPercentile = NumericOutlierBase & {
787
+ detection_type?: 'percentile';
788
+ min?: unknown & Percentiles;
789
+ max?: unknown & Percentiles;
790
+ };
791
+ export type detection_type3 = 'percentile';
792
+ export declare const detection_type3: {
793
+ readonly PERCENTILE: "percentile";
794
+ };
795
+ export type NumericOutlier = NumericOutlierNone | NumericOutlierMinMax | NumericOutlierPercentile;
796
+ /**
797
+ * List of supported percentiles
798
+ */
799
+ export type Percentiles = 1 | 5 | 10 | 25 | 50 | 75 | 90 | 95 | 99;
800
+ /**
801
+ * List of supported percentiles
802
+ */
803
+ export declare const Percentiles: {
804
+ readonly _1: 1;
805
+ readonly _5: 5;
806
+ readonly _10: 10;
807
+ readonly _25: 25;
808
+ readonly _50: 50;
809
+ readonly _75: 75;
810
+ readonly _90: 90;
811
+ readonly _95: 95;
812
+ readonly _99: 99;
813
+ };
814
+ /**
815
+ * Response containing project's config data needed in order to serve experiences
816
+ */
817
+ export type ConfigResponseData = {
818
+ /**
819
+ * Account ID under which the project exists
820
+ */
821
+ account_id?: string;
822
+ project?: ConfigProject;
823
+ /**
824
+ * List of goals to be tracked in the project
825
+ */
826
+ goals?: Array<ConfigGoal>;
827
+ /**
828
+ * List of locations that are used inside this project
829
+ */
830
+ locations?: Array<ConfigLocation>;
831
+ /**
832
+ * List of audiences that are used inside this project
833
+ */
834
+ audiences?: Array<ConfigAudience>;
835
+ /**
836
+ * List of custom that are devined inside this project
837
+ */
838
+ segments?: Array<ConfigSegment>;
839
+ /**
840
+ * List of active experiences inside this project
841
+ */
842
+ experiences?: Array<ConfigExperience>;
843
+ /**
844
+ * List of archived experiences inside this project, which were archived within the last 8 months
845
+ */
846
+ archived_experiences?: Array<string>;
847
+ /**
848
+ * List of features inside this project. Presented only for fullstack projects
849
+ */
850
+ features?: Array<ConfigFeature>;
851
+ /**
852
+ * Flag indicating if the returned config is in debug mode
853
+ */
854
+ is_debug?: boolean;
855
+ };
856
+ export type ConfigMinimalResponseData = {
857
+ /**
858
+ * Account ID
859
+ */
860
+ account_id?: string;
861
+ /**
862
+ * Project ID
863
+ */
864
+ project_id?: string;
865
+ } & ConfigProjectMinimalSettings;
866
+ /**
867
+ * Object that represents the change done inside an experience
868
+ */
869
+ export type ExperienceChangeBase = {
870
+ type?: 'richStructure' | 'customCode' | 'defaultCode' | 'defaultCodeMultipage' | 'defaultRedirect' | 'fullStackFeature';
871
+ /**
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
879
+ *
880
+ */
881
+ data?: {
882
+ [key: string]: unknown;
883
+ };
884
+ };
885
+ export type type3 = 'richStructure' | 'customCode' | 'defaultCode' | 'defaultCodeMultipage' | 'defaultRedirect' | 'fullStackFeature';
886
+ export declare const type3: {
887
+ readonly RICH_STRUCTURE: "richStructure";
888
+ readonly CUSTOM_CODE: "customCode";
889
+ readonly DEFAULT_CODE: "defaultCode";
890
+ readonly DEFAULT_CODE_MULTIPAGE: "defaultCodeMultipage";
891
+ readonly DEFAULT_REDIRECT: "defaultRedirect";
892
+ readonly FULL_STACK_FEATURE: "fullStackFeature";
893
+ };
894
+ /**
895
+ * Object that represents id of the change done inside an experience
896
+ */
897
+ export type ExperienceChangeId = {
898
+ /**
899
+ * The ID of the experience change
900
+ */
901
+ id: number;
902
+ };
903
+ /**
904
+ * Object that represents id of the change done inside an experience
905
+ */
906
+ export type ExperienceChangeIdReadOnly = {
907
+ /**
908
+ * The ID of the experience change
909
+ */
910
+ readonly id?: number;
911
+ };
912
+ /**
913
+ * Object that represents one change done inside an experience
914
+ */
915
+ export type ExperienceChange = ExperienceChangeDefaultCodeData | ExperienceChangeDefaultCodeMultipageData | ExperienceChangeDefaultRedirectData | ExperienceChangeCustomCodeData | ExperienceChangeRichStructureData | ExperienceChangeFullStackFeature;
916
+ /**
917
+ * Object that represents one change done inside an experience, used when adding changes
918
+ */
919
+ export type ExperienceChangeAdd = ExperienceChangeDefaultCodeDataAdd | ExperienceChangeDefaultCodeMultipageDataAdd | ExperienceChangeDefaultRedirectDataAdd | ExperienceChangeCustomCodeDataAdd | ExperienceChangeRichStructureDataAdd | ExperienceChangeFullStackFeatureAdd;
920
+ /**
921
+ * Object that represents one change done inside an experience
922
+ */
923
+ export type ExperienceChangeUpdate = ExperienceChangeDefaultCodeDataUpdate | ExperienceChangeDefaultCodeMultipageDataUpdate | ExperienceChangeDefaultRedirectDataUpdate | ExperienceChangeRichStructureDataUpdate | ExperienceChangeCustomCodeDataUpdate | ExperienceChangeFullStackFeatureUpdate;
924
+ /**
925
+ * Object that represents one change done inside an experience
926
+ */
927
+ export type ExperienceChangeUpdateNoId = ExperienceChangeDefaultCodeDataUpdateNoId | ExperienceChangeDefaultCodeMultipageDataUpdateNoId | ExperienceChangeDefaultRedirectDataUpdateNoId | ExperienceChangeRichStructureDataUpdateNoId | ExperienceChangeCustomCodeDataUpdateNoId | ExperienceChangeFullStackFeatureUpdateNoId;
928
+ /**
929
+ * Describes structure for "defaultCode" type of experience change
930
+ */
931
+ export type ExperienceChangeDefaultCodeDataBase = ExperienceChangeBase & {
932
+ type?: 'defaultCode';
933
+ /**
934
+ * Describes structure for "defaultCode" type of experience change
935
+ */
936
+ data?: {
937
+ /**
938
+ * CSS code to be applied by this change
939
+ */
940
+ css?: string | null;
941
+ /**
942
+ * Javascript code generated by the visual editor or written in the same structure, to be applied by this experience change
943
+ */
944
+ js?: string | null;
945
+ /**
946
+ * Custom javascript code to be applied by this change
947
+ */
948
+ custom_js?: string | null;
949
+ };
950
+ };
951
+ export type type4 = 'defaultCode';
952
+ export declare const type4: {
953
+ readonly DEFAULT_CODE: "defaultCode";
954
+ };
955
+ /**
956
+ * Describes structure for "defaultCode" type of experience change
957
+ */
958
+ export type ExperienceChangeDefaultCodeData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeDataBase;
959
+ /**
960
+ * Describes structure for adding a "defaultCode" type of experience change
961
+ */
962
+ export type ExperienceChangeDefaultCodeDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeDataBase & {
963
+ data: unknown;
964
+ };
965
+ /**
966
+ * Describes structure for "defaultCode" type of experience change
967
+ */
968
+ export type ExperienceChangeDefaultCodeDataUpdateNoId = ExperienceChangeDefaultCodeDataBase & unknown;
969
+ /**
970
+ * Describes structure for "defaultCode" type of experience change
971
+ */
972
+ export type ExperienceChangeDefaultCodeDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeDataBase & unknown;
973
+ /**
974
+ * Describes structure for "defaultRedirect" type of experience change
975
+ */
976
+ export type ExperienceChangeDefaultRedirectDataBase = ExperienceChangeBase & {
977
+ type?: 'defaultRedirect';
978
+ /**
979
+ * Describes structure for "defaultRedirect" type of experience change
980
+ */
981
+ data?: {
982
+ /**
983
+ * Defines whether the URL matching is case sensitive or not
984
+ */
985
+ case_sensitive?: boolean;
986
+ /**
987
+ * Pattern for matching the Original URL in order to construct the redirect URL
988
+ */
989
+ original_pattern?: string;
990
+ /**
991
+ * String used to construct the variation redirect URL. This string can contain matches from original_url or it can be a standard URL
992
+ */
993
+ variation_pattern?: string;
994
+ };
995
+ };
996
+ export type type5 = 'defaultRedirect';
997
+ export declare const type5: {
998
+ readonly DEFAULT_REDIRECT: "defaultRedirect";
999
+ };
1000
+ /**
1001
+ * Describes structure for "defaultRedirect" type of experience change
1002
+ */
1003
+ export type ExperienceChangeDefaultRedirectData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase;
1004
+ /**
1005
+ * Describes structure for "defaultRedirect" type of experience change
1006
+ */
1007
+ export type ExperienceChangeDefaultRedirectDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeDefaultRedirectDataBase & {
1008
+ data: unknown;
1009
+ };
1010
+ /**
1011
+ * Describes structure for "defaultRedirect" type of experience change
1012
+ */
1013
+ export type ExperienceChangeDefaultRedirectDataUpdateNoId = ExperienceChangeDefaultRedirectDataBase & unknown;
1014
+ /**
1015
+ * Describes structure for "defaultRedirect" type of experience change
1016
+ */
1017
+ export type ExperienceChangeDefaultRedirectDataUpdate = ExperienceChangeId & ExperienceChangeDefaultRedirectDataBase & unknown;
1018
+ /**
1019
+ * Describes structure for "defaultCodeMultipage" type of experience change
1020
+ */
1021
+ export type ExperienceChangeDefaultCodeMultipageDataBase = ExperienceChangeBase & {
1022
+ type?: 'defaultCodeMultipage';
1023
+ /**
1024
+ * Describes structure for "defaultCodeMultipage" type of experience change
1025
+ */
1026
+ data?: {
1027
+ /**
1028
+ * CSS code to be applied by this change
1029
+ */
1030
+ css?: string | null;
1031
+ /**
1032
+ * Javascript code generated by the visual editor or written in the same structure, to be applied by this experience change
1033
+ */
1034
+ js?: string | null;
1035
+ /**
1036
+ * Custom javascript code to be applied by this change
1037
+ */
1038
+ custom_js?: string | null;
1039
+ /**
1040
+ * The **id** of the page connected to this change.
1041
+ */
1042
+ page_id?: string;
1043
+ };
1044
+ };
1045
+ export type type6 = 'defaultCodeMultipage';
1046
+ export declare const type6: {
1047
+ readonly DEFAULT_CODE_MULTIPAGE: "defaultCodeMultipage";
1048
+ };
1049
+ /**
1050
+ * Describes structure for "defaultCodeMultipage" type of experience change
1051
+ */
1052
+ export type ExperienceChangeDefaultCodeMultipageData = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase;
1053
+ /**
1054
+ * Describes structure for "defaultCodeMultipage" type of experience change
1055
+ */
1056
+ export type ExperienceChangeDefaultCodeMultipageDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeDefaultCodeMultipageDataBase & {
1057
+ data: unknown;
1058
+ };
1059
+ /**
1060
+ * Describes structure for "defaultCodeMultipage" type of experience change
1061
+ */
1062
+ export type ExperienceChangeDefaultCodeMultipageDataUpdateNoId = ExperienceChangeDefaultCodeMultipageDataBase & unknown;
1063
+ /**
1064
+ * Describes structure for "defaultCodeMultipage" type of experience change
1065
+ */
1066
+ export type ExperienceChangeDefaultCodeMultipageDataUpdate = ExperienceChangeId & ExperienceChangeDefaultCodeMultipageDataBase & unknown;
1067
+ /**
1068
+ * Describes structure for "defaultCode" type of experience change
1069
+ */
1070
+ export type ExperienceChangeRichStructureDataBase = ExperienceChangeBase & {
1071
+ type?: 'richStructure';
1072
+ /**
1073
+ * Describes structure for "defaultCode" type of experience change
1074
+ */
1075
+ data?: {
1076
+ /**
1077
+ * Javascript code generated by the visual editor or written in the same structure, to be applied by this experience change
1078
+ */
1079
+ js?: string | null;
1080
+ /**
1081
+ * CSS selector of the element to which the change refers to, if this is a change concerning one DOM element
1082
+ */
1083
+ selector?: string;
1084
+ /**
1085
+ * The **id** of the page connected to this change, in case this is a **multi-page** experiment
1086
+ */
1087
+ page_id?: string;
1088
+ /**
1089
+ * Various key - value data
1090
+ */
1091
+ [key: string]: string | undefined;
1092
+ };
1093
+ };
1094
+ export type type7 = 'richStructure';
1095
+ export declare const type7: {
1096
+ readonly RICH_STRUCTURE: "richStructure";
1097
+ };
1098
+ /**
1099
+ * Describes structure for "defaultCode" type of experience change
1100
+ */
1101
+ export type ExperienceChangeRichStructureData = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase;
1102
+ /**
1103
+ * Describes structure for "defaultCode" type of experience change
1104
+ */
1105
+ export type ExperienceChangeRichStructureDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeRichStructureDataBase & {
1106
+ data: unknown;
1107
+ };
1108
+ /**
1109
+ * Describes structure for "defaultCode" type of experience change
1110
+ */
1111
+ export type ExperienceChangeRichStructureDataUpdateNoId = ExperienceChangeRichStructureDataBase & unknown;
1112
+ /**
1113
+ * Describes structure for "defaultCode" type of experience change
1114
+ */
1115
+ export type ExperienceChangeRichStructureDataUpdate = ExperienceChangeId & ExperienceChangeRichStructureDataBase & unknown;
1116
+ /**
1117
+ * Describes structure for "defaultCode" type of experience change
1118
+ */
1119
+ export type ExperienceChangeCustomCodeDataBase = ExperienceChangeBase & {
1120
+ type?: 'customCode';
1121
+ /**
1122
+ * Describes structure for "defaultCode" type of experience change
1123
+ */
1124
+ data?: {
1125
+ /**
1126
+ * CSS code to be applied by this change
1127
+ */
1128
+ css?: string | null;
1129
+ /**
1130
+ * Custom javascript code to be applied by this change
1131
+ */
1132
+ js?: string | null;
1133
+ /**
1134
+ * The **id** of the page connected to this change, in case this is a **multi-page** experiment
1135
+ */
1136
+ page_id?: string;
1137
+ };
1138
+ };
1139
+ export type type8 = 'customCode';
1140
+ export declare const type8: {
1141
+ readonly CUSTOM_CODE: "customCode";
1142
+ };
1143
+ /**
1144
+ * Describes structure for "defaultCode" type of experience change
1145
+ */
1146
+ export type ExperienceChangeCustomCodeData = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase;
1147
+ /**
1148
+ * Describes structure for "defaultCode" type of experience change
1149
+ */
1150
+ export type ExperienceChangeCustomCodeDataAdd = ExperienceChangeIdReadOnly & ExperienceChangeCustomCodeDataBase & {
1151
+ data: unknown;
1152
+ };
1153
+ /**
1154
+ * Describes structure for "customCode" type of experience change
1155
+ */
1156
+ export type ExperienceChangeCustomCodeDataUpdateNoId = ExperienceChangeCustomCodeDataBase & unknown;
1157
+ /**
1158
+ * Describes structure for "customCode" type of experience change
1159
+ */
1160
+ export type ExperienceChangeCustomCodeDataUpdate = ExperienceChangeId & ExperienceChangeCustomCodeDataBase & unknown;
1161
+ /**
1162
+ * Describes structure for "fullStackFeature" type of experience change
1163
+ */
1164
+ export type ExperienceChangeFullStackFeatureBase = ExperienceChangeBase & {
1165
+ type?: 'fullStackFeature';
1166
+ /**
1167
+ * Describes structure for "fullStackFeature" type of experience change
1168
+ */
1169
+ data?: {
1170
+ /**
1171
+ * The **id** of the feature connected to this change
1172
+ */
1173
+ feature_id?: number;
1174
+ /**
1175
+ * A key-value object defined by user which describes the variables values. Where the key is variable name defined in connected feature and value is a variable's value with corresponding type
1176
+ */
1177
+ variables_data?: {
1178
+ [key: string]: unknown;
1179
+ };
1180
+ };
1181
+ };
1182
+ export type type9 = 'fullStackFeature';
1183
+ export declare const type9: {
1184
+ readonly FULL_STACK_FEATURE: "fullStackFeature";
1185
+ };
1186
+ /**
1187
+ * Describes structure for "fullStackFeature" type of experience change
1188
+ */
1189
+ export type ExperienceChangeFullStackFeature = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase;
1190
+ /**
1191
+ * Describes structure for "fullStackFeature" type of experience change
1192
+ */
1193
+ export type ExperienceChangeFullStackFeatureAdd = ExperienceChangeIdReadOnly & ExperienceChangeFullStackFeatureBase & {
1194
+ data: unknown;
1195
+ };
1196
+ /**
1197
+ * Describes structure for "fullStackFeature" type of experience change
1198
+ */
1199
+ export type ExperienceChangeFullStackFeatureUpdate = ExperienceChangeId & ExperienceChangeFullStackFeatureBase & unknown;
1200
+ /**
1201
+ * Describes structure for "fullStackFeature" type of experience change
1202
+ */
1203
+ export type ExperienceChangeFullStackFeatureUpdateNoId = ExperienceChangeFullStackFeatureBase & unknown;
1204
+ export type UpdateExperienceChangeRequestData = ExperienceChangeAdd;
1205
+ /**
1206
+ * Describes the provider with which Convert integrates to send experience data
1207
+ */
1208
+ export type IntegrationProvider = 'baidu' | 'clicktale' | 'clicky' | 'cnzz' | 'crazyegg' | 'econda' | 'eulerian' | 'google_analytics' | 'gosquared' | 'heapanalytics' | 'hotjar' | 'mixpanel' | 'mouseflow' | 'piwik' | 'segmentio' | 'sitecatalyst' | 'woopra' | 'ysance';
1209
+ /**
1210
+ * Describes the provider with which Convert integrates to send experience data
1211
+ */
1212
+ export declare const IntegrationProvider: {
1213
+ readonly BAIDU: "baidu";
1214
+ readonly CLICKTALE: "clicktale";
1215
+ readonly CLICKY: "clicky";
1216
+ readonly CNZZ: "cnzz";
1217
+ readonly CRAZYEGG: "crazyegg";
1218
+ readonly ECONDA: "econda";
1219
+ readonly EULERIAN: "eulerian";
1220
+ readonly GOOGLE_ANALYTICS: "google_analytics";
1221
+ readonly GOSQUARED: "gosquared";
1222
+ readonly HEAPANALYTICS: "heapanalytics";
1223
+ readonly HOTJAR: "hotjar";
1224
+ readonly MIXPANEL: "mixpanel";
1225
+ readonly MOUSEFLOW: "mouseflow";
1226
+ readonly PIWIK: "piwik";
1227
+ readonly SEGMENTIO: "segmentio";
1228
+ readonly SITECATALYST: "sitecatalyst";
1229
+ readonly WOOPRA: "woopra";
1230
+ readonly YSANCE: "ysance";
1231
+ };
1232
+ export type ExperienceIntegrationBase = {
1233
+ provider: IntegrationProvider;
1234
+ /**
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**
1237
+ *
1238
+ */
1239
+ enabled?: boolean | null;
1240
+ };
1241
+ export type ExperienceIntegrationBaidu = ExperienceIntegrationBase & {
1242
+ /**
1243
+ * Custom dimension where experience data should be sent to.
1244
+ */
1245
+ custom_dimension: string;
1246
+ };
1247
+ export type ExperienceIntegrationClicktale = ExperienceIntegrationBase;
1248
+ export type ExperienceIntegrationClicky = ExperienceIntegrationBase;
1249
+ export type ExperienceIntegrationCnzz = ExperienceIntegrationBase & {
1250
+ /**
1251
+ * Custom dimension where experience data should be sent to.
1252
+ */
1253
+ custom_dimension: string;
1254
+ };
1255
+ /**
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
1260
+ *
1261
+ */
1262
+ export type ExperienceIntegrationCrazyegg = ExperienceIntegrationBase;
1263
+ export type ExperienceIntegrationEconda = ExperienceIntegrationBase;
1264
+ export type ExperienceIntegrationEulerian = ExperienceIntegrationBase;
1265
+ export type ExperienceIntegrationGA3 = GA_SettingsBase & ExperienceIntegrationBase & IntegrationGA3 & {
1266
+ /**
1267
+ * Custom dimension where experience data should be sent to.
1268
+ */
1269
+ custom_dimension?: string;
1270
+ };
1271
+ export type ExperienceIntegrationGA4Base = GA_SettingsBase & ExperienceIntegrationBase & IntegrationGA4Base;
1272
+ export type ExperienceIntegrationGA4 = ExperienceIntegrationGA4Base & IntegrationGA4 & {
1273
+ /**
1274
+ * List of GA audiences created for each of this experience's variations
1275
+ */
1276
+ audiences?: {
1277
+ [key: string]: string;
1278
+ };
1279
+ };
1280
+ export type ExperienceIntegrationGoogleAnalytics = ExperienceIntegrationGA3 | ExperienceIntegrationGA4;
1281
+ export type ExperienceIntegrationGosquared = ExperienceIntegrationBase;
1282
+ export type ExperienceIntegrationHeapanalytics = ExperienceIntegrationBase;
1283
+ export type ExperienceIntegrationHotjar = ExperienceIntegrationBase;
1284
+ export type ExperienceIntegrationMixpanel = ExperienceIntegrationBase;
1285
+ export type ExperienceIntegrationMouseflow = ExperienceIntegrationBase;
1286
+ export type ExperienceIntegrationPiwik = ExperienceIntegrationBase & {
1287
+ /**
1288
+ * Custom dimension where experience data should be sent to.
1289
+ */
1290
+ custom_dimension: string;
1291
+ };
1292
+ export type ExperienceIntegrationSegmentio = ExperienceIntegrationBase;
1293
+ export type ExperienceIntegrationSitecatalyst = ExperienceIntegrationBase & {
1294
+ /**
1295
+ * Custom dimension where experience data should be sent to.
1296
+ */
1297
+ evar: string;
1298
+ };
1299
+ export type ExperienceIntegrationWoopra = ExperienceIntegrationBase;
1300
+ export type ExperienceIntegrationYsance = ExperienceIntegrationBase & {
1301
+ /**
1302
+ * Custom dimension where experience data should be sent to.
1303
+ */
1304
+ custom_dimension: string;
1305
+ };
1306
+ export type ConfigExperience = {
1307
+ /**
1308
+ * Experience ID
1309
+ */
1310
+ id?: string;
1311
+ /**
1312
+ * Experience Name
1313
+ */
1314
+ name?: string;
1315
+ /**
1316
+ * Experience readable key that uniquely identifies this experience
1317
+ */
1318
+ key?: string;
1319
+ /**
1320
+ * List of locations IDs on which this experience is presented. Either this or **site_area** is given but should not be both.
1321
+ */
1322
+ locations?: Array<string> | null;
1323
+ /**
1324
+ * Rules that define where the experience is gonna run. Either this or **locations** is given but should not be both.
1325
+ */
1326
+ site_area?: RuleObject | null;
1327
+ /**
1328
+ * List of audiences IDs to which this experience is presented to
1329
+ */
1330
+ audiences?: Array<string> | null;
1331
+ /**
1332
+ * List of goals IDs to which will be tracked for this experience
1333
+ */
1334
+ goals?: Array<string>;
1335
+ status?: ExperienceStatuses;
1336
+ /**
1337
+ * Global Experience's JavaScript that will run for this experience before its changes are applied
1338
+ *
1339
+ */
1340
+ global_js?: string;
1341
+ /**
1342
+ * Global Experience's StyleSheet that will run for this experience before its changes are applied
1343
+ *
1344
+ */
1345
+ global_css?: string;
1346
+ type?: ExperienceTypes;
1347
+ /**
1348
+ * Experience's version number
1349
+ */
1350
+ version?: number;
1351
+ /**
1352
+ * Experience's variations list
1353
+ */
1354
+ variations?: Array<ExperienceVariationConfig>;
1355
+ /**
1356
+ * List of integrations that this experience's data is sent to
1357
+ */
1358
+ integrations?: Array<ExperienceIntegrationBaidu | ExperienceIntegrationClicktale | ExperienceIntegrationClicky | ExperienceIntegrationCnzz | ExperienceIntegrationCrazyegg | ExperienceIntegrationEconda | ExperienceIntegrationEulerian | ExperienceIntegrationGAServing | ExperienceIntegrationGosquared | ExperienceIntegrationHeapanalytics | ExperienceIntegrationHotjar | ExperienceIntegrationMixpanel | ExperienceIntegrationMouseflow | ExperienceIntegrationPiwik | ExperienceIntegrationSegmentio | ExperienceIntegrationSitecatalyst | ExperienceIntegrationWoopra | ExperienceIntegrationYsance>;
1359
+ /**
1360
+ * List of environments that this experience is supposed to run on. The full list of available environments is defined at
1361
+ * project level. If this list is empty, the experience will run on all environments.
1362
+ *
1363
+ * @deprecated
1364
+ */
1365
+ environments?: Array<string>;
1366
+ /**
1367
+ * The environment where this experience will run. It has to be one of the environments defined at the project level
1368
+ */
1369
+ environment?: string;
1370
+ /**
1371
+ * Various experience's settings
1372
+ */
1373
+ settings?: {
1374
+ /**
1375
+ * Minimum order value for transactions outliers
1376
+ * @deprecated
1377
+ */
1378
+ min_order_value?: number;
1379
+ /**
1380
+ * Maximum order value for transactions outliers
1381
+ * @deprecated
1382
+ */
1383
+ max_order_value?: number;
1384
+ /**
1385
+ * Various settings used by the stats engine to detect outliers
1386
+ */
1387
+ outliers?: {
1388
+ /**
1389
+ * Order value outlier settings
1390
+ */
1391
+ order_value?: NumericOutlier;
1392
+ /**
1393
+ * Products Ordered count outlier settings
1394
+ */
1395
+ products_ordered_count?: NumericOutlier;
1396
+ };
1397
+ /**
1398
+ * Various settings used for matching the list of Audiences and Locations
1399
+ */
1400
+ matching_options?: {
1401
+ audiences?: GenericListMatchingOptions;
1402
+ locations?: GenericListMatchingOptions;
1403
+ };
1404
+ };
1405
+ };
1406
+ /**
1407
+ * Variation Object
1408
+ */
1409
+ export type ExperienceVariationConfig = {
1410
+ /**
1411
+ * Variation ID
1412
+ */
1413
+ id?: string;
1414
+ /**
1415
+ * Variation name
1416
+ */
1417
+ name?: string;
1418
+ /**
1419
+ * Variation Key
1420
+ */
1421
+ key?: string;
1422
+ /**
1423
+ * Percentage of traffic allocation for this variation, as a number from 0 to 10000.
1424
+ * For an experience, the sum of the traffic allocations for all variations cannot be greater than 10000.
1425
+ *
1426
+ */
1427
+ traffic_allocation?: number;
1428
+ status?: VariationStatuses;
1429
+ /**
1430
+ * List of changes that this variation is exposing.
1431
+ */
1432
+ changes?: Array<ExperienceChange>;
1433
+ };
1434
+ export type ExperienceStatuses = 'draft' | 'active' | 'paused' | 'completed' | 'scheduled';
1435
+ export declare const ExperienceStatuses: {
1436
+ readonly DRAFT: "draft";
1437
+ readonly ACTIVE: "active";
1438
+ readonly PAUSED: "paused";
1439
+ readonly COMPLETED: "completed";
1440
+ readonly SCHEDULED: "scheduled";
1441
+ };
1442
+ export type ExperienceTypes = 'a/b' | 'a/a' | 'mvt' | 'split_url' | 'multipage' | 'deploy';
1443
+ export declare const ExperienceTypes: {
1444
+ readonly A_B: "a/b";
1445
+ readonly A_A: "a/a";
1446
+ readonly MVT: "mvt";
1447
+ readonly SPLIT_URL: "split_url";
1448
+ readonly MULTIPAGE: "multipage";
1449
+ readonly DEPLOY: "deploy";
1450
+ };
1451
+ /**
1452
+ * Variation status
1453
+ */
1454
+ export type VariationStatuses = 'stopped' | 'running';
1455
+ /**
1456
+ * Variation status
1457
+ */
1458
+ export declare const VariationStatuses: {
1459
+ readonly STOPPED: "stopped";
1460
+ readonly RUNNING: "running";
1461
+ };
1462
+ export type ExperienceIntegrationGAServing = ExperienceIntegrationGA3 | ExperienceIntegrationGA4Base;
1463
+ /**
1464
+ * Base Feature Object
1465
+ */
1466
+ export type ConfigFeature = {
1467
+ /**
1468
+ * Feature ID
1469
+ */
1470
+ id?: string;
1471
+ /**
1472
+ * A name given to the feature to identify it easily
1473
+ */
1474
+ name?: string;
1475
+ /**
1476
+ * A unique per project level identifier
1477
+ */
1478
+ key?: string;
1479
+ /**
1480
+ * An array of user-defined variables of a feature.
1481
+ */
1482
+ variables?: Array<FeatureVariableItemData>;
1483
+ };
1484
+ /**
1485
+ * An object which describes the variable of a feature. Where key is variable name and value is one of the possible types [boolean, float, json, integer, string]
1486
+ */
1487
+ export type FeatureVariableItemData = {
1488
+ /**
1489
+ * A user-defined variable name
1490
+ */
1491
+ key?: string;
1492
+ /**
1493
+ * A variable's type
1494
+ */
1495
+ type?: 'boolean' | 'float' | 'json' | 'integer' | 'string';
1496
+ };
1497
+ /**
1498
+ * A variable's type
1499
+ */
1500
+ export type type10 = 'boolean' | 'float' | 'json' | 'integer' | 'string';
1501
+ /**
1502
+ * A variable's type
1503
+ */
1504
+ export declare const type10: {
1505
+ readonly BOOLEAN: "boolean";
1506
+ readonly FLOAT: "float";
1507
+ readonly JSON: "json";
1508
+ readonly INTEGER: "integer";
1509
+ readonly STRING: "string";
1510
+ };
1511
+ /**
1512
+ * Goal item to be tracked inside a project
1513
+ */
1514
+ export type ConfigGoalBase = {
1515
+ /**
1516
+ * Goal ID
1517
+ */
1518
+ id?: string;
1519
+ /**
1520
+ * Goal Name.
1521
+ */
1522
+ name?: string;
1523
+ /**
1524
+ * Goal Key
1525
+ */
1526
+ key?: string;
1527
+ /**
1528
+ * List of goal types to be returned
1529
+ */
1530
+ type?: Array<GoalTypes>;
1531
+ rules?: RuleObject | null;
1532
+ };
1533
+ export type ConfigGoal = DomInteractionGoal | ScrollPercentageGoal | RevenueGoal | NoSettingsGoal | GaGoal | SubmitsFormGoal | ClicksLinkGoal | ClicksElementGoal;
1534
+ export type DomInteractionGoal = ConfigGoalBase & {
1535
+ type?: 'dom_interaction';
1536
+ settings?: DomInteractionGoalSettings;
1537
+ };
1538
+ export type type11 = 'dom_interaction';
1539
+ export declare const type11: {
1540
+ readonly DOM_INTERACTION: "dom_interaction";
1541
+ };
1542
+ export type ScrollPercentageGoal = ConfigGoalBase & {
1543
+ type?: 'scroll_percentage';
1544
+ settings?: ScrollPercentageGoalSettings;
1545
+ };
1546
+ export type type12 = 'scroll_percentage';
1547
+ export declare const type12: {
1548
+ readonly SCROLL_PERCENTAGE: "scroll_percentage";
1549
+ };
1550
+ export type RevenueGoal = ConfigGoalBase & {
1551
+ type?: 'revenue';
1552
+ settings?: RevenueGoalSettings;
1553
+ };
1554
+ export type type13 = 'revenue';
1555
+ export declare const type13: {
1556
+ readonly REVENUE: "revenue";
1557
+ };
1558
+ export type NoSettingsGoal = ConfigGoalBase & {
1559
+ type?: 'advanced' | 'visits_page' | 'code_trigger';
1560
+ };
1561
+ export type type14 = 'advanced' | 'visits_page' | 'code_trigger';
1562
+ export declare const type14: {
1563
+ readonly ADVANCED: "advanced";
1564
+ readonly VISITS_PAGE: "visits_page";
1565
+ readonly CODE_TRIGGER: "code_trigger";
1566
+ };
1567
+ export type GaGoal = ConfigGoalBase & {
1568
+ type?: 'ga_import';
1569
+ settings?: GaGoalSettings;
1570
+ };
1571
+ export type type15 = 'ga_import';
1572
+ export declare const type15: {
1573
+ readonly GA_IMPORT: "ga_import";
1574
+ };
1575
+ export type SubmitsFormGoal = ConfigGoalBase & {
1576
+ type?: 'submits_form';
1577
+ settings?: SubmitsFormGoalSettings;
1578
+ };
1579
+ export type type16 = 'submits_form';
1580
+ export declare const type16: {
1581
+ readonly SUBMITS_FORM: "submits_form";
1582
+ };
1583
+ export type ClicksLinkGoal = ConfigGoalBase & {
1584
+ type?: 'clicks_link';
1585
+ settings?: ClicksLinkGoalSettings;
1586
+ };
1587
+ export type type17 = 'clicks_link';
1588
+ export declare const type17: {
1589
+ readonly CLICKS_LINK: "clicks_link";
1590
+ };
1591
+ export type ClicksElementGoal = ConfigGoalBase & {
1592
+ type?: 'clicks_element';
1593
+ settings?: ClicksElementGoalSettings;
1594
+ };
1595
+ export type type18 = 'clicks_element';
1596
+ export declare const type18: {
1597
+ readonly CLICKS_ELEMENT: "clicks_element";
1598
+ };
1599
+ export type DomInteractionGoalSettings = {
1600
+ /**
1601
+ * Array of Events to be tracked by this goal
1602
+ */
1603
+ tracked_items: Array<{
1604
+ /**
1605
+ * Css selector that identifies the DOM element(s) on which 'event' is to be monitored in order to fire the goal.
1606
+ */
1607
+ selector?: string;
1608
+ /**
1609
+ * The event to monitor in order to fire the goal.
1610
+ */
1611
+ event?: string;
1612
+ }>;
1613
+ };
1614
+ export type ScrollPercentageGoalSettings = {
1615
+ /**
1616
+ * The percentage of scrolling after which the goal will be fired
1617
+ */
1618
+ percentage: number;
1619
+ };
1620
+ export type GaGoalSettings = {
1621
+ /**
1622
+ * GA4 event name
1623
+ */
1624
+ ga_event?: string;
1625
+ };
1626
+ export type RevenueGoalSettings = {
1627
+ /**
1628
+ * Type of the revenue goal tracking, one of the below.
1629
+ * * "manual" - goal will be triggered through the given revenue tracking code;
1630
+ * An empty **triggering_rule** has to be provided as that takes priority over manual triggering
1631
+ * * "ga" - Convert will attempt to pick revenue from GA revenue tracking code and attach it to this goal,
1632
+ * when on page where this goal is triggered via "triggering_rule"
1633
+ *
1634
+ */
1635
+ triggering_type: 'manual' | 'ga';
1636
+ };
1637
+ /**
1638
+ * Type of the revenue goal tracking, one of the below.
1639
+ * * "manual" - goal will be triggered through the given revenue tracking code;
1640
+ * An empty **triggering_rule** has to be provided as that takes priority over manual triggering
1641
+ * * "ga" - Convert will attempt to pick revenue from GA revenue tracking code and attach it to this goal,
1642
+ * when on page where this goal is triggered via "triggering_rule"
1643
+ *
1644
+ */
1645
+ export type triggering_type = 'manual' | 'ga';
1646
+ /**
1647
+ * Type of the revenue goal tracking, one of the below.
1648
+ * * "manual" - goal will be triggered through the given revenue tracking code;
1649
+ * An empty **triggering_rule** has to be provided as that takes priority over manual triggering
1650
+ * * "ga" - Convert will attempt to pick revenue from GA revenue tracking code and attach it to this goal,
1651
+ * when on page where this goal is triggered via "triggering_rule"
1652
+ *
1653
+ */
1654
+ export declare const triggering_type: {
1655
+ readonly MANUAL: "manual";
1656
+ readonly GA: "ga";
1657
+ };
1658
+ export type SubmitsFormGoalSettings = {
1659
+ /**
1660
+ * Url representing form's action attribute used to identify forms which will be tracked for submit event.
1661
+ */
1662
+ action: string;
1663
+ };
1664
+ export type ClicksLinkGoalSettings = {
1665
+ /**
1666
+ * Url representing link's href attribute used to identify links which will be tracked for click event
1667
+ */
1668
+ href: string;
1669
+ };
1670
+ export type ClicksElementGoalSettings = {
1671
+ /**
1672
+ * Css selector that identifies the DOM element(s) on which will track clicks in order to fire the goal.
1673
+ */
1674
+ selector: string;
1675
+ };
1676
+ /**
1677
+ * Goals type, one of below.
1678
+ */
1679
+ export type GoalTypes = 'advanced' | 'dom_interaction' | 'scroll_percentage' | 'code_trigger' | 'revenue';
1680
+ /**
1681
+ * Goals type, one of below.
1682
+ */
1683
+ export declare const GoalTypes: {
1684
+ readonly ADVANCED: "advanced";
1685
+ readonly DOM_INTERACTION: "dom_interaction";
1686
+ readonly SCROLL_PERCENTAGE: "scroll_percentage";
1687
+ readonly CODE_TRIGGER: "code_trigger";
1688
+ readonly REVENUE: "revenue";
1689
+ };
1690
+ /**
1691
+ * This one describes a logical triggering rule that is being used inside the app
1692
+ */
1693
+ export type LocationTrigger = LocationTriggerDomElement | LocationTriggerCallback | LocationTriggerManual | LocationTriggerUponRun;
1694
+ /**
1695
+ * Describes possible location trigger types.
1696
+ * Note that `upon_run` is always the case for **fullstack** projects.
1697
+ *
1698
+ */
1699
+ export type LocationTriggerTypes = 'upon_run' | 'manual' | 'dom_element' | 'callback';
1700
+ /**
1701
+ * Describes possible location trigger types.
1702
+ * Note that `upon_run` is always the case for **fullstack** projects.
1703
+ *
1704
+ */
1705
+ export declare const LocationTriggerTypes: {
1706
+ readonly UPON_RUN: "upon_run";
1707
+ readonly MANUAL: "manual";
1708
+ readonly DOM_ELEMENT: "dom_element";
1709
+ readonly CALLBACK: "callback";
1710
+ };
1711
+ export type LocationTriggerBase = {
1712
+ type: LocationTriggerTypes;
1713
+ };
1714
+ export type LocationTriggerUponRun = LocationTriggerBase & {
1715
+ type?: 'upon_run';
1716
+ };
1717
+ export type type19 = 'upon_run';
1718
+ export declare const type19: {
1719
+ readonly UPON_RUN: "upon_run";
1720
+ };
1721
+ export type LocationTriggerManual = LocationTriggerBase & {
1722
+ type?: 'manual';
1723
+ };
1724
+ export type type20 = 'manual';
1725
+ export declare const type20: {
1726
+ readonly MANUAL: "manual";
1727
+ };
1728
+ /**
1729
+ * Allowed events for LocationTriggerDomElement
1730
+ */
1731
+ export type LocationDomTriggerEvents = 'click' | 'hover' | 'in_view' | 'change';
1732
+ /**
1733
+ * Allowed events for LocationTriggerDomElement
1734
+ */
1735
+ export declare const LocationDomTriggerEvents: {
1736
+ readonly CLICK: "click";
1737
+ readonly HOVER: "hover";
1738
+ readonly IN_VIEW: "in_view";
1739
+ readonly CHANGE: "change";
1740
+ };
1741
+ export type LocationTriggerDomElement = LocationTriggerBase & {
1742
+ type?: 'dom_element';
1743
+ /**
1744
+ * Describes html selector
1745
+ */
1746
+ selector: string;
1747
+ /**
1748
+ * Events for LocationTriggerDomElement
1749
+ */
1750
+ events: Array<LocationDomTriggerEvents>;
1751
+ };
1752
+ export type type21 = 'dom_element';
1753
+ export declare const type21: {
1754
+ readonly DOM_ELEMENT: "dom_element";
1755
+ };
1756
+ export type LocationTriggerCallback = LocationTriggerBase & {
1757
+ type?: 'callback';
1758
+ /**
1759
+ * Describes the js callback that will be executed in order to fire the experience.
1760
+ * It is called with two arguments:
1761
+ * - `activate` - a function that should be called when the experience should be activated
1762
+ * - `options` - an object with the following properties:
1763
+ * - `locationId` - id of the location that is being activated
1764
+ * - `isActive` - boolean flag that indicates if the location is active
1765
+ *
1766
+ * Example:
1767
+ * ```
1768
+ * function(activate, options) {
1769
+ * if (options.isActive) {
1770
+ * setTimeout(function() {
1771
+ * * it activates the experiences 1 second after the
1772
+ * location trigger is initialized - at the load of the tracking script*
1773
+ * activate();
1774
+ * }, 1000);
1775
+ * }
1776
+ * }
1777
+ * ```
1778
+ *
1779
+ */
1780
+ js: string;
1781
+ };
1782
+ export type type22 = 'callback';
1783
+ export declare const type22: {
1784
+ readonly CALLBACK: "callback";
1785
+ };
1786
+ /**
1787
+ * Base Location object
1788
+ */
1789
+ export type ConfigLocation = {
1790
+ /**
1791
+ * Location ID
1792
+ */
1793
+ id?: string;
1794
+ /**
1795
+ * Location unique key
1796
+ */
1797
+ key?: string;
1798
+ /**
1799
+ * Location Name
1800
+ */
1801
+ name?: string;
1802
+ trigger?: LocationTrigger;
1803
+ rules?: RuleObject | null;
1804
+ };
1805
+ export type ConfigProjectMinimalSettings = {
1806
+ /**
1807
+ * Whether to include jQuery library or not into the javascript tracking file served by Convert and loaded via the tracking snippet. If jQuery is not included, it has to be loaded on page, before Convert's tracking code
1808
+ */
1809
+ include_jquery?: boolean;
1810
+ /**
1811
+ * Whether to include jQuery library or not into the v1 javascript tracking file served by Convert and loaded via the tracking snippet.
1812
+ */
1813
+ include_jquery_v1?: boolean;
1814
+ /**
1815
+ * Whether to disable the SPA (Single Page Application) related functionalities from the tracking scripts V1. Most websites work fine without disabling SPA functionality regardless of the fact they are Single Page Apps or not. In edge situation, this setting might prove handy
1816
+ */
1817
+ disable_spa_functionality?: boolean;
1818
+ /**
1819
+ * 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
+ *
1821
+ */
1822
+ readonly version?: string | null;
1823
+ tracking_script?: TrackingScriptReleaseBase;
1824
+ };
1825
+ /**
1826
+ * Project Object under which experiences would get created
1827
+ */
1828
+ export type ConfigProject = {
1829
+ /**
1830
+ * Project ID
1831
+ */
1832
+ id?: string;
1833
+ /**
1834
+ * Project Name. If **settings.data_anonymization** is turned on, the name will be generated from **id** field
1835
+ */
1836
+ name?: string;
1837
+ /**
1838
+ * Value which describes project product type
1839
+ */
1840
+ type?: 'fullstack' | 'web';
1841
+ utc_offset?: UTC_Offset;
1842
+ /**
1843
+ * Object representing the custom domain that is used for loading the tracking scripts and
1844
+ * sending tracking requests to Convert servers instead of the standard Convert domain
1845
+ *
1846
+ */
1847
+ custom_domain?: {
1848
+ /**
1849
+ * Custom domain to be used instead of standard Convert's one
1850
+ */
1851
+ domain?: string;
1852
+ } | null;
1853
+ /**
1854
+ * List of domains allowed to be tracked under this project
1855
+ */
1856
+ domains?: Array<{
1857
+ /**
1858
+ * Top level domain, used for setting cookies where applicable
1859
+ */
1860
+ tld?: string;
1861
+ /**
1862
+ * List of host names under **tld** which are allowed to be tracked under this project
1863
+ */
1864
+ hosts?: unknown;
1865
+ }>;
1866
+ /**
1867
+ * 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.
1870
+ *
1871
+ */
1872
+ global_javascript?: string | null;
1873
+ settings?: {
1874
+ /**
1875
+ * Flag indicating whether decoration of outgoing links (appending tracking cookies inside the link URL in order to
1876
+ * make cross domain tracking possible) is done automatically on page
1877
+ *
1878
+ */
1879
+ allow_crossdomain_tracking?: boolean;
1880
+ /**
1881
+ * Whether or not data is [anonymized](https://convert.zendesk.com/hc/en-us/articles/204506339-Prevent-Experiment-Details-Data-Leak-with-Data-Anonymization).
1882
+ */
1883
+ data_anonymization?: boolean;
1884
+ /**
1885
+ * Follow the 'Do not track' browser settings for users in the mentioned area of the world.
1886
+ */
1887
+ do_not_track?: 'OFF' | 'EU ONLY' | 'EEA ONLY' | 'Worldwide';
1888
+ /**
1889
+ * Follow Global Privacy Control (GPC) signals for users in the mentioned area of the world.
1890
+ * - OFF: Do not follow GPC signals.
1891
+ * - EU ONLY: Follow GPC signals for users in the European Union only.
1892
+ * - EEA ONLY: Follow GPC signals for users in the European Economic Area only.
1893
+ * - Worldwide: Follow GPC signals for users worldwide.
1894
+ *
1895
+ */
1896
+ global_privacy_control?: 'OFF' | 'EU ONLY' | 'EEA ONLY' | 'Worldwide';
1897
+ /**
1898
+ * When this is turned to true, Convert won't track any referral data like http referral, utm query strings etc. Those will be used on the current page if available but won't be stored in cookies in order to be used on subsequent pages.
1899
+ */
1900
+ do_not_track_referral?: boolean;
1901
+ /**
1902
+ * This holds project wide settings used by integrations
1903
+ */
1904
+ integrations?: {
1905
+ google_analytics?: GA_Settings;
1906
+ kissmetrics?: {
1907
+ /**
1908
+ * Flag indicating whether Kissmetrics integration is enabled or not for this project
1909
+ */
1910
+ enabled?: boolean;
1911
+ };
1912
+ };
1913
+ /**
1914
+ * Minimum order value for transactions outliers
1915
+ * @deprecated
1916
+ */
1917
+ min_order_value?: number;
1918
+ /**
1919
+ * Maximum order value for transactions outliers
1920
+ * @deprecated
1921
+ */
1922
+ max_order_value?: number;
1923
+ /**
1924
+ * Various settings used by the stats engine to detect outliers
1925
+ */
1926
+ outliers?: {
1927
+ /**
1928
+ * Order value outlier settings
1929
+ */
1930
+ order_value?: NumericOutlier;
1931
+ /**
1932
+ * Products Ordered count outlier settings
1933
+ */
1934
+ products_ordered_count?: NumericOutlier;
1935
+ };
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
+ };
1952
+ };
1953
+ /**
1954
+ * Value which describes project product type
1955
+ */
1956
+ export type type23 = 'fullstack' | 'web';
1957
+ /**
1958
+ * Value which describes project product type
1959
+ */
1960
+ export declare const type23: {
1961
+ readonly FULLSTACK: "fullstack";
1962
+ readonly WEB: "web";
1963
+ };
1964
+ /**
1965
+ * Follow the 'Do not track' browser settings for users in the mentioned area of the world.
1966
+ */
1967
+ export type do_not_track = 'OFF' | 'EU ONLY' | 'EEA ONLY' | 'Worldwide';
1968
+ /**
1969
+ * Follow the 'Do not track' browser settings for users in the mentioned area of the world.
1970
+ */
1971
+ export declare const do_not_track: {
1972
+ readonly OFF: "OFF";
1973
+ readonly EU_ONLY: "EU ONLY";
1974
+ readonly EEA_ONLY: "EEA ONLY";
1975
+ readonly WORLDWIDE: "Worldwide";
1976
+ };
1977
+ /**
1978
+ * Follow Global Privacy Control (GPC) signals for users in the mentioned area of the world.
1979
+ * - OFF: Do not follow GPC signals.
1980
+ * - EU ONLY: Follow GPC signals for users in the European Union only.
1981
+ * - EEA ONLY: Follow GPC signals for users in the European Economic Area only.
1982
+ * - Worldwide: Follow GPC signals for users worldwide.
1983
+ *
1984
+ */
1985
+ export type global_privacy_control = 'OFF' | 'EU ONLY' | 'EEA ONLY' | 'Worldwide';
1986
+ /**
1987
+ * Follow Global Privacy Control (GPC) signals for users in the mentioned area of the world.
1988
+ * - OFF: Do not follow GPC signals.
1989
+ * - EU ONLY: Follow GPC signals for users in the European Union only.
1990
+ * - EEA ONLY: Follow GPC signals for users in the European Economic Area only.
1991
+ * - Worldwide: Follow GPC signals for users worldwide.
1992
+ *
1993
+ */
1994
+ export declare const global_privacy_control: {
1995
+ readonly OFF: "OFF";
1996
+ readonly EU_ONLY: "EU ONLY";
1997
+ readonly EEA_ONLY: "EEA ONLY";
1998
+ readonly WORLDWIDE: "Worldwide";
1999
+ };
2000
+ /**
2001
+ * Settings to identify which tracking script version will be applied to the project.
2002
+ */
2003
+ export type TrackingScriptReleaseBase = {
2004
+ /**
2005
+ * Current version of the tracking script bundle
2006
+ */
2007
+ readonly current_version?: string;
2008
+ /**
2009
+ * Latest available version of the tracking script bundle.
2010
+ */
2011
+ readonly latest_version?: string | null;
2012
+ } | null;
2013
+ export type ProjectGASettingsBase = GA_SettingsBase & {
2014
+ /**
2015
+ * Attempt to pull revenue data from Google Analytics Revenue Tracking code.
2016
+ */
2017
+ auto_revenue_tracking?: boolean;
2018
+ };
2019
+ export type ProjectIntegrationGA3 = ProjectGASettingsBase & IntegrationGA3;
2020
+ export type ProjectIntegrationGA4 = ProjectGASettingsBase & IntegrationGA4Base & {
2021
+ /**
2022
+ * Boolean indicating whether to wait for the page view event to complete before sending other events.
2023
+ */
2024
+ no_wait_pageview?: boolean;
2025
+ };
2026
+ export type GA_Settings = ProjectIntegrationGA3 | ProjectIntegrationGA4;
2027
+ /**
2028
+ * Base Segment object
2029
+ */
2030
+ export type ConfigSegment = {
2031
+ /**
2032
+ * Segment ID
2033
+ */
2034
+ id?: string;
2035
+ /**
2036
+ * Segment unique key
2037
+ */
2038
+ key?: string;
2039
+ /**
2040
+ * Segment Name
2041
+ */
2042
+ name?: string;
2043
+ rules?: RuleObject | null;
2044
+ };
2045
+ /**
2046
+ * Tracking Request's data
2047
+ */
2048
+ export type SendTrackingEventsRequestData = {
2049
+ /**
2050
+ * ID of the account under which the project is setup
2051
+ */
2052
+ accountId?: string;
2053
+ /**
2054
+ * ID of the project under which the tracking occurs
2055
+ */
2056
+ projectId?: string;
2057
+ /**
2058
+ * Flag to determine whether the data is gonna be enriched before the events are stored for reporting.
2059
+ * For example, in case of a conversion event, if this flag is on and bucketing is not provided, the bucketing stored on the backend datastore for the given visitor
2060
+ * ID would be used. Same applies for segments.
2061
+ *
2062
+ * *Note*: this flag is only available for some plans
2063
+ *
2064
+ */
2065
+ enrichData?: boolean;
2066
+ /**
2067
+ * List of visitors tracked. Each visitor can have multiple events.
2068
+ *
2069
+ */
2070
+ visitors?: Array<{
2071
+ segments?: VisitorSegments;
2072
+ /**
2073
+ * Id of the visitor tracked
2074
+ */
2075
+ visitorId?: string;
2076
+ /**
2077
+ * List of events fired for the given visitor
2078
+ */
2079
+ events?: Array<VisitorTrackingEvents>;
2080
+ }>;
2081
+ };
2082
+ /**
2083
+ * Tracking events related to the same user ID
2084
+ */
2085
+ export type VisitorTrackingEvents = {
2086
+ /**
2087
+ * Type of the event. It can be a bucketing or a conversion event
2088
+ */
2089
+ eventType?: 'bucketing' | 'conversion';
2090
+ data?: BucketingEvent | ConversionEvent;
2091
+ };
2092
+ /**
2093
+ * Type of the event. It can be a bucketing or a conversion event
2094
+ */
2095
+ export type eventType = 'bucketing' | 'conversion';
2096
+ /**
2097
+ * Type of the event. It can be a bucketing or a conversion event
2098
+ */
2099
+ export declare const eventType: {
2100
+ readonly BUCKETING: "bucketing";
2101
+ readonly CONVERSION: "conversion";
2102
+ };
2103
+ /**
2104
+ * Bucketing event data
2105
+ */
2106
+ export type BucketingEvent = {
2107
+ /**
2108
+ * Experience ID to which the visitor is bucketed. In case that **enrichData=true** flag is being sent, only unique events are gonna be recorded. Otherwise, it's
2109
+ * up to the client to ensure that duplicates of the same event for the same visitor do not get sent to the tracking endpoint.
2110
+ *
2111
+ */
2112
+ experienceId: string;
2113
+ /**
2114
+ * Variation ID corresponding to the experience identified by experienceID, that is assigned to the visitor.
2115
+ */
2116
+ variationId: string;
2117
+ };
2118
+ /**
2119
+ * Conversion event data
2120
+ */
2121
+ export type ConversionEvent = {
2122
+ /**
2123
+ * Id of the conversion goal to be fired
2124
+ */
2125
+ goalId: string;
2126
+ /**
2127
+ * Data connected to this conversion, for non binomial metrics, eg revenue
2128
+ */
2129
+ goalData?: Array<{
2130
+ /**
2131
+ * Key of the metric
2132
+ */
2133
+ key?: 'amount' | 'productsCount' | 'transactionId';
2134
+ /**
2135
+ * Value of the metric
2136
+ */
2137
+ value?: number | string;
2138
+ }>;
2139
+ /**
2140
+ * Bucketing data (experiences that this visitor is currently part of) for the visitor. In case that **enrichData=true** flag is being sent and
2141
+ * this attribute is not provided, the bucketing stored on the backend datastore for the given visitor is gonna be used. If both **enrichData=true** and
2142
+ * **bucketingData**, the **bucketingData** is gonna be merged with the stored data inside the backend data source, the request provided data having the
2143
+ * biggest overwriting bucketing for the same experience which might exist on the backend
2144
+ *
2145
+ */
2146
+ bucketingData?: {
2147
+ [key: string]: string;
2148
+ };
2149
+ };
2150
+ /**
2151
+ * Segments under which this visitor is placed. Some defaults keys are accepted and any other free field **key value** could be used
2152
+ * for fullstack projects
2153
+ *
2154
+ */
2155
+ export type VisitorSegments = {
2156
+ /**
2157
+ * Browser used:
2158
+ * IE - Internet Explorer
2159
+ * CH - Chrome
2160
+ * FF - Firefox
2161
+ * OP - Opera
2162
+ * SF - Safari
2163
+ * OTH - Other
2164
+ *
2165
+ */
2166
+ browser?: 'IE' | 'CH' | 'FF' | 'OP' | 'SF' | 'OTH';
2167
+ /**
2168
+ * List of device classes that the visitor device falls into
2169
+ */
2170
+ devices?: Array<'ALLPH' | 'IPH' | 'OTHPH' | 'ALLTAB' | 'IPAD' | 'OTHTAB' | 'DESK' | 'OTHDEV'>;
2171
+ /**
2172
+ * Traffic source
2173
+ */
2174
+ source?: 'campaign' | 'search' | 'referral' | 'direct';
2175
+ /**
2176
+ * Campaign string
2177
+ */
2178
+ campaign?: string;
2179
+ /**
2180
+ * Type of the visitor
2181
+ */
2182
+ visitorType?: 'new' | 'returning';
2183
+ /**
2184
+ * Two ISO country code for visitor's country
2185
+ */
2186
+ country?: string;
2187
+ /**
2188
+ * Custom Segments as defined inside Convert app. This will be the list of segments' IDs
2189
+ */
2190
+ customSegments?: Array<string>;
2191
+ };
2192
+ /**
2193
+ * Browser used:
2194
+ * IE - Internet Explorer
2195
+ * CH - Chrome
2196
+ * FF - Firefox
2197
+ * OP - Opera
2198
+ * SF - Safari
2199
+ * OTH - Other
2200
+ *
2201
+ */
2202
+ export type browser = 'IE' | 'CH' | 'FF' | 'OP' | 'SF' | 'OTH';
2203
+ /**
2204
+ * Browser used:
2205
+ * IE - Internet Explorer
2206
+ * CH - Chrome
2207
+ * FF - Firefox
2208
+ * OP - Opera
2209
+ * SF - Safari
2210
+ * OTH - Other
2211
+ *
2212
+ */
2213
+ export declare const browser: {
2214
+ readonly IE: "IE";
2215
+ readonly CH: "CH";
2216
+ readonly FF: "FF";
2217
+ readonly OP: "OP";
2218
+ readonly SF: "SF";
2219
+ readonly OTH: "OTH";
2220
+ };
2221
+ /**
2222
+ * Traffic source
2223
+ */
2224
+ export type source = 'campaign' | 'search' | 'referral' | 'direct';
2225
+ /**
2226
+ * Traffic source
2227
+ */
2228
+ export declare const source: {
2229
+ readonly CAMPAIGN: "campaign";
2230
+ readonly SEARCH: "search";
2231
+ readonly REFERRAL: "referral";
2232
+ readonly DIRECT: "direct";
2233
+ };
2234
+ /**
2235
+ * Type of the visitor
2236
+ */
2237
+ export type visitorType = 'new' | 'returning';
2238
+ /**
2239
+ * Type of the visitor
2240
+ */
2241
+ export declare const visitorType: {
2242
+ readonly NEW: "new";
2243
+ readonly RETURNING: "returning";
2244
+ };
2245
+ export type GetProjectConfigData = {
2246
+ /**
2247
+ * ID of the account that owns the retrieved/saved data
2248
+ */
2249
+ accountId: number;
2250
+ /**
2251
+ * Filter experiences based on environment.
2252
+ */
2253
+ environment?: string;
2254
+ /**
2255
+ * ID of the project to be retrieved
2256
+ */
2257
+ projectId: number;
2258
+ };
2259
+ export type GetProjectConfigResponse = ConfigResponseData;
2260
+ export type GetProjectConfigBySdkKeyData = {
2261
+ /**
2262
+ * Filter experiences based on environment.
2263
+ */
2264
+ environment?: string;
2265
+ /**
2266
+ * The SDK key used to retrieve the project's config
2267
+ */
2268
+ sdkKey: string;
2269
+ };
2270
+ export type GetProjectConfigBySdkKeyResponse = ConfigResponseData;
2271
+ export type GetProjectSettingsData = {
2272
+ /**
2273
+ * ID of the account that owns the retrieved/saved data
2274
+ */
2275
+ accountId: number;
2276
+ /**
2277
+ * ID of the project to be retrieved
2278
+ */
2279
+ projectId: number;
2280
+ };
2281
+ export type GetProjectSettingsResponse = ConfigMinimalResponseData;
2282
+ export type SendTrackingEventsSdkKeyData = {
2283
+ /**
2284
+ * A JSON object containing the tracking events sent to the Convert tracking servers.
2285
+ */
2286
+ requestBody: SendTrackingEventsRequestData;
2287
+ /**
2288
+ * The SDK key used to identify the project where that the data belongs to
2289
+ */
2290
+ sdkKey: string;
2291
+ };
2292
+ export type SendTrackingEventsSdkKeyResponse = SuccessData;
2293
+ export type SendTrackingEventsData = {
2294
+ /**
2295
+ * ID of the account that owns the given project
2296
+ */
2297
+ accountId: number;
2298
+ /**
2299
+ * ID of the project to which the events belong to
2300
+ */
2301
+ projectId: number;
2302
+ /**
2303
+ * A JSON object containing the tracking events sent to the Convert tracking servers.
2304
+ */
2305
+ requestBody: SendTrackingEventsRequestData;
2306
+ };
2307
+ export type SendTrackingEventsResponse = SuccessData;
2308
+ export type $OpenApiTs = {
2309
+ '/config/{account_id}/{project_id}': {
2310
+ get: {
2311
+ req: GetProjectConfigData;
2312
+ res: {
2313
+ /**
2314
+ * Object consumed by SDKs
2315
+ *
2316
+ */
2317
+ 200: ConfigResponseData;
2318
+ /**
2319
+ * A response signaling an error
2320
+ */
2321
+ default: ErrorData;
2322
+ };
2323
+ };
2324
+ };
2325
+ '/config/{sdk_key}': {
2326
+ get: {
2327
+ req: GetProjectConfigBySdkKeyData;
2328
+ res: {
2329
+ /**
2330
+ * Object consumed by SDKs
2331
+ *
2332
+ */
2333
+ 200: ConfigResponseData;
2334
+ /**
2335
+ * A response signaling an error
2336
+ */
2337
+ default: ErrorData;
2338
+ };
2339
+ };
2340
+ };
2341
+ '/project-settings/{account_id}/{project_id}': {
2342
+ get: {
2343
+ req: GetProjectSettingsData;
2344
+ res: {
2345
+ /**
2346
+ * Object consumed by SDKs
2347
+ *
2348
+ */
2349
+ 200: ConfigMinimalResponseData;
2350
+ /**
2351
+ * A response signaling an error
2352
+ */
2353
+ default: ErrorData;
2354
+ };
2355
+ };
2356
+ };
2357
+ '/track/{sdkKey}': {
2358
+ post: {
2359
+ req: SendTrackingEventsSdkKeyData;
2360
+ res: {
2361
+ /**
2362
+ * A response signaling a generic success
2363
+ */
2364
+ 200: SuccessData;
2365
+ /**
2366
+ * A response signaling an error
2367
+ */
2368
+ default: ErrorData;
2369
+ };
2370
+ };
2371
+ };
2372
+ '/track/{account_id}/{project_id}': {
2373
+ post: {
2374
+ req: SendTrackingEventsData;
2375
+ res: {
2376
+ /**
2377
+ * A response signaling a generic success
2378
+ */
2379
+ 200: SuccessData;
2380
+ /**
2381
+ * A response signaling an error
2382
+ */
2383
+ default: ErrorData;
2384
+ };
2385
+ };
2386
+ };
2387
+ };