@oursprivacy/platform-sdk 1.49.0 → 1.50.0
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.
- package/CHANGELOG.md +7 -0
- package/client.d.mts +5 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/analytics.d.mts +62 -0
- package/resources/analytics.d.mts.map +1 -0
- package/resources/analytics.d.ts +62 -0
- package/resources/analytics.d.ts.map +1 -0
- package/resources/analytics.js +25 -0
- package/resources/analytics.js.map +1 -0
- package/resources/analytics.mjs +21 -0
- package/resources/analytics.mjs.map +1 -0
- package/resources/consent-settings.d.mts +9 -0
- package/resources/consent-settings.d.mts.map +1 -1
- package/resources/consent-settings.d.ts +9 -0
- package/resources/consent-settings.d.ts.map +1 -1
- package/resources/funnels.d.mts +88 -980
- package/resources/funnels.d.mts.map +1 -1
- package/resources/funnels.d.ts +88 -980
- package/resources/funnels.d.ts.map +1 -1
- package/resources/funnels.js +24 -19
- package/resources/funnels.js.map +1 -1
- package/resources/funnels.mjs +24 -19
- package/resources/funnels.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/web-scanners.d.mts +129 -1
- package/resources/web-scanners.d.mts.map +1 -1
- package/resources/web-scanners.d.ts +129 -1
- package/resources/web-scanners.d.ts.map +1 -1
- package/resources/web-scanners.js +40 -0
- package/resources/web-scanners.js.map +1 -1
- package/resources/web-scanners.mjs +40 -0
- package/resources/web-scanners.mjs.map +1 -1
- package/src/client.ts +23 -0
- package/src/resources/analytics.ts +98 -0
- package/src/resources/consent-settings.ts +16 -0
- package/src/resources/funnels.ts +114 -1616
- package/src/resources/index.ts +10 -0
- package/src/resources/web-scanners.ts +220 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/funnels.ts
CHANGED
|
@@ -7,19 +7,21 @@ import { path } from '../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Funnels extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* List
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* List readable funnels configured on this account. Each funnel includes its
|
|
11
|
+
* canonical versioned definition. If some funnels cannot be loaded,
|
|
12
|
+
* `unavailableCount` and `warnings` identify the incomplete result; omitted
|
|
13
|
+
* funnels must not be treated as deleted. A complete list has
|
|
14
|
+
* `unavailableCount: 0` and no warnings. Funnel results are computed on demand, so
|
|
15
|
+
* `status` is always `READY` and `reportDateRange` is always `null`. Requires
|
|
16
|
+
* scope: web-analytics:view
|
|
15
17
|
*/
|
|
16
18
|
list(options?: RequestOptions): APIPromise<FunnelListResponse> {
|
|
17
19
|
return this._client.get('/rest/v1/funnels', options);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
|
-
* Create a
|
|
22
|
-
*
|
|
23
|
+
* Create a funnel from a versioned definition. Returns the complete saved
|
|
24
|
+
* configuration. Requires scope: web-analytics:write
|
|
23
25
|
*/
|
|
24
26
|
create(body: FunnelCreateParams, options?: RequestOptions): APIPromise<FunnelCreateResponse> {
|
|
25
27
|
return this._client.post('/rest/v1/funnels', { body, ...options });
|
|
@@ -35,9 +37,9 @@ export class Funnels extends APIResource {
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
/**
|
|
38
|
-
* Update one or more
|
|
39
|
-
*
|
|
40
|
-
*
|
|
40
|
+
* Update one or more funnel fields. Omitted fields remain unchanged. The canonical
|
|
41
|
+
* definition can be replaced by supplying `queryDefinition`. Requires scope:
|
|
42
|
+
* web-analytics:write
|
|
41
43
|
*/
|
|
42
44
|
update(id: string, body: FunnelUpdateParams, options?: RequestOptions): APIPromise<FunnelUpdateResponse> {
|
|
43
45
|
return this._client.patch(path`/rest/v1/funnels/${id}`, { body, ...options });
|
|
@@ -52,21 +54,24 @@ export class Funnels extends APIResource {
|
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
/**
|
|
55
|
-
* Duplicate a funnel configuration in the same account. The copy keeps the
|
|
56
|
-
*
|
|
57
|
-
* web-analytics:write
|
|
57
|
+
* Duplicate a funnel configuration in the same account. The copy keeps the
|
|
58
|
+
* canonical definition, receives a new ID, and is named `Copy of …`. Requires
|
|
59
|
+
* scope: web-analytics:write
|
|
58
60
|
*/
|
|
59
61
|
duplicate(id: string, options?: RequestOptions): APIPromise<FunnelDuplicateResponse> {
|
|
60
62
|
return this._client.post(path`/rest/v1/funnels/${id}/duplicate`, options);
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
|
-
* Compute funnel step analytics
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
66
|
+
* Compute funnel step analytics from the funnel’s saved `queryDefinition` over a
|
|
67
|
+
* requested date window. Returns per-step visitor counts, conversion rates,
|
|
68
|
+
* drop-off rates, average time to next step, sample session IDs for replay, and
|
|
69
|
+
* the resolved entry/observation scope. Results are computed on demand from event
|
|
70
|
+
* data at request time; ad hoc filter, saved-scope, and web-source overrides are
|
|
71
|
+
* not accepted. Observation completeness is null when the source coverage
|
|
72
|
+
* watermark is unavailable. `to` must be on or after `from`, and the window may
|
|
73
|
+
* span at most 91 days including both endpoints. Requires scope:
|
|
74
|
+
* web-analytics:view
|
|
70
75
|
*/
|
|
71
76
|
results(
|
|
72
77
|
id: string,
|
|
@@ -79,9 +84,20 @@ export class Funnels extends APIResource {
|
|
|
79
84
|
|
|
80
85
|
export interface FunnelListResponse {
|
|
81
86
|
/**
|
|
82
|
-
*
|
|
87
|
+
* The readable funnels configured on this account.
|
|
83
88
|
*/
|
|
84
89
|
entities: Array<FunnelListResponse.Entity>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Number of funnels that could not be loaded. A positive count means the list is
|
|
93
|
+
* incomplete.
|
|
94
|
+
*/
|
|
95
|
+
unavailableCount: number;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Warnings about incomplete results. Empty when every funnel was loaded.
|
|
99
|
+
*/
|
|
100
|
+
warnings: Array<string>;
|
|
85
101
|
}
|
|
86
102
|
|
|
87
103
|
export namespace FunnelListResponse {
|
|
@@ -90,245 +106,25 @@ export namespace FunnelListResponse {
|
|
|
90
106
|
|
|
91
107
|
funnelId: string;
|
|
92
108
|
|
|
93
|
-
funnelType: 'SESSION_BASED' | 'VISITOR_BASED';
|
|
94
|
-
|
|
95
109
|
name: string;
|
|
96
110
|
|
|
97
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Versioned funnel definition with typed steps and filters.
|
|
113
|
+
*/
|
|
114
|
+
queryDefinition: unknown;
|
|
98
115
|
|
|
99
|
-
|
|
116
|
+
status: 'READY' | 'PROCESSING';
|
|
100
117
|
|
|
101
118
|
updatedAt: string;
|
|
102
119
|
|
|
103
|
-
conversionWindow?: Entity.ConversionWindow | null;
|
|
104
|
-
|
|
105
|
-
countingMethod?: 'UNIQUES' | 'TOTALS' | 'SESSIONS' | null;
|
|
106
|
-
|
|
107
120
|
description?: string | null;
|
|
108
121
|
|
|
109
|
-
/**
|
|
110
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
111
|
-
* UTM filters.
|
|
112
|
-
*/
|
|
113
|
-
globalLogic?: Entity.GlobalLogic | null;
|
|
114
|
-
|
|
115
122
|
reportDateRange?: Entity.ReportDateRange | null;
|
|
116
123
|
|
|
117
|
-
stepOrder?: 'EXACT' | 'ANY' | null;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
121
|
-
* takes precedence.
|
|
122
|
-
*/
|
|
123
|
-
utmFilters?: unknown | null;
|
|
124
|
-
|
|
125
124
|
watched?: boolean | null;
|
|
126
125
|
}
|
|
127
126
|
|
|
128
127
|
export namespace Entity {
|
|
129
|
-
export interface Step {
|
|
130
|
-
eventName: string;
|
|
131
|
-
|
|
132
|
-
name: string;
|
|
133
|
-
|
|
134
|
-
order: number;
|
|
135
|
-
|
|
136
|
-
stepId: string;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Step-level event filters (JSON object).
|
|
140
|
-
*/
|
|
141
|
-
filters?: unknown;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Step-level event logic.
|
|
145
|
-
*/
|
|
146
|
-
logic?: Step.Logic | null;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export namespace Step {
|
|
150
|
-
/**
|
|
151
|
-
* Step-level event logic.
|
|
152
|
-
*/
|
|
153
|
-
export interface Logic {
|
|
154
|
-
/**
|
|
155
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
156
|
-
* or combinator).
|
|
157
|
-
*/
|
|
158
|
-
AND?: Array<unknown> | null;
|
|
159
|
-
|
|
160
|
-
condition?: Logic.Condition | null;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Negates a single child logic node.
|
|
164
|
-
*/
|
|
165
|
-
NOT?: unknown;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
169
|
-
* or combinator).
|
|
170
|
-
*/
|
|
171
|
-
OR?: Array<unknown> | null;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export namespace Logic {
|
|
175
|
-
export interface Condition {
|
|
176
|
-
/**
|
|
177
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
178
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
179
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
180
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
181
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
182
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
183
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
184
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
185
|
-
*/
|
|
186
|
-
operator:
|
|
187
|
-
| 'Is'
|
|
188
|
-
| 'IsNot'
|
|
189
|
-
| 'Contains'
|
|
190
|
-
| 'DoesNotContain'
|
|
191
|
-
| 'StartsWith'
|
|
192
|
-
| 'EndsWith'
|
|
193
|
-
| 'IsFalsy'
|
|
194
|
-
| 'IsTruthy'
|
|
195
|
-
| 'IsNull'
|
|
196
|
-
| 'IsNotNull'
|
|
197
|
-
| 'IsUndefined'
|
|
198
|
-
| 'IsNotUndefined'
|
|
199
|
-
| 'IsGreaterThan'
|
|
200
|
-
| 'IsGreaterThanOrEqual'
|
|
201
|
-
| 'IsLessThan'
|
|
202
|
-
| 'IsLessThanOrEqual'
|
|
203
|
-
| 'IsIn'
|
|
204
|
-
| 'IsNotIn'
|
|
205
|
-
| 'IsFoundIn'
|
|
206
|
-
| 'IsNotFoundIn'
|
|
207
|
-
| 'IsTrue'
|
|
208
|
-
| 'IsFalse'
|
|
209
|
-
| 'IsBefore'
|
|
210
|
-
| 'IsAfter'
|
|
211
|
-
| 'IsBetween'
|
|
212
|
-
| 'IsOnOrBefore'
|
|
213
|
-
| 'IsOnOrAfter'
|
|
214
|
-
| 'MatchesRegex'
|
|
215
|
-
| 'MatchesRegexIgnoreCase'
|
|
216
|
-
| 'DoesNotMatchRegex'
|
|
217
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
221
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
222
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
223
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
224
|
-
* and would be compared as a literal string.
|
|
225
|
-
*/
|
|
226
|
-
property: string;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* String compared against the resolved property. Operators that take no value
|
|
230
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
231
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
232
|
-
*/
|
|
233
|
-
value: string;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export interface ConversionWindow {
|
|
239
|
-
unit: 'MINUTES' | 'HOURS' | 'DAYS';
|
|
240
|
-
|
|
241
|
-
value: number;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
246
|
-
* UTM filters.
|
|
247
|
-
*/
|
|
248
|
-
export interface GlobalLogic {
|
|
249
|
-
/**
|
|
250
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
251
|
-
* or combinator).
|
|
252
|
-
*/
|
|
253
|
-
AND?: Array<unknown> | null;
|
|
254
|
-
|
|
255
|
-
condition?: GlobalLogic.Condition | null;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Negates a single child logic node.
|
|
259
|
-
*/
|
|
260
|
-
NOT?: unknown;
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
264
|
-
* or combinator).
|
|
265
|
-
*/
|
|
266
|
-
OR?: Array<unknown> | null;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export namespace GlobalLogic {
|
|
270
|
-
export interface Condition {
|
|
271
|
-
/**
|
|
272
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
273
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
274
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
275
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
276
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
277
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
278
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
279
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
280
|
-
*/
|
|
281
|
-
operator:
|
|
282
|
-
| 'Is'
|
|
283
|
-
| 'IsNot'
|
|
284
|
-
| 'Contains'
|
|
285
|
-
| 'DoesNotContain'
|
|
286
|
-
| 'StartsWith'
|
|
287
|
-
| 'EndsWith'
|
|
288
|
-
| 'IsFalsy'
|
|
289
|
-
| 'IsTruthy'
|
|
290
|
-
| 'IsNull'
|
|
291
|
-
| 'IsNotNull'
|
|
292
|
-
| 'IsUndefined'
|
|
293
|
-
| 'IsNotUndefined'
|
|
294
|
-
| 'IsGreaterThan'
|
|
295
|
-
| 'IsGreaterThanOrEqual'
|
|
296
|
-
| 'IsLessThan'
|
|
297
|
-
| 'IsLessThanOrEqual'
|
|
298
|
-
| 'IsIn'
|
|
299
|
-
| 'IsNotIn'
|
|
300
|
-
| 'IsFoundIn'
|
|
301
|
-
| 'IsNotFoundIn'
|
|
302
|
-
| 'IsTrue'
|
|
303
|
-
| 'IsFalse'
|
|
304
|
-
| 'IsBefore'
|
|
305
|
-
| 'IsAfter'
|
|
306
|
-
| 'IsBetween'
|
|
307
|
-
| 'IsOnOrBefore'
|
|
308
|
-
| 'IsOnOrAfter'
|
|
309
|
-
| 'MatchesRegex'
|
|
310
|
-
| 'MatchesRegexIgnoreCase'
|
|
311
|
-
| 'DoesNotMatchRegex'
|
|
312
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
316
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
317
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
318
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
319
|
-
* and would be compared as a literal string.
|
|
320
|
-
*/
|
|
321
|
-
property: string;
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* String compared against the resolved property. Operators that take no value
|
|
325
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
326
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
327
|
-
*/
|
|
328
|
-
value: string;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
128
|
export interface ReportDateRange {
|
|
333
129
|
from: string;
|
|
334
130
|
|
|
@@ -342,245 +138,25 @@ export interface FunnelCreateResponse {
|
|
|
342
138
|
|
|
343
139
|
funnelId: string;
|
|
344
140
|
|
|
345
|
-
funnelType: 'SESSION_BASED' | 'VISITOR_BASED';
|
|
346
|
-
|
|
347
141
|
name: string;
|
|
348
142
|
|
|
349
|
-
|
|
143
|
+
/**
|
|
144
|
+
* Versioned funnel definition with typed steps and filters.
|
|
145
|
+
*/
|
|
146
|
+
queryDefinition: unknown;
|
|
350
147
|
|
|
351
|
-
|
|
148
|
+
status: 'READY' | 'PROCESSING';
|
|
352
149
|
|
|
353
150
|
updatedAt: string;
|
|
354
151
|
|
|
355
|
-
conversionWindow?: FunnelCreateResponse.ConversionWindow | null;
|
|
356
|
-
|
|
357
|
-
countingMethod?: 'UNIQUES' | 'TOTALS' | 'SESSIONS' | null;
|
|
358
|
-
|
|
359
152
|
description?: string | null;
|
|
360
153
|
|
|
361
|
-
/**
|
|
362
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
363
|
-
* UTM filters.
|
|
364
|
-
*/
|
|
365
|
-
globalLogic?: FunnelCreateResponse.GlobalLogic | null;
|
|
366
|
-
|
|
367
154
|
reportDateRange?: FunnelCreateResponse.ReportDateRange | null;
|
|
368
155
|
|
|
369
|
-
stepOrder?: 'EXACT' | 'ANY' | null;
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
373
|
-
* takes precedence.
|
|
374
|
-
*/
|
|
375
|
-
utmFilters?: unknown | null;
|
|
376
|
-
|
|
377
156
|
watched?: boolean | null;
|
|
378
157
|
}
|
|
379
158
|
|
|
380
159
|
export namespace FunnelCreateResponse {
|
|
381
|
-
export interface Step {
|
|
382
|
-
eventName: string;
|
|
383
|
-
|
|
384
|
-
name: string;
|
|
385
|
-
|
|
386
|
-
order: number;
|
|
387
|
-
|
|
388
|
-
stepId: string;
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Step-level event filters (JSON object).
|
|
392
|
-
*/
|
|
393
|
-
filters?: unknown;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Step-level event logic.
|
|
397
|
-
*/
|
|
398
|
-
logic?: Step.Logic | null;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
export namespace Step {
|
|
402
|
-
/**
|
|
403
|
-
* Step-level event logic.
|
|
404
|
-
*/
|
|
405
|
-
export interface Logic {
|
|
406
|
-
/**
|
|
407
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
408
|
-
* or combinator).
|
|
409
|
-
*/
|
|
410
|
-
AND?: Array<unknown> | null;
|
|
411
|
-
|
|
412
|
-
condition?: Logic.Condition | null;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Negates a single child logic node.
|
|
416
|
-
*/
|
|
417
|
-
NOT?: unknown;
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
421
|
-
* or combinator).
|
|
422
|
-
*/
|
|
423
|
-
OR?: Array<unknown> | null;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
export namespace Logic {
|
|
427
|
-
export interface Condition {
|
|
428
|
-
/**
|
|
429
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
430
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
431
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
432
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
433
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
434
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
435
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
436
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
437
|
-
*/
|
|
438
|
-
operator:
|
|
439
|
-
| 'Is'
|
|
440
|
-
| 'IsNot'
|
|
441
|
-
| 'Contains'
|
|
442
|
-
| 'DoesNotContain'
|
|
443
|
-
| 'StartsWith'
|
|
444
|
-
| 'EndsWith'
|
|
445
|
-
| 'IsFalsy'
|
|
446
|
-
| 'IsTruthy'
|
|
447
|
-
| 'IsNull'
|
|
448
|
-
| 'IsNotNull'
|
|
449
|
-
| 'IsUndefined'
|
|
450
|
-
| 'IsNotUndefined'
|
|
451
|
-
| 'IsGreaterThan'
|
|
452
|
-
| 'IsGreaterThanOrEqual'
|
|
453
|
-
| 'IsLessThan'
|
|
454
|
-
| 'IsLessThanOrEqual'
|
|
455
|
-
| 'IsIn'
|
|
456
|
-
| 'IsNotIn'
|
|
457
|
-
| 'IsFoundIn'
|
|
458
|
-
| 'IsNotFoundIn'
|
|
459
|
-
| 'IsTrue'
|
|
460
|
-
| 'IsFalse'
|
|
461
|
-
| 'IsBefore'
|
|
462
|
-
| 'IsAfter'
|
|
463
|
-
| 'IsBetween'
|
|
464
|
-
| 'IsOnOrBefore'
|
|
465
|
-
| 'IsOnOrAfter'
|
|
466
|
-
| 'MatchesRegex'
|
|
467
|
-
| 'MatchesRegexIgnoreCase'
|
|
468
|
-
| 'DoesNotMatchRegex'
|
|
469
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
473
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
474
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
475
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
476
|
-
* and would be compared as a literal string.
|
|
477
|
-
*/
|
|
478
|
-
property: string;
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* String compared against the resolved property. Operators that take no value
|
|
482
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
483
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
484
|
-
*/
|
|
485
|
-
value: string;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
export interface ConversionWindow {
|
|
491
|
-
unit: 'MINUTES' | 'HOURS' | 'DAYS';
|
|
492
|
-
|
|
493
|
-
value: number;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
498
|
-
* UTM filters.
|
|
499
|
-
*/
|
|
500
|
-
export interface GlobalLogic {
|
|
501
|
-
/**
|
|
502
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
503
|
-
* or combinator).
|
|
504
|
-
*/
|
|
505
|
-
AND?: Array<unknown> | null;
|
|
506
|
-
|
|
507
|
-
condition?: GlobalLogic.Condition | null;
|
|
508
|
-
|
|
509
|
-
/**
|
|
510
|
-
* Negates a single child logic node.
|
|
511
|
-
*/
|
|
512
|
-
NOT?: unknown;
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
516
|
-
* or combinator).
|
|
517
|
-
*/
|
|
518
|
-
OR?: Array<unknown> | null;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
export namespace GlobalLogic {
|
|
522
|
-
export interface Condition {
|
|
523
|
-
/**
|
|
524
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
525
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
526
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
527
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
528
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
529
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
530
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
531
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
532
|
-
*/
|
|
533
|
-
operator:
|
|
534
|
-
| 'Is'
|
|
535
|
-
| 'IsNot'
|
|
536
|
-
| 'Contains'
|
|
537
|
-
| 'DoesNotContain'
|
|
538
|
-
| 'StartsWith'
|
|
539
|
-
| 'EndsWith'
|
|
540
|
-
| 'IsFalsy'
|
|
541
|
-
| 'IsTruthy'
|
|
542
|
-
| 'IsNull'
|
|
543
|
-
| 'IsNotNull'
|
|
544
|
-
| 'IsUndefined'
|
|
545
|
-
| 'IsNotUndefined'
|
|
546
|
-
| 'IsGreaterThan'
|
|
547
|
-
| 'IsGreaterThanOrEqual'
|
|
548
|
-
| 'IsLessThan'
|
|
549
|
-
| 'IsLessThanOrEqual'
|
|
550
|
-
| 'IsIn'
|
|
551
|
-
| 'IsNotIn'
|
|
552
|
-
| 'IsFoundIn'
|
|
553
|
-
| 'IsNotFoundIn'
|
|
554
|
-
| 'IsTrue'
|
|
555
|
-
| 'IsFalse'
|
|
556
|
-
| 'IsBefore'
|
|
557
|
-
| 'IsAfter'
|
|
558
|
-
| 'IsBetween'
|
|
559
|
-
| 'IsOnOrBefore'
|
|
560
|
-
| 'IsOnOrAfter'
|
|
561
|
-
| 'MatchesRegex'
|
|
562
|
-
| 'MatchesRegexIgnoreCase'
|
|
563
|
-
| 'DoesNotMatchRegex'
|
|
564
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
568
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
569
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
570
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
571
|
-
* and would be compared as a literal string.
|
|
572
|
-
*/
|
|
573
|
-
property: string;
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* String compared against the resolved property. Operators that take no value
|
|
577
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
578
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
579
|
-
*/
|
|
580
|
-
value: string;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
|
|
584
160
|
export interface ReportDateRange {
|
|
585
161
|
from: string;
|
|
586
162
|
|
|
@@ -596,245 +172,25 @@ export interface FunnelRetrieveResponse {
|
|
|
596
172
|
|
|
597
173
|
funnelId: string;
|
|
598
174
|
|
|
599
|
-
funnelType: 'SESSION_BASED' | 'VISITOR_BASED';
|
|
600
|
-
|
|
601
175
|
name: string;
|
|
602
176
|
|
|
603
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Versioned funnel definition with typed steps and filters.
|
|
179
|
+
*/
|
|
180
|
+
queryDefinition: unknown;
|
|
604
181
|
|
|
605
|
-
|
|
182
|
+
status: 'READY' | 'PROCESSING';
|
|
606
183
|
|
|
607
184
|
updatedAt: string;
|
|
608
185
|
|
|
609
|
-
conversionWindow?: FunnelRetrieveResponse.ConversionWindow | null;
|
|
610
|
-
|
|
611
|
-
countingMethod?: 'UNIQUES' | 'TOTALS' | 'SESSIONS' | null;
|
|
612
|
-
|
|
613
186
|
description?: string | null;
|
|
614
187
|
|
|
615
|
-
/**
|
|
616
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
617
|
-
* UTM filters.
|
|
618
|
-
*/
|
|
619
|
-
globalLogic?: FunnelRetrieveResponse.GlobalLogic | null;
|
|
620
|
-
|
|
621
188
|
reportDateRange?: FunnelRetrieveResponse.ReportDateRange | null;
|
|
622
189
|
|
|
623
|
-
stepOrder?: 'EXACT' | 'ANY' | null;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
627
|
-
* takes precedence.
|
|
628
|
-
*/
|
|
629
|
-
utmFilters?: unknown | null;
|
|
630
|
-
|
|
631
190
|
watched?: boolean | null;
|
|
632
191
|
}
|
|
633
192
|
|
|
634
193
|
export namespace FunnelRetrieveResponse {
|
|
635
|
-
export interface Step {
|
|
636
|
-
eventName: string;
|
|
637
|
-
|
|
638
|
-
name: string;
|
|
639
|
-
|
|
640
|
-
order: number;
|
|
641
|
-
|
|
642
|
-
stepId: string;
|
|
643
|
-
|
|
644
|
-
/**
|
|
645
|
-
* Step-level event filters (JSON object).
|
|
646
|
-
*/
|
|
647
|
-
filters?: unknown;
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* Step-level event logic.
|
|
651
|
-
*/
|
|
652
|
-
logic?: Step.Logic | null;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
export namespace Step {
|
|
656
|
-
/**
|
|
657
|
-
* Step-level event logic.
|
|
658
|
-
*/
|
|
659
|
-
export interface Logic {
|
|
660
|
-
/**
|
|
661
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
662
|
-
* or combinator).
|
|
663
|
-
*/
|
|
664
|
-
AND?: Array<unknown> | null;
|
|
665
|
-
|
|
666
|
-
condition?: Logic.Condition | null;
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Negates a single child logic node.
|
|
670
|
-
*/
|
|
671
|
-
NOT?: unknown;
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
675
|
-
* or combinator).
|
|
676
|
-
*/
|
|
677
|
-
OR?: Array<unknown> | null;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
export namespace Logic {
|
|
681
|
-
export interface Condition {
|
|
682
|
-
/**
|
|
683
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
684
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
685
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
686
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
687
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
688
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
689
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
690
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
691
|
-
*/
|
|
692
|
-
operator:
|
|
693
|
-
| 'Is'
|
|
694
|
-
| 'IsNot'
|
|
695
|
-
| 'Contains'
|
|
696
|
-
| 'DoesNotContain'
|
|
697
|
-
| 'StartsWith'
|
|
698
|
-
| 'EndsWith'
|
|
699
|
-
| 'IsFalsy'
|
|
700
|
-
| 'IsTruthy'
|
|
701
|
-
| 'IsNull'
|
|
702
|
-
| 'IsNotNull'
|
|
703
|
-
| 'IsUndefined'
|
|
704
|
-
| 'IsNotUndefined'
|
|
705
|
-
| 'IsGreaterThan'
|
|
706
|
-
| 'IsGreaterThanOrEqual'
|
|
707
|
-
| 'IsLessThan'
|
|
708
|
-
| 'IsLessThanOrEqual'
|
|
709
|
-
| 'IsIn'
|
|
710
|
-
| 'IsNotIn'
|
|
711
|
-
| 'IsFoundIn'
|
|
712
|
-
| 'IsNotFoundIn'
|
|
713
|
-
| 'IsTrue'
|
|
714
|
-
| 'IsFalse'
|
|
715
|
-
| 'IsBefore'
|
|
716
|
-
| 'IsAfter'
|
|
717
|
-
| 'IsBetween'
|
|
718
|
-
| 'IsOnOrBefore'
|
|
719
|
-
| 'IsOnOrAfter'
|
|
720
|
-
| 'MatchesRegex'
|
|
721
|
-
| 'MatchesRegexIgnoreCase'
|
|
722
|
-
| 'DoesNotMatchRegex'
|
|
723
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
724
|
-
|
|
725
|
-
/**
|
|
726
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
727
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
728
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
729
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
730
|
-
* and would be compared as a literal string.
|
|
731
|
-
*/
|
|
732
|
-
property: string;
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* String compared against the resolved property. Operators that take no value
|
|
736
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
737
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
738
|
-
*/
|
|
739
|
-
value: string;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
export interface ConversionWindow {
|
|
745
|
-
unit: 'MINUTES' | 'HOURS' | 'DAYS';
|
|
746
|
-
|
|
747
|
-
value: number;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
/**
|
|
751
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
752
|
-
* UTM filters.
|
|
753
|
-
*/
|
|
754
|
-
export interface GlobalLogic {
|
|
755
|
-
/**
|
|
756
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
757
|
-
* or combinator).
|
|
758
|
-
*/
|
|
759
|
-
AND?: Array<unknown> | null;
|
|
760
|
-
|
|
761
|
-
condition?: GlobalLogic.Condition | null;
|
|
762
|
-
|
|
763
|
-
/**
|
|
764
|
-
* Negates a single child logic node.
|
|
765
|
-
*/
|
|
766
|
-
NOT?: unknown;
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
770
|
-
* or combinator).
|
|
771
|
-
*/
|
|
772
|
-
OR?: Array<unknown> | null;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
export namespace GlobalLogic {
|
|
776
|
-
export interface Condition {
|
|
777
|
-
/**
|
|
778
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
779
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
780
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
781
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
782
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
783
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
784
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
785
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
786
|
-
*/
|
|
787
|
-
operator:
|
|
788
|
-
| 'Is'
|
|
789
|
-
| 'IsNot'
|
|
790
|
-
| 'Contains'
|
|
791
|
-
| 'DoesNotContain'
|
|
792
|
-
| 'StartsWith'
|
|
793
|
-
| 'EndsWith'
|
|
794
|
-
| 'IsFalsy'
|
|
795
|
-
| 'IsTruthy'
|
|
796
|
-
| 'IsNull'
|
|
797
|
-
| 'IsNotNull'
|
|
798
|
-
| 'IsUndefined'
|
|
799
|
-
| 'IsNotUndefined'
|
|
800
|
-
| 'IsGreaterThan'
|
|
801
|
-
| 'IsGreaterThanOrEqual'
|
|
802
|
-
| 'IsLessThan'
|
|
803
|
-
| 'IsLessThanOrEqual'
|
|
804
|
-
| 'IsIn'
|
|
805
|
-
| 'IsNotIn'
|
|
806
|
-
| 'IsFoundIn'
|
|
807
|
-
| 'IsNotFoundIn'
|
|
808
|
-
| 'IsTrue'
|
|
809
|
-
| 'IsFalse'
|
|
810
|
-
| 'IsBefore'
|
|
811
|
-
| 'IsAfter'
|
|
812
|
-
| 'IsBetween'
|
|
813
|
-
| 'IsOnOrBefore'
|
|
814
|
-
| 'IsOnOrAfter'
|
|
815
|
-
| 'MatchesRegex'
|
|
816
|
-
| 'MatchesRegexIgnoreCase'
|
|
817
|
-
| 'DoesNotMatchRegex'
|
|
818
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
822
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
823
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
824
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
825
|
-
* and would be compared as a literal string.
|
|
826
|
-
*/
|
|
827
|
-
property: string;
|
|
828
|
-
|
|
829
|
-
/**
|
|
830
|
-
* String compared against the resolved property. Operators that take no value
|
|
831
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
832
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
833
|
-
*/
|
|
834
|
-
value: string;
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
|
|
838
194
|
export interface ReportDateRange {
|
|
839
195
|
from: string;
|
|
840
196
|
|
|
@@ -847,245 +203,25 @@ export interface FunnelUpdateResponse {
|
|
|
847
203
|
|
|
848
204
|
funnelId: string;
|
|
849
205
|
|
|
850
|
-
funnelType: 'SESSION_BASED' | 'VISITOR_BASED';
|
|
851
|
-
|
|
852
206
|
name: string;
|
|
853
207
|
|
|
854
|
-
|
|
208
|
+
/**
|
|
209
|
+
* Versioned funnel definition with typed steps and filters.
|
|
210
|
+
*/
|
|
211
|
+
queryDefinition: unknown;
|
|
855
212
|
|
|
856
|
-
|
|
213
|
+
status: 'READY' | 'PROCESSING';
|
|
857
214
|
|
|
858
215
|
updatedAt: string;
|
|
859
216
|
|
|
860
|
-
conversionWindow?: FunnelUpdateResponse.ConversionWindow | null;
|
|
861
|
-
|
|
862
|
-
countingMethod?: 'UNIQUES' | 'TOTALS' | 'SESSIONS' | null;
|
|
863
|
-
|
|
864
217
|
description?: string | null;
|
|
865
218
|
|
|
866
|
-
/**
|
|
867
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
868
|
-
* UTM filters.
|
|
869
|
-
*/
|
|
870
|
-
globalLogic?: FunnelUpdateResponse.GlobalLogic | null;
|
|
871
|
-
|
|
872
219
|
reportDateRange?: FunnelUpdateResponse.ReportDateRange | null;
|
|
873
220
|
|
|
874
|
-
stepOrder?: 'EXACT' | 'ANY' | null;
|
|
875
|
-
|
|
876
|
-
/**
|
|
877
|
-
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
878
|
-
* takes precedence.
|
|
879
|
-
*/
|
|
880
|
-
utmFilters?: unknown | null;
|
|
881
|
-
|
|
882
221
|
watched?: boolean | null;
|
|
883
222
|
}
|
|
884
223
|
|
|
885
224
|
export namespace FunnelUpdateResponse {
|
|
886
|
-
export interface Step {
|
|
887
|
-
eventName: string;
|
|
888
|
-
|
|
889
|
-
name: string;
|
|
890
|
-
|
|
891
|
-
order: number;
|
|
892
|
-
|
|
893
|
-
stepId: string;
|
|
894
|
-
|
|
895
|
-
/**
|
|
896
|
-
* Step-level event filters (JSON object).
|
|
897
|
-
*/
|
|
898
|
-
filters?: unknown;
|
|
899
|
-
|
|
900
|
-
/**
|
|
901
|
-
* Step-level event logic.
|
|
902
|
-
*/
|
|
903
|
-
logic?: Step.Logic | null;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
export namespace Step {
|
|
907
|
-
/**
|
|
908
|
-
* Step-level event logic.
|
|
909
|
-
*/
|
|
910
|
-
export interface Logic {
|
|
911
|
-
/**
|
|
912
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
913
|
-
* or combinator).
|
|
914
|
-
*/
|
|
915
|
-
AND?: Array<unknown> | null;
|
|
916
|
-
|
|
917
|
-
condition?: Logic.Condition | null;
|
|
918
|
-
|
|
919
|
-
/**
|
|
920
|
-
* Negates a single child logic node.
|
|
921
|
-
*/
|
|
922
|
-
NOT?: unknown;
|
|
923
|
-
|
|
924
|
-
/**
|
|
925
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
926
|
-
* or combinator).
|
|
927
|
-
*/
|
|
928
|
-
OR?: Array<unknown> | null;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
export namespace Logic {
|
|
932
|
-
export interface Condition {
|
|
933
|
-
/**
|
|
934
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
935
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
936
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
937
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
938
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
939
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
940
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
941
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
942
|
-
*/
|
|
943
|
-
operator:
|
|
944
|
-
| 'Is'
|
|
945
|
-
| 'IsNot'
|
|
946
|
-
| 'Contains'
|
|
947
|
-
| 'DoesNotContain'
|
|
948
|
-
| 'StartsWith'
|
|
949
|
-
| 'EndsWith'
|
|
950
|
-
| 'IsFalsy'
|
|
951
|
-
| 'IsTruthy'
|
|
952
|
-
| 'IsNull'
|
|
953
|
-
| 'IsNotNull'
|
|
954
|
-
| 'IsUndefined'
|
|
955
|
-
| 'IsNotUndefined'
|
|
956
|
-
| 'IsGreaterThan'
|
|
957
|
-
| 'IsGreaterThanOrEqual'
|
|
958
|
-
| 'IsLessThan'
|
|
959
|
-
| 'IsLessThanOrEqual'
|
|
960
|
-
| 'IsIn'
|
|
961
|
-
| 'IsNotIn'
|
|
962
|
-
| 'IsFoundIn'
|
|
963
|
-
| 'IsNotFoundIn'
|
|
964
|
-
| 'IsTrue'
|
|
965
|
-
| 'IsFalse'
|
|
966
|
-
| 'IsBefore'
|
|
967
|
-
| 'IsAfter'
|
|
968
|
-
| 'IsBetween'
|
|
969
|
-
| 'IsOnOrBefore'
|
|
970
|
-
| 'IsOnOrAfter'
|
|
971
|
-
| 'MatchesRegex'
|
|
972
|
-
| 'MatchesRegexIgnoreCase'
|
|
973
|
-
| 'DoesNotMatchRegex'
|
|
974
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
975
|
-
|
|
976
|
-
/**
|
|
977
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
978
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
979
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
980
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
981
|
-
* and would be compared as a literal string.
|
|
982
|
-
*/
|
|
983
|
-
property: string;
|
|
984
|
-
|
|
985
|
-
/**
|
|
986
|
-
* String compared against the resolved property. Operators that take no value
|
|
987
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
988
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
989
|
-
*/
|
|
990
|
-
value: string;
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
export interface ConversionWindow {
|
|
996
|
-
unit: 'MINUTES' | 'HOURS' | 'DAYS';
|
|
997
|
-
|
|
998
|
-
value: number;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1003
|
-
* UTM filters.
|
|
1004
|
-
*/
|
|
1005
|
-
export interface GlobalLogic {
|
|
1006
|
-
/**
|
|
1007
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1008
|
-
* or combinator).
|
|
1009
|
-
*/
|
|
1010
|
-
AND?: Array<unknown> | null;
|
|
1011
|
-
|
|
1012
|
-
condition?: GlobalLogic.Condition | null;
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* Negates a single child logic node.
|
|
1016
|
-
*/
|
|
1017
|
-
NOT?: unknown;
|
|
1018
|
-
|
|
1019
|
-
/**
|
|
1020
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1021
|
-
* or combinator).
|
|
1022
|
-
*/
|
|
1023
|
-
OR?: Array<unknown> | null;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
export namespace GlobalLogic {
|
|
1027
|
-
export interface Condition {
|
|
1028
|
-
/**
|
|
1029
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1030
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1031
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1032
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1033
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1034
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1035
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1036
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1037
|
-
*/
|
|
1038
|
-
operator:
|
|
1039
|
-
| 'Is'
|
|
1040
|
-
| 'IsNot'
|
|
1041
|
-
| 'Contains'
|
|
1042
|
-
| 'DoesNotContain'
|
|
1043
|
-
| 'StartsWith'
|
|
1044
|
-
| 'EndsWith'
|
|
1045
|
-
| 'IsFalsy'
|
|
1046
|
-
| 'IsTruthy'
|
|
1047
|
-
| 'IsNull'
|
|
1048
|
-
| 'IsNotNull'
|
|
1049
|
-
| 'IsUndefined'
|
|
1050
|
-
| 'IsNotUndefined'
|
|
1051
|
-
| 'IsGreaterThan'
|
|
1052
|
-
| 'IsGreaterThanOrEqual'
|
|
1053
|
-
| 'IsLessThan'
|
|
1054
|
-
| 'IsLessThanOrEqual'
|
|
1055
|
-
| 'IsIn'
|
|
1056
|
-
| 'IsNotIn'
|
|
1057
|
-
| 'IsFoundIn'
|
|
1058
|
-
| 'IsNotFoundIn'
|
|
1059
|
-
| 'IsTrue'
|
|
1060
|
-
| 'IsFalse'
|
|
1061
|
-
| 'IsBefore'
|
|
1062
|
-
| 'IsAfter'
|
|
1063
|
-
| 'IsBetween'
|
|
1064
|
-
| 'IsOnOrBefore'
|
|
1065
|
-
| 'IsOnOrAfter'
|
|
1066
|
-
| 'MatchesRegex'
|
|
1067
|
-
| 'MatchesRegexIgnoreCase'
|
|
1068
|
-
| 'DoesNotMatchRegex'
|
|
1069
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
1070
|
-
|
|
1071
|
-
/**
|
|
1072
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1073
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1074
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1075
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1076
|
-
* and would be compared as a literal string.
|
|
1077
|
-
*/
|
|
1078
|
-
property: string;
|
|
1079
|
-
|
|
1080
|
-
/**
|
|
1081
|
-
* String compared against the resolved property. Operators that take no value
|
|
1082
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1083
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1084
|
-
*/
|
|
1085
|
-
value: string;
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
225
|
export interface ReportDateRange {
|
|
1090
226
|
from: string;
|
|
1091
227
|
|
|
@@ -1104,245 +240,25 @@ export interface FunnelDuplicateResponse {
|
|
|
1104
240
|
|
|
1105
241
|
funnelId: string;
|
|
1106
242
|
|
|
1107
|
-
funnelType: 'SESSION_BASED' | 'VISITOR_BASED';
|
|
1108
|
-
|
|
1109
243
|
name: string;
|
|
1110
244
|
|
|
1111
|
-
|
|
245
|
+
/**
|
|
246
|
+
* Versioned funnel definition with typed steps and filters.
|
|
247
|
+
*/
|
|
248
|
+
queryDefinition: unknown;
|
|
1112
249
|
|
|
1113
|
-
|
|
250
|
+
status: 'READY' | 'PROCESSING';
|
|
1114
251
|
|
|
1115
252
|
updatedAt: string;
|
|
1116
253
|
|
|
1117
|
-
conversionWindow?: FunnelDuplicateResponse.ConversionWindow | null;
|
|
1118
|
-
|
|
1119
|
-
countingMethod?: 'UNIQUES' | 'TOTALS' | 'SESSIONS' | null;
|
|
1120
|
-
|
|
1121
254
|
description?: string | null;
|
|
1122
255
|
|
|
1123
|
-
/**
|
|
1124
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1125
|
-
* UTM filters.
|
|
1126
|
-
*/
|
|
1127
|
-
globalLogic?: FunnelDuplicateResponse.GlobalLogic | null;
|
|
1128
|
-
|
|
1129
256
|
reportDateRange?: FunnelDuplicateResponse.ReportDateRange | null;
|
|
1130
257
|
|
|
1131
|
-
stepOrder?: 'EXACT' | 'ANY' | null;
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
1135
|
-
* takes precedence.
|
|
1136
|
-
*/
|
|
1137
|
-
utmFilters?: unknown | null;
|
|
1138
|
-
|
|
1139
258
|
watched?: boolean | null;
|
|
1140
259
|
}
|
|
1141
260
|
|
|
1142
261
|
export namespace FunnelDuplicateResponse {
|
|
1143
|
-
export interface Step {
|
|
1144
|
-
eventName: string;
|
|
1145
|
-
|
|
1146
|
-
name: string;
|
|
1147
|
-
|
|
1148
|
-
order: number;
|
|
1149
|
-
|
|
1150
|
-
stepId: string;
|
|
1151
|
-
|
|
1152
|
-
/**
|
|
1153
|
-
* Step-level event filters (JSON object).
|
|
1154
|
-
*/
|
|
1155
|
-
filters?: unknown;
|
|
1156
|
-
|
|
1157
|
-
/**
|
|
1158
|
-
* Step-level event logic.
|
|
1159
|
-
*/
|
|
1160
|
-
logic?: Step.Logic | null;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
export namespace Step {
|
|
1164
|
-
/**
|
|
1165
|
-
* Step-level event logic.
|
|
1166
|
-
*/
|
|
1167
|
-
export interface Logic {
|
|
1168
|
-
/**
|
|
1169
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1170
|
-
* or combinator).
|
|
1171
|
-
*/
|
|
1172
|
-
AND?: Array<unknown> | null;
|
|
1173
|
-
|
|
1174
|
-
condition?: Logic.Condition | null;
|
|
1175
|
-
|
|
1176
|
-
/**
|
|
1177
|
-
* Negates a single child logic node.
|
|
1178
|
-
*/
|
|
1179
|
-
NOT?: unknown;
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1183
|
-
* or combinator).
|
|
1184
|
-
*/
|
|
1185
|
-
OR?: Array<unknown> | null;
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
export namespace Logic {
|
|
1189
|
-
export interface Condition {
|
|
1190
|
-
/**
|
|
1191
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1192
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1193
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1194
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1195
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1196
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1197
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1198
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1199
|
-
*/
|
|
1200
|
-
operator:
|
|
1201
|
-
| 'Is'
|
|
1202
|
-
| 'IsNot'
|
|
1203
|
-
| 'Contains'
|
|
1204
|
-
| 'DoesNotContain'
|
|
1205
|
-
| 'StartsWith'
|
|
1206
|
-
| 'EndsWith'
|
|
1207
|
-
| 'IsFalsy'
|
|
1208
|
-
| 'IsTruthy'
|
|
1209
|
-
| 'IsNull'
|
|
1210
|
-
| 'IsNotNull'
|
|
1211
|
-
| 'IsUndefined'
|
|
1212
|
-
| 'IsNotUndefined'
|
|
1213
|
-
| 'IsGreaterThan'
|
|
1214
|
-
| 'IsGreaterThanOrEqual'
|
|
1215
|
-
| 'IsLessThan'
|
|
1216
|
-
| 'IsLessThanOrEqual'
|
|
1217
|
-
| 'IsIn'
|
|
1218
|
-
| 'IsNotIn'
|
|
1219
|
-
| 'IsFoundIn'
|
|
1220
|
-
| 'IsNotFoundIn'
|
|
1221
|
-
| 'IsTrue'
|
|
1222
|
-
| 'IsFalse'
|
|
1223
|
-
| 'IsBefore'
|
|
1224
|
-
| 'IsAfter'
|
|
1225
|
-
| 'IsBetween'
|
|
1226
|
-
| 'IsOnOrBefore'
|
|
1227
|
-
| 'IsOnOrAfter'
|
|
1228
|
-
| 'MatchesRegex'
|
|
1229
|
-
| 'MatchesRegexIgnoreCase'
|
|
1230
|
-
| 'DoesNotMatchRegex'
|
|
1231
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1235
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1236
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1237
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1238
|
-
* and would be compared as a literal string.
|
|
1239
|
-
*/
|
|
1240
|
-
property: string;
|
|
1241
|
-
|
|
1242
|
-
/**
|
|
1243
|
-
* String compared against the resolved property. Operators that take no value
|
|
1244
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1245
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1246
|
-
*/
|
|
1247
|
-
value: string;
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
export interface ConversionWindow {
|
|
1253
|
-
unit: 'MINUTES' | 'HOURS' | 'DAYS';
|
|
1254
|
-
|
|
1255
|
-
value: number;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
/**
|
|
1259
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1260
|
-
* UTM filters.
|
|
1261
|
-
*/
|
|
1262
|
-
export interface GlobalLogic {
|
|
1263
|
-
/**
|
|
1264
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1265
|
-
* or combinator).
|
|
1266
|
-
*/
|
|
1267
|
-
AND?: Array<unknown> | null;
|
|
1268
|
-
|
|
1269
|
-
condition?: GlobalLogic.Condition | null;
|
|
1270
|
-
|
|
1271
|
-
/**
|
|
1272
|
-
* Negates a single child logic node.
|
|
1273
|
-
*/
|
|
1274
|
-
NOT?: unknown;
|
|
1275
|
-
|
|
1276
|
-
/**
|
|
1277
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1278
|
-
* or combinator).
|
|
1279
|
-
*/
|
|
1280
|
-
OR?: Array<unknown> | null;
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
export namespace GlobalLogic {
|
|
1284
|
-
export interface Condition {
|
|
1285
|
-
/**
|
|
1286
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1287
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1288
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1289
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1290
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1291
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1292
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1293
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1294
|
-
*/
|
|
1295
|
-
operator:
|
|
1296
|
-
| 'Is'
|
|
1297
|
-
| 'IsNot'
|
|
1298
|
-
| 'Contains'
|
|
1299
|
-
| 'DoesNotContain'
|
|
1300
|
-
| 'StartsWith'
|
|
1301
|
-
| 'EndsWith'
|
|
1302
|
-
| 'IsFalsy'
|
|
1303
|
-
| 'IsTruthy'
|
|
1304
|
-
| 'IsNull'
|
|
1305
|
-
| 'IsNotNull'
|
|
1306
|
-
| 'IsUndefined'
|
|
1307
|
-
| 'IsNotUndefined'
|
|
1308
|
-
| 'IsGreaterThan'
|
|
1309
|
-
| 'IsGreaterThanOrEqual'
|
|
1310
|
-
| 'IsLessThan'
|
|
1311
|
-
| 'IsLessThanOrEqual'
|
|
1312
|
-
| 'IsIn'
|
|
1313
|
-
| 'IsNotIn'
|
|
1314
|
-
| 'IsFoundIn'
|
|
1315
|
-
| 'IsNotFoundIn'
|
|
1316
|
-
| 'IsTrue'
|
|
1317
|
-
| 'IsFalse'
|
|
1318
|
-
| 'IsBefore'
|
|
1319
|
-
| 'IsAfter'
|
|
1320
|
-
| 'IsBetween'
|
|
1321
|
-
| 'IsOnOrBefore'
|
|
1322
|
-
| 'IsOnOrAfter'
|
|
1323
|
-
| 'MatchesRegex'
|
|
1324
|
-
| 'MatchesRegexIgnoreCase'
|
|
1325
|
-
| 'DoesNotMatchRegex'
|
|
1326
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
1327
|
-
|
|
1328
|
-
/**
|
|
1329
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1330
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1331
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1332
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1333
|
-
* and would be compared as a literal string.
|
|
1334
|
-
*/
|
|
1335
|
-
property: string;
|
|
1336
|
-
|
|
1337
|
-
/**
|
|
1338
|
-
* String compared against the resolved property. Operators that take no value
|
|
1339
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1340
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1341
|
-
*/
|
|
1342
|
-
value: string;
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
262
|
export interface ReportDateRange {
|
|
1347
263
|
from: string;
|
|
1348
264
|
|
|
@@ -1351,11 +267,29 @@ export namespace FunnelDuplicateResponse {
|
|
|
1351
267
|
}
|
|
1352
268
|
|
|
1353
269
|
export interface FunnelResultsResponse {
|
|
270
|
+
definitionUpdatedAt: string;
|
|
271
|
+
|
|
272
|
+
engine: string;
|
|
273
|
+
|
|
1354
274
|
/**
|
|
1355
275
|
* Conversion rate from first step to last step as a percentage.
|
|
1356
276
|
*/
|
|
1357
277
|
overallConversionRate: number;
|
|
1358
278
|
|
|
279
|
+
scope: FunnelResultsResponse.Scope;
|
|
280
|
+
|
|
281
|
+
semanticVersion: 1;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Known Events v3 source limitations: equal-load conflicts, corrections that move
|
|
285
|
+
* across physical keys, and source completeness are unverified.
|
|
286
|
+
*/
|
|
287
|
+
sourceLimitations: Array<
|
|
288
|
+
'equal-load-conflicts-unverified' | 'cross-key-corrections-unverified' | 'source-completeness-unverified'
|
|
289
|
+
>;
|
|
290
|
+
|
|
291
|
+
sourcePolicy: 'events-v3-physical-key';
|
|
292
|
+
|
|
1359
293
|
/**
|
|
1360
294
|
* Per-step funnel analytics, ordered by step number.
|
|
1361
295
|
*/
|
|
@@ -1371,16 +305,30 @@ export interface FunnelResultsResponse {
|
|
|
1371
305
|
*/
|
|
1372
306
|
overallAvgTimeToConversion?: number | null;
|
|
1373
307
|
|
|
1374
|
-
|
|
1375
|
-
* Present when the results are wider than the funnel as configured. Some step
|
|
1376
|
-
* conditions could not be expressed as a query and were ignored, so the counts
|
|
1377
|
-
* above include visitors those conditions would have excluded. Absent when the
|
|
1378
|
-
* whole definition was applied. The dashboard surfaces the same caveat.
|
|
1379
|
-
*/
|
|
1380
|
-
warning?: string;
|
|
308
|
+
sourceRevision?: string | null;
|
|
1381
309
|
}
|
|
1382
310
|
|
|
1383
311
|
export namespace FunnelResultsResponse {
|
|
312
|
+
export interface Scope {
|
|
313
|
+
entryFrom: string;
|
|
314
|
+
|
|
315
|
+
entryTo: string;
|
|
316
|
+
|
|
317
|
+
observationFrom: string;
|
|
318
|
+
|
|
319
|
+
observationTo: string;
|
|
320
|
+
|
|
321
|
+
timezone: 'UTC';
|
|
322
|
+
|
|
323
|
+
windowMs: number;
|
|
324
|
+
|
|
325
|
+
observationComplete?: boolean | null;
|
|
326
|
+
|
|
327
|
+
settledEntryTo?: string | null;
|
|
328
|
+
|
|
329
|
+
watermark?: string | null;
|
|
330
|
+
}
|
|
331
|
+
|
|
1384
332
|
export interface Step {
|
|
1385
333
|
conversionCount: number;
|
|
1386
334
|
|
|
@@ -1390,6 +338,8 @@ export namespace FunnelResultsResponse {
|
|
|
1390
338
|
|
|
1391
339
|
dropOffSessionIds: Array<string>;
|
|
1392
340
|
|
|
341
|
+
dropOffVisitorIds: Array<string>;
|
|
342
|
+
|
|
1393
343
|
overallConversionRate: number;
|
|
1394
344
|
|
|
1395
345
|
sessionIds: Array<string>;
|
|
@@ -1398,6 +348,8 @@ export namespace FunnelResultsResponse {
|
|
|
1398
348
|
|
|
1399
349
|
visitorCount: number;
|
|
1400
350
|
|
|
351
|
+
visitorIds: Array<string>;
|
|
352
|
+
|
|
1401
353
|
avgTimeToNextStep?: number | null;
|
|
1402
354
|
}
|
|
1403
355
|
}
|
|
@@ -1405,447 +357,33 @@ export namespace FunnelResultsResponse {
|
|
|
1405
357
|
export interface FunnelCreateParams {
|
|
1406
358
|
name: string;
|
|
1407
359
|
|
|
1408
|
-
steps: Array<FunnelCreateParams.Step>;
|
|
1409
|
-
|
|
1410
|
-
conversionWindow?: unknown | null;
|
|
1411
|
-
|
|
1412
|
-
countingMethod?: string | null;
|
|
1413
|
-
|
|
1414
|
-
description?: string | null;
|
|
1415
|
-
|
|
1416
|
-
/**
|
|
1417
|
-
* Funnels are session-based. `SESSION_BASED` is the only supported value and is
|
|
1418
|
-
* applied when omitted.
|
|
1419
|
-
*/
|
|
1420
|
-
funnelType?: 'SESSION_BASED';
|
|
1421
|
-
|
|
1422
360
|
/**
|
|
1423
|
-
*
|
|
1424
|
-
* UTM filters.
|
|
361
|
+
* Versioned funnel definition with typed steps and filters.
|
|
1425
362
|
*/
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
stepOrder?: string | null;
|
|
363
|
+
queryDefinition: unknown;
|
|
1429
364
|
|
|
1430
|
-
|
|
1431
|
-
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
1432
|
-
* takes precedence.
|
|
1433
|
-
*/
|
|
1434
|
-
utmFilters?: unknown | null;
|
|
365
|
+
description?: string | null;
|
|
1435
366
|
|
|
1436
367
|
watched?: boolean | null;
|
|
1437
368
|
}
|
|
1438
369
|
|
|
1439
|
-
export namespace FunnelCreateParams {
|
|
1440
|
-
export interface Step {
|
|
1441
|
-
eventName: string;
|
|
1442
|
-
|
|
1443
|
-
name: string;
|
|
1444
|
-
|
|
1445
|
-
order: number;
|
|
1446
|
-
|
|
1447
|
-
filters?: unknown | null;
|
|
1448
|
-
|
|
1449
|
-
logic?: Step.Logic | null;
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
export namespace Step {
|
|
1453
|
-
export interface Logic {
|
|
1454
|
-
/**
|
|
1455
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1456
|
-
* or combinator).
|
|
1457
|
-
*/
|
|
1458
|
-
AND?: Array<unknown> | null;
|
|
1459
|
-
|
|
1460
|
-
condition?: Logic.Condition | null;
|
|
1461
|
-
|
|
1462
|
-
/**
|
|
1463
|
-
* Negates a single child logic node.
|
|
1464
|
-
*/
|
|
1465
|
-
NOT?: unknown;
|
|
1466
|
-
|
|
1467
|
-
/**
|
|
1468
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1469
|
-
* or combinator).
|
|
1470
|
-
*/
|
|
1471
|
-
OR?: Array<unknown> | null;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
export namespace Logic {
|
|
1475
|
-
export interface Condition {
|
|
1476
|
-
/**
|
|
1477
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1478
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1479
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1480
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1481
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1482
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1483
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1484
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1485
|
-
*/
|
|
1486
|
-
operator:
|
|
1487
|
-
| 'Is'
|
|
1488
|
-
| 'IsNot'
|
|
1489
|
-
| 'Contains'
|
|
1490
|
-
| 'DoesNotContain'
|
|
1491
|
-
| 'StartsWith'
|
|
1492
|
-
| 'EndsWith'
|
|
1493
|
-
| 'IsFalsy'
|
|
1494
|
-
| 'IsTruthy'
|
|
1495
|
-
| 'IsNull'
|
|
1496
|
-
| 'IsNotNull'
|
|
1497
|
-
| 'IsUndefined'
|
|
1498
|
-
| 'IsNotUndefined'
|
|
1499
|
-
| 'IsGreaterThan'
|
|
1500
|
-
| 'IsGreaterThanOrEqual'
|
|
1501
|
-
| 'IsLessThan'
|
|
1502
|
-
| 'IsLessThanOrEqual'
|
|
1503
|
-
| 'IsIn'
|
|
1504
|
-
| 'IsNotIn'
|
|
1505
|
-
| 'IsFoundIn'
|
|
1506
|
-
| 'IsNotFoundIn'
|
|
1507
|
-
| 'IsTrue'
|
|
1508
|
-
| 'IsFalse'
|
|
1509
|
-
| 'IsBefore'
|
|
1510
|
-
| 'IsAfter'
|
|
1511
|
-
| 'IsBetween'
|
|
1512
|
-
| 'IsOnOrBefore'
|
|
1513
|
-
| 'IsOnOrAfter'
|
|
1514
|
-
| 'MatchesRegex'
|
|
1515
|
-
| 'MatchesRegexIgnoreCase'
|
|
1516
|
-
| 'DoesNotMatchRegex'
|
|
1517
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
1518
|
-
|
|
1519
|
-
/**
|
|
1520
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1521
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1522
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1523
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1524
|
-
* and would be compared as a literal string.
|
|
1525
|
-
*/
|
|
1526
|
-
property: string;
|
|
1527
|
-
|
|
1528
|
-
/**
|
|
1529
|
-
* String compared against the resolved property. Operators that take no value
|
|
1530
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1531
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1532
|
-
*/
|
|
1533
|
-
value: string;
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
/**
|
|
1539
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1540
|
-
* UTM filters.
|
|
1541
|
-
*/
|
|
1542
|
-
export interface GlobalLogic {
|
|
1543
|
-
/**
|
|
1544
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1545
|
-
* or combinator).
|
|
1546
|
-
*/
|
|
1547
|
-
AND?: Array<unknown> | null;
|
|
1548
|
-
|
|
1549
|
-
condition?: GlobalLogic.Condition | null;
|
|
1550
|
-
|
|
1551
|
-
/**
|
|
1552
|
-
* Negates a single child logic node.
|
|
1553
|
-
*/
|
|
1554
|
-
NOT?: unknown;
|
|
1555
|
-
|
|
1556
|
-
/**
|
|
1557
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1558
|
-
* or combinator).
|
|
1559
|
-
*/
|
|
1560
|
-
OR?: Array<unknown> | null;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
export namespace GlobalLogic {
|
|
1564
|
-
export interface Condition {
|
|
1565
|
-
/**
|
|
1566
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1567
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1568
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1569
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1570
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1571
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1572
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1573
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1574
|
-
*/
|
|
1575
|
-
operator:
|
|
1576
|
-
| 'Is'
|
|
1577
|
-
| 'IsNot'
|
|
1578
|
-
| 'Contains'
|
|
1579
|
-
| 'DoesNotContain'
|
|
1580
|
-
| 'StartsWith'
|
|
1581
|
-
| 'EndsWith'
|
|
1582
|
-
| 'IsFalsy'
|
|
1583
|
-
| 'IsTruthy'
|
|
1584
|
-
| 'IsNull'
|
|
1585
|
-
| 'IsNotNull'
|
|
1586
|
-
| 'IsUndefined'
|
|
1587
|
-
| 'IsNotUndefined'
|
|
1588
|
-
| 'IsGreaterThan'
|
|
1589
|
-
| 'IsGreaterThanOrEqual'
|
|
1590
|
-
| 'IsLessThan'
|
|
1591
|
-
| 'IsLessThanOrEqual'
|
|
1592
|
-
| 'IsIn'
|
|
1593
|
-
| 'IsNotIn'
|
|
1594
|
-
| 'IsFoundIn'
|
|
1595
|
-
| 'IsNotFoundIn'
|
|
1596
|
-
| 'IsTrue'
|
|
1597
|
-
| 'IsFalse'
|
|
1598
|
-
| 'IsBefore'
|
|
1599
|
-
| 'IsAfter'
|
|
1600
|
-
| 'IsBetween'
|
|
1601
|
-
| 'IsOnOrBefore'
|
|
1602
|
-
| 'IsOnOrAfter'
|
|
1603
|
-
| 'MatchesRegex'
|
|
1604
|
-
| 'MatchesRegexIgnoreCase'
|
|
1605
|
-
| 'DoesNotMatchRegex'
|
|
1606
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
1607
|
-
|
|
1608
|
-
/**
|
|
1609
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1610
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1611
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1612
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1613
|
-
* and would be compared as a literal string.
|
|
1614
|
-
*/
|
|
1615
|
-
property: string;
|
|
1616
|
-
|
|
1617
|
-
/**
|
|
1618
|
-
* String compared against the resolved property. Operators that take no value
|
|
1619
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1620
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1621
|
-
*/
|
|
1622
|
-
value: string;
|
|
1623
|
-
}
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
370
|
export interface FunnelUpdateParams {
|
|
1628
|
-
conversionWindow?: unknown | null;
|
|
1629
|
-
|
|
1630
|
-
countingMethod?: string | null;
|
|
1631
|
-
|
|
1632
371
|
description?: string | null;
|
|
1633
372
|
|
|
1634
|
-
funnelType?: 'SESSION_BASED';
|
|
1635
|
-
|
|
1636
|
-
/**
|
|
1637
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1638
|
-
* UTM filters.
|
|
1639
|
-
*/
|
|
1640
|
-
globalLogic?: FunnelUpdateParams.GlobalLogic | null;
|
|
1641
|
-
|
|
1642
373
|
name?: string;
|
|
1643
374
|
|
|
1644
|
-
stepOrder?: string | null;
|
|
1645
|
-
|
|
1646
|
-
steps?: Array<FunnelUpdateParams.Step>;
|
|
1647
|
-
|
|
1648
375
|
/**
|
|
1649
|
-
*
|
|
1650
|
-
* takes precedence.
|
|
376
|
+
* Versioned funnel definition with typed steps and filters.
|
|
1651
377
|
*/
|
|
1652
|
-
|
|
378
|
+
queryDefinition?: unknown;
|
|
1653
379
|
|
|
1654
380
|
watched?: boolean | null;
|
|
1655
381
|
}
|
|
1656
382
|
|
|
1657
|
-
export namespace FunnelUpdateParams {
|
|
1658
|
-
/**
|
|
1659
|
-
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1660
|
-
* UTM filters.
|
|
1661
|
-
*/
|
|
1662
|
-
export interface GlobalLogic {
|
|
1663
|
-
/**
|
|
1664
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1665
|
-
* or combinator).
|
|
1666
|
-
*/
|
|
1667
|
-
AND?: Array<unknown> | null;
|
|
1668
|
-
|
|
1669
|
-
condition?: GlobalLogic.Condition | null;
|
|
1670
|
-
|
|
1671
|
-
/**
|
|
1672
|
-
* Negates a single child logic node.
|
|
1673
|
-
*/
|
|
1674
|
-
NOT?: unknown;
|
|
1675
|
-
|
|
1676
|
-
/**
|
|
1677
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1678
|
-
* or combinator).
|
|
1679
|
-
*/
|
|
1680
|
-
OR?: Array<unknown> | null;
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
export namespace GlobalLogic {
|
|
1684
|
-
export interface Condition {
|
|
1685
|
-
/**
|
|
1686
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1687
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1688
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1689
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1690
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1691
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1692
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1693
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1694
|
-
*/
|
|
1695
|
-
operator:
|
|
1696
|
-
| 'Is'
|
|
1697
|
-
| 'IsNot'
|
|
1698
|
-
| 'Contains'
|
|
1699
|
-
| 'DoesNotContain'
|
|
1700
|
-
| 'StartsWith'
|
|
1701
|
-
| 'EndsWith'
|
|
1702
|
-
| 'IsFalsy'
|
|
1703
|
-
| 'IsTruthy'
|
|
1704
|
-
| 'IsNull'
|
|
1705
|
-
| 'IsNotNull'
|
|
1706
|
-
| 'IsUndefined'
|
|
1707
|
-
| 'IsNotUndefined'
|
|
1708
|
-
| 'IsGreaterThan'
|
|
1709
|
-
| 'IsGreaterThanOrEqual'
|
|
1710
|
-
| 'IsLessThan'
|
|
1711
|
-
| 'IsLessThanOrEqual'
|
|
1712
|
-
| 'IsIn'
|
|
1713
|
-
| 'IsNotIn'
|
|
1714
|
-
| 'IsFoundIn'
|
|
1715
|
-
| 'IsNotFoundIn'
|
|
1716
|
-
| 'IsTrue'
|
|
1717
|
-
| 'IsFalse'
|
|
1718
|
-
| 'IsBefore'
|
|
1719
|
-
| 'IsAfter'
|
|
1720
|
-
| 'IsBetween'
|
|
1721
|
-
| 'IsOnOrBefore'
|
|
1722
|
-
| 'IsOnOrAfter'
|
|
1723
|
-
| 'MatchesRegex'
|
|
1724
|
-
| 'MatchesRegexIgnoreCase'
|
|
1725
|
-
| 'DoesNotMatchRegex'
|
|
1726
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
1727
|
-
|
|
1728
|
-
/**
|
|
1729
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1730
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1731
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1732
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1733
|
-
* and would be compared as a literal string.
|
|
1734
|
-
*/
|
|
1735
|
-
property: string;
|
|
1736
|
-
|
|
1737
|
-
/**
|
|
1738
|
-
* String compared against the resolved property. Operators that take no value
|
|
1739
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1740
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1741
|
-
*/
|
|
1742
|
-
value: string;
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
export interface Step {
|
|
1747
|
-
eventName: string;
|
|
1748
|
-
|
|
1749
|
-
name: string;
|
|
1750
|
-
|
|
1751
|
-
order: number;
|
|
1752
|
-
|
|
1753
|
-
filters?: unknown | null;
|
|
1754
|
-
|
|
1755
|
-
logic?: Step.Logic | null;
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
export namespace Step {
|
|
1759
|
-
export interface Logic {
|
|
1760
|
-
/**
|
|
1761
|
-
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1762
|
-
* or combinator).
|
|
1763
|
-
*/
|
|
1764
|
-
AND?: Array<unknown> | null;
|
|
1765
|
-
|
|
1766
|
-
condition?: Logic.Condition | null;
|
|
1767
|
-
|
|
1768
|
-
/**
|
|
1769
|
-
* Negates a single child logic node.
|
|
1770
|
-
*/
|
|
1771
|
-
NOT?: unknown;
|
|
1772
|
-
|
|
1773
|
-
/**
|
|
1774
|
-
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1775
|
-
* or combinator).
|
|
1776
|
-
*/
|
|
1777
|
-
OR?: Array<unknown> | null;
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
export namespace Logic {
|
|
1781
|
-
export interface Condition {
|
|
1782
|
-
/**
|
|
1783
|
-
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1784
|
-
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1785
|
-
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1786
|
-
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1787
|
-
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1788
|
-
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1789
|
-
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1790
|
-
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1791
|
-
*/
|
|
1792
|
-
operator:
|
|
1793
|
-
| 'Is'
|
|
1794
|
-
| 'IsNot'
|
|
1795
|
-
| 'Contains'
|
|
1796
|
-
| 'DoesNotContain'
|
|
1797
|
-
| 'StartsWith'
|
|
1798
|
-
| 'EndsWith'
|
|
1799
|
-
| 'IsFalsy'
|
|
1800
|
-
| 'IsTruthy'
|
|
1801
|
-
| 'IsNull'
|
|
1802
|
-
| 'IsNotNull'
|
|
1803
|
-
| 'IsUndefined'
|
|
1804
|
-
| 'IsNotUndefined'
|
|
1805
|
-
| 'IsGreaterThan'
|
|
1806
|
-
| 'IsGreaterThanOrEqual'
|
|
1807
|
-
| 'IsLessThan'
|
|
1808
|
-
| 'IsLessThanOrEqual'
|
|
1809
|
-
| 'IsIn'
|
|
1810
|
-
| 'IsNotIn'
|
|
1811
|
-
| 'IsFoundIn'
|
|
1812
|
-
| 'IsNotFoundIn'
|
|
1813
|
-
| 'IsTrue'
|
|
1814
|
-
| 'IsFalse'
|
|
1815
|
-
| 'IsBefore'
|
|
1816
|
-
| 'IsAfter'
|
|
1817
|
-
| 'IsBetween'
|
|
1818
|
-
| 'IsOnOrBefore'
|
|
1819
|
-
| 'IsOnOrAfter'
|
|
1820
|
-
| 'MatchesRegex'
|
|
1821
|
-
| 'MatchesRegexIgnoreCase'
|
|
1822
|
-
| 'DoesNotMatchRegex'
|
|
1823
|
-
| 'DoesNotMatchRegexIgnoreCase';
|
|
1824
|
-
|
|
1825
|
-
/**
|
|
1826
|
-
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1827
|
-
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1828
|
-
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1829
|
-
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1830
|
-
* and would be compared as a literal string.
|
|
1831
|
-
*/
|
|
1832
|
-
property: string;
|
|
1833
|
-
|
|
1834
|
-
/**
|
|
1835
|
-
* String compared against the resolved property. Operators that take no value
|
|
1836
|
-
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1837
|
-
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1838
|
-
*/
|
|
1839
|
-
value: string;
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
383
|
export interface FunnelResultsParams {
|
|
1846
384
|
/**
|
|
1847
385
|
* Inclusive lower bound of the analysis window, as a UTC calendar day in
|
|
1848
|
-
* `YYYY-MM-DD` format. The window may span at most
|
|
386
|
+
* `YYYY-MM-DD` format. The window may span at most 91 days including both
|
|
1849
387
|
* endpoints.
|
|
1850
388
|
*/
|
|
1851
389
|
from: string;
|
|
@@ -1853,55 +391,15 @@ export interface FunnelResultsParams {
|
|
|
1853
391
|
/**
|
|
1854
392
|
* Inclusive upper bound of the analysis window, as a UTC calendar day in
|
|
1855
393
|
* `YYYY-MM-DD` format. Must be on or after `from`, and the window may span at most
|
|
1856
|
-
*
|
|
394
|
+
* 91 days including both endpoints.
|
|
1857
395
|
*/
|
|
1858
396
|
to: string;
|
|
1859
397
|
|
|
1860
398
|
/**
|
|
1861
|
-
*
|
|
1862
|
-
*
|
|
1863
|
-
* select between.
|
|
1864
|
-
*/
|
|
1865
|
-
attributionType?: 'INITIAL' | 'LAST_TOUCH';
|
|
1866
|
-
|
|
1867
|
-
/**
|
|
1868
|
-
* Restrict the funnel to sessions on a device class. `MOBILE` matches phone
|
|
1869
|
-
* sessions; `DESKTOP` matches every session that is not a phone, tablet, TV,
|
|
1870
|
-
* console, wearable, XR, or embedded device. `ALL` (the default) applies no device
|
|
1871
|
-
* filter.
|
|
1872
|
-
*/
|
|
1873
|
-
deviceType?: 'DESKTOP' | 'MOBILE' | 'ALL';
|
|
1874
|
-
|
|
1875
|
-
/**
|
|
1876
|
-
* Restrict the funnel to sessions whose `utm_campaign` exactly matches this value.
|
|
1877
|
-
*/
|
|
1878
|
-
utmCampaign?: string;
|
|
1879
|
-
|
|
1880
|
-
/**
|
|
1881
|
-
* Restrict the funnel to sessions whose `utm_content` exactly matches this value.
|
|
1882
|
-
*/
|
|
1883
|
-
utmContent?: string;
|
|
1884
|
-
|
|
1885
|
-
/**
|
|
1886
|
-
* Restrict the funnel to sessions whose `utm_medium` exactly matches this value.
|
|
1887
|
-
*/
|
|
1888
|
-
utmMedium?: string;
|
|
1889
|
-
|
|
1890
|
-
/**
|
|
1891
|
-
* Accepted for backward compatibility but NOT applied — there is no campaign-name
|
|
1892
|
-
* dimension on funnel sessions. Use `utmCampaign` instead.
|
|
1893
|
-
*/
|
|
1894
|
-
utmName?: string;
|
|
1895
|
-
|
|
1896
|
-
/**
|
|
1897
|
-
* Restrict the funnel to sessions whose `utm_source` exactly matches this value.
|
|
1898
|
-
*/
|
|
1899
|
-
utmSource?: string;
|
|
1900
|
-
|
|
1901
|
-
/**
|
|
1902
|
-
* Restrict the funnel to sessions whose `utm_term` exactly matches this value.
|
|
399
|
+
* Require this saved definition revision. Returns a conflict if the funnel has
|
|
400
|
+
* changed.
|
|
1903
401
|
*/
|
|
1904
|
-
|
|
402
|
+
expectedDefinitionUpdatedAt?: string;
|
|
1905
403
|
}
|
|
1906
404
|
|
|
1907
405
|
export declare namespace Funnels {
|