@oursprivacy/platform-sdk 1.67.0 → 1.69.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 +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/analytics.d.mts +10 -0
- package/resources/analytics.d.mts.map +1 -1
- package/resources/analytics.d.ts +10 -0
- package/resources/analytics.d.ts.map +1 -1
- package/resources/dashboards.d.mts +696 -34
- package/resources/dashboards.d.mts.map +1 -1
- package/resources/dashboards.d.ts +696 -34
- package/resources/dashboards.d.ts.map +1 -1
- package/resources/destinations.d.mts +7 -7
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +7 -7
- package/resources/destinations.d.ts.map +1 -1
- package/resources/funnels.d.mts +255 -9
- package/resources/funnels.d.mts.map +1 -1
- package/resources/funnels.d.ts +255 -9
- package/resources/funnels.d.ts.map +1 -1
- package/resources/funnels.js +10 -7
- package/resources/funnels.js.map +1 -1
- package/resources/funnels.mjs +10 -7
- 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/insights.d.mts +178 -57
- package/resources/insights.d.mts.map +1 -1
- package/resources/insights.d.ts +178 -57
- package/resources/insights.d.ts.map +1 -1
- package/resources/insights.js +9 -7
- package/resources/insights.js.map +1 -1
- package/resources/insights.mjs +9 -7
- package/resources/insights.mjs.map +1 -1
- package/resources/journey-flows.d.mts +242 -18
- package/resources/journey-flows.d.mts.map +1 -1
- package/resources/journey-flows.d.ts +242 -18
- package/resources/journey-flows.d.ts.map +1 -1
- package/resources/journey-flows.js +18 -12
- package/resources/journey-flows.js.map +1 -1
- package/resources/journey-flows.mjs +18 -12
- package/resources/journey-flows.mjs.map +1 -1
- package/resources/query-events.d.mts +324 -0
- package/resources/query-events.d.mts.map +1 -0
- package/resources/query-events.d.ts +324 -0
- package/resources/query-events.d.ts.map +1 -0
- package/resources/query-events.js +64 -0
- package/resources/query-events.js.map +1 -0
- package/resources/query-events.mjs +60 -0
- package/resources/query-events.mjs.map +1 -0
- package/resources/query-visitors.d.mts +127 -0
- package/resources/query-visitors.d.mts.map +1 -0
- package/resources/query-visitors.d.ts +127 -0
- package/resources/query-visitors.d.ts.map +1 -0
- package/resources/query-visitors.js +35 -0
- package/resources/query-visitors.js.map +1 -0
- package/resources/query-visitors.mjs +31 -0
- package/resources/query-visitors.mjs.map +1 -0
- package/resources/report-branding.d.mts +112 -28
- package/resources/report-branding.d.mts.map +1 -1
- package/resources/report-branding.d.ts +112 -28
- package/resources/report-branding.d.ts.map +1 -1
- package/resources/report-branding.js +29 -15
- package/resources/report-branding.js.map +1 -1
- package/resources/report-branding.mjs +29 -15
- package/resources/report-branding.mjs.map +1 -1
- package/resources/sources.d.mts +6 -6
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts +6 -6
- package/resources/sources.d.ts.map +1 -1
- package/resources/test-events.d.mts +28 -0
- package/resources/test-events.d.mts.map +1 -1
- package/resources/test-events.d.ts +28 -0
- package/resources/test-events.d.ts.map +1 -1
- package/resources/web-analytics.d.mts +25 -1
- package/resources/web-analytics.d.mts.map +1 -1
- package/resources/web-analytics.d.ts +25 -1
- package/resources/web-analytics.d.ts.map +1 -1
- package/src/client.ts +54 -0
- package/src/resources/analytics.ts +12 -0
- package/src/resources/dashboards.ts +939 -47
- package/src/resources/destinations.ts +23 -2
- package/src/resources/funnels.ts +334 -9
- package/src/resources/index.ts +24 -0
- package/src/resources/insights.ts +224 -57
- package/src/resources/journey-flows.ts +300 -22
- package/src/resources/query-events.ts +459 -0
- package/src/resources/query-visitors.ts +190 -0
- package/src/resources/report-branding.ts +132 -27
- package/src/resources/sources.ts +12 -0
- package/src/resources/test-events.ts +33 -0
- package/src/resources/web-analytics.ts +41 -1
- 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,459 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class QueryEvents extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* List matching event occurrences. JSON-encode input in the query string.
|
|
10
|
+
* includeCount defaults to false. Requests that include raw event or visitor
|
|
11
|
+
* properties also require event-detail permission, checked by the resolver; a
|
|
12
|
+
* missing permission is masked as 404 Not Found. Requires API-key scope or current
|
|
13
|
+
* OAuth user permission: report:list-events
|
|
14
|
+
*/
|
|
15
|
+
list(query: QueryEventListParams, options?: RequestOptions): APIPromise<QueryEventListResponse> {
|
|
16
|
+
return this._client.get('/rest/v1/query-events', { query, ...options });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Return Query Events date, page, selection, projection, and export limits.
|
|
21
|
+
* Requires API-key scope or current OAuth user permission: report:list-events
|
|
22
|
+
*/
|
|
23
|
+
capabilities(options?: RequestOptions): APIPromise<QueryEventCapabilitiesResponse> {
|
|
24
|
+
return this._client.get('/rest/v1/query-events/capabilities', options);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* List the filter fields and operators supported by Query Events. Requires API-key
|
|
29
|
+
* scope or current OAuth user permission: report:list-events
|
|
30
|
+
*/
|
|
31
|
+
catalog(options?: RequestOptions): APIPromise<QueryEventCatalogResponse> {
|
|
32
|
+
return this._client.get('/rest/v1/query-events/query-catalog', options);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Suggest observed event and visitor property paths. Optionally scope by exact
|
|
37
|
+
* event name or source id. Requires API-key scope or current OAuth user
|
|
38
|
+
* permission: report:list-events
|
|
39
|
+
*/
|
|
40
|
+
propertySuggestions(
|
|
41
|
+
query: QueryEventPropertySuggestionsParams | null | undefined = {},
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<QueryEventPropertySuggestionsResponse> {
|
|
44
|
+
return this._client.get('/rest/v1/query-events/property-suggestions', { query, ...options });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* List observed event names available to Query Events. Requires API-key scope or
|
|
49
|
+
* current OAuth user permission: report:list-events
|
|
50
|
+
*/
|
|
51
|
+
eventNames(options?: RequestOptions): APIPromise<QueryEventEventNamesResponse> {
|
|
52
|
+
return this._client.get('/rest/v1/query-events/event-names', options);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Find one event occurrence using the same JSON-encoded input and cursor returned
|
|
57
|
+
* by a Query Events list. Requires API-key scope or current OAuth user permission:
|
|
58
|
+
* report:list-events, report:view-event
|
|
59
|
+
*/
|
|
60
|
+
occurrence(
|
|
61
|
+
query: QueryEventOccurrenceParams,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): APIPromise<QueryEventOccurrenceResponse | null> {
|
|
64
|
+
return this._client.get('/rest/v1/query-events/occurrence', { query, ...options });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Export matching events as CSV or JSON, up to the supported row limit.
|
|
69
|
+
* JSON-encode input in the query string. Requires API-key scope or current OAuth
|
|
70
|
+
* user permission: report:list-events, report:view-event
|
|
71
|
+
*/
|
|
72
|
+
export(query: QueryEventExportParams, options?: RequestOptions): APIPromise<QueryEventExportResponse> {
|
|
73
|
+
return this._client.get('/rest/v1/query-events/export', { query, ...options });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface QueryEventListResponse {
|
|
78
|
+
freshness: QueryEventListResponse.Freshness;
|
|
79
|
+
|
|
80
|
+
matchedCount: number | null;
|
|
81
|
+
|
|
82
|
+
pagination: QueryEventListResponse.Pagination;
|
|
83
|
+
|
|
84
|
+
rows: Array<QueryEventListResponse.Row>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export namespace QueryEventListResponse {
|
|
88
|
+
export interface Freshness {
|
|
89
|
+
coverageStatus: 'UNKNOWN';
|
|
90
|
+
|
|
91
|
+
coverageWatermark: string | null;
|
|
92
|
+
|
|
93
|
+
syncCompletedAt?: string | null;
|
|
94
|
+
|
|
95
|
+
syncCursor?: string | null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface Pagination {
|
|
99
|
+
hasMore: boolean;
|
|
100
|
+
|
|
101
|
+
nextCursor: string | null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface Row {
|
|
105
|
+
columns: Array<Row.Column>;
|
|
106
|
+
|
|
107
|
+
cursor: string;
|
|
108
|
+
|
|
109
|
+
distinctId: string;
|
|
110
|
+
|
|
111
|
+
email: string | null;
|
|
112
|
+
|
|
113
|
+
eventName: string;
|
|
114
|
+
|
|
115
|
+
eventProperties: { [key: string]: unknown };
|
|
116
|
+
|
|
117
|
+
isBot: boolean;
|
|
118
|
+
|
|
119
|
+
isTestEvent: boolean;
|
|
120
|
+
|
|
121
|
+
pagePath: string | null;
|
|
122
|
+
|
|
123
|
+
sessionId: string | null;
|
|
124
|
+
|
|
125
|
+
sourceId: string;
|
|
126
|
+
|
|
127
|
+
sourceName: string;
|
|
128
|
+
|
|
129
|
+
sourceType: string;
|
|
130
|
+
|
|
131
|
+
timestamp: string;
|
|
132
|
+
|
|
133
|
+
visitorId: string;
|
|
134
|
+
|
|
135
|
+
visitorProperties: { [key: string]: unknown };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export namespace Row {
|
|
139
|
+
export interface Column {
|
|
140
|
+
path: Array<string> | null;
|
|
141
|
+
|
|
142
|
+
property: string;
|
|
143
|
+
|
|
144
|
+
type: 'STRING' | 'NUMBER' | 'BOOLEAN' | null;
|
|
145
|
+
|
|
146
|
+
value: string | null;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface QueryEventCapabilitiesResponse {
|
|
152
|
+
defaultPageSize: number;
|
|
153
|
+
|
|
154
|
+
maxColumns: 20;
|
|
155
|
+
|
|
156
|
+
maxDateRangeDays: 366;
|
|
157
|
+
|
|
158
|
+
maxExportRows: 100;
|
|
159
|
+
|
|
160
|
+
maxPageSize: 250;
|
|
161
|
+
|
|
162
|
+
maxSelections: 10;
|
|
163
|
+
|
|
164
|
+
supportsVerifiedCoverageWatermark: boolean;
|
|
165
|
+
|
|
166
|
+
version: 1;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface QueryEventCatalogResponse {
|
|
170
|
+
/**
|
|
171
|
+
* Fields available to analytics report filters.
|
|
172
|
+
*/
|
|
173
|
+
entries: Array<QueryEventCatalogResponse.Entry>;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Known limits of analytics filtering.
|
|
177
|
+
*/
|
|
178
|
+
limitations: Array<string>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Catalog format version.
|
|
182
|
+
*/
|
|
183
|
+
version: 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export namespace QueryEventCatalogResponse {
|
|
187
|
+
export interface Entry {
|
|
188
|
+
/**
|
|
189
|
+
* Catalog identifier for this filterable field.
|
|
190
|
+
*/
|
|
191
|
+
id: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Human-readable field name.
|
|
195
|
+
*/
|
|
196
|
+
label: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* How a filter treats events where the field is absent.
|
|
200
|
+
*/
|
|
201
|
+
missingBehavior: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Operators this field accepts in a filter condition.
|
|
205
|
+
*/
|
|
206
|
+
operators: Array<string>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Data source that supplies the field value.
|
|
210
|
+
*/
|
|
211
|
+
provider: string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Whether the field belongs to the event or to its session.
|
|
215
|
+
*/
|
|
216
|
+
scope: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* False when the field identifies a person, so reports can filter on it but not
|
|
220
|
+
* break down by it.
|
|
221
|
+
*/
|
|
222
|
+
supportsBreakdown: boolean;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Value type the filter compares against.
|
|
226
|
+
*/
|
|
227
|
+
type: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Value types allowed for a path-based field.
|
|
231
|
+
*/
|
|
232
|
+
allowedTypes?: Array<string> | null;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* True when a property path must be supplied, as for custom event properties.
|
|
236
|
+
*/
|
|
237
|
+
requiresPath?: boolean | null;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface QueryEventPropertySuggestionsResponse {
|
|
242
|
+
/**
|
|
243
|
+
* Property paths and value types observed in a sample of recent events.
|
|
244
|
+
*/
|
|
245
|
+
entities: Array<QueryEventPropertySuggestionsResponse.Entity>;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Start of the observation window the suggestions were drawn from.
|
|
249
|
+
*/
|
|
250
|
+
from: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* True when the suggestions come from a sample, so some paths may be missing.
|
|
254
|
+
*/
|
|
255
|
+
sampled: boolean;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* End of the observation window the suggestions were drawn from.
|
|
259
|
+
*/
|
|
260
|
+
to: string;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export namespace QueryEventPropertySuggestionsResponse {
|
|
264
|
+
export interface Entity {
|
|
265
|
+
/**
|
|
266
|
+
* Property path segments, outermost first.
|
|
267
|
+
*/
|
|
268
|
+
path: Array<string>;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Property bag the path belongs to.
|
|
272
|
+
*/
|
|
273
|
+
property: 'event.properties' | 'event.visitor_properties';
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* False when the path identifies a person, so reports can filter on it but not
|
|
277
|
+
* break down by it.
|
|
278
|
+
*/
|
|
279
|
+
supportsBreakdown: boolean;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Value type observed at this path.
|
|
283
|
+
*/
|
|
284
|
+
type: 'string' | 'number' | 'boolean';
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface QueryEventEventNamesResponse {
|
|
289
|
+
/**
|
|
290
|
+
* Distinct event names seen in the last 30 days, alphabetical. Not paginated: the
|
|
291
|
+
* list holds up to the 500 most frequent names.
|
|
292
|
+
*/
|
|
293
|
+
entities: Array<QueryEventEventNamesResponse.Entity>;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Start of the observation window the suggestions were drawn from.
|
|
297
|
+
*/
|
|
298
|
+
from: string;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* True when rare names may be missing from the list. Missing names still work when
|
|
302
|
+
* entered exactly.
|
|
303
|
+
*/
|
|
304
|
+
sampled: boolean;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* End of the observation window the suggestions were drawn from.
|
|
308
|
+
*/
|
|
309
|
+
to: string;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export namespace QueryEventEventNamesResponse {
|
|
313
|
+
export interface Entity {
|
|
314
|
+
/**
|
|
315
|
+
* Event name exactly as collected, including `$`-prefixed system events.
|
|
316
|
+
*/
|
|
317
|
+
name: string;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export interface QueryEventOccurrenceResponse {
|
|
322
|
+
columns: Array<QueryEventOccurrenceResponse.Column>;
|
|
323
|
+
|
|
324
|
+
cursor: string;
|
|
325
|
+
|
|
326
|
+
distinctId: string;
|
|
327
|
+
|
|
328
|
+
email: string | null;
|
|
329
|
+
|
|
330
|
+
eventName: string;
|
|
331
|
+
|
|
332
|
+
eventProperties: { [key: string]: unknown };
|
|
333
|
+
|
|
334
|
+
isBot: boolean;
|
|
335
|
+
|
|
336
|
+
isTestEvent: boolean;
|
|
337
|
+
|
|
338
|
+
pagePath: string | null;
|
|
339
|
+
|
|
340
|
+
sessionId: string | null;
|
|
341
|
+
|
|
342
|
+
sourceId: string;
|
|
343
|
+
|
|
344
|
+
sourceName: string;
|
|
345
|
+
|
|
346
|
+
sourceType: string;
|
|
347
|
+
|
|
348
|
+
timestamp: string;
|
|
349
|
+
|
|
350
|
+
visitorId: string;
|
|
351
|
+
|
|
352
|
+
visitorProperties: { [key: string]: unknown };
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export namespace QueryEventOccurrenceResponse {
|
|
356
|
+
export interface Column {
|
|
357
|
+
path: Array<string> | null;
|
|
358
|
+
|
|
359
|
+
property: string;
|
|
360
|
+
|
|
361
|
+
type: 'STRING' | 'NUMBER' | 'BOOLEAN' | null;
|
|
362
|
+
|
|
363
|
+
value: string | null;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export interface QueryEventExportResponse {
|
|
368
|
+
content: string;
|
|
369
|
+
|
|
370
|
+
format: 'CSV' | 'JSON';
|
|
371
|
+
|
|
372
|
+
pagination: QueryEventExportResponse.Pagination;
|
|
373
|
+
|
|
374
|
+
rowCount: number;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export namespace QueryEventExportResponse {
|
|
378
|
+
export interface Pagination {
|
|
379
|
+
hasMore: boolean;
|
|
380
|
+
|
|
381
|
+
nextCursor: string | null;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface QueryEventListParams {
|
|
386
|
+
/**
|
|
387
|
+
* Query Events filters and projection. JSON-encode input in the REST query string.
|
|
388
|
+
*/
|
|
389
|
+
input: string;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Cursor from the previous page.
|
|
393
|
+
*/
|
|
394
|
+
cursor?: string;
|
|
395
|
+
|
|
396
|
+
includeCount?: boolean;
|
|
397
|
+
|
|
398
|
+
limit?: number;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export interface QueryEventPropertySuggestionsParams {
|
|
402
|
+
/**
|
|
403
|
+
* Optional exact event name to scope the suggestions.
|
|
404
|
+
*/
|
|
405
|
+
eventName?: string;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Optional exact source identifier to scope the suggestions.
|
|
409
|
+
*/
|
|
410
|
+
sourceId?: string;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export interface QueryEventOccurrenceParams {
|
|
414
|
+
/**
|
|
415
|
+
* Cursor from the page containing this event.
|
|
416
|
+
*/
|
|
417
|
+
cursor: string;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* The same filters used to obtain the event cursor. JSON-encode input in the REST
|
|
421
|
+
* query string.
|
|
422
|
+
*/
|
|
423
|
+
input: string;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export interface QueryEventExportParams {
|
|
427
|
+
/**
|
|
428
|
+
* Export encoding.
|
|
429
|
+
*/
|
|
430
|
+
format: 'CSV' | 'JSON';
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Query Events filters and projection. JSON-encode input in the REST query string.
|
|
434
|
+
*/
|
|
435
|
+
input: string;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Start after this event cursor.
|
|
439
|
+
*/
|
|
440
|
+
cursor?: string;
|
|
441
|
+
|
|
442
|
+
limit?: number;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export declare namespace QueryEvents {
|
|
446
|
+
export {
|
|
447
|
+
type QueryEventListResponse as QueryEventListResponse,
|
|
448
|
+
type QueryEventCapabilitiesResponse as QueryEventCapabilitiesResponse,
|
|
449
|
+
type QueryEventCatalogResponse as QueryEventCatalogResponse,
|
|
450
|
+
type QueryEventPropertySuggestionsResponse as QueryEventPropertySuggestionsResponse,
|
|
451
|
+
type QueryEventEventNamesResponse as QueryEventEventNamesResponse,
|
|
452
|
+
type QueryEventOccurrenceResponse as QueryEventOccurrenceResponse,
|
|
453
|
+
type QueryEventExportResponse as QueryEventExportResponse,
|
|
454
|
+
type QueryEventListParams as QueryEventListParams,
|
|
455
|
+
type QueryEventPropertySuggestionsParams as QueryEventPropertySuggestionsParams,
|
|
456
|
+
type QueryEventOccurrenceParams as QueryEventOccurrenceParams,
|
|
457
|
+
type QueryEventExportParams as QueryEventExportParams,
|
|
458
|
+
};
|
|
459
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class QueryVisitors extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* List visitors with matching events and their permitted current-profile fields.
|
|
10
|
+
* JSON-encode input in the query string; cursors stay bound to the account and
|
|
11
|
+
* filters, while page size may change. Requires API-key scope or current OAuth
|
|
12
|
+
* user permission: web-analytics:view, report:list-events
|
|
13
|
+
*/
|
|
14
|
+
list(query: QueryVisitorListParams, options?: RequestOptions): APIPromise<QueryVisitorListResponse> {
|
|
15
|
+
return this._client.get('/rest/v1/query-visitors', { query, ...options });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Return Query Visitors date, page, selection, and touch-filter capabilities.
|
|
20
|
+
* Requires API-key scope or current OAuth user permission: web-analytics:view,
|
|
21
|
+
* report:list-events
|
|
22
|
+
*/
|
|
23
|
+
capabilities(options?: RequestOptions): APIPromise<QueryVisitorCapabilitiesResponse> {
|
|
24
|
+
return this._client.get('/rest/v1/query-visitors/capabilities', options);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Search current visitor profiles for the Query Visitors typeahead. Pass returned
|
|
29
|
+
* visitorIds to the list input to filter the result. Requires API-key scope or
|
|
30
|
+
* current OAuth user permission: web-analytics:view, report:list-events,
|
|
31
|
+
* report:view-visitor
|
|
32
|
+
*/
|
|
33
|
+
profileSearch(
|
|
34
|
+
query: QueryVisitorProfileSearchParams,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<QueryVisitorProfileSearchResponse> {
|
|
37
|
+
return this._client.get('/rest/v1/query-visitors/profile-search', { query, ...options });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface QueryVisitorListResponse {
|
|
42
|
+
freshness: QueryVisitorListResponse.Freshness;
|
|
43
|
+
|
|
44
|
+
matchedCount: number | null;
|
|
45
|
+
|
|
46
|
+
pagination: QueryVisitorListResponse.Pagination;
|
|
47
|
+
|
|
48
|
+
rows: Array<QueryVisitorListResponse.Row>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export namespace QueryVisitorListResponse {
|
|
52
|
+
export interface Freshness {
|
|
53
|
+
coverageStatus: 'UNKNOWN';
|
|
54
|
+
|
|
55
|
+
coverageWatermark: string | null;
|
|
56
|
+
|
|
57
|
+
syncCompletedAt?: string | null;
|
|
58
|
+
|
|
59
|
+
syncCursor?: string | null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface Pagination {
|
|
63
|
+
hasMore: boolean;
|
|
64
|
+
|
|
65
|
+
nextCursor: string | null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface Row {
|
|
69
|
+
match: Row.Match;
|
|
70
|
+
|
|
71
|
+
profile: Row.Profile;
|
|
72
|
+
|
|
73
|
+
visitorId: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export namespace Row {
|
|
77
|
+
export interface Match {
|
|
78
|
+
eventCount: number;
|
|
79
|
+
|
|
80
|
+
firstEventAt: string;
|
|
81
|
+
|
|
82
|
+
lastEventAt: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface Profile {
|
|
86
|
+
/**
|
|
87
|
+
* Current profile email, when available.
|
|
88
|
+
*/
|
|
89
|
+
email: string | null;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Current external ID, when available.
|
|
93
|
+
*/
|
|
94
|
+
externalId: string | null;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Current first name, when permitted and available.
|
|
98
|
+
*/
|
|
99
|
+
firstName: string | null;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* First activity recorded on the current profile.
|
|
103
|
+
*/
|
|
104
|
+
firstSeenAt: string | null;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Current last name, when permitted and available.
|
|
108
|
+
*/
|
|
109
|
+
lastName: string | null;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Most recent activity recorded on the current profile.
|
|
113
|
+
*/
|
|
114
|
+
lastSeenAt: string | null;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Current profile lookup status.
|
|
118
|
+
*/
|
|
119
|
+
status: 'FOUND' | 'NOT_FOUND' | 'UNAVAILABLE';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface QueryVisitorCapabilitiesResponse {
|
|
125
|
+
defaultPageSize: 25;
|
|
126
|
+
|
|
127
|
+
defaultTouchLookbackDays: number;
|
|
128
|
+
|
|
129
|
+
maxDateRangeDays: 31;
|
|
130
|
+
|
|
131
|
+
maxPageSize: 100;
|
|
132
|
+
|
|
133
|
+
maxSelections: 10;
|
|
134
|
+
|
|
135
|
+
supportsVerifiedCoverageWatermark: boolean;
|
|
136
|
+
|
|
137
|
+
touchEnabled: boolean;
|
|
138
|
+
|
|
139
|
+
touchLookbackDays: Array<number>;
|
|
140
|
+
|
|
141
|
+
version: 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface QueryVisitorProfileSearchResponse {
|
|
145
|
+
matches: Array<QueryVisitorProfileSearchResponse.Match>;
|
|
146
|
+
|
|
147
|
+
truncated: boolean;
|
|
148
|
+
|
|
149
|
+
visitorIds: Array<string>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export namespace QueryVisitorProfileSearchResponse {
|
|
153
|
+
export interface Match {
|
|
154
|
+
email: string | null;
|
|
155
|
+
|
|
156
|
+
externalId: string | null;
|
|
157
|
+
|
|
158
|
+
firstName: string | null;
|
|
159
|
+
|
|
160
|
+
lastName: string | null;
|
|
161
|
+
|
|
162
|
+
lastSeenAt: string | null;
|
|
163
|
+
|
|
164
|
+
visitorId: string;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface QueryVisitorListParams {
|
|
169
|
+
/**
|
|
170
|
+
* Query Visitors filters and page. JSON-encode input in the REST query string.
|
|
171
|
+
*/
|
|
172
|
+
input: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface QueryVisitorProfileSearchParams {
|
|
176
|
+
/**
|
|
177
|
+
* Current profile search filters. JSON-encode input in the REST query string.
|
|
178
|
+
*/
|
|
179
|
+
input: string;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export declare namespace QueryVisitors {
|
|
183
|
+
export {
|
|
184
|
+
type QueryVisitorListResponse as QueryVisitorListResponse,
|
|
185
|
+
type QueryVisitorCapabilitiesResponse as QueryVisitorCapabilitiesResponse,
|
|
186
|
+
type QueryVisitorProfileSearchResponse as QueryVisitorProfileSearchResponse,
|
|
187
|
+
type QueryVisitorListParams as QueryVisitorListParams,
|
|
188
|
+
type QueryVisitorProfileSearchParams as QueryVisitorProfileSearchParams,
|
|
189
|
+
};
|
|
190
|
+
}
|