@oursprivacy/platform-sdk 1.46.0 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/client.d.mts +20 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +20 -11
- package/client.d.ts.map +1 -1
- package/client.js +11 -2
- package/client.js.map +1 -1
- package/client.mjs +11 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/attribution.d.mts +9 -1
- package/resources/attribution.d.mts.map +1 -1
- package/resources/attribution.d.ts +9 -1
- package/resources/attribution.d.ts.map +1 -1
- package/resources/consent-settings.d.mts +48 -0
- package/resources/consent-settings.d.mts.map +1 -1
- package/resources/consent-settings.d.ts +48 -0
- package/resources/consent-settings.d.ts.map +1 -1
- package/resources/conversion-journey-summaries.d.mts +38 -0
- package/resources/conversion-journey-summaries.d.mts.map +1 -1
- package/resources/conversion-journey-summaries.d.ts +38 -0
- package/resources/conversion-journey-summaries.d.ts.map +1 -1
- package/resources/conversion-journey-summaries.js +38 -0
- package/resources/conversion-journey-summaries.js.map +1 -1
- package/resources/conversion-journey-summaries.mjs +38 -0
- package/resources/conversion-journey-summaries.mjs.map +1 -1
- package/resources/data-governance.d.mts +5 -5
- package/resources/data-governance.d.mts.map +1 -1
- package/resources/data-governance.d.ts +5 -5
- package/resources/data-governance.d.ts.map +1 -1
- package/resources/destinations.d.mts +7 -27
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +7 -27
- package/resources/destinations.d.ts.map +1 -1
- package/resources/experiment-variants.d.mts +4 -2
- package/resources/experiment-variants.d.mts.map +1 -1
- package/resources/experiment-variants.d.ts +4 -2
- package/resources/experiment-variants.d.ts.map +1 -1
- package/resources/experiments.d.mts +677 -102
- package/resources/experiments.d.mts.map +1 -1
- package/resources/experiments.d.ts +677 -102
- package/resources/experiments.d.ts.map +1 -1
- package/resources/experiments.js +32 -2
- package/resources/experiments.js.map +1 -1
- package/resources/experiments.mjs +32 -2
- package/resources/experiments.mjs.map +1 -1
- package/resources/funnels.d.mts +172 -22
- package/resources/funnels.d.mts.map +1 -1
- package/resources/funnels.d.ts +172 -22
- package/resources/funnels.d.ts.map +1 -1
- package/resources/funnels.js +10 -2
- package/resources/funnels.js.map +1 -1
- package/resources/funnels.mjs +10 -2
- package/resources/funnels.mjs.map +1 -1
- package/resources/heatmap-pages.d.mts +42 -14
- package/resources/heatmap-pages.d.mts.map +1 -1
- package/resources/heatmap-pages.d.ts +42 -14
- package/resources/heatmap-pages.d.ts.map +1 -1
- package/resources/heatmap-pages.js +11 -7
- package/resources/heatmap-pages.js.map +1 -1
- package/resources/heatmap-pages.mjs +11 -7
- package/resources/heatmap-pages.mjs.map +1 -1
- package/resources/index.d.mts +8 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -5
- 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/mappings.d.mts +2 -2
- package/resources/mappings.d.mts.map +1 -1
- package/resources/mappings.d.ts +2 -2
- package/resources/mappings.d.ts.map +1 -1
- package/resources/session-replays.d.mts +91 -0
- package/resources/session-replays.d.mts.map +1 -0
- package/resources/session-replays.d.ts +91 -0
- package/resources/session-replays.d.ts.map +1 -0
- package/resources/session-replays.js +24 -0
- package/resources/session-replays.js.map +1 -0
- package/resources/session-replays.mjs +20 -0
- package/resources/session-replays.mjs.map +1 -0
- package/resources/short-links.d.mts +138 -37
- package/resources/short-links.d.mts.map +1 -1
- package/resources/short-links.d.ts +138 -37
- package/resources/short-links.d.ts.map +1 -1
- package/resources/short-links.js +27 -12
- package/resources/short-links.js.map +1 -1
- package/resources/short-links.mjs +27 -12
- package/resources/short-links.mjs.map +1 -1
- package/resources/sources.d.mts +10 -6
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts +10 -6
- package/resources/sources.d.ts.map +1 -1
- package/resources/tag-manager-tags.d.mts +2 -2
- package/resources/tag-manager-tags.d.ts +2 -2
- package/resources/tag-manager-tags.js +2 -2
- package/resources/tag-manager-tags.mjs +2 -2
- package/resources/tag-manager-triggers.d.mts +18 -1
- package/resources/tag-manager-triggers.d.mts.map +1 -1
- package/resources/tag-manager-triggers.d.ts +18 -1
- package/resources/tag-manager-triggers.d.ts.map +1 -1
- package/resources/translation-widgets.d.mts +62 -0
- package/resources/translation-widgets.d.mts.map +1 -0
- package/resources/translation-widgets.d.ts +62 -0
- package/resources/translation-widgets.d.ts.map +1 -0
- package/resources/translation-widgets.js +18 -0
- package/resources/translation-widgets.js.map +1 -0
- package/resources/translation-widgets.mjs +14 -0
- package/resources/translation-widgets.mjs.map +1 -0
- package/resources/video-channels.d.mts +17 -17
- package/resources/video-channels.d.mts.map +1 -1
- package/resources/video-channels.d.ts +17 -17
- package/resources/video-channels.d.ts.map +1 -1
- package/resources/video-channels.js +17 -16
- package/resources/video-channels.js.map +1 -1
- package/resources/video-channels.mjs +17 -16
- package/resources/video-channels.mjs.map +1 -1
- package/resources/web-analytics.d.mts +345 -0
- package/resources/web-analytics.d.mts.map +1 -0
- package/resources/web-analytics.d.ts +345 -0
- package/resources/web-analytics.d.ts.map +1 -0
- package/resources/web-analytics.js +61 -0
- package/resources/web-analytics.js.map +1 -0
- package/resources/web-analytics.mjs +57 -0
- package/resources/web-analytics.mjs.map +1 -0
- package/resources/web-scanners.d.mts +314 -14
- package/resources/web-scanners.d.mts.map +1 -1
- package/resources/web-scanners.d.ts +314 -14
- package/resources/web-scanners.d.ts.map +1 -1
- package/resources/web-scanners.js +139 -13
- package/resources/web-scanners.js.map +1 -1
- package/resources/web-scanners.mjs +139 -13
- package/resources/web-scanners.mjs.map +1 -1
- package/src/client.ts +116 -19
- package/src/resources/attribution.ts +11 -1
- package/src/resources/consent-settings.ts +56 -0
- package/src/resources/conversion-journey-summaries.ts +38 -0
- package/src/resources/data-governance.ts +5 -5
- package/src/resources/destinations.ts +18 -115
- package/src/resources/experiment-variants.ts +4 -2
- package/src/resources/experiments.ts +812 -101
- package/src/resources/funnels.ts +276 -21
- package/src/resources/heatmap-pages.ts +49 -14
- package/src/resources/index.ts +47 -3
- package/src/resources/mappings.ts +2 -2
- package/src/resources/session-replays.ts +138 -0
- package/src/resources/short-links.ts +164 -36
- package/src/resources/sources.ts +11 -0
- package/src/resources/tag-manager-tags.ts +2 -2
- package/src/resources/tag-manager-triggers.ts +18 -1
- package/src/resources/translation-widgets.ts +97 -0
- package/src/resources/video-channels.ts +19 -18
- package/src/resources/web-analytics.ts +494 -0
- package/src/resources/web-scanners.ts +443 -13
- 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,97 @@
|
|
|
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
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class TranslationWidgets extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Return usage totals and language, host, and page breakdowns for one translation
|
|
11
|
+
* widget over the requested date range. Requires scope:
|
|
12
|
+
* report:translation-analytics
|
|
13
|
+
*/
|
|
14
|
+
analytics(
|
|
15
|
+
id: string,
|
|
16
|
+
query: TranslationWidgetAnalyticsParams,
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): APIPromise<TranslationWidgetAnalyticsResponse> {
|
|
19
|
+
return this._client.get(path`/rest/v1/translation-widgets/${id}/analytics`, { query, ...options });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface TranslationWidgetAnalyticsResponse {
|
|
24
|
+
byHost: Array<TranslationWidgetAnalyticsResponse.ByHost>;
|
|
25
|
+
|
|
26
|
+
byLanguage: Array<TranslationWidgetAnalyticsResponse.ByLanguage>;
|
|
27
|
+
|
|
28
|
+
languagesUsed: number;
|
|
29
|
+
|
|
30
|
+
topPages: Array<TranslationWidgetAnalyticsResponse.TopPage>;
|
|
31
|
+
|
|
32
|
+
totalTranslations: number;
|
|
33
|
+
|
|
34
|
+
uniqueUsers: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export namespace TranslationWidgetAnalyticsResponse {
|
|
38
|
+
export interface ByHost {
|
|
39
|
+
host: string;
|
|
40
|
+
|
|
41
|
+
translations: number;
|
|
42
|
+
|
|
43
|
+
uniqueUsers: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ByLanguage {
|
|
47
|
+
languageCode: string;
|
|
48
|
+
|
|
49
|
+
translations: number;
|
|
50
|
+
|
|
51
|
+
uniqueUsers: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface TopPage {
|
|
55
|
+
byLanguage: Array<TopPage.ByLanguage>;
|
|
56
|
+
|
|
57
|
+
translations: number;
|
|
58
|
+
|
|
59
|
+
uniqueUsers: number;
|
|
60
|
+
|
|
61
|
+
url: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export namespace TopPage {
|
|
65
|
+
export interface ByLanguage {
|
|
66
|
+
languageCode: string;
|
|
67
|
+
|
|
68
|
+
translations: number;
|
|
69
|
+
|
|
70
|
+
uniqueUsers: number;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface TranslationWidgetAnalyticsParams {
|
|
76
|
+
/**
|
|
77
|
+
* Inclusive lower bound of the analytics window as `YYYY-MM-DD`.
|
|
78
|
+
*/
|
|
79
|
+
from: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Inclusive upper bound of the analytics window as `YYYY-MM-DD`.
|
|
83
|
+
*/
|
|
84
|
+
to: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Maximum rows to return for each breakdown. Defaults to 50.
|
|
88
|
+
*/
|
|
89
|
+
limit?: number;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export declare namespace TranslationWidgets {
|
|
93
|
+
export {
|
|
94
|
+
type TranslationWidgetAnalyticsResponse as TranslationWidgetAnalyticsResponse,
|
|
95
|
+
type TranslationWidgetAnalyticsParams as TranslationWidgetAnalyticsParams,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
@@ -10,8 +10,8 @@ export class VideoChannels extends APIResource {
|
|
|
10
10
|
/**
|
|
11
11
|
* List video channels for the account, sorted by name. Supports cursor pagination
|
|
12
12
|
* via `limit` and `cursor`; the limit clamp is 1000 so a single request can return
|
|
13
|
-
* the full set. Entries omit `resolvedValues` — fetch a channel by id for its
|
|
14
|
-
* count and embed output. Requires scope: videoChannel:list
|
|
13
|
+
* the full set. Entries omit `resolvedValues` — fetch a channel by id for its
|
|
14
|
+
* video count and embed output. Requires scope: videoChannel:list
|
|
15
15
|
*/
|
|
16
16
|
list(
|
|
17
17
|
query: VideoChannelListParams | null | undefined = {},
|
|
@@ -24,9 +24,9 @@ export class VideoChannels extends APIResource {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Create a video channel. Only `name` is accepted here; set branding and publish
|
|
28
|
-
* with PATCH, and add videos with `POST /rest/v1/video-channels/{id}/media`.
|
|
29
|
-
* channels start unpublished, so the page is not reachable until you send
|
|
27
|
+
* Create a video channel. Only `name` is accepted here; set branding and publish
|
|
28
|
+
* it with PATCH, and add videos with `POST /rest/v1/video-channels/{id}/media`.
|
|
29
|
+
* New channels start unpublished, so the page is not reachable until you send
|
|
30
30
|
* `isPublished: true`. Requires scope: videoChannel:create
|
|
31
31
|
*/
|
|
32
32
|
create(body: VideoChannelCreateParams, options?: RequestOptions): APIPromise<VideoChannelCreateResponse> {
|
|
@@ -91,25 +91,26 @@ export class VideoChannels extends APIResource {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* Remove one video from a channel, identified by the `mediaId` query parameter.
|
|
95
|
-
* video itself is not deleted and stays in any other channel it belongs to.
|
|
96
|
-
* Idempotent — removing a video that is not in the channel succeeds and returns
|
|
97
|
-
* channel unchanged. Requires scope: videoChannel:update
|
|
94
|
+
* Remove one video from a channel, identified by the `mediaId` query parameter.
|
|
95
|
+
* The video itself is not deleted and stays in any other channel it belongs to.
|
|
96
|
+
* Idempotent — removing a video that is not in the channel succeeds and returns
|
|
97
|
+
* the channel unchanged. Requires scope: videoChannel:update
|
|
98
98
|
*/
|
|
99
99
|
removeMedia(
|
|
100
100
|
id: string,
|
|
101
|
-
|
|
101
|
+
params: VideoChannelRemoveMediaParams,
|
|
102
102
|
options?: RequestOptions,
|
|
103
103
|
): APIPromise<VideoChannelRemoveMediaResponse> {
|
|
104
|
-
|
|
104
|
+
const { mediaId } = params;
|
|
105
|
+
return this._client.delete(path`/rest/v1/video-channels/${id}/media`, { query: { mediaId }, ...options });
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
/**
|
|
108
|
-
* Set the display order of a channel’s videos. Send every video id currently in
|
|
109
|
-
* channel in the order you want them shown — index 0 appears first. A partial
|
|
110
|
-
* or an id that is not in the channel, returns 400 so a caller working from
|
|
111
|
-
* view learns it is out of date instead of getting a partial write.
|
|
112
|
-
* videoChannel:update
|
|
109
|
+
* Set the display order of a channel’s videos. Send every video id currently in
|
|
110
|
+
* the channel in the order you want them shown — index 0 appears first. A partial
|
|
111
|
+
* list, or an id that is not in the channel, returns 400 so a caller working from
|
|
112
|
+
* a stale view learns it is out of date instead of getting a partial write.
|
|
113
|
+
* Requires scope: videoChannel:update
|
|
113
114
|
*/
|
|
114
115
|
reorder(
|
|
115
116
|
id: string,
|
|
@@ -362,8 +363,8 @@ export interface VideoChannelAssignMediaParams {
|
|
|
362
363
|
mediaId: string;
|
|
363
364
|
|
|
364
365
|
/**
|
|
365
|
-
* Zero-based slot in the channel order. Omit to append to the end; omitting it on
|
|
366
|
-
* video that is already in the channel keeps its current slot.
|
|
366
|
+
* Zero-based slot in the channel order. Omit to append to the end; omitting it on
|
|
367
|
+
* a video that is already in the channel keeps its current slot.
|
|
367
368
|
*/
|
|
368
369
|
position?: number;
|
|
369
370
|
}
|
|
@@ -0,0 +1,494 @@
|
|
|
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 WebAnalytics extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Return privacy-first traffic metrics and a timeseries for the requested date
|
|
10
|
+
* range. Filter by source, geography, page, campaign, device, or other supported
|
|
11
|
+
* dimensions with the JSON-encoded `filters` query parameter. Requires scope:
|
|
12
|
+
* web-analytics:view
|
|
13
|
+
*/
|
|
14
|
+
overview(
|
|
15
|
+
query: WebAnalyticsOverviewParams,
|
|
16
|
+
options?: RequestOptions,
|
|
17
|
+
): APIPromise<WebAnalyticsOverviewResponse> {
|
|
18
|
+
return this._client.get('/rest/v1/web-analytics/overview', { query, ...options });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Return visitor counts grouped by referrer or UTM source dimension for the
|
|
23
|
+
* requested date range. Requires scope: web-analytics:view
|
|
24
|
+
*/
|
|
25
|
+
sources(
|
|
26
|
+
query: WebAnalyticsSourcesParams,
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): APIPromise<WebAnalyticsSourcesResponse> {
|
|
29
|
+
return this._client.get('/rest/v1/web-analytics/sources', { query, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Return page-level traffic metrics for top pages, entry pages, or exit pages in
|
|
34
|
+
* the requested date range. Requires scope: web-analytics:view
|
|
35
|
+
*/
|
|
36
|
+
pages(query: WebAnalyticsPagesParams, options?: RequestOptions): APIPromise<WebAnalyticsPagesResponse> {
|
|
37
|
+
return this._client.get('/rest/v1/web-analytics/pages', { query, ...options });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Return visitor counts grouped by country, region, or city for the requested date
|
|
42
|
+
* range. Requires scope: web-analytics:view
|
|
43
|
+
*/
|
|
44
|
+
locations(
|
|
45
|
+
query: WebAnalyticsLocationsParams,
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): APIPromise<WebAnalyticsLocationsResponse> {
|
|
48
|
+
return this._client.get('/rest/v1/web-analytics/locations', { query, ...options });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Return visitor counts grouped by device type, browser, or operating system for
|
|
53
|
+
* the requested date range. Requires scope: web-analytics:view
|
|
54
|
+
*/
|
|
55
|
+
devices(
|
|
56
|
+
query: WebAnalyticsDevicesParams,
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): APIPromise<WebAnalyticsDevicesResponse> {
|
|
59
|
+
return this._client.get('/rest/v1/web-analytics/devices', { query, ...options });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Return the distinct visitors active in the most recent 15-minute window,
|
|
64
|
+
* optionally scoped to one web source. Requires scope: web-analytics:view
|
|
65
|
+
*/
|
|
66
|
+
currentVisitors(
|
|
67
|
+
query: WebAnalyticsCurrentVisitorsParams | null | undefined = {},
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): APIPromise<WebAnalyticsCurrentVisitorsResponse> {
|
|
70
|
+
return this._client.get('/rest/v1/web-analytics/current-visitors', { query, ...options });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Return the next or previous journey steps for a pinned path. The `path` and
|
|
75
|
+
* `filters` query parameters are JSON-encoded arrays. Requires scope:
|
|
76
|
+
* web-analytics:view
|
|
77
|
+
*/
|
|
78
|
+
journey(
|
|
79
|
+
query: WebAnalyticsJourneyParams,
|
|
80
|
+
options?: RequestOptions,
|
|
81
|
+
): APIPromise<WebAnalyticsJourneyResponse> {
|
|
82
|
+
return this._client.get('/rest/v1/web-analytics/journey', { query, ...options });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface WebAnalyticsOverviewResponse {
|
|
87
|
+
dataUpdatedAt: string;
|
|
88
|
+
|
|
89
|
+
metrics: WebAnalyticsOverviewResponse.Metrics | null;
|
|
90
|
+
|
|
91
|
+
timeseries: Array<WebAnalyticsOverviewResponse.Timesery> | null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export namespace WebAnalyticsOverviewResponse {
|
|
95
|
+
export interface Metrics {
|
|
96
|
+
/**
|
|
97
|
+
* Percentage from 0 to 100 of visits with exactly one pageview.
|
|
98
|
+
*/
|
|
99
|
+
bounceRate: number;
|
|
100
|
+
|
|
101
|
+
pageviews: number;
|
|
102
|
+
|
|
103
|
+
totalVisits: number;
|
|
104
|
+
|
|
105
|
+
uniqueVisitors: number;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Average pageviews per visit.
|
|
109
|
+
*/
|
|
110
|
+
viewsPerVisit: number;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Average visit duration in seconds.
|
|
114
|
+
*/
|
|
115
|
+
visitDuration: number;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface Timesery {
|
|
119
|
+
date: string;
|
|
120
|
+
|
|
121
|
+
value: number;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface WebAnalyticsSourcesResponse {
|
|
126
|
+
dataUpdatedAt: string;
|
|
127
|
+
|
|
128
|
+
rows: Array<WebAnalyticsSourcesResponse.Row>;
|
|
129
|
+
|
|
130
|
+
totalCount: number;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export namespace WebAnalyticsSourcesResponse {
|
|
134
|
+
export interface Row {
|
|
135
|
+
name: string;
|
|
136
|
+
|
|
137
|
+
visitors: number;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface WebAnalyticsPagesResponse {
|
|
142
|
+
dataUpdatedAt: string;
|
|
143
|
+
|
|
144
|
+
rows: Array<WebAnalyticsPagesResponse.Row>;
|
|
145
|
+
|
|
146
|
+
totalCount: number;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export namespace WebAnalyticsPagesResponse {
|
|
150
|
+
export interface Row {
|
|
151
|
+
/**
|
|
152
|
+
* Percentage from 0 to 100 of visits to the page that bounced.
|
|
153
|
+
*/
|
|
154
|
+
bounceRate: number | null;
|
|
155
|
+
|
|
156
|
+
entries: number | null;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Percentage from 0 to 100 of pageviews that ended a visit.
|
|
160
|
+
*/
|
|
161
|
+
exitRate: number | null;
|
|
162
|
+
|
|
163
|
+
exits: number | null;
|
|
164
|
+
|
|
165
|
+
pageHostname: string;
|
|
166
|
+
|
|
167
|
+
pagePath: string;
|
|
168
|
+
|
|
169
|
+
pageviews: number | null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Average time on page in seconds when available.
|
|
173
|
+
*/
|
|
174
|
+
timeOnPage: number | null;
|
|
175
|
+
|
|
176
|
+
visitors: number | null;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface WebAnalyticsLocationsResponse {
|
|
181
|
+
dataUpdatedAt: string;
|
|
182
|
+
|
|
183
|
+
rows: Array<WebAnalyticsLocationsResponse.Row>;
|
|
184
|
+
|
|
185
|
+
totalCount: number;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export namespace WebAnalyticsLocationsResponse {
|
|
189
|
+
export interface Row {
|
|
190
|
+
code: string | null;
|
|
191
|
+
|
|
192
|
+
name: string;
|
|
193
|
+
|
|
194
|
+
visitors: number;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface WebAnalyticsDevicesResponse {
|
|
199
|
+
dataUpdatedAt: string;
|
|
200
|
+
|
|
201
|
+
rows: Array<WebAnalyticsDevicesResponse.Row>;
|
|
202
|
+
|
|
203
|
+
totalCount: number;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export namespace WebAnalyticsDevicesResponse {
|
|
207
|
+
export interface Row {
|
|
208
|
+
name: string;
|
|
209
|
+
|
|
210
|
+
visitors: number;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface WebAnalyticsCurrentVisitorsResponse {
|
|
215
|
+
count: number;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface WebAnalyticsJourneyResponse {
|
|
219
|
+
anchorSessions: number;
|
|
220
|
+
|
|
221
|
+
hasMore: boolean;
|
|
222
|
+
|
|
223
|
+
steps: Array<WebAnalyticsJourneyResponse.Step>;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export namespace WebAnalyticsJourneyResponse {
|
|
227
|
+
export interface Step {
|
|
228
|
+
isOther: boolean;
|
|
229
|
+
|
|
230
|
+
isTerminal: boolean;
|
|
231
|
+
|
|
232
|
+
key: string;
|
|
233
|
+
|
|
234
|
+
kind: 'PAGE' | 'EVENT' | null;
|
|
235
|
+
|
|
236
|
+
label: string;
|
|
237
|
+
|
|
238
|
+
sessions: number;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface WebAnalyticsOverviewParams {
|
|
243
|
+
/**
|
|
244
|
+
* Inclusive lower bound of the analysis window as `YYYY-MM-DD`.
|
|
245
|
+
*/
|
|
246
|
+
from: string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Timeseries bucket interval. Minute queries are capped to the most recent 24
|
|
250
|
+
* hours.
|
|
251
|
+
*/
|
|
252
|
+
interval: 'minute' | 'day' | 'week' | 'month';
|
|
253
|
+
|
|
254
|
+
metric:
|
|
255
|
+
'unique_visitors' | 'total_visits' | 'pageviews' | 'views_per_visit' | 'bounce_rate' | 'visit_duration';
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Inclusive upper bound of the analysis window as `YYYY-MM-DD`.
|
|
259
|
+
*/
|
|
260
|
+
to: string;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Exclude detected bot sessions. Defaults to true.
|
|
264
|
+
*/
|
|
265
|
+
excludeBots?: boolean;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Optional JSON-encoded array of up to 20 filters. Dimensions: `page`,
|
|
269
|
+
* `entry_page`, `exit_page`, `source`, `medium`, `campaign`, `content`, `term`,
|
|
270
|
+
* `referrer`, `country`, `region`, `city`, `device`, `browser`, `os`. Each filter
|
|
271
|
+
* has a dimension, optional operator (`IS`, `IS_NOT`, `CONTAINS`, `NOT_CONTAINS`;
|
|
272
|
+
* defaults to `IS`), and one or more values. Example:
|
|
273
|
+
* `[{"dimension":"country","values":["United States"]}]`.
|
|
274
|
+
*/
|
|
275
|
+
filters?: string;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Optional ISO timestamp used as the lower bound for realtime queries.
|
|
279
|
+
*/
|
|
280
|
+
realtimeFrom?: string;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Optional web source UUID. Omit to aggregate all web sources in the account.
|
|
284
|
+
*/
|
|
285
|
+
webSourceId?: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface WebAnalyticsSourcesParams {
|
|
289
|
+
dimension: 'referrer' | 'campaign' | 'source' | 'medium' | 'content' | 'term';
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Inclusive lower bound of the analysis window as `YYYY-MM-DD`.
|
|
293
|
+
*/
|
|
294
|
+
from: string;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Inclusive upper bound of the analysis window as `YYYY-MM-DD`.
|
|
298
|
+
*/
|
|
299
|
+
to: string;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Exclude detected bot sessions. Defaults to true.
|
|
303
|
+
*/
|
|
304
|
+
excludeBots?: boolean;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Optional JSON-encoded array of up to 20 filters. Dimensions: `page`,
|
|
308
|
+
* `entry_page`, `exit_page`, `source`, `medium`, `campaign`, `content`, `term`,
|
|
309
|
+
* `referrer`, `country`, `region`, `city`, `device`, `browser`, `os`. Each filter
|
|
310
|
+
* has a dimension, optional operator (`IS`, `IS_NOT`, `CONTAINS`, `NOT_CONTAINS`;
|
|
311
|
+
* defaults to `IS`), and one or more values. Example:
|
|
312
|
+
* `[{"dimension":"country","values":["United States"]}]`.
|
|
313
|
+
*/
|
|
314
|
+
filters?: string;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Optional web source UUID. Omit to aggregate all web sources in the account.
|
|
318
|
+
*/
|
|
319
|
+
webSourceId?: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export interface WebAnalyticsPagesParams {
|
|
323
|
+
/**
|
|
324
|
+
* Inclusive lower bound of the analysis window as `YYYY-MM-DD`.
|
|
325
|
+
*/
|
|
326
|
+
from: string;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Inclusive upper bound of the analysis window as `YYYY-MM-DD`.
|
|
330
|
+
*/
|
|
331
|
+
to: string;
|
|
332
|
+
|
|
333
|
+
view: 'top' | 'entry' | 'exit';
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Exclude detected bot sessions. Defaults to true.
|
|
337
|
+
*/
|
|
338
|
+
excludeBots?: boolean;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Optional JSON-encoded array of up to 20 filters. Dimensions: `page`,
|
|
342
|
+
* `entry_page`, `exit_page`, `source`, `medium`, `campaign`, `content`, `term`,
|
|
343
|
+
* `referrer`, `country`, `region`, `city`, `device`, `browser`, `os`. Each filter
|
|
344
|
+
* has a dimension, optional operator (`IS`, `IS_NOT`, `CONTAINS`, `NOT_CONTAINS`;
|
|
345
|
+
* defaults to `IS`), and one or more values. Example:
|
|
346
|
+
* `[{"dimension":"country","values":["United States"]}]`.
|
|
347
|
+
*/
|
|
348
|
+
filters?: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Optional web source UUID. Omit to aggregate all web sources in the account.
|
|
352
|
+
*/
|
|
353
|
+
webSourceId?: string;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export interface WebAnalyticsLocationsParams {
|
|
357
|
+
dimension: 'country' | 'region' | 'city';
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Inclusive lower bound of the analysis window as `YYYY-MM-DD`.
|
|
361
|
+
*/
|
|
362
|
+
from: string;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Inclusive upper bound of the analysis window as `YYYY-MM-DD`.
|
|
366
|
+
*/
|
|
367
|
+
to: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Exclude detected bot sessions. Defaults to true.
|
|
371
|
+
*/
|
|
372
|
+
excludeBots?: boolean;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Optional JSON-encoded array of up to 20 filters. Dimensions: `page`,
|
|
376
|
+
* `entry_page`, `exit_page`, `source`, `medium`, `campaign`, `content`, `term`,
|
|
377
|
+
* `referrer`, `country`, `region`, `city`, `device`, `browser`, `os`. Each filter
|
|
378
|
+
* has a dimension, optional operator (`IS`, `IS_NOT`, `CONTAINS`, `NOT_CONTAINS`;
|
|
379
|
+
* defaults to `IS`), and one or more values. Example:
|
|
380
|
+
* `[{"dimension":"country","values":["United States"]}]`.
|
|
381
|
+
*/
|
|
382
|
+
filters?: string;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Optional web source UUID. Omit to aggregate all web sources in the account.
|
|
386
|
+
*/
|
|
387
|
+
webSourceId?: string;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export interface WebAnalyticsDevicesParams {
|
|
391
|
+
dimension: 'device' | 'browser' | 'os';
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Inclusive lower bound of the analysis window as `YYYY-MM-DD`.
|
|
395
|
+
*/
|
|
396
|
+
from: string;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Inclusive upper bound of the analysis window as `YYYY-MM-DD`.
|
|
400
|
+
*/
|
|
401
|
+
to: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Exclude detected bot sessions. Defaults to true.
|
|
405
|
+
*/
|
|
406
|
+
excludeBots?: boolean;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Optional JSON-encoded array of up to 20 filters. Dimensions: `page`,
|
|
410
|
+
* `entry_page`, `exit_page`, `source`, `medium`, `campaign`, `content`, `term`,
|
|
411
|
+
* `referrer`, `country`, `region`, `city`, `device`, `browser`, `os`. Each filter
|
|
412
|
+
* has a dimension, optional operator (`IS`, `IS_NOT`, `CONTAINS`, `NOT_CONTAINS`;
|
|
413
|
+
* defaults to `IS`), and one or more values. Example:
|
|
414
|
+
* `[{"dimension":"country","values":["United States"]}]`.
|
|
415
|
+
*/
|
|
416
|
+
filters?: string;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Optional web source UUID. Omit to aggregate all web sources in the account.
|
|
420
|
+
*/
|
|
421
|
+
webSourceId?: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export interface WebAnalyticsCurrentVisitorsParams {
|
|
425
|
+
/**
|
|
426
|
+
* Optional web source UUID. Omit to count visitors across all account web sources.
|
|
427
|
+
*/
|
|
428
|
+
webSourceId?: string;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export interface WebAnalyticsJourneyParams {
|
|
432
|
+
/**
|
|
433
|
+
* Inclusive lower bound of the analysis window as `YYYY-MM-DD`.
|
|
434
|
+
*/
|
|
435
|
+
from: string;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* JSON-encoded ordered path of opaque journey step keys. Use an empty array to
|
|
439
|
+
* request first-column candidates.
|
|
440
|
+
*/
|
|
441
|
+
path: string;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Inclusive upper bound of the analysis window as `YYYY-MM-DD`.
|
|
445
|
+
*/
|
|
446
|
+
to: string;
|
|
447
|
+
|
|
448
|
+
direction?: 'forward' | 'reverse';
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Exclude detected bot sessions. Defaults to true.
|
|
452
|
+
*/
|
|
453
|
+
excludeBots?: boolean;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Optional JSON-encoded array of up to 20 journey filters. Supports web analytics
|
|
457
|
+
* dimensions plus `event_name`, `ep_currency`, `ep_appointment_id`,
|
|
458
|
+
* `ep_appointment_status`, `ep_service_line`, `ep_provider_id`, `ep_location_id`,
|
|
459
|
+
* `ep_booking_channel`, `ep_revenue_type`, `ep_call_outcome`, and `ep_staff_id`.
|
|
460
|
+
* Each filter has a dimension, optional operator (`IS`, `IS_NOT`, `CONTAINS`,
|
|
461
|
+
* `NOT_CONTAINS`; defaults to `IS`), and one or more values.
|
|
462
|
+
*/
|
|
463
|
+
filters?: string;
|
|
464
|
+
|
|
465
|
+
limit?: number;
|
|
466
|
+
|
|
467
|
+
search?: string;
|
|
468
|
+
|
|
469
|
+
stepKind?: 'PAGE' | 'EVENT';
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Optional web source UUID. Omit to aggregate all web sources in the account.
|
|
473
|
+
*/
|
|
474
|
+
webSourceId?: string;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export declare namespace WebAnalytics {
|
|
478
|
+
export {
|
|
479
|
+
type WebAnalyticsOverviewResponse as WebAnalyticsOverviewResponse,
|
|
480
|
+
type WebAnalyticsSourcesResponse as WebAnalyticsSourcesResponse,
|
|
481
|
+
type WebAnalyticsPagesResponse as WebAnalyticsPagesResponse,
|
|
482
|
+
type WebAnalyticsLocationsResponse as WebAnalyticsLocationsResponse,
|
|
483
|
+
type WebAnalyticsDevicesResponse as WebAnalyticsDevicesResponse,
|
|
484
|
+
type WebAnalyticsCurrentVisitorsResponse as WebAnalyticsCurrentVisitorsResponse,
|
|
485
|
+
type WebAnalyticsJourneyResponse as WebAnalyticsJourneyResponse,
|
|
486
|
+
type WebAnalyticsOverviewParams as WebAnalyticsOverviewParams,
|
|
487
|
+
type WebAnalyticsSourcesParams as WebAnalyticsSourcesParams,
|
|
488
|
+
type WebAnalyticsPagesParams as WebAnalyticsPagesParams,
|
|
489
|
+
type WebAnalyticsLocationsParams as WebAnalyticsLocationsParams,
|
|
490
|
+
type WebAnalyticsDevicesParams as WebAnalyticsDevicesParams,
|
|
491
|
+
type WebAnalyticsCurrentVisitorsParams as WebAnalyticsCurrentVisitorsParams,
|
|
492
|
+
type WebAnalyticsJourneyParams as WebAnalyticsJourneyParams,
|
|
493
|
+
};
|
|
494
|
+
}
|