@oursprivacy/platform-sdk 1.43.0 → 1.44.1
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 +17 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audience-conversion-reports.d.mts +216 -0
- package/resources/audience-conversion-reports.d.mts.map +1 -0
- package/resources/audience-conversion-reports.d.ts +216 -0
- package/resources/audience-conversion-reports.d.ts.map +1 -0
- package/resources/audience-conversion-reports.js +55 -0
- package/resources/audience-conversion-reports.js.map +1 -0
- package/resources/audience-conversion-reports.mjs +51 -0
- package/resources/audience-conversion-reports.mjs.map +1 -0
- package/resources/destinations.d.mts +20 -0
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +20 -0
- package/resources/destinations.d.ts.map +1 -1
- package/resources/experiments.d.mts +6 -4
- package/resources/experiments.d.mts.map +1 -1
- package/resources/experiments.d.ts +6 -4
- package/resources/experiments.d.ts.map +1 -1
- package/resources/experiments.js +4 -3
- package/resources/experiments.js.map +1 -1
- package/resources/experiments.mjs +4 -3
- package/resources/experiments.mjs.map +1 -1
- package/resources/funnels.d.mts +811 -5
- package/resources/funnels.d.mts.map +1 -1
- package/resources/funnels.d.ts +811 -5
- package/resources/funnels.d.ts.map +1 -1
- package/resources/funnels.js +22 -0
- package/resources/funnels.js.map +1 -1
- package/resources/funnels.mjs +22 -0
- package/resources/funnels.mjs.map +1 -1
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/video-channels.d.mts +237 -0
- package/resources/video-channels.d.mts.map +1 -0
- package/resources/video-channels.d.ts +237 -0
- package/resources/video-channels.d.ts.map +1 -0
- package/resources/video-channels.js +95 -0
- package/resources/video-channels.js.map +1 -0
- package/resources/video-channels.mjs +91 -0
- package/resources/video-channels.mjs.map +1 -0
- package/resources/web-scanners.d.mts +10 -8
- package/resources/web-scanners.d.mts.map +1 -1
- package/resources/web-scanners.d.ts +10 -8
- package/resources/web-scanners.d.ts.map +1 -1
- package/resources/web-scanners.js +9 -8
- package/resources/web-scanners.js.map +1 -1
- package/resources/web-scanners.mjs +9 -8
- package/resources/web-scanners.mjs.map +1 -1
- package/src/client.ts +78 -0
- package/src/resources/audience-conversion-reports.ts +466 -0
- package/src/resources/destinations.ts +113 -0
- package/src/resources/experiments.ts +6 -4
- package/src/resources/funnels.ts +1366 -4
- package/src/resources/index.ts +36 -0
- package/src/resources/video-channels.ts +405 -0
- package/src/resources/web-scanners.ts +11 -8
- 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
|
@@ -17,6 +17,14 @@ export class Funnels extends APIResource {
|
|
|
17
17
|
return this._client.get('/rest/v1/funnels', options);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Create a session-based funnel with 2 to 10 ordered event steps. Returns the
|
|
22
|
+
* complete saved configuration. Requires scope: web-analytics:write
|
|
23
|
+
*/
|
|
24
|
+
create(body: FunnelCreateParams, options?: RequestOptions): APIPromise<FunnelCreateResponse> {
|
|
25
|
+
return this._client.post('/rest/v1/funnels', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
20
28
|
/**
|
|
21
29
|
* Fetch a single funnel configuration by its id. Returns `404` when the funnel
|
|
22
30
|
* does not exist or belongs to a different account. Requires scope:
|
|
@@ -26,6 +34,23 @@ export class Funnels extends APIResource {
|
|
|
26
34
|
return this._client.get(path`/rest/v1/funnels/${id}`, options);
|
|
27
35
|
}
|
|
28
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Update one or more Funnel fields. Omitted fields remain unchanged. Send `null`
|
|
39
|
+
* to clear an optional field. `globalLogic` and legacy `utmFilters` cannot be set
|
|
40
|
+
* together. Requires scope: web-analytics:write
|
|
41
|
+
*/
|
|
42
|
+
update(id: string, body: FunnelUpdateParams, options?: RequestOptions): APIPromise<FunnelUpdateResponse> {
|
|
43
|
+
return this._client.patch(path`/rest/v1/funnels/${id}`, { body, ...options });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Delete a Funnel configuration. Existing analytics data is unaffected. Requires
|
|
48
|
+
* scope: web-analytics:write
|
|
49
|
+
*/
|
|
50
|
+
delete(id: string, options?: RequestOptions): APIPromise<FunnelDeleteResponse> {
|
|
51
|
+
return this._client.delete(path`/rest/v1/funnels/${id}`, options);
|
|
52
|
+
}
|
|
53
|
+
|
|
29
54
|
/**
|
|
30
55
|
* Compute funnel step analytics for a funnel over a date window. Returns per-step
|
|
31
56
|
* visitor counts, conversion rates, drop-off rates, average time to next step, and
|
|
@@ -72,14 +97,21 @@ export namespace FunnelListResponse {
|
|
|
72
97
|
|
|
73
98
|
description?: string | null;
|
|
74
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
102
|
+
* UTM filters.
|
|
103
|
+
*/
|
|
104
|
+
globalLogic?: Entity.GlobalLogic | null;
|
|
105
|
+
|
|
75
106
|
reportDateRange?: Entity.ReportDateRange | null;
|
|
76
107
|
|
|
77
108
|
stepOrder?: 'EXACT' | 'ANY' | null;
|
|
78
109
|
|
|
79
110
|
/**
|
|
80
|
-
* UTM
|
|
111
|
+
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
112
|
+
* takes precedence.
|
|
81
113
|
*/
|
|
82
|
-
utmFilters?: unknown;
|
|
114
|
+
utmFilters?: unknown | null;
|
|
83
115
|
|
|
84
116
|
watched?: boolean | null;
|
|
85
117
|
}
|
|
@@ -98,6 +130,100 @@ export namespace FunnelListResponse {
|
|
|
98
130
|
* Step-level event filters (JSON object).
|
|
99
131
|
*/
|
|
100
132
|
filters?: unknown;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Step-level event logic.
|
|
136
|
+
*/
|
|
137
|
+
logic?: Step.Logic | null;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export namespace Step {
|
|
141
|
+
/**
|
|
142
|
+
* Step-level event logic.
|
|
143
|
+
*/
|
|
144
|
+
export interface Logic {
|
|
145
|
+
/**
|
|
146
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
147
|
+
* or combinator).
|
|
148
|
+
*/
|
|
149
|
+
AND?: Array<unknown> | null;
|
|
150
|
+
|
|
151
|
+
condition?: Logic.Condition;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Negates a single child logic node.
|
|
155
|
+
*/
|
|
156
|
+
NOT?: unknown;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
160
|
+
* or combinator).
|
|
161
|
+
*/
|
|
162
|
+
OR?: Array<unknown> | null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export namespace Logic {
|
|
166
|
+
export interface Condition {
|
|
167
|
+
/**
|
|
168
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
169
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
170
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
171
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
172
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
173
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
174
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
175
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
176
|
+
*/
|
|
177
|
+
operator:
|
|
178
|
+
| 'Is'
|
|
179
|
+
| 'IsNot'
|
|
180
|
+
| 'Contains'
|
|
181
|
+
| 'DoesNotContain'
|
|
182
|
+
| 'StartsWith'
|
|
183
|
+
| 'EndsWith'
|
|
184
|
+
| 'IsFalsy'
|
|
185
|
+
| 'IsTruthy'
|
|
186
|
+
| 'IsNull'
|
|
187
|
+
| 'IsNotNull'
|
|
188
|
+
| 'IsUndefined'
|
|
189
|
+
| 'IsNotUndefined'
|
|
190
|
+
| 'IsGreaterThan'
|
|
191
|
+
| 'IsGreaterThanOrEqual'
|
|
192
|
+
| 'IsLessThan'
|
|
193
|
+
| 'IsLessThanOrEqual'
|
|
194
|
+
| 'IsIn'
|
|
195
|
+
| 'IsNotIn'
|
|
196
|
+
| 'IsFoundIn'
|
|
197
|
+
| 'IsNotFoundIn'
|
|
198
|
+
| 'IsTrue'
|
|
199
|
+
| 'IsFalse'
|
|
200
|
+
| 'IsBefore'
|
|
201
|
+
| 'IsAfter'
|
|
202
|
+
| 'IsBetween'
|
|
203
|
+
| 'IsOnOrBefore'
|
|
204
|
+
| 'IsOnOrAfter'
|
|
205
|
+
| 'MatchesRegex'
|
|
206
|
+
| 'MatchesRegexIgnoreCase'
|
|
207
|
+
| 'DoesNotMatchRegex'
|
|
208
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
212
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
213
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
214
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
215
|
+
* and would be compared as a literal string.
|
|
216
|
+
*/
|
|
217
|
+
property: string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* String compared against the resolved property. Operators that take no value
|
|
221
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
222
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
223
|
+
*/
|
|
224
|
+
value: string;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
101
227
|
}
|
|
102
228
|
|
|
103
229
|
export interface ConversionWindow {
|
|
@@ -106,6 +232,94 @@ export namespace FunnelListResponse {
|
|
|
106
232
|
value: number;
|
|
107
233
|
}
|
|
108
234
|
|
|
235
|
+
/**
|
|
236
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
237
|
+
* UTM filters.
|
|
238
|
+
*/
|
|
239
|
+
export interface GlobalLogic {
|
|
240
|
+
/**
|
|
241
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
242
|
+
* or combinator).
|
|
243
|
+
*/
|
|
244
|
+
AND?: Array<unknown> | null;
|
|
245
|
+
|
|
246
|
+
condition?: GlobalLogic.Condition;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Negates a single child logic node.
|
|
250
|
+
*/
|
|
251
|
+
NOT?: unknown;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
255
|
+
* or combinator).
|
|
256
|
+
*/
|
|
257
|
+
OR?: Array<unknown> | null;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export namespace GlobalLogic {
|
|
261
|
+
export interface Condition {
|
|
262
|
+
/**
|
|
263
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
264
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
265
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
266
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
267
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
268
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
269
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
270
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
271
|
+
*/
|
|
272
|
+
operator:
|
|
273
|
+
| 'Is'
|
|
274
|
+
| 'IsNot'
|
|
275
|
+
| 'Contains'
|
|
276
|
+
| 'DoesNotContain'
|
|
277
|
+
| 'StartsWith'
|
|
278
|
+
| 'EndsWith'
|
|
279
|
+
| 'IsFalsy'
|
|
280
|
+
| 'IsTruthy'
|
|
281
|
+
| 'IsNull'
|
|
282
|
+
| 'IsNotNull'
|
|
283
|
+
| 'IsUndefined'
|
|
284
|
+
| 'IsNotUndefined'
|
|
285
|
+
| 'IsGreaterThan'
|
|
286
|
+
| 'IsGreaterThanOrEqual'
|
|
287
|
+
| 'IsLessThan'
|
|
288
|
+
| 'IsLessThanOrEqual'
|
|
289
|
+
| 'IsIn'
|
|
290
|
+
| 'IsNotIn'
|
|
291
|
+
| 'IsFoundIn'
|
|
292
|
+
| 'IsNotFoundIn'
|
|
293
|
+
| 'IsTrue'
|
|
294
|
+
| 'IsFalse'
|
|
295
|
+
| 'IsBefore'
|
|
296
|
+
| 'IsAfter'
|
|
297
|
+
| 'IsBetween'
|
|
298
|
+
| 'IsOnOrBefore'
|
|
299
|
+
| 'IsOnOrAfter'
|
|
300
|
+
| 'MatchesRegex'
|
|
301
|
+
| 'MatchesRegexIgnoreCase'
|
|
302
|
+
| 'DoesNotMatchRegex'
|
|
303
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
307
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
308
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
309
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
310
|
+
* and would be compared as a literal string.
|
|
311
|
+
*/
|
|
312
|
+
property: string;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* String compared against the resolved property. Operators that take no value
|
|
316
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
317
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
318
|
+
*/
|
|
319
|
+
value: string;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
109
323
|
export interface ReportDateRange {
|
|
110
324
|
from: string;
|
|
111
325
|
|
|
@@ -114,6 +328,260 @@ export namespace FunnelListResponse {
|
|
|
114
328
|
}
|
|
115
329
|
}
|
|
116
330
|
|
|
331
|
+
/**
|
|
332
|
+
* Created funnel configuration
|
|
333
|
+
*/
|
|
334
|
+
export interface FunnelCreateResponse {
|
|
335
|
+
createdAt: string;
|
|
336
|
+
|
|
337
|
+
funnelId: string;
|
|
338
|
+
|
|
339
|
+
funnelType: 'SESSION_BASED' | 'VISITOR_BASED';
|
|
340
|
+
|
|
341
|
+
name: string;
|
|
342
|
+
|
|
343
|
+
status: 'READY' | 'PROCESSING';
|
|
344
|
+
|
|
345
|
+
steps: Array<FunnelCreateResponse.Step>;
|
|
346
|
+
|
|
347
|
+
updatedAt: string;
|
|
348
|
+
|
|
349
|
+
conversionWindow?: FunnelCreateResponse.ConversionWindow | null;
|
|
350
|
+
|
|
351
|
+
countingMethod?: 'UNIQUES' | 'TOTALS' | 'SESSIONS' | null;
|
|
352
|
+
|
|
353
|
+
description?: string | null;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
357
|
+
* UTM filters.
|
|
358
|
+
*/
|
|
359
|
+
globalLogic?: FunnelCreateResponse.GlobalLogic | null;
|
|
360
|
+
|
|
361
|
+
reportDateRange?: FunnelCreateResponse.ReportDateRange | null;
|
|
362
|
+
|
|
363
|
+
stepOrder?: 'EXACT' | 'ANY' | null;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
367
|
+
* takes precedence.
|
|
368
|
+
*/
|
|
369
|
+
utmFilters?: unknown | null;
|
|
370
|
+
|
|
371
|
+
watched?: boolean | null;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export namespace FunnelCreateResponse {
|
|
375
|
+
export interface Step {
|
|
376
|
+
eventName: string;
|
|
377
|
+
|
|
378
|
+
name: string;
|
|
379
|
+
|
|
380
|
+
order: number;
|
|
381
|
+
|
|
382
|
+
stepId: string;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Step-level event filters (JSON object).
|
|
386
|
+
*/
|
|
387
|
+
filters?: unknown;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Step-level event logic.
|
|
391
|
+
*/
|
|
392
|
+
logic?: Step.Logic | null;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export namespace Step {
|
|
396
|
+
/**
|
|
397
|
+
* Step-level event logic.
|
|
398
|
+
*/
|
|
399
|
+
export interface Logic {
|
|
400
|
+
/**
|
|
401
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
402
|
+
* or combinator).
|
|
403
|
+
*/
|
|
404
|
+
AND?: Array<unknown> | null;
|
|
405
|
+
|
|
406
|
+
condition?: Logic.Condition;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Negates a single child logic node.
|
|
410
|
+
*/
|
|
411
|
+
NOT?: unknown;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
415
|
+
* or combinator).
|
|
416
|
+
*/
|
|
417
|
+
OR?: Array<unknown> | null;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export namespace Logic {
|
|
421
|
+
export interface Condition {
|
|
422
|
+
/**
|
|
423
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
424
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
425
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
426
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
427
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
428
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
429
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
430
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
431
|
+
*/
|
|
432
|
+
operator:
|
|
433
|
+
| 'Is'
|
|
434
|
+
| 'IsNot'
|
|
435
|
+
| 'Contains'
|
|
436
|
+
| 'DoesNotContain'
|
|
437
|
+
| 'StartsWith'
|
|
438
|
+
| 'EndsWith'
|
|
439
|
+
| 'IsFalsy'
|
|
440
|
+
| 'IsTruthy'
|
|
441
|
+
| 'IsNull'
|
|
442
|
+
| 'IsNotNull'
|
|
443
|
+
| 'IsUndefined'
|
|
444
|
+
| 'IsNotUndefined'
|
|
445
|
+
| 'IsGreaterThan'
|
|
446
|
+
| 'IsGreaterThanOrEqual'
|
|
447
|
+
| 'IsLessThan'
|
|
448
|
+
| 'IsLessThanOrEqual'
|
|
449
|
+
| 'IsIn'
|
|
450
|
+
| 'IsNotIn'
|
|
451
|
+
| 'IsFoundIn'
|
|
452
|
+
| 'IsNotFoundIn'
|
|
453
|
+
| 'IsTrue'
|
|
454
|
+
| 'IsFalse'
|
|
455
|
+
| 'IsBefore'
|
|
456
|
+
| 'IsAfter'
|
|
457
|
+
| 'IsBetween'
|
|
458
|
+
| 'IsOnOrBefore'
|
|
459
|
+
| 'IsOnOrAfter'
|
|
460
|
+
| 'MatchesRegex'
|
|
461
|
+
| 'MatchesRegexIgnoreCase'
|
|
462
|
+
| 'DoesNotMatchRegex'
|
|
463
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
467
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
468
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
469
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
470
|
+
* and would be compared as a literal string.
|
|
471
|
+
*/
|
|
472
|
+
property: string;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* String compared against the resolved property. Operators that take no value
|
|
476
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
477
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
478
|
+
*/
|
|
479
|
+
value: string;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export interface ConversionWindow {
|
|
485
|
+
unit: 'MINUTES' | 'HOURS' | 'DAYS';
|
|
486
|
+
|
|
487
|
+
value: number;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
492
|
+
* UTM filters.
|
|
493
|
+
*/
|
|
494
|
+
export interface GlobalLogic {
|
|
495
|
+
/**
|
|
496
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
497
|
+
* or combinator).
|
|
498
|
+
*/
|
|
499
|
+
AND?: Array<unknown> | null;
|
|
500
|
+
|
|
501
|
+
condition?: GlobalLogic.Condition;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Negates a single child logic node.
|
|
505
|
+
*/
|
|
506
|
+
NOT?: unknown;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
510
|
+
* or combinator).
|
|
511
|
+
*/
|
|
512
|
+
OR?: Array<unknown> | null;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export namespace GlobalLogic {
|
|
516
|
+
export interface Condition {
|
|
517
|
+
/**
|
|
518
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
519
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
520
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
521
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
522
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
523
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
524
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
525
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
526
|
+
*/
|
|
527
|
+
operator:
|
|
528
|
+
| 'Is'
|
|
529
|
+
| 'IsNot'
|
|
530
|
+
| 'Contains'
|
|
531
|
+
| 'DoesNotContain'
|
|
532
|
+
| 'StartsWith'
|
|
533
|
+
| 'EndsWith'
|
|
534
|
+
| 'IsFalsy'
|
|
535
|
+
| 'IsTruthy'
|
|
536
|
+
| 'IsNull'
|
|
537
|
+
| 'IsNotNull'
|
|
538
|
+
| 'IsUndefined'
|
|
539
|
+
| 'IsNotUndefined'
|
|
540
|
+
| 'IsGreaterThan'
|
|
541
|
+
| 'IsGreaterThanOrEqual'
|
|
542
|
+
| 'IsLessThan'
|
|
543
|
+
| 'IsLessThanOrEqual'
|
|
544
|
+
| 'IsIn'
|
|
545
|
+
| 'IsNotIn'
|
|
546
|
+
| 'IsFoundIn'
|
|
547
|
+
| 'IsNotFoundIn'
|
|
548
|
+
| 'IsTrue'
|
|
549
|
+
| 'IsFalse'
|
|
550
|
+
| 'IsBefore'
|
|
551
|
+
| 'IsAfter'
|
|
552
|
+
| 'IsBetween'
|
|
553
|
+
| 'IsOnOrBefore'
|
|
554
|
+
| 'IsOnOrAfter'
|
|
555
|
+
| 'MatchesRegex'
|
|
556
|
+
| 'MatchesRegexIgnoreCase'
|
|
557
|
+
| 'DoesNotMatchRegex'
|
|
558
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
562
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
563
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
564
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
565
|
+
* and would be compared as a literal string.
|
|
566
|
+
*/
|
|
567
|
+
property: string;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* String compared against the resolved property. Operators that take no value
|
|
571
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
572
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
573
|
+
*/
|
|
574
|
+
value: string;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
export interface ReportDateRange {
|
|
579
|
+
from: string;
|
|
580
|
+
|
|
581
|
+
to: string;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
117
585
|
/**
|
|
118
586
|
* Funnel configuration details.
|
|
119
587
|
*/
|
|
@@ -138,14 +606,21 @@ export interface FunnelRetrieveResponse {
|
|
|
138
606
|
|
|
139
607
|
description?: string | null;
|
|
140
608
|
|
|
609
|
+
/**
|
|
610
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
611
|
+
* UTM filters.
|
|
612
|
+
*/
|
|
613
|
+
globalLogic?: FunnelRetrieveResponse.GlobalLogic | null;
|
|
614
|
+
|
|
141
615
|
reportDateRange?: FunnelRetrieveResponse.ReportDateRange | null;
|
|
142
616
|
|
|
143
617
|
stepOrder?: 'EXACT' | 'ANY' | null;
|
|
144
618
|
|
|
145
619
|
/**
|
|
146
|
-
* UTM
|
|
620
|
+
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
621
|
+
* takes precedence.
|
|
147
622
|
*/
|
|
148
|
-
utmFilters?: unknown;
|
|
623
|
+
utmFilters?: unknown | null;
|
|
149
624
|
|
|
150
625
|
watched?: boolean | null;
|
|
151
626
|
}
|
|
@@ -164,6 +639,100 @@ export namespace FunnelRetrieveResponse {
|
|
|
164
639
|
* Step-level event filters (JSON object).
|
|
165
640
|
*/
|
|
166
641
|
filters?: unknown;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Step-level event logic.
|
|
645
|
+
*/
|
|
646
|
+
logic?: Step.Logic | null;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export namespace Step {
|
|
650
|
+
/**
|
|
651
|
+
* Step-level event logic.
|
|
652
|
+
*/
|
|
653
|
+
export interface Logic {
|
|
654
|
+
/**
|
|
655
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
656
|
+
* or combinator).
|
|
657
|
+
*/
|
|
658
|
+
AND?: Array<unknown> | null;
|
|
659
|
+
|
|
660
|
+
condition?: Logic.Condition;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Negates a single child logic node.
|
|
664
|
+
*/
|
|
665
|
+
NOT?: unknown;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
669
|
+
* or combinator).
|
|
670
|
+
*/
|
|
671
|
+
OR?: Array<unknown> | null;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export namespace Logic {
|
|
675
|
+
export interface Condition {
|
|
676
|
+
/**
|
|
677
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
678
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
679
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
680
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
681
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
682
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
683
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
684
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
685
|
+
*/
|
|
686
|
+
operator:
|
|
687
|
+
| 'Is'
|
|
688
|
+
| 'IsNot'
|
|
689
|
+
| 'Contains'
|
|
690
|
+
| 'DoesNotContain'
|
|
691
|
+
| 'StartsWith'
|
|
692
|
+
| 'EndsWith'
|
|
693
|
+
| 'IsFalsy'
|
|
694
|
+
| 'IsTruthy'
|
|
695
|
+
| 'IsNull'
|
|
696
|
+
| 'IsNotNull'
|
|
697
|
+
| 'IsUndefined'
|
|
698
|
+
| 'IsNotUndefined'
|
|
699
|
+
| 'IsGreaterThan'
|
|
700
|
+
| 'IsGreaterThanOrEqual'
|
|
701
|
+
| 'IsLessThan'
|
|
702
|
+
| 'IsLessThanOrEqual'
|
|
703
|
+
| 'IsIn'
|
|
704
|
+
| 'IsNotIn'
|
|
705
|
+
| 'IsFoundIn'
|
|
706
|
+
| 'IsNotFoundIn'
|
|
707
|
+
| 'IsTrue'
|
|
708
|
+
| 'IsFalse'
|
|
709
|
+
| 'IsBefore'
|
|
710
|
+
| 'IsAfter'
|
|
711
|
+
| 'IsBetween'
|
|
712
|
+
| 'IsOnOrBefore'
|
|
713
|
+
| 'IsOnOrAfter'
|
|
714
|
+
| 'MatchesRegex'
|
|
715
|
+
| 'MatchesRegexIgnoreCase'
|
|
716
|
+
| 'DoesNotMatchRegex'
|
|
717
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
721
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
722
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
723
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
724
|
+
* and would be compared as a literal string.
|
|
725
|
+
*/
|
|
726
|
+
property: string;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* String compared against the resolved property. Operators that take no value
|
|
730
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
731
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
732
|
+
*/
|
|
733
|
+
value: string;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
167
736
|
}
|
|
168
737
|
|
|
169
738
|
export interface ConversionWindow {
|
|
@@ -172,6 +741,94 @@ export namespace FunnelRetrieveResponse {
|
|
|
172
741
|
value: number;
|
|
173
742
|
}
|
|
174
743
|
|
|
744
|
+
/**
|
|
745
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
746
|
+
* UTM filters.
|
|
747
|
+
*/
|
|
748
|
+
export interface GlobalLogic {
|
|
749
|
+
/**
|
|
750
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
751
|
+
* or combinator).
|
|
752
|
+
*/
|
|
753
|
+
AND?: Array<unknown> | null;
|
|
754
|
+
|
|
755
|
+
condition?: GlobalLogic.Condition;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Negates a single child logic node.
|
|
759
|
+
*/
|
|
760
|
+
NOT?: unknown;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
764
|
+
* or combinator).
|
|
765
|
+
*/
|
|
766
|
+
OR?: Array<unknown> | null;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export namespace GlobalLogic {
|
|
770
|
+
export interface Condition {
|
|
771
|
+
/**
|
|
772
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
773
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
774
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
775
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
776
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
777
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
778
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
779
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
780
|
+
*/
|
|
781
|
+
operator:
|
|
782
|
+
| 'Is'
|
|
783
|
+
| 'IsNot'
|
|
784
|
+
| 'Contains'
|
|
785
|
+
| 'DoesNotContain'
|
|
786
|
+
| 'StartsWith'
|
|
787
|
+
| 'EndsWith'
|
|
788
|
+
| 'IsFalsy'
|
|
789
|
+
| 'IsTruthy'
|
|
790
|
+
| 'IsNull'
|
|
791
|
+
| 'IsNotNull'
|
|
792
|
+
| 'IsUndefined'
|
|
793
|
+
| 'IsNotUndefined'
|
|
794
|
+
| 'IsGreaterThan'
|
|
795
|
+
| 'IsGreaterThanOrEqual'
|
|
796
|
+
| 'IsLessThan'
|
|
797
|
+
| 'IsLessThanOrEqual'
|
|
798
|
+
| 'IsIn'
|
|
799
|
+
| 'IsNotIn'
|
|
800
|
+
| 'IsFoundIn'
|
|
801
|
+
| 'IsNotFoundIn'
|
|
802
|
+
| 'IsTrue'
|
|
803
|
+
| 'IsFalse'
|
|
804
|
+
| 'IsBefore'
|
|
805
|
+
| 'IsAfter'
|
|
806
|
+
| 'IsBetween'
|
|
807
|
+
| 'IsOnOrBefore'
|
|
808
|
+
| 'IsOnOrAfter'
|
|
809
|
+
| 'MatchesRegex'
|
|
810
|
+
| 'MatchesRegexIgnoreCase'
|
|
811
|
+
| 'DoesNotMatchRegex'
|
|
812
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
816
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
817
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
818
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
819
|
+
* and would be compared as a literal string.
|
|
820
|
+
*/
|
|
821
|
+
property: string;
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* String compared against the resolved property. Operators that take no value
|
|
825
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
826
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
827
|
+
*/
|
|
828
|
+
value: string;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
175
832
|
export interface ReportDateRange {
|
|
176
833
|
from: string;
|
|
177
834
|
|
|
@@ -179,6 +836,266 @@ export namespace FunnelRetrieveResponse {
|
|
|
179
836
|
}
|
|
180
837
|
}
|
|
181
838
|
|
|
839
|
+
/**
|
|
840
|
+
* Updated funnel configuration
|
|
841
|
+
*/
|
|
842
|
+
export interface FunnelUpdateResponse {
|
|
843
|
+
createdAt: string;
|
|
844
|
+
|
|
845
|
+
funnelId: string;
|
|
846
|
+
|
|
847
|
+
funnelType: 'SESSION_BASED' | 'VISITOR_BASED';
|
|
848
|
+
|
|
849
|
+
name: string;
|
|
850
|
+
|
|
851
|
+
status: 'READY' | 'PROCESSING';
|
|
852
|
+
|
|
853
|
+
steps: Array<FunnelUpdateResponse.Step>;
|
|
854
|
+
|
|
855
|
+
updatedAt: string;
|
|
856
|
+
|
|
857
|
+
conversionWindow?: FunnelUpdateResponse.ConversionWindow | null;
|
|
858
|
+
|
|
859
|
+
countingMethod?: 'UNIQUES' | 'TOTALS' | 'SESSIONS' | null;
|
|
860
|
+
|
|
861
|
+
description?: string | null;
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
865
|
+
* UTM filters.
|
|
866
|
+
*/
|
|
867
|
+
globalLogic?: FunnelUpdateResponse.GlobalLogic | null;
|
|
868
|
+
|
|
869
|
+
reportDateRange?: FunnelUpdateResponse.ReportDateRange | null;
|
|
870
|
+
|
|
871
|
+
stepOrder?: 'EXACT' | 'ANY' | null;
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
875
|
+
* takes precedence.
|
|
876
|
+
*/
|
|
877
|
+
utmFilters?: unknown | null;
|
|
878
|
+
|
|
879
|
+
watched?: boolean | null;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
export namespace FunnelUpdateResponse {
|
|
883
|
+
export interface Step {
|
|
884
|
+
eventName: string;
|
|
885
|
+
|
|
886
|
+
name: string;
|
|
887
|
+
|
|
888
|
+
order: number;
|
|
889
|
+
|
|
890
|
+
stepId: string;
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Step-level event filters (JSON object).
|
|
894
|
+
*/
|
|
895
|
+
filters?: unknown;
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* Step-level event logic.
|
|
899
|
+
*/
|
|
900
|
+
logic?: Step.Logic | null;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
export namespace Step {
|
|
904
|
+
/**
|
|
905
|
+
* Step-level event logic.
|
|
906
|
+
*/
|
|
907
|
+
export interface Logic {
|
|
908
|
+
/**
|
|
909
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
910
|
+
* or combinator).
|
|
911
|
+
*/
|
|
912
|
+
AND?: Array<unknown> | null;
|
|
913
|
+
|
|
914
|
+
condition?: Logic.Condition;
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* Negates a single child logic node.
|
|
918
|
+
*/
|
|
919
|
+
NOT?: unknown;
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
923
|
+
* or combinator).
|
|
924
|
+
*/
|
|
925
|
+
OR?: Array<unknown> | null;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
export namespace Logic {
|
|
929
|
+
export interface Condition {
|
|
930
|
+
/**
|
|
931
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
932
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
933
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
934
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
935
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
936
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
937
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
938
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
939
|
+
*/
|
|
940
|
+
operator:
|
|
941
|
+
| 'Is'
|
|
942
|
+
| 'IsNot'
|
|
943
|
+
| 'Contains'
|
|
944
|
+
| 'DoesNotContain'
|
|
945
|
+
| 'StartsWith'
|
|
946
|
+
| 'EndsWith'
|
|
947
|
+
| 'IsFalsy'
|
|
948
|
+
| 'IsTruthy'
|
|
949
|
+
| 'IsNull'
|
|
950
|
+
| 'IsNotNull'
|
|
951
|
+
| 'IsUndefined'
|
|
952
|
+
| 'IsNotUndefined'
|
|
953
|
+
| 'IsGreaterThan'
|
|
954
|
+
| 'IsGreaterThanOrEqual'
|
|
955
|
+
| 'IsLessThan'
|
|
956
|
+
| 'IsLessThanOrEqual'
|
|
957
|
+
| 'IsIn'
|
|
958
|
+
| 'IsNotIn'
|
|
959
|
+
| 'IsFoundIn'
|
|
960
|
+
| 'IsNotFoundIn'
|
|
961
|
+
| 'IsTrue'
|
|
962
|
+
| 'IsFalse'
|
|
963
|
+
| 'IsBefore'
|
|
964
|
+
| 'IsAfter'
|
|
965
|
+
| 'IsBetween'
|
|
966
|
+
| 'IsOnOrBefore'
|
|
967
|
+
| 'IsOnOrAfter'
|
|
968
|
+
| 'MatchesRegex'
|
|
969
|
+
| 'MatchesRegexIgnoreCase'
|
|
970
|
+
| 'DoesNotMatchRegex'
|
|
971
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
975
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
976
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
977
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
978
|
+
* and would be compared as a literal string.
|
|
979
|
+
*/
|
|
980
|
+
property: string;
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* String compared against the resolved property. Operators that take no value
|
|
984
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
985
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
986
|
+
*/
|
|
987
|
+
value: string;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
export interface ConversionWindow {
|
|
993
|
+
unit: 'MINUTES' | 'HOURS' | 'DAYS';
|
|
994
|
+
|
|
995
|
+
value: number;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1000
|
+
* UTM filters.
|
|
1001
|
+
*/
|
|
1002
|
+
export interface GlobalLogic {
|
|
1003
|
+
/**
|
|
1004
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1005
|
+
* or combinator).
|
|
1006
|
+
*/
|
|
1007
|
+
AND?: Array<unknown> | null;
|
|
1008
|
+
|
|
1009
|
+
condition?: GlobalLogic.Condition;
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* Negates a single child logic node.
|
|
1013
|
+
*/
|
|
1014
|
+
NOT?: unknown;
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1018
|
+
* or combinator).
|
|
1019
|
+
*/
|
|
1020
|
+
OR?: Array<unknown> | null;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
export namespace GlobalLogic {
|
|
1024
|
+
export interface Condition {
|
|
1025
|
+
/**
|
|
1026
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1027
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1028
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1029
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1030
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1031
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1032
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1033
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1034
|
+
*/
|
|
1035
|
+
operator:
|
|
1036
|
+
| 'Is'
|
|
1037
|
+
| 'IsNot'
|
|
1038
|
+
| 'Contains'
|
|
1039
|
+
| 'DoesNotContain'
|
|
1040
|
+
| 'StartsWith'
|
|
1041
|
+
| 'EndsWith'
|
|
1042
|
+
| 'IsFalsy'
|
|
1043
|
+
| 'IsTruthy'
|
|
1044
|
+
| 'IsNull'
|
|
1045
|
+
| 'IsNotNull'
|
|
1046
|
+
| 'IsUndefined'
|
|
1047
|
+
| 'IsNotUndefined'
|
|
1048
|
+
| 'IsGreaterThan'
|
|
1049
|
+
| 'IsGreaterThanOrEqual'
|
|
1050
|
+
| 'IsLessThan'
|
|
1051
|
+
| 'IsLessThanOrEqual'
|
|
1052
|
+
| 'IsIn'
|
|
1053
|
+
| 'IsNotIn'
|
|
1054
|
+
| 'IsFoundIn'
|
|
1055
|
+
| 'IsNotFoundIn'
|
|
1056
|
+
| 'IsTrue'
|
|
1057
|
+
| 'IsFalse'
|
|
1058
|
+
| 'IsBefore'
|
|
1059
|
+
| 'IsAfter'
|
|
1060
|
+
| 'IsBetween'
|
|
1061
|
+
| 'IsOnOrBefore'
|
|
1062
|
+
| 'IsOnOrAfter'
|
|
1063
|
+
| 'MatchesRegex'
|
|
1064
|
+
| 'MatchesRegexIgnoreCase'
|
|
1065
|
+
| 'DoesNotMatchRegex'
|
|
1066
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1070
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1071
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1072
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1073
|
+
* and would be compared as a literal string.
|
|
1074
|
+
*/
|
|
1075
|
+
property: string;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* String compared against the resolved property. Operators that take no value
|
|
1079
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1080
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1081
|
+
*/
|
|
1082
|
+
value: string;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
export interface ReportDateRange {
|
|
1087
|
+
from: string;
|
|
1088
|
+
|
|
1089
|
+
to: string;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
export interface FunnelDeleteResponse {
|
|
1094
|
+
deleted: true;
|
|
1095
|
+
|
|
1096
|
+
id: string;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
182
1099
|
export interface FunnelResultsResponse {
|
|
183
1100
|
/**
|
|
184
1101
|
* Conversion rate from first step to last step as a percentage.
|
|
@@ -231,6 +1148,446 @@ export namespace FunnelResultsResponse {
|
|
|
231
1148
|
}
|
|
232
1149
|
}
|
|
233
1150
|
|
|
1151
|
+
export interface FunnelCreateParams {
|
|
1152
|
+
name: string;
|
|
1153
|
+
|
|
1154
|
+
steps: Array<FunnelCreateParams.Step>;
|
|
1155
|
+
|
|
1156
|
+
conversionWindow?: unknown | null;
|
|
1157
|
+
|
|
1158
|
+
countingMethod?: string | null;
|
|
1159
|
+
|
|
1160
|
+
description?: string | null;
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Funnels are session-based. `SESSION_BASED` is the only supported value and is
|
|
1164
|
+
* applied when omitted.
|
|
1165
|
+
*/
|
|
1166
|
+
funnelType?: 'SESSION_BASED';
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1170
|
+
* UTM filters.
|
|
1171
|
+
*/
|
|
1172
|
+
globalLogic?: FunnelCreateParams.GlobalLogic | null;
|
|
1173
|
+
|
|
1174
|
+
stepOrder?: string | null;
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
1178
|
+
* takes precedence.
|
|
1179
|
+
*/
|
|
1180
|
+
utmFilters?: unknown | null;
|
|
1181
|
+
|
|
1182
|
+
watched?: boolean | null;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
export namespace FunnelCreateParams {
|
|
1186
|
+
export interface Step {
|
|
1187
|
+
eventName: string;
|
|
1188
|
+
|
|
1189
|
+
name: string;
|
|
1190
|
+
|
|
1191
|
+
order: number;
|
|
1192
|
+
|
|
1193
|
+
filters?: unknown | null;
|
|
1194
|
+
|
|
1195
|
+
logic?: Step.Logic | null;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
export namespace Step {
|
|
1199
|
+
export interface Logic {
|
|
1200
|
+
/**
|
|
1201
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1202
|
+
* or combinator).
|
|
1203
|
+
*/
|
|
1204
|
+
AND?: Array<unknown> | null;
|
|
1205
|
+
|
|
1206
|
+
condition?: Logic.Condition;
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* Negates a single child logic node.
|
|
1210
|
+
*/
|
|
1211
|
+
NOT?: unknown;
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1215
|
+
* or combinator).
|
|
1216
|
+
*/
|
|
1217
|
+
OR?: Array<unknown> | null;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
export namespace Logic {
|
|
1221
|
+
export interface Condition {
|
|
1222
|
+
/**
|
|
1223
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1224
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1225
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1226
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1227
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1228
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1229
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1230
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1231
|
+
*/
|
|
1232
|
+
operator:
|
|
1233
|
+
| 'Is'
|
|
1234
|
+
| 'IsNot'
|
|
1235
|
+
| 'Contains'
|
|
1236
|
+
| 'DoesNotContain'
|
|
1237
|
+
| 'StartsWith'
|
|
1238
|
+
| 'EndsWith'
|
|
1239
|
+
| 'IsFalsy'
|
|
1240
|
+
| 'IsTruthy'
|
|
1241
|
+
| 'IsNull'
|
|
1242
|
+
| 'IsNotNull'
|
|
1243
|
+
| 'IsUndefined'
|
|
1244
|
+
| 'IsNotUndefined'
|
|
1245
|
+
| 'IsGreaterThan'
|
|
1246
|
+
| 'IsGreaterThanOrEqual'
|
|
1247
|
+
| 'IsLessThan'
|
|
1248
|
+
| 'IsLessThanOrEqual'
|
|
1249
|
+
| 'IsIn'
|
|
1250
|
+
| 'IsNotIn'
|
|
1251
|
+
| 'IsFoundIn'
|
|
1252
|
+
| 'IsNotFoundIn'
|
|
1253
|
+
| 'IsTrue'
|
|
1254
|
+
| 'IsFalse'
|
|
1255
|
+
| 'IsBefore'
|
|
1256
|
+
| 'IsAfter'
|
|
1257
|
+
| 'IsBetween'
|
|
1258
|
+
| 'IsOnOrBefore'
|
|
1259
|
+
| 'IsOnOrAfter'
|
|
1260
|
+
| 'MatchesRegex'
|
|
1261
|
+
| 'MatchesRegexIgnoreCase'
|
|
1262
|
+
| 'DoesNotMatchRegex'
|
|
1263
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1267
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1268
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1269
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1270
|
+
* and would be compared as a literal string.
|
|
1271
|
+
*/
|
|
1272
|
+
property: string;
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* String compared against the resolved property. Operators that take no value
|
|
1276
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1277
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1278
|
+
*/
|
|
1279
|
+
value: string;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1286
|
+
* UTM filters.
|
|
1287
|
+
*/
|
|
1288
|
+
export interface GlobalLogic {
|
|
1289
|
+
/**
|
|
1290
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1291
|
+
* or combinator).
|
|
1292
|
+
*/
|
|
1293
|
+
AND?: Array<unknown> | null;
|
|
1294
|
+
|
|
1295
|
+
condition?: GlobalLogic.Condition;
|
|
1296
|
+
|
|
1297
|
+
/**
|
|
1298
|
+
* Negates a single child logic node.
|
|
1299
|
+
*/
|
|
1300
|
+
NOT?: unknown;
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1304
|
+
* or combinator).
|
|
1305
|
+
*/
|
|
1306
|
+
OR?: Array<unknown> | null;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
export namespace GlobalLogic {
|
|
1310
|
+
export interface Condition {
|
|
1311
|
+
/**
|
|
1312
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1313
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1314
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1315
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1316
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1317
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1318
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1319
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1320
|
+
*/
|
|
1321
|
+
operator:
|
|
1322
|
+
| 'Is'
|
|
1323
|
+
| 'IsNot'
|
|
1324
|
+
| 'Contains'
|
|
1325
|
+
| 'DoesNotContain'
|
|
1326
|
+
| 'StartsWith'
|
|
1327
|
+
| 'EndsWith'
|
|
1328
|
+
| 'IsFalsy'
|
|
1329
|
+
| 'IsTruthy'
|
|
1330
|
+
| 'IsNull'
|
|
1331
|
+
| 'IsNotNull'
|
|
1332
|
+
| 'IsUndefined'
|
|
1333
|
+
| 'IsNotUndefined'
|
|
1334
|
+
| 'IsGreaterThan'
|
|
1335
|
+
| 'IsGreaterThanOrEqual'
|
|
1336
|
+
| 'IsLessThan'
|
|
1337
|
+
| 'IsLessThanOrEqual'
|
|
1338
|
+
| 'IsIn'
|
|
1339
|
+
| 'IsNotIn'
|
|
1340
|
+
| 'IsFoundIn'
|
|
1341
|
+
| 'IsNotFoundIn'
|
|
1342
|
+
| 'IsTrue'
|
|
1343
|
+
| 'IsFalse'
|
|
1344
|
+
| 'IsBefore'
|
|
1345
|
+
| 'IsAfter'
|
|
1346
|
+
| 'IsBetween'
|
|
1347
|
+
| 'IsOnOrBefore'
|
|
1348
|
+
| 'IsOnOrAfter'
|
|
1349
|
+
| 'MatchesRegex'
|
|
1350
|
+
| 'MatchesRegexIgnoreCase'
|
|
1351
|
+
| 'DoesNotMatchRegex'
|
|
1352
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1356
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1357
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1358
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1359
|
+
* and would be compared as a literal string.
|
|
1360
|
+
*/
|
|
1361
|
+
property: string;
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* String compared against the resolved property. Operators that take no value
|
|
1365
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1366
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1367
|
+
*/
|
|
1368
|
+
value: string;
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
export interface FunnelUpdateParams {
|
|
1374
|
+
conversionWindow?: unknown | null;
|
|
1375
|
+
|
|
1376
|
+
countingMethod?: string | null;
|
|
1377
|
+
|
|
1378
|
+
description?: string | null;
|
|
1379
|
+
|
|
1380
|
+
funnelType?: 'SESSION_BASED';
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1384
|
+
* UTM filters.
|
|
1385
|
+
*/
|
|
1386
|
+
globalLogic?: FunnelUpdateParams.GlobalLogic | null;
|
|
1387
|
+
|
|
1388
|
+
name?: string;
|
|
1389
|
+
|
|
1390
|
+
stepOrder?: string | null;
|
|
1391
|
+
|
|
1392
|
+
steps?: Array<FunnelUpdateParams.Step>;
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* Legacy exact-match UTM filters. Do not combine with globalLogic; globalLogic
|
|
1396
|
+
* takes precedence.
|
|
1397
|
+
*/
|
|
1398
|
+
utmFilters?: unknown | null;
|
|
1399
|
+
|
|
1400
|
+
watched?: boolean | null;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
export namespace FunnelUpdateParams {
|
|
1404
|
+
/**
|
|
1405
|
+
* Nested visitor logic for the entire funnel. When supplied, this replaces legacy
|
|
1406
|
+
* UTM filters.
|
|
1407
|
+
*/
|
|
1408
|
+
export interface GlobalLogic {
|
|
1409
|
+
/**
|
|
1410
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1411
|
+
* or combinator).
|
|
1412
|
+
*/
|
|
1413
|
+
AND?: Array<unknown> | null;
|
|
1414
|
+
|
|
1415
|
+
condition?: GlobalLogic.Condition;
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* Negates a single child logic node.
|
|
1419
|
+
*/
|
|
1420
|
+
NOT?: unknown;
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1424
|
+
* or combinator).
|
|
1425
|
+
*/
|
|
1426
|
+
OR?: Array<unknown> | null;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
export namespace GlobalLogic {
|
|
1430
|
+
export interface Condition {
|
|
1431
|
+
/**
|
|
1432
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1433
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1434
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1435
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1436
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1437
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1438
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1439
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1440
|
+
*/
|
|
1441
|
+
operator:
|
|
1442
|
+
| 'Is'
|
|
1443
|
+
| 'IsNot'
|
|
1444
|
+
| 'Contains'
|
|
1445
|
+
| 'DoesNotContain'
|
|
1446
|
+
| 'StartsWith'
|
|
1447
|
+
| 'EndsWith'
|
|
1448
|
+
| 'IsFalsy'
|
|
1449
|
+
| 'IsTruthy'
|
|
1450
|
+
| 'IsNull'
|
|
1451
|
+
| 'IsNotNull'
|
|
1452
|
+
| 'IsUndefined'
|
|
1453
|
+
| 'IsNotUndefined'
|
|
1454
|
+
| 'IsGreaterThan'
|
|
1455
|
+
| 'IsGreaterThanOrEqual'
|
|
1456
|
+
| 'IsLessThan'
|
|
1457
|
+
| 'IsLessThanOrEqual'
|
|
1458
|
+
| 'IsIn'
|
|
1459
|
+
| 'IsNotIn'
|
|
1460
|
+
| 'IsFoundIn'
|
|
1461
|
+
| 'IsNotFoundIn'
|
|
1462
|
+
| 'IsTrue'
|
|
1463
|
+
| 'IsFalse'
|
|
1464
|
+
| 'IsBefore'
|
|
1465
|
+
| 'IsAfter'
|
|
1466
|
+
| 'IsBetween'
|
|
1467
|
+
| 'IsOnOrBefore'
|
|
1468
|
+
| 'IsOnOrAfter'
|
|
1469
|
+
| 'MatchesRegex'
|
|
1470
|
+
| 'MatchesRegexIgnoreCase'
|
|
1471
|
+
| 'DoesNotMatchRegex'
|
|
1472
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1476
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1477
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1478
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1479
|
+
* and would be compared as a literal string.
|
|
1480
|
+
*/
|
|
1481
|
+
property: string;
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* String compared against the resolved property. Operators that take no value
|
|
1485
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1486
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1487
|
+
*/
|
|
1488
|
+
value: string;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
export interface Step {
|
|
1493
|
+
eventName: string;
|
|
1494
|
+
|
|
1495
|
+
name: string;
|
|
1496
|
+
|
|
1497
|
+
order: number;
|
|
1498
|
+
|
|
1499
|
+
filters?: unknown | null;
|
|
1500
|
+
|
|
1501
|
+
logic?: Step.Logic | null;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
export namespace Step {
|
|
1505
|
+
export interface Logic {
|
|
1506
|
+
/**
|
|
1507
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
1508
|
+
* or combinator).
|
|
1509
|
+
*/
|
|
1510
|
+
AND?: Array<unknown> | null;
|
|
1511
|
+
|
|
1512
|
+
condition?: Logic.Condition;
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* Negates a single child logic node.
|
|
1516
|
+
*/
|
|
1517
|
+
NOT?: unknown;
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
1521
|
+
* or combinator).
|
|
1522
|
+
*/
|
|
1523
|
+
OR?: Array<unknown> | null;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
export namespace Logic {
|
|
1527
|
+
export interface Condition {
|
|
1528
|
+
/**
|
|
1529
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
1530
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
1531
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
1532
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
1533
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
1534
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
1535
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
1536
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
1537
|
+
*/
|
|
1538
|
+
operator:
|
|
1539
|
+
| 'Is'
|
|
1540
|
+
| 'IsNot'
|
|
1541
|
+
| 'Contains'
|
|
1542
|
+
| 'DoesNotContain'
|
|
1543
|
+
| 'StartsWith'
|
|
1544
|
+
| 'EndsWith'
|
|
1545
|
+
| 'IsFalsy'
|
|
1546
|
+
| 'IsTruthy'
|
|
1547
|
+
| 'IsNull'
|
|
1548
|
+
| 'IsNotNull'
|
|
1549
|
+
| 'IsUndefined'
|
|
1550
|
+
| 'IsNotUndefined'
|
|
1551
|
+
| 'IsGreaterThan'
|
|
1552
|
+
| 'IsGreaterThanOrEqual'
|
|
1553
|
+
| 'IsLessThan'
|
|
1554
|
+
| 'IsLessThanOrEqual'
|
|
1555
|
+
| 'IsIn'
|
|
1556
|
+
| 'IsNotIn'
|
|
1557
|
+
| 'IsFoundIn'
|
|
1558
|
+
| 'IsNotFoundIn'
|
|
1559
|
+
| 'IsTrue'
|
|
1560
|
+
| 'IsFalse'
|
|
1561
|
+
| 'IsBefore'
|
|
1562
|
+
| 'IsAfter'
|
|
1563
|
+
| 'IsBetween'
|
|
1564
|
+
| 'IsOnOrBefore'
|
|
1565
|
+
| 'IsOnOrAfter'
|
|
1566
|
+
| 'MatchesRegex'
|
|
1567
|
+
| 'MatchesRegexIgnoreCase'
|
|
1568
|
+
| 'DoesNotMatchRegex'
|
|
1569
|
+
| 'DoesNotMatchRegexIgnoreCase';
|
|
1570
|
+
|
|
1571
|
+
/**
|
|
1572
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
1573
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
1574
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
1575
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
1576
|
+
* and would be compared as a literal string.
|
|
1577
|
+
*/
|
|
1578
|
+
property: string;
|
|
1579
|
+
|
|
1580
|
+
/**
|
|
1581
|
+
* String compared against the resolved property. Operators that take no value
|
|
1582
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
1583
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
1584
|
+
*/
|
|
1585
|
+
value: string;
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
|
|
234
1591
|
export interface FunnelResultsParams {
|
|
235
1592
|
/**
|
|
236
1593
|
* Inclusive lower bound of the analysis window, as a UTC calendar day in
|
|
@@ -296,8 +1653,13 @@ export interface FunnelResultsParams {
|
|
|
296
1653
|
export declare namespace Funnels {
|
|
297
1654
|
export {
|
|
298
1655
|
type FunnelListResponse as FunnelListResponse,
|
|
1656
|
+
type FunnelCreateResponse as FunnelCreateResponse,
|
|
299
1657
|
type FunnelRetrieveResponse as FunnelRetrieveResponse,
|
|
1658
|
+
type FunnelUpdateResponse as FunnelUpdateResponse,
|
|
1659
|
+
type FunnelDeleteResponse as FunnelDeleteResponse,
|
|
300
1660
|
type FunnelResultsResponse as FunnelResultsResponse,
|
|
1661
|
+
type FunnelCreateParams as FunnelCreateParams,
|
|
1662
|
+
type FunnelUpdateParams as FunnelUpdateParams,
|
|
301
1663
|
type FunnelResultsParams as FunnelResultsParams,
|
|
302
1664
|
};
|
|
303
1665
|
}
|