@oursprivacy/platform-sdk 1.55.0 → 1.57.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 +14 -0
- package/client.d.mts +15 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -6
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +4 -2
- package/resources/consent-settings.d.mts +90 -1
- package/resources/consent-settings.d.mts.map +1 -1
- package/resources/consent-settings.d.ts +90 -1
- package/resources/consent-settings.d.ts.map +1 -1
- package/resources/consent-settings.js +13 -0
- package/resources/consent-settings.js.map +1 -1
- package/resources/consent-settings.mjs +13 -0
- package/resources/consent-settings.mjs.map +1 -1
- package/resources/custom-domains.d.mts +10 -4
- package/resources/custom-domains.d.mts.map +1 -1
- package/resources/custom-domains.d.ts +10 -4
- package/resources/custom-domains.d.ts.map +1 -1
- package/resources/custom-domains.js +3 -2
- package/resources/custom-domains.js.map +1 -1
- package/resources/custom-domains.mjs +3 -2
- package/resources/custom-domains.mjs.map +1 -1
- package/resources/dashboards.d.mts +4737 -0
- package/resources/dashboards.d.mts.map +1 -0
- package/resources/dashboards.d.ts +4737 -0
- package/resources/dashboards.d.ts.map +1 -0
- package/resources/dashboards.js +124 -0
- package/resources/dashboards.js.map +1 -0
- package/resources/dashboards.mjs +120 -0
- package/resources/dashboards.mjs.map +1 -0
- package/resources/data-governance.d.mts +19 -26
- package/resources/data-governance.d.mts.map +1 -1
- package/resources/data-governance.d.ts +19 -26
- package/resources/data-governance.d.ts.map +1 -1
- package/resources/data-governance.js +14 -13
- package/resources/data-governance.js.map +1 -1
- package/resources/data-governance.mjs +14 -13
- package/resources/data-governance.mjs.map +1 -1
- package/resources/destinations.d.mts +46 -11
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +46 -11
- package/resources/destinations.d.ts.map +1 -1
- package/resources/experiment-settings.d.mts +84 -24
- package/resources/experiment-settings.d.mts.map +1 -1
- package/resources/experiment-settings.d.ts +84 -24
- package/resources/experiment-settings.d.ts.map +1 -1
- package/resources/experiment-settings.js +9 -4
- package/resources/experiment-settings.js.map +1 -1
- package/resources/experiment-settings.mjs +9 -4
- package/resources/experiment-settings.mjs.map +1 -1
- package/resources/funnels.d.mts +64 -7
- package/resources/funnels.d.mts.map +1 -1
- package/resources/funnels.d.ts +64 -7
- package/resources/funnels.d.ts.map +1 -1
- package/resources/funnels.js +2 -1
- package/resources/funnels.js.map +1 -1
- package/resources/funnels.mjs +2 -1
- package/resources/funnels.mjs.map +1 -1
- package/resources/index.d.mts +6 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/insights.d.mts +1152 -0
- package/resources/insights.d.mts.map +1 -0
- package/resources/insights.d.ts +1152 -0
- package/resources/insights.d.ts.map +1 -0
- package/resources/insights.js +81 -0
- package/resources/insights.js.map +1 -0
- package/resources/insights.mjs +77 -0
- package/resources/insights.mjs.map +1 -0
- package/resources/journey-flows.d.mts +214 -17
- package/resources/journey-flows.d.mts.map +1 -1
- package/resources/journey-flows.d.ts +214 -17
- package/resources/journey-flows.d.ts.map +1 -1
- package/resources/journey-flows.js +17 -13
- package/resources/journey-flows.js.map +1 -1
- package/resources/journey-flows.mjs +17 -13
- package/resources/journey-flows.mjs.map +1 -1
- package/resources/replay-settings.d.mts +72 -42
- package/resources/replay-settings.d.mts.map +1 -1
- package/resources/replay-settings.d.ts +72 -42
- package/resources/replay-settings.d.ts.map +1 -1
- package/resources/replay-settings.js +12 -7
- package/resources/replay-settings.js.map +1 -1
- package/resources/replay-settings.mjs +12 -7
- package/resources/replay-settings.mjs.map +1 -1
- package/resources/report-branding.d.mts +157 -0
- package/resources/report-branding.d.mts.map +1 -0
- package/resources/report-branding.d.ts +157 -0
- package/resources/report-branding.d.ts.map +1 -0
- package/resources/report-branding.js +39 -0
- package/resources/report-branding.js.map +1 -0
- package/resources/report-branding.mjs +35 -0
- package/resources/report-branding.mjs.map +1 -0
- package/resources/tag-manager-triggers.d.mts +46 -4
- package/resources/tag-manager-triggers.d.mts.map +1 -1
- package/resources/tag-manager-triggers.d.ts +46 -4
- package/resources/tag-manager-triggers.d.ts.map +1 -1
- package/resources/tag-manager-triggers.js +6 -4
- package/resources/tag-manager-triggers.js.map +1 -1
- package/resources/tag-manager-triggers.mjs +6 -4
- package/resources/tag-manager-triggers.mjs.map +1 -1
- package/resources/tag-manager-variables.d.mts +25 -13
- package/resources/tag-manager-variables.d.mts.map +1 -1
- package/resources/tag-manager-variables.d.ts +25 -13
- package/resources/tag-manager-variables.d.ts.map +1 -1
- package/resources/tag-manager-variables.js +9 -4
- package/resources/tag-manager-variables.js.map +1 -1
- package/resources/tag-manager-variables.mjs +9 -4
- package/resources/tag-manager-variables.mjs.map +1 -1
- package/resources/tag-managers.d.mts +17 -1
- package/resources/tag-managers.d.mts.map +1 -1
- package/resources/tag-managers.d.ts +17 -1
- package/resources/tag-managers.d.ts.map +1 -1
- package/resources/tag-managers.js +10 -0
- package/resources/tag-managers.js.map +1 -1
- package/resources/tag-managers.mjs +10 -0
- package/resources/tag-managers.mjs.map +1 -1
- package/resources/test-events.d.mts +28 -13
- package/resources/test-events.d.mts.map +1 -1
- package/resources/test-events.d.ts +28 -13
- package/resources/test-events.d.ts.map +1 -1
- package/resources/versions.d.mts +607 -139
- package/resources/versions.d.mts.map +1 -1
- package/resources/versions.d.ts +607 -139
- package/resources/versions.d.ts.map +1 -1
- package/resources/versions.js +2 -0
- package/resources/versions.js.map +1 -1
- package/resources/versions.mjs +2 -0
- package/resources/versions.mjs.map +1 -1
- package/resources/web-analytics.d.mts +91 -39
- package/resources/web-analytics.d.mts.map +1 -1
- package/resources/web-analytics.d.ts +91 -39
- package/resources/web-analytics.d.ts.map +1 -1
- package/resources/web-analytics.js +11 -0
- package/resources/web-analytics.js.map +1 -1
- package/resources/web-analytics.mjs +11 -0
- package/resources/web-analytics.mjs.map +1 -1
- package/resources/web-scanners.d.mts +3 -2
- package/resources/web-scanners.d.mts.map +1 -1
- package/resources/web-scanners.d.ts +3 -2
- package/resources/web-scanners.d.ts.map +1 -1
- package/resources/web-scanners.js +3 -2
- package/resources/web-scanners.js.map +1 -1
- package/resources/web-scanners.mjs +3 -2
- package/resources/web-scanners.mjs.map +1 -1
- package/src/client.ts +118 -3
- package/src/internal/utils/log.ts +1 -3
- package/src/resources/consent-settings.ts +117 -0
- package/src/resources/custom-domains.ts +14 -4
- package/src/resources/dashboards.ts +8757 -0
- package/src/resources/data-governance.ts +19 -26
- package/src/resources/destinations.ts +50 -6
- package/src/resources/experiment-settings.ts +84 -24
- package/src/resources/funnels.ts +64 -7
- package/src/resources/index.ts +54 -0
- package/src/resources/insights.ts +1976 -0
- package/src/resources/journey-flows.ts +214 -17
- package/src/resources/replay-settings.ts +77 -42
- package/src/resources/report-branding.ts +207 -0
- package/src/resources/tag-manager-triggers.ts +55 -4
- package/src/resources/tag-manager-variables.ts +25 -13
- package/src/resources/tag-managers.ts +21 -0
- package/src/resources/test-events.ts +30 -13
- package/src/resources/versions.ts +777 -139
- package/src/resources/web-analytics.ts +137 -38
- package/src/resources/web-scanners.ts +3 -2
- 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
|
@@ -0,0 +1,1152 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class Insights extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List saved Insights, most recently updated first. Supports cursor pagination and
|
|
8
|
+
* case-insensitive name/description search. Preserve unavailableCount and warnings
|
|
9
|
+
* when presenting partial lists. Requires API-key scope or current OAuth user
|
|
10
|
+
* permission: web-analytics:view, variables:find-custom
|
|
11
|
+
*/
|
|
12
|
+
list(query?: InsightListParams | null | undefined, options?: RequestOptions): PagePromise<InsightListResponsesCursor, InsightListResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Save an Insight report. Use GET /rest/v1/insights/capabilities to discover
|
|
15
|
+
* supported features and GET /rest/v1/insights/{id}/result to compute results.
|
|
16
|
+
* Requires API-key scope or current OAuth user permission: web-analytics:write,
|
|
17
|
+
* variables:find-custom
|
|
18
|
+
*/
|
|
19
|
+
create(body: InsightCreateParams, options?: RequestOptions): APIPromise<InsightCreateResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Get a saved Insight by id, including its revision, metric definition, date
|
|
22
|
+
* range, and chart settings. Requires API-key scope or current OAuth user
|
|
23
|
+
* permission: web-analytics:view, variables:find-custom
|
|
24
|
+
*/
|
|
25
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<InsightRetrieveResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Update a saved Insight using expectedRevision. Omitted top-level fields remain
|
|
28
|
+
* unchanged; supplied definition, reportContext, and view replace the entire
|
|
29
|
+
* nested value. Null clears the description. Requires API-key scope or current
|
|
30
|
+
* OAuth user permission: web-analytics:write, variables:find-custom
|
|
31
|
+
*/
|
|
32
|
+
update(id: string, body: InsightUpdateParams, options?: RequestOptions): APIPromise<InsightUpdateResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Delete a saved Insight using expectedRevision. Reload the report before retrying
|
|
35
|
+
* a revision conflict. Requires API-key scope or current OAuth user permission:
|
|
36
|
+
* web-analytics:write, variables:find-custom
|
|
37
|
+
*/
|
|
38
|
+
delete(id: string, params: InsightDeleteParams, options?: RequestOptions): APIPromise<InsightDeleteResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Discover supported Insight metrics, intervals, date presets, visualizations,
|
|
41
|
+
* comparisons, and limits before creating a report. Requires API-key scope or
|
|
42
|
+
* current OAuth user permission: web-analytics:view, variables:find-custom
|
|
43
|
+
*/
|
|
44
|
+
capabilities(options?: RequestOptions): APIPromise<InsightCapabilitiesResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Compute a saved Insight using expectedRevision with optional date, smoothing,
|
|
47
|
+
* cumulative, and comparison overrides. Overrides do not change the saved report.
|
|
48
|
+
* Requires API-key scope or current OAuth user permission: web-analytics:view,
|
|
49
|
+
* variables:find-custom
|
|
50
|
+
*/
|
|
51
|
+
results(id: string, query: InsightResultsParams, options?: RequestOptions): APIPromise<InsightResultsResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Compute an unsaved Insight preview from its metric definition and date range.
|
|
54
|
+
* JSON-encode input in the query string; maximum 16384 bytes before URL encoding.
|
|
55
|
+
* Requires API-key scope or current OAuth user permission: web-analytics:view,
|
|
56
|
+
* variables:find-custom
|
|
57
|
+
*/
|
|
58
|
+
preview(query: InsightPreviewParams, options?: RequestOptions): APIPromise<InsightPreviewResponse>;
|
|
59
|
+
}
|
|
60
|
+
export type InsightListResponsesCursor = Cursor<InsightListResponse>;
|
|
61
|
+
export interface InsightListResponse {
|
|
62
|
+
id: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
createdByUserId: string;
|
|
65
|
+
/**
|
|
66
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
67
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
68
|
+
* analytics property catalog.
|
|
69
|
+
*/
|
|
70
|
+
definition: InsightListResponse.Definition;
|
|
71
|
+
/**
|
|
72
|
+
* Display name for the saved Insight.
|
|
73
|
+
*/
|
|
74
|
+
name: string;
|
|
75
|
+
/**
|
|
76
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
77
|
+
* 366 days.
|
|
78
|
+
*/
|
|
79
|
+
reportContext: InsightListResponse.ReportContext;
|
|
80
|
+
revision: string;
|
|
81
|
+
updatedAt: string;
|
|
82
|
+
updatedByUserId: string;
|
|
83
|
+
/**
|
|
84
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
85
|
+
* view fields reset to their defaults.
|
|
86
|
+
*/
|
|
87
|
+
view: InsightListResponse.View;
|
|
88
|
+
/**
|
|
89
|
+
* Optional description; null clears it.
|
|
90
|
+
*/
|
|
91
|
+
description?: string | null;
|
|
92
|
+
}
|
|
93
|
+
export declare namespace InsightListResponse {
|
|
94
|
+
/**
|
|
95
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
96
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
97
|
+
* analytics property catalog.
|
|
98
|
+
*/
|
|
99
|
+
interface Definition {
|
|
100
|
+
interval: 'day' | 'week' | 'month';
|
|
101
|
+
kind: 'insight';
|
|
102
|
+
metrics: Array<Definition.Metric>;
|
|
103
|
+
version: 1;
|
|
104
|
+
filter?: Definition.Filter;
|
|
105
|
+
}
|
|
106
|
+
namespace Definition {
|
|
107
|
+
interface Metric {
|
|
108
|
+
id: string;
|
|
109
|
+
aggregation: 'event_count' | 'unique_visitors' | 'sum' | 'average';
|
|
110
|
+
eventNames: Array<string>;
|
|
111
|
+
name: string;
|
|
112
|
+
filter?: Metric.Filter;
|
|
113
|
+
property?: Metric.Property;
|
|
114
|
+
}
|
|
115
|
+
namespace Metric {
|
|
116
|
+
interface Filter {
|
|
117
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
118
|
+
version: 1;
|
|
119
|
+
}
|
|
120
|
+
namespace Filter {
|
|
121
|
+
interface UnionMember0 {
|
|
122
|
+
children: Array<unknown>;
|
|
123
|
+
kind: 'and' | 'or';
|
|
124
|
+
}
|
|
125
|
+
interface UnionMember1 {
|
|
126
|
+
child: unknown;
|
|
127
|
+
kind: 'not';
|
|
128
|
+
}
|
|
129
|
+
interface UnionMember2 {
|
|
130
|
+
kind: 'predicate';
|
|
131
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
132
|
+
property: string;
|
|
133
|
+
path?: Array<string>;
|
|
134
|
+
type?: 'string' | 'number' | 'boolean';
|
|
135
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
interface Property {
|
|
139
|
+
path: Array<string>;
|
|
140
|
+
property: 'event.properties';
|
|
141
|
+
type?: 'number';
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
interface Filter {
|
|
145
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
146
|
+
version: 1;
|
|
147
|
+
}
|
|
148
|
+
namespace Filter {
|
|
149
|
+
interface UnionMember0 {
|
|
150
|
+
children: Array<unknown>;
|
|
151
|
+
kind: 'and' | 'or';
|
|
152
|
+
}
|
|
153
|
+
interface UnionMember1 {
|
|
154
|
+
child: unknown;
|
|
155
|
+
kind: 'not';
|
|
156
|
+
}
|
|
157
|
+
interface UnionMember2 {
|
|
158
|
+
kind: 'predicate';
|
|
159
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
160
|
+
property: string;
|
|
161
|
+
path?: Array<string>;
|
|
162
|
+
type?: 'string' | 'number' | 'boolean';
|
|
163
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
169
|
+
* 366 days.
|
|
170
|
+
*/
|
|
171
|
+
interface ReportContext {
|
|
172
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
173
|
+
}
|
|
174
|
+
namespace ReportContext {
|
|
175
|
+
interface UnionMember0 {
|
|
176
|
+
from: string;
|
|
177
|
+
to: string;
|
|
178
|
+
timeZone?: 'UTC';
|
|
179
|
+
}
|
|
180
|
+
interface UnionMember1 {
|
|
181
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
182
|
+
timeZone?: 'UTC';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
187
|
+
* view fields reset to their defaults.
|
|
188
|
+
*/
|
|
189
|
+
interface View {
|
|
190
|
+
cumulative?: boolean;
|
|
191
|
+
series?: Array<View.Series>;
|
|
192
|
+
smoothing?: 'none' | 'rolling_average';
|
|
193
|
+
smoothingWindow?: number;
|
|
194
|
+
stacked?: boolean;
|
|
195
|
+
tableSort?: View.TableSort;
|
|
196
|
+
visualization?: 'line' | 'column' | 'bar' | 'pie' | 'table' | 'metric';
|
|
197
|
+
yAxisScale?: 'linear' | 'log';
|
|
198
|
+
}
|
|
199
|
+
namespace View {
|
|
200
|
+
interface Series {
|
|
201
|
+
metricId: string;
|
|
202
|
+
color?: string;
|
|
203
|
+
hidden?: boolean;
|
|
204
|
+
}
|
|
205
|
+
interface TableSort {
|
|
206
|
+
column: 'label' | 'range_value' | 'average';
|
|
207
|
+
direction: 'asc' | 'desc';
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
export interface InsightCreateResponse {
|
|
212
|
+
id: string;
|
|
213
|
+
createdAt: string;
|
|
214
|
+
createdByUserId: string;
|
|
215
|
+
/**
|
|
216
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
217
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
218
|
+
* analytics property catalog.
|
|
219
|
+
*/
|
|
220
|
+
definition: InsightCreateResponse.Definition;
|
|
221
|
+
/**
|
|
222
|
+
* Display name for the saved Insight.
|
|
223
|
+
*/
|
|
224
|
+
name: string;
|
|
225
|
+
/**
|
|
226
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
227
|
+
* 366 days.
|
|
228
|
+
*/
|
|
229
|
+
reportContext: InsightCreateResponse.ReportContext;
|
|
230
|
+
revision: string;
|
|
231
|
+
updatedAt: string;
|
|
232
|
+
updatedByUserId: string;
|
|
233
|
+
/**
|
|
234
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
235
|
+
* view fields reset to their defaults.
|
|
236
|
+
*/
|
|
237
|
+
view: InsightCreateResponse.View;
|
|
238
|
+
/**
|
|
239
|
+
* Optional description; null clears it.
|
|
240
|
+
*/
|
|
241
|
+
description?: string | null;
|
|
242
|
+
}
|
|
243
|
+
export declare namespace InsightCreateResponse {
|
|
244
|
+
/**
|
|
245
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
246
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
247
|
+
* analytics property catalog.
|
|
248
|
+
*/
|
|
249
|
+
interface Definition {
|
|
250
|
+
interval: 'day' | 'week' | 'month';
|
|
251
|
+
kind: 'insight';
|
|
252
|
+
metrics: Array<Definition.Metric>;
|
|
253
|
+
version: 1;
|
|
254
|
+
filter?: Definition.Filter;
|
|
255
|
+
}
|
|
256
|
+
namespace Definition {
|
|
257
|
+
interface Metric {
|
|
258
|
+
id: string;
|
|
259
|
+
aggregation: 'event_count' | 'unique_visitors' | 'sum' | 'average';
|
|
260
|
+
eventNames: Array<string>;
|
|
261
|
+
name: string;
|
|
262
|
+
filter?: Metric.Filter;
|
|
263
|
+
property?: Metric.Property;
|
|
264
|
+
}
|
|
265
|
+
namespace Metric {
|
|
266
|
+
interface Filter {
|
|
267
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
268
|
+
version: 1;
|
|
269
|
+
}
|
|
270
|
+
namespace Filter {
|
|
271
|
+
interface UnionMember0 {
|
|
272
|
+
children: Array<unknown>;
|
|
273
|
+
kind: 'and' | 'or';
|
|
274
|
+
}
|
|
275
|
+
interface UnionMember1 {
|
|
276
|
+
child: unknown;
|
|
277
|
+
kind: 'not';
|
|
278
|
+
}
|
|
279
|
+
interface UnionMember2 {
|
|
280
|
+
kind: 'predicate';
|
|
281
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
282
|
+
property: string;
|
|
283
|
+
path?: Array<string>;
|
|
284
|
+
type?: 'string' | 'number' | 'boolean';
|
|
285
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
interface Property {
|
|
289
|
+
path: Array<string>;
|
|
290
|
+
property: 'event.properties';
|
|
291
|
+
type?: 'number';
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
interface Filter {
|
|
295
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
296
|
+
version: 1;
|
|
297
|
+
}
|
|
298
|
+
namespace Filter {
|
|
299
|
+
interface UnionMember0 {
|
|
300
|
+
children: Array<unknown>;
|
|
301
|
+
kind: 'and' | 'or';
|
|
302
|
+
}
|
|
303
|
+
interface UnionMember1 {
|
|
304
|
+
child: unknown;
|
|
305
|
+
kind: 'not';
|
|
306
|
+
}
|
|
307
|
+
interface UnionMember2 {
|
|
308
|
+
kind: 'predicate';
|
|
309
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
310
|
+
property: string;
|
|
311
|
+
path?: Array<string>;
|
|
312
|
+
type?: 'string' | 'number' | 'boolean';
|
|
313
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
319
|
+
* 366 days.
|
|
320
|
+
*/
|
|
321
|
+
interface ReportContext {
|
|
322
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
323
|
+
}
|
|
324
|
+
namespace ReportContext {
|
|
325
|
+
interface UnionMember0 {
|
|
326
|
+
from: string;
|
|
327
|
+
to: string;
|
|
328
|
+
timeZone?: 'UTC';
|
|
329
|
+
}
|
|
330
|
+
interface UnionMember1 {
|
|
331
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
332
|
+
timeZone?: 'UTC';
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
337
|
+
* view fields reset to their defaults.
|
|
338
|
+
*/
|
|
339
|
+
interface View {
|
|
340
|
+
cumulative?: boolean;
|
|
341
|
+
series?: Array<View.Series>;
|
|
342
|
+
smoothing?: 'none' | 'rolling_average';
|
|
343
|
+
smoothingWindow?: number;
|
|
344
|
+
stacked?: boolean;
|
|
345
|
+
tableSort?: View.TableSort;
|
|
346
|
+
visualization?: 'line' | 'column' | 'bar' | 'pie' | 'table' | 'metric';
|
|
347
|
+
yAxisScale?: 'linear' | 'log';
|
|
348
|
+
}
|
|
349
|
+
namespace View {
|
|
350
|
+
interface Series {
|
|
351
|
+
metricId: string;
|
|
352
|
+
color?: string;
|
|
353
|
+
hidden?: boolean;
|
|
354
|
+
}
|
|
355
|
+
interface TableSort {
|
|
356
|
+
column: 'label' | 'range_value' | 'average';
|
|
357
|
+
direction: 'asc' | 'desc';
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
export interface InsightRetrieveResponse {
|
|
362
|
+
id: string;
|
|
363
|
+
createdAt: string;
|
|
364
|
+
createdByUserId: string;
|
|
365
|
+
/**
|
|
366
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
367
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
368
|
+
* analytics property catalog.
|
|
369
|
+
*/
|
|
370
|
+
definition: InsightRetrieveResponse.Definition;
|
|
371
|
+
/**
|
|
372
|
+
* Display name for the saved Insight.
|
|
373
|
+
*/
|
|
374
|
+
name: string;
|
|
375
|
+
/**
|
|
376
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
377
|
+
* 366 days.
|
|
378
|
+
*/
|
|
379
|
+
reportContext: InsightRetrieveResponse.ReportContext;
|
|
380
|
+
revision: string;
|
|
381
|
+
updatedAt: string;
|
|
382
|
+
updatedByUserId: string;
|
|
383
|
+
/**
|
|
384
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
385
|
+
* view fields reset to their defaults.
|
|
386
|
+
*/
|
|
387
|
+
view: InsightRetrieveResponse.View;
|
|
388
|
+
/**
|
|
389
|
+
* Optional description; null clears it.
|
|
390
|
+
*/
|
|
391
|
+
description?: string | null;
|
|
392
|
+
}
|
|
393
|
+
export declare namespace InsightRetrieveResponse {
|
|
394
|
+
/**
|
|
395
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
396
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
397
|
+
* analytics property catalog.
|
|
398
|
+
*/
|
|
399
|
+
interface Definition {
|
|
400
|
+
interval: 'day' | 'week' | 'month';
|
|
401
|
+
kind: 'insight';
|
|
402
|
+
metrics: Array<Definition.Metric>;
|
|
403
|
+
version: 1;
|
|
404
|
+
filter?: Definition.Filter;
|
|
405
|
+
}
|
|
406
|
+
namespace Definition {
|
|
407
|
+
interface Metric {
|
|
408
|
+
id: string;
|
|
409
|
+
aggregation: 'event_count' | 'unique_visitors' | 'sum' | 'average';
|
|
410
|
+
eventNames: Array<string>;
|
|
411
|
+
name: string;
|
|
412
|
+
filter?: Metric.Filter;
|
|
413
|
+
property?: Metric.Property;
|
|
414
|
+
}
|
|
415
|
+
namespace Metric {
|
|
416
|
+
interface Filter {
|
|
417
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
418
|
+
version: 1;
|
|
419
|
+
}
|
|
420
|
+
namespace Filter {
|
|
421
|
+
interface UnionMember0 {
|
|
422
|
+
children: Array<unknown>;
|
|
423
|
+
kind: 'and' | 'or';
|
|
424
|
+
}
|
|
425
|
+
interface UnionMember1 {
|
|
426
|
+
child: unknown;
|
|
427
|
+
kind: 'not';
|
|
428
|
+
}
|
|
429
|
+
interface UnionMember2 {
|
|
430
|
+
kind: 'predicate';
|
|
431
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
432
|
+
property: string;
|
|
433
|
+
path?: Array<string>;
|
|
434
|
+
type?: 'string' | 'number' | 'boolean';
|
|
435
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
interface Property {
|
|
439
|
+
path: Array<string>;
|
|
440
|
+
property: 'event.properties';
|
|
441
|
+
type?: 'number';
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
interface Filter {
|
|
445
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
446
|
+
version: 1;
|
|
447
|
+
}
|
|
448
|
+
namespace Filter {
|
|
449
|
+
interface UnionMember0 {
|
|
450
|
+
children: Array<unknown>;
|
|
451
|
+
kind: 'and' | 'or';
|
|
452
|
+
}
|
|
453
|
+
interface UnionMember1 {
|
|
454
|
+
child: unknown;
|
|
455
|
+
kind: 'not';
|
|
456
|
+
}
|
|
457
|
+
interface UnionMember2 {
|
|
458
|
+
kind: 'predicate';
|
|
459
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
460
|
+
property: string;
|
|
461
|
+
path?: Array<string>;
|
|
462
|
+
type?: 'string' | 'number' | 'boolean';
|
|
463
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
469
|
+
* 366 days.
|
|
470
|
+
*/
|
|
471
|
+
interface ReportContext {
|
|
472
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
473
|
+
}
|
|
474
|
+
namespace ReportContext {
|
|
475
|
+
interface UnionMember0 {
|
|
476
|
+
from: string;
|
|
477
|
+
to: string;
|
|
478
|
+
timeZone?: 'UTC';
|
|
479
|
+
}
|
|
480
|
+
interface UnionMember1 {
|
|
481
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
482
|
+
timeZone?: 'UTC';
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
487
|
+
* view fields reset to their defaults.
|
|
488
|
+
*/
|
|
489
|
+
interface View {
|
|
490
|
+
cumulative?: boolean;
|
|
491
|
+
series?: Array<View.Series>;
|
|
492
|
+
smoothing?: 'none' | 'rolling_average';
|
|
493
|
+
smoothingWindow?: number;
|
|
494
|
+
stacked?: boolean;
|
|
495
|
+
tableSort?: View.TableSort;
|
|
496
|
+
visualization?: 'line' | 'column' | 'bar' | 'pie' | 'table' | 'metric';
|
|
497
|
+
yAxisScale?: 'linear' | 'log';
|
|
498
|
+
}
|
|
499
|
+
namespace View {
|
|
500
|
+
interface Series {
|
|
501
|
+
metricId: string;
|
|
502
|
+
color?: string;
|
|
503
|
+
hidden?: boolean;
|
|
504
|
+
}
|
|
505
|
+
interface TableSort {
|
|
506
|
+
column: 'label' | 'range_value' | 'average';
|
|
507
|
+
direction: 'asc' | 'desc';
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
export interface InsightUpdateResponse {
|
|
512
|
+
id: string;
|
|
513
|
+
createdAt: string;
|
|
514
|
+
createdByUserId: string;
|
|
515
|
+
/**
|
|
516
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
517
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
518
|
+
* analytics property catalog.
|
|
519
|
+
*/
|
|
520
|
+
definition: InsightUpdateResponse.Definition;
|
|
521
|
+
/**
|
|
522
|
+
* Display name for the saved Insight.
|
|
523
|
+
*/
|
|
524
|
+
name: string;
|
|
525
|
+
/**
|
|
526
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
527
|
+
* 366 days.
|
|
528
|
+
*/
|
|
529
|
+
reportContext: InsightUpdateResponse.ReportContext;
|
|
530
|
+
revision: string;
|
|
531
|
+
updatedAt: string;
|
|
532
|
+
updatedByUserId: string;
|
|
533
|
+
/**
|
|
534
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
535
|
+
* view fields reset to their defaults.
|
|
536
|
+
*/
|
|
537
|
+
view: InsightUpdateResponse.View;
|
|
538
|
+
/**
|
|
539
|
+
* Optional description; null clears it.
|
|
540
|
+
*/
|
|
541
|
+
description?: string | null;
|
|
542
|
+
}
|
|
543
|
+
export declare namespace InsightUpdateResponse {
|
|
544
|
+
/**
|
|
545
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
546
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
547
|
+
* analytics property catalog.
|
|
548
|
+
*/
|
|
549
|
+
interface Definition {
|
|
550
|
+
interval: 'day' | 'week' | 'month';
|
|
551
|
+
kind: 'insight';
|
|
552
|
+
metrics: Array<Definition.Metric>;
|
|
553
|
+
version: 1;
|
|
554
|
+
filter?: Definition.Filter;
|
|
555
|
+
}
|
|
556
|
+
namespace Definition {
|
|
557
|
+
interface Metric {
|
|
558
|
+
id: string;
|
|
559
|
+
aggregation: 'event_count' | 'unique_visitors' | 'sum' | 'average';
|
|
560
|
+
eventNames: Array<string>;
|
|
561
|
+
name: string;
|
|
562
|
+
filter?: Metric.Filter;
|
|
563
|
+
property?: Metric.Property;
|
|
564
|
+
}
|
|
565
|
+
namespace Metric {
|
|
566
|
+
interface Filter {
|
|
567
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
568
|
+
version: 1;
|
|
569
|
+
}
|
|
570
|
+
namespace Filter {
|
|
571
|
+
interface UnionMember0 {
|
|
572
|
+
children: Array<unknown>;
|
|
573
|
+
kind: 'and' | 'or';
|
|
574
|
+
}
|
|
575
|
+
interface UnionMember1 {
|
|
576
|
+
child: unknown;
|
|
577
|
+
kind: 'not';
|
|
578
|
+
}
|
|
579
|
+
interface UnionMember2 {
|
|
580
|
+
kind: 'predicate';
|
|
581
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
582
|
+
property: string;
|
|
583
|
+
path?: Array<string>;
|
|
584
|
+
type?: 'string' | 'number' | 'boolean';
|
|
585
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
interface Property {
|
|
589
|
+
path: Array<string>;
|
|
590
|
+
property: 'event.properties';
|
|
591
|
+
type?: 'number';
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
interface Filter {
|
|
595
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
596
|
+
version: 1;
|
|
597
|
+
}
|
|
598
|
+
namespace Filter {
|
|
599
|
+
interface UnionMember0 {
|
|
600
|
+
children: Array<unknown>;
|
|
601
|
+
kind: 'and' | 'or';
|
|
602
|
+
}
|
|
603
|
+
interface UnionMember1 {
|
|
604
|
+
child: unknown;
|
|
605
|
+
kind: 'not';
|
|
606
|
+
}
|
|
607
|
+
interface UnionMember2 {
|
|
608
|
+
kind: 'predicate';
|
|
609
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
610
|
+
property: string;
|
|
611
|
+
path?: Array<string>;
|
|
612
|
+
type?: 'string' | 'number' | 'boolean';
|
|
613
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
619
|
+
* 366 days.
|
|
620
|
+
*/
|
|
621
|
+
interface ReportContext {
|
|
622
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
623
|
+
}
|
|
624
|
+
namespace ReportContext {
|
|
625
|
+
interface UnionMember0 {
|
|
626
|
+
from: string;
|
|
627
|
+
to: string;
|
|
628
|
+
timeZone?: 'UTC';
|
|
629
|
+
}
|
|
630
|
+
interface UnionMember1 {
|
|
631
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
632
|
+
timeZone?: 'UTC';
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
637
|
+
* view fields reset to their defaults.
|
|
638
|
+
*/
|
|
639
|
+
interface View {
|
|
640
|
+
cumulative?: boolean;
|
|
641
|
+
series?: Array<View.Series>;
|
|
642
|
+
smoothing?: 'none' | 'rolling_average';
|
|
643
|
+
smoothingWindow?: number;
|
|
644
|
+
stacked?: boolean;
|
|
645
|
+
tableSort?: View.TableSort;
|
|
646
|
+
visualization?: 'line' | 'column' | 'bar' | 'pie' | 'table' | 'metric';
|
|
647
|
+
yAxisScale?: 'linear' | 'log';
|
|
648
|
+
}
|
|
649
|
+
namespace View {
|
|
650
|
+
interface Series {
|
|
651
|
+
metricId: string;
|
|
652
|
+
color?: string;
|
|
653
|
+
hidden?: boolean;
|
|
654
|
+
}
|
|
655
|
+
interface TableSort {
|
|
656
|
+
column: 'label' | 'range_value' | 'average';
|
|
657
|
+
direction: 'asc' | 'desc';
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
export interface InsightDeleteResponse {
|
|
662
|
+
id: string;
|
|
663
|
+
deleted: true;
|
|
664
|
+
deletedRevision: string;
|
|
665
|
+
}
|
|
666
|
+
export interface InsightCapabilitiesResponse {
|
|
667
|
+
definitionVersion: 1;
|
|
668
|
+
maxDateRangeDays: 366;
|
|
669
|
+
maxEventNamesPerMetric: 10;
|
|
670
|
+
maxMetrics: 10;
|
|
671
|
+
maxSmoothingWindow: 30;
|
|
672
|
+
minSmoothingWindow: 2;
|
|
673
|
+
supportedAggregations: Array<'event_count' | 'unique_visitors' | 'sum' | 'average'>;
|
|
674
|
+
supportedAxisScales: Array<'linear' | 'log'>;
|
|
675
|
+
supportedComparisons: Array<'previous_period' | 'previous_year' | 'custom'>;
|
|
676
|
+
supportedCumulativeAggregations: Array<'event_count' | 'unique_visitors' | 'sum' | 'average'>;
|
|
677
|
+
supportedDatePresets: Array<'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date'>;
|
|
678
|
+
supportedIntervals: Array<'day' | 'week' | 'month'>;
|
|
679
|
+
supportedSmoothing: Array<'none' | 'rolling_average'>;
|
|
680
|
+
supportedVisualizations: Array<'line' | 'column' | 'bar' | 'pie' | 'table' | 'metric'>;
|
|
681
|
+
supportsBreakdowns: false;
|
|
682
|
+
supportsComparisons: true;
|
|
683
|
+
supportsMetricFilter: true;
|
|
684
|
+
supportsNonUtcTimeZones: false;
|
|
685
|
+
supportsNumericProperty: true;
|
|
686
|
+
supportsReportFilter: true;
|
|
687
|
+
}
|
|
688
|
+
export interface InsightResultsResponse {
|
|
689
|
+
engine: 'clickhouse';
|
|
690
|
+
/**
|
|
691
|
+
* Saved report identifier; null for previews.
|
|
692
|
+
*/
|
|
693
|
+
reportId: string | null;
|
|
694
|
+
/**
|
|
695
|
+
* Saved report revision; null for previews.
|
|
696
|
+
*/
|
|
697
|
+
revision: string | null;
|
|
698
|
+
scope: InsightResultsResponse.Scope;
|
|
699
|
+
semanticVersion: 1;
|
|
700
|
+
series: Array<InsightResultsResponse.Series>;
|
|
701
|
+
sourceLimitations: Array<string>;
|
|
702
|
+
sourcePolicy: string;
|
|
703
|
+
sourceRevision?: string | null;
|
|
704
|
+
}
|
|
705
|
+
export declare namespace InsightResultsResponse {
|
|
706
|
+
interface Scope {
|
|
707
|
+
cumulative: boolean;
|
|
708
|
+
executedAt: string;
|
|
709
|
+
from: string;
|
|
710
|
+
interval: 'day' | 'week' | 'month';
|
|
711
|
+
sourceCompleteness: 'unknown';
|
|
712
|
+
timeZone: 'UTC';
|
|
713
|
+
to: string;
|
|
714
|
+
comparison?: Scope.Comparison | null;
|
|
715
|
+
}
|
|
716
|
+
namespace Scope {
|
|
717
|
+
interface Comparison {
|
|
718
|
+
from: string;
|
|
719
|
+
kind: 'previous_period' | 'previous_year' | 'custom';
|
|
720
|
+
to: string;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
interface Series {
|
|
724
|
+
aggregation: 'event_count' | 'unique_visitors' | 'sum' | 'average';
|
|
725
|
+
breakdownValues: Array<Series.BreakdownValue>;
|
|
726
|
+
comparison: 'previous_period' | 'previous_year' | 'custom' | null;
|
|
727
|
+
key: string;
|
|
728
|
+
label: string;
|
|
729
|
+
metricId: string;
|
|
730
|
+
points: Array<Series.Point>;
|
|
731
|
+
rangeValue: number | null;
|
|
732
|
+
}
|
|
733
|
+
namespace Series {
|
|
734
|
+
interface BreakdownValue {
|
|
735
|
+
property: string;
|
|
736
|
+
value: string | null;
|
|
737
|
+
}
|
|
738
|
+
interface Point {
|
|
739
|
+
bucketEnd: string;
|
|
740
|
+
bucketStart: string;
|
|
741
|
+
cumulative: number | null;
|
|
742
|
+
isPartial: boolean;
|
|
743
|
+
raw: number | null;
|
|
744
|
+
smoothed: number | null;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
export interface InsightPreviewResponse {
|
|
749
|
+
engine: 'clickhouse';
|
|
750
|
+
/**
|
|
751
|
+
* Saved report identifier; null for previews.
|
|
752
|
+
*/
|
|
753
|
+
reportId: string | null;
|
|
754
|
+
/**
|
|
755
|
+
* Saved report revision; null for previews.
|
|
756
|
+
*/
|
|
757
|
+
revision: string | null;
|
|
758
|
+
scope: InsightPreviewResponse.Scope;
|
|
759
|
+
semanticVersion: 1;
|
|
760
|
+
series: Array<InsightPreviewResponse.Series>;
|
|
761
|
+
sourceLimitations: Array<string>;
|
|
762
|
+
sourcePolicy: string;
|
|
763
|
+
sourceRevision?: string | null;
|
|
764
|
+
}
|
|
765
|
+
export declare namespace InsightPreviewResponse {
|
|
766
|
+
interface Scope {
|
|
767
|
+
cumulative: boolean;
|
|
768
|
+
executedAt: string;
|
|
769
|
+
from: string;
|
|
770
|
+
interval: 'day' | 'week' | 'month';
|
|
771
|
+
sourceCompleteness: 'unknown';
|
|
772
|
+
timeZone: 'UTC';
|
|
773
|
+
to: string;
|
|
774
|
+
comparison?: Scope.Comparison | null;
|
|
775
|
+
}
|
|
776
|
+
namespace Scope {
|
|
777
|
+
interface Comparison {
|
|
778
|
+
from: string;
|
|
779
|
+
kind: 'previous_period' | 'previous_year' | 'custom';
|
|
780
|
+
to: string;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
interface Series {
|
|
784
|
+
aggregation: 'event_count' | 'unique_visitors' | 'sum' | 'average';
|
|
785
|
+
breakdownValues: Array<Series.BreakdownValue>;
|
|
786
|
+
comparison: 'previous_period' | 'previous_year' | 'custom' | null;
|
|
787
|
+
key: string;
|
|
788
|
+
label: string;
|
|
789
|
+
metricId: string;
|
|
790
|
+
points: Array<Series.Point>;
|
|
791
|
+
rangeValue: number | null;
|
|
792
|
+
}
|
|
793
|
+
namespace Series {
|
|
794
|
+
interface BreakdownValue {
|
|
795
|
+
property: string;
|
|
796
|
+
value: string | null;
|
|
797
|
+
}
|
|
798
|
+
interface Point {
|
|
799
|
+
bucketEnd: string;
|
|
800
|
+
bucketStart: string;
|
|
801
|
+
cumulative: number | null;
|
|
802
|
+
isPartial: boolean;
|
|
803
|
+
raw: number | null;
|
|
804
|
+
smoothed: number | null;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
export interface InsightListParams extends CursorParams {
|
|
809
|
+
/**
|
|
810
|
+
* Case-insensitive search in the name and description.
|
|
811
|
+
*/
|
|
812
|
+
search?: string;
|
|
813
|
+
}
|
|
814
|
+
export interface InsightCreateParams {
|
|
815
|
+
/**
|
|
816
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
817
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
818
|
+
* analytics property catalog.
|
|
819
|
+
*/
|
|
820
|
+
definition: InsightCreateParams.Definition;
|
|
821
|
+
/**
|
|
822
|
+
* Display name for the saved Insight.
|
|
823
|
+
*/
|
|
824
|
+
name: string;
|
|
825
|
+
/**
|
|
826
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
827
|
+
* 366 days.
|
|
828
|
+
*/
|
|
829
|
+
reportContext: InsightCreateParams.ReportContext;
|
|
830
|
+
/**
|
|
831
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
832
|
+
* view fields reset to their defaults.
|
|
833
|
+
*/
|
|
834
|
+
view: InsightCreateParams.View;
|
|
835
|
+
/**
|
|
836
|
+
* Optional description; null clears it.
|
|
837
|
+
*/
|
|
838
|
+
description?: string | null;
|
|
839
|
+
}
|
|
840
|
+
export declare namespace InsightCreateParams {
|
|
841
|
+
/**
|
|
842
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
843
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
844
|
+
* analytics property catalog.
|
|
845
|
+
*/
|
|
846
|
+
interface Definition {
|
|
847
|
+
interval: 'day' | 'week' | 'month';
|
|
848
|
+
kind: 'insight';
|
|
849
|
+
metrics: Array<Definition.Metric>;
|
|
850
|
+
version: 1;
|
|
851
|
+
filter?: Definition.Filter;
|
|
852
|
+
}
|
|
853
|
+
namespace Definition {
|
|
854
|
+
interface Metric {
|
|
855
|
+
id: string;
|
|
856
|
+
aggregation: 'event_count' | 'unique_visitors' | 'sum' | 'average';
|
|
857
|
+
eventNames: Array<string>;
|
|
858
|
+
name: string;
|
|
859
|
+
filter?: Metric.Filter;
|
|
860
|
+
property?: Metric.Property;
|
|
861
|
+
}
|
|
862
|
+
namespace Metric {
|
|
863
|
+
interface Filter {
|
|
864
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
865
|
+
version: 1;
|
|
866
|
+
}
|
|
867
|
+
namespace Filter {
|
|
868
|
+
interface UnionMember0 {
|
|
869
|
+
children: Array<unknown>;
|
|
870
|
+
kind: 'and' | 'or';
|
|
871
|
+
}
|
|
872
|
+
interface UnionMember1 {
|
|
873
|
+
child: unknown;
|
|
874
|
+
kind: 'not';
|
|
875
|
+
}
|
|
876
|
+
interface UnionMember2 {
|
|
877
|
+
kind: 'predicate';
|
|
878
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
879
|
+
property: string;
|
|
880
|
+
path?: Array<string>;
|
|
881
|
+
type?: 'string' | 'number' | 'boolean';
|
|
882
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
interface Property {
|
|
886
|
+
path: Array<string>;
|
|
887
|
+
property: 'event.properties';
|
|
888
|
+
type?: 'number';
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
interface Filter {
|
|
892
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
893
|
+
version: 1;
|
|
894
|
+
}
|
|
895
|
+
namespace Filter {
|
|
896
|
+
interface UnionMember0 {
|
|
897
|
+
children: Array<unknown>;
|
|
898
|
+
kind: 'and' | 'or';
|
|
899
|
+
}
|
|
900
|
+
interface UnionMember1 {
|
|
901
|
+
child: unknown;
|
|
902
|
+
kind: 'not';
|
|
903
|
+
}
|
|
904
|
+
interface UnionMember2 {
|
|
905
|
+
kind: 'predicate';
|
|
906
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
907
|
+
property: string;
|
|
908
|
+
path?: Array<string>;
|
|
909
|
+
type?: 'string' | 'number' | 'boolean';
|
|
910
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
916
|
+
* 366 days.
|
|
917
|
+
*/
|
|
918
|
+
interface ReportContext {
|
|
919
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
920
|
+
}
|
|
921
|
+
namespace ReportContext {
|
|
922
|
+
interface UnionMember0 {
|
|
923
|
+
from: string;
|
|
924
|
+
to: string;
|
|
925
|
+
timeZone?: 'UTC';
|
|
926
|
+
}
|
|
927
|
+
interface UnionMember1 {
|
|
928
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
929
|
+
timeZone?: 'UTC';
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
934
|
+
* view fields reset to their defaults.
|
|
935
|
+
*/
|
|
936
|
+
interface View {
|
|
937
|
+
cumulative?: boolean;
|
|
938
|
+
series?: Array<View.Series>;
|
|
939
|
+
smoothing?: 'none' | 'rolling_average';
|
|
940
|
+
smoothingWindow?: number;
|
|
941
|
+
stacked?: boolean;
|
|
942
|
+
tableSort?: View.TableSort;
|
|
943
|
+
visualization?: 'line' | 'column' | 'bar' | 'pie' | 'table' | 'metric';
|
|
944
|
+
yAxisScale?: 'linear' | 'log';
|
|
945
|
+
}
|
|
946
|
+
namespace View {
|
|
947
|
+
interface Series {
|
|
948
|
+
metricId: string;
|
|
949
|
+
color?: string;
|
|
950
|
+
hidden?: boolean;
|
|
951
|
+
}
|
|
952
|
+
interface TableSort {
|
|
953
|
+
column: 'label' | 'range_value' | 'average';
|
|
954
|
+
direction: 'asc' | 'desc';
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
export interface InsightUpdateParams {
|
|
959
|
+
/**
|
|
960
|
+
* Revision returned by get/list or the last write. A stale revision returns 409;
|
|
961
|
+
* reload before retrying.
|
|
962
|
+
*/
|
|
963
|
+
expectedRevision: string;
|
|
964
|
+
/**
|
|
965
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
966
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
967
|
+
* analytics property catalog.
|
|
968
|
+
*/
|
|
969
|
+
definition?: InsightUpdateParams.Definition;
|
|
970
|
+
/**
|
|
971
|
+
* Optional description; null clears it.
|
|
972
|
+
*/
|
|
973
|
+
description?: string | null;
|
|
974
|
+
/**
|
|
975
|
+
* Display name for the saved Insight.
|
|
976
|
+
*/
|
|
977
|
+
name?: string;
|
|
978
|
+
/**
|
|
979
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
980
|
+
* 366 days.
|
|
981
|
+
*/
|
|
982
|
+
reportContext?: InsightUpdateParams.ReportContext;
|
|
983
|
+
/**
|
|
984
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
985
|
+
* view fields reset to their defaults.
|
|
986
|
+
*/
|
|
987
|
+
view?: InsightUpdateParams.View;
|
|
988
|
+
}
|
|
989
|
+
export declare namespace InsightUpdateParams {
|
|
990
|
+
/**
|
|
991
|
+
* Version 1 Insight definition: one to ten metrics and a day, week, or month
|
|
992
|
+
* interval. Sum and average require a numeric event property. Filters use the
|
|
993
|
+
* analytics property catalog.
|
|
994
|
+
*/
|
|
995
|
+
interface Definition {
|
|
996
|
+
interval: 'day' | 'week' | 'month';
|
|
997
|
+
kind: 'insight';
|
|
998
|
+
metrics: Array<Definition.Metric>;
|
|
999
|
+
version: 1;
|
|
1000
|
+
filter?: Definition.Filter;
|
|
1001
|
+
}
|
|
1002
|
+
namespace Definition {
|
|
1003
|
+
interface Metric {
|
|
1004
|
+
id: string;
|
|
1005
|
+
aggregation: 'event_count' | 'unique_visitors' | 'sum' | 'average';
|
|
1006
|
+
eventNames: Array<string>;
|
|
1007
|
+
name: string;
|
|
1008
|
+
filter?: Metric.Filter;
|
|
1009
|
+
property?: Metric.Property;
|
|
1010
|
+
}
|
|
1011
|
+
namespace Metric {
|
|
1012
|
+
interface Filter {
|
|
1013
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
1014
|
+
version: 1;
|
|
1015
|
+
}
|
|
1016
|
+
namespace Filter {
|
|
1017
|
+
interface UnionMember0 {
|
|
1018
|
+
children: Array<unknown>;
|
|
1019
|
+
kind: 'and' | 'or';
|
|
1020
|
+
}
|
|
1021
|
+
interface UnionMember1 {
|
|
1022
|
+
child: unknown;
|
|
1023
|
+
kind: 'not';
|
|
1024
|
+
}
|
|
1025
|
+
interface UnionMember2 {
|
|
1026
|
+
kind: 'predicate';
|
|
1027
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
1028
|
+
property: string;
|
|
1029
|
+
path?: Array<string>;
|
|
1030
|
+
type?: 'string' | 'number' | 'boolean';
|
|
1031
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
interface Property {
|
|
1035
|
+
path: Array<string>;
|
|
1036
|
+
property: 'event.properties';
|
|
1037
|
+
type?: 'number';
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
interface Filter {
|
|
1041
|
+
filter: Filter.UnionMember0 | Filter.UnionMember1 | Filter.UnionMember2;
|
|
1042
|
+
version: 1;
|
|
1043
|
+
}
|
|
1044
|
+
namespace Filter {
|
|
1045
|
+
interface UnionMember0 {
|
|
1046
|
+
children: Array<unknown>;
|
|
1047
|
+
kind: 'and' | 'or';
|
|
1048
|
+
}
|
|
1049
|
+
interface UnionMember1 {
|
|
1050
|
+
child: unknown;
|
|
1051
|
+
kind: 'not';
|
|
1052
|
+
}
|
|
1053
|
+
interface UnionMember2 {
|
|
1054
|
+
kind: 'predicate';
|
|
1055
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'contains_ci' | 'not_contains_ci' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'missing' | 'is_null';
|
|
1056
|
+
property: string;
|
|
1057
|
+
path?: Array<string>;
|
|
1058
|
+
type?: 'string' | 'number' | 'boolean';
|
|
1059
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* UTC date range using either a preset or inclusive from/to calendar dates, up to
|
|
1065
|
+
* 366 days.
|
|
1066
|
+
*/
|
|
1067
|
+
interface ReportContext {
|
|
1068
|
+
dateRange: ReportContext.UnionMember0 | ReportContext.UnionMember1;
|
|
1069
|
+
}
|
|
1070
|
+
namespace ReportContext {
|
|
1071
|
+
interface UnionMember0 {
|
|
1072
|
+
from: string;
|
|
1073
|
+
to: string;
|
|
1074
|
+
timeZone?: 'UTC';
|
|
1075
|
+
}
|
|
1076
|
+
interface UnionMember1 {
|
|
1077
|
+
preset: 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_12_months' | 'week_to_date' | 'month_to_date' | 'year_to_date';
|
|
1078
|
+
timeZone?: 'UTC';
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Complete chart settings. Replaces the saved view when supplied on PATCH; omitted
|
|
1083
|
+
* view fields reset to their defaults.
|
|
1084
|
+
*/
|
|
1085
|
+
interface View {
|
|
1086
|
+
cumulative?: boolean;
|
|
1087
|
+
series?: Array<View.Series>;
|
|
1088
|
+
smoothing?: 'none' | 'rolling_average';
|
|
1089
|
+
smoothingWindow?: number;
|
|
1090
|
+
stacked?: boolean;
|
|
1091
|
+
tableSort?: View.TableSort;
|
|
1092
|
+
visualization?: 'line' | 'column' | 'bar' | 'pie' | 'table' | 'metric';
|
|
1093
|
+
yAxisScale?: 'linear' | 'log';
|
|
1094
|
+
}
|
|
1095
|
+
namespace View {
|
|
1096
|
+
interface Series {
|
|
1097
|
+
metricId: string;
|
|
1098
|
+
color?: string;
|
|
1099
|
+
hidden?: boolean;
|
|
1100
|
+
}
|
|
1101
|
+
interface TableSort {
|
|
1102
|
+
column: 'label' | 'range_value' | 'average';
|
|
1103
|
+
direction: 'asc' | 'desc';
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
export interface InsightDeleteParams {
|
|
1108
|
+
/**
|
|
1109
|
+
* Revision returned by get/list or the last write. A stale revision returns 409;
|
|
1110
|
+
* reload before retrying.
|
|
1111
|
+
*/
|
|
1112
|
+
expectedRevision: string;
|
|
1113
|
+
}
|
|
1114
|
+
export interface InsightResultsParams {
|
|
1115
|
+
/**
|
|
1116
|
+
* Revision returned by get/list or the last write. A stale revision returns 409;
|
|
1117
|
+
* reload before retrying.
|
|
1118
|
+
*/
|
|
1119
|
+
expectedRevision: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* Compare with the previous period, previous year, or a custom starting date.
|
|
1122
|
+
* JSON-encoded in the REST query string; never saved.
|
|
1123
|
+
*/
|
|
1124
|
+
comparison?: string;
|
|
1125
|
+
/**
|
|
1126
|
+
* Omit or send null to use the saved cumulative setting; true or false overrides
|
|
1127
|
+
* it for this query.
|
|
1128
|
+
*/
|
|
1129
|
+
cumulativeOverride?: boolean | null;
|
|
1130
|
+
/**
|
|
1131
|
+
* Complete date range override for this query. JSON-encoded in the REST query
|
|
1132
|
+
* string; does not change the saved report.
|
|
1133
|
+
*/
|
|
1134
|
+
reportContextOverride?: string;
|
|
1135
|
+
/**
|
|
1136
|
+
* Omit to use saved smoothing, send null to disable it, or supply a window of 2–30
|
|
1137
|
+
* buckets.
|
|
1138
|
+
*/
|
|
1139
|
+
smoothingWindowOverride?: number | null;
|
|
1140
|
+
}
|
|
1141
|
+
export interface InsightPreviewParams {
|
|
1142
|
+
/**
|
|
1143
|
+
* Object with required definition and reportContext, plus optional
|
|
1144
|
+
* smoothingWindow, cumulative, and comparison. Chart view settings belong to saved
|
|
1145
|
+
* reports. JSON-encode input in the REST query string; maximum 16384 bytes.
|
|
1146
|
+
*/
|
|
1147
|
+
input: string;
|
|
1148
|
+
}
|
|
1149
|
+
export declare namespace Insights {
|
|
1150
|
+
export { type InsightListResponse as InsightListResponse, type InsightCreateResponse as InsightCreateResponse, type InsightRetrieveResponse as InsightRetrieveResponse, type InsightUpdateResponse as InsightUpdateResponse, type InsightDeleteResponse as InsightDeleteResponse, type InsightCapabilitiesResponse as InsightCapabilitiesResponse, type InsightResultsResponse as InsightResultsResponse, type InsightPreviewResponse as InsightPreviewResponse, type InsightListResponsesCursor as InsightListResponsesCursor, type InsightListParams as InsightListParams, type InsightCreateParams as InsightCreateParams, type InsightUpdateParams as InsightUpdateParams, type InsightDeleteParams as InsightDeleteParams, type InsightResultsParams as InsightResultsParams, type InsightPreviewParams as InsightPreviewParams, };
|
|
1151
|
+
}
|
|
1152
|
+
//# sourceMappingURL=insights.d.mts.map
|