@schibsted/pulse-sdk 8.0.0-rc.13 → 8.0.0-rc.14
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/dist/cjs/Tracker.js +22 -0
- package/dist/cjs/leaveTrackingTpaas/index.js +18 -6
- package/dist/cjs/tpaas-builders/builders/device.js +1 -1
- package/dist/cjs/tpaas-builders/builders/trackerBuilder.js +2 -1
- package/dist/cjs/tpaas-builders/builders.js +10 -6
- package/dist/cjs/tpaas-schemas/constants.js +59 -51
- package/dist/cjs/version.js +1 -1
- package/dist/ejs/Tracker.js +23 -1
- package/dist/ejs/leaveTrackingTpaas/index.js +18 -6
- package/dist/ejs/tpaas-builders/builders/device.js +1 -1
- package/dist/ejs/tpaas-builders/builders/trackerBuilder.js +2 -1
- package/dist/ejs/tpaas-builders/builders.js +10 -7
- package/dist/ejs/tpaas-schemas/constants.js +57 -49
- package/dist/ejs/version.js +1 -1
- package/dist/types/Tracker.d.ts +6 -1
- package/dist/types/builders/consents.d.ts +2 -2
- package/dist/types/builders/device-node.d.ts +2 -2
- package/dist/types/builders/events-anonymous-node.d.ts +4 -4
- package/dist/types/builders/events-node.d.ts +5 -5
- package/dist/types/builders/objects/objects-anonymous-node.d.ts +1 -1
- package/dist/types/builders/objects/objects-node.d.ts +1 -1
- package/dist/types/builders/origin-node.d.ts +1 -1
- package/dist/types/cis-sync/storage/pulseStorage.d.ts +8 -4
- package/dist/types/config.d.ts +1 -1
- package/dist/types/tpaas-builders/builders/device.d.ts +1 -1
- package/dist/types/tpaas-builders/builders/experiments.d.ts +1 -1
- package/dist/types/tpaas-builders/builders/navigationType.d.ts +2 -2
- package/dist/types/tpaas-builders/builders/pageviewId.d.ts +1 -1
- package/dist/types/tpaas-builders/builders/trackerBuilder.d.ts +1 -1
- package/dist/types/tpaas-builders/builders/user.d.ts +1 -1
- package/dist/types/tpaas-builders/builders.d.ts +41 -39
- package/dist/types/tpaas-builders/index.d.ts +1 -1
- package/dist/types/tpaas-builders/types.d.ts +2 -0
- package/dist/types/tpaas-schemas/constants.d.ts +182 -174
- package/dist/types/tpaas-schemas/types/ITpaasEvent.d.ts +2 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementAudio.d.ts +0 -6
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTeaser.d.ts +9 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTvModule.d.ts +130 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementUIElement.d.ts +4 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementVideo.d.ts +1 -7
- package/dist/types/tpaas-schemas/types/schemas/IImpressionForm.d.ts +2 -2
- package/dist/types/tpaas-schemas/types/schemas/IImpressionTeaser.d.ts +9 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveArticle.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/ILeaveAudioPage.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/ILeaveFrontpage.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLockedArticle.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/ILeaveVideoPage.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/IViewArticle.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/IViewAudioPage.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/IViewFrontpage.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/IViewLockedArticle.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/IViewVideoPage.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/schemas/index.d.ts +1 -0
- package/dist/types/tpaas-schemas/types/templates/IDevice.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/templates/IProvider.d.ts +1 -1
- package/dist/types/tpaas-schemas/types/templates/ITracker.d.ts +4 -0
- package/dist/types/tpaas-schemas/types.d.ts +3 -3
- package/dist/types/tracker-proxy/consts.d.ts +2 -2
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wrapper/types/event.d.ts +1 -1
- package/package.json +8 -7
package/dist/types/Tracker.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type AdvertisingIdentifiers, type AdvertisingVendor } from './cis-sync'
|
|
|
6
6
|
import type { Deferred, ResolvedInput } from './defer';
|
|
7
7
|
import { type Listener } from './EventBus/EventBus';
|
|
8
8
|
import type { LeaveEvent, LeaveEventBuilder, LeaveEventOptions } from './leaveTracking/types';
|
|
9
|
-
import { type IAnonymousViewUIElement, type ICompletedHealthAction, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementTeaser, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IImpressionAdSlot, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeave, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudioPage, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type InputParams, type IProvider, type ITpaasEvent, type IViewArticle, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudioPage, type IViewLockedVideoPage, type IViewPage, type IViewSportsPage, type IViewTitle, type IViewVideoPage, type IViewWeather } from './tpaas-schemas';
|
|
9
|
+
import { type IAnonymousViewUIElement, type ICompletedHealthAction, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementTeaser, type IEngagementTvModule, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IImpressionAdSlot, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeave, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudioPage, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type InputParams, type IProvider, type ITpaasEvent, type IViewArticle, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudioPage, type IViewLockedVideoPage, type IViewPage, type IViewSportsPage, type IViewTitle, type IViewVideoPage, type IViewWeather } from './tpaas-schemas';
|
|
10
10
|
import type { AnonymousEventInputTypesByTrackingMethod, EventInput, EventInputTypesByTrackingMethod, TrackViewEventOptions } from './types';
|
|
11
11
|
import { type ObserverOptions } from './visibility-observer';
|
|
12
12
|
import type { ClickUIElementInputProperties } from './wrapper/engagement/ui-element/types';
|
|
@@ -874,6 +874,11 @@ export default class Tracker {
|
|
|
874
874
|
* @category TPaaS Tracking
|
|
875
875
|
*/
|
|
876
876
|
trackEngagementTeaser(input: InputParams<IEngagementTeaser>): Promise<unknown>;
|
|
877
|
+
/**
|
|
878
|
+
* @param input
|
|
879
|
+
* @category TPaaS Tracking
|
|
880
|
+
*/
|
|
881
|
+
trackEngagementTvModule(input: InputParams<IEngagementTvModule>): Promise<unknown>;
|
|
877
882
|
/**
|
|
878
883
|
* @param input
|
|
879
884
|
* @category TPaaS Tracking
|
|
@@ -8,9 +8,9 @@ export declare enum ConsentsCategory {
|
|
|
8
8
|
CMP_ADVERTISING = "CMP_ADVERTISING",
|
|
9
9
|
CMP_PERSONALIZATION = "CMP_PERSONALIZATION"
|
|
10
10
|
}
|
|
11
|
-
export declare const ConsentsSourceValues: readonly [
|
|
11
|
+
export declare const ConsentsSourceValues: readonly ['default', 'cmp', 'cache', 'url'];
|
|
12
12
|
export type ConsentsSource = (typeof ConsentsSourceValues)[number];
|
|
13
|
-
export declare const ConsentsPurposeCategoryStatusValues: readonly [
|
|
13
|
+
export declare const ConsentsPurposeCategoryStatusValues: readonly ['accepted', 'rejected', 'unknown'];
|
|
14
14
|
export type ConsentsPurposeCategoryStatus = (typeof ConsentsPurposeCategoryStatusValues)[number];
|
|
15
15
|
export interface ConsentsBase {
|
|
16
16
|
source?: ConsentsSource;
|
|
@@ -53,7 +53,7 @@ export type Device = {
|
|
|
53
53
|
*
|
|
54
54
|
* @internal
|
|
55
55
|
*/
|
|
56
|
-
export declare const device: (defaultValueHandler: () => unknown) => (input?: Pick<TrackerEventInput,
|
|
56
|
+
export declare const device: (defaultValueHandler: () => unknown) => (input?: Pick<TrackerEventInput, 'device'>) => Device | undefined;
|
|
57
57
|
/**
|
|
58
58
|
* @internal
|
|
59
59
|
*/
|
|
@@ -61,5 +61,5 @@ export declare const defaultValue: () => {};
|
|
|
61
61
|
/**
|
|
62
62
|
* Builder for Device objects.
|
|
63
63
|
*/
|
|
64
|
-
declare const _default: (input?: Pick<TrackerEventInput,
|
|
64
|
+
declare const _default: (input?: Pick<TrackerEventInput, 'device'>) => Device | undefined;
|
|
65
65
|
export default _default;
|
|
@@ -38,8 +38,8 @@ export declare function anonymousTrackerEvent({ eventInput, sdkConfig }?: EventP
|
|
|
38
38
|
experimentMetadata: ExperimentMetadata | undefined;
|
|
39
39
|
object: Record<string, unknown> | undefined;
|
|
40
40
|
origin: {
|
|
41
|
-
'@type'?: string | undefined;
|
|
42
41
|
'@id'?: string | number | undefined;
|
|
42
|
+
'@type'?: string | undefined;
|
|
43
43
|
} & {
|
|
44
44
|
[k: string]: unknown;
|
|
45
45
|
url?: string;
|
|
@@ -50,7 +50,7 @@ export declare function anonymousTrackerEvent({ eventInput, sdkConfig }?: EventP
|
|
|
50
50
|
isAnonymous: boolean;
|
|
51
51
|
};
|
|
52
52
|
export declare namespace anonymousTrackerEvent {
|
|
53
|
-
|
|
53
|
+
export { trackerAnonymousEventInput as defaults };
|
|
54
54
|
}
|
|
55
55
|
export declare function anonymousEngagementEvent({ eventInput, sdkConfig }?: EventParams<AnonymousTrackerEventInput>): {
|
|
56
56
|
[k: string]: any;
|
|
@@ -62,8 +62,8 @@ export declare function anonymousEngagementEvent({ eventInput, sdkConfig }?: Eve
|
|
|
62
62
|
experimentMetadata: ExperimentMetadata | undefined;
|
|
63
63
|
object: Record<string, unknown> | undefined;
|
|
64
64
|
origin: {
|
|
65
|
-
'@type'?: string | undefined;
|
|
66
65
|
'@id'?: string | number | undefined;
|
|
66
|
+
'@type'?: string | undefined;
|
|
67
67
|
} & {
|
|
68
68
|
[k: string]: unknown;
|
|
69
69
|
url?: string;
|
|
@@ -77,6 +77,6 @@ export declare function anonymousEngagementEvent({ eventInput, sdkConfig }?: Eve
|
|
|
77
77
|
'@type': string;
|
|
78
78
|
};
|
|
79
79
|
export declare namespace anonymousEngagementEvent {
|
|
80
|
-
|
|
80
|
+
export { trackerAnonymousEventInput as defaults };
|
|
81
81
|
}
|
|
82
82
|
export {};
|
|
@@ -57,7 +57,7 @@ export declare function routableEvent({ eventInput, sdkConfig }?: EventParams<Ro
|
|
|
57
57
|
actor: import("./actor").Actor | undefined;
|
|
58
58
|
};
|
|
59
59
|
export declare namespace routableEvent {
|
|
60
|
-
|
|
60
|
+
export { routableEventDefaults as defaults };
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Add default value to TrackerEventInput.
|
|
@@ -80,8 +80,8 @@ export declare function trackerEvent({ eventInput, sdkConfig }?: EventParams<Tra
|
|
|
80
80
|
location: import("./location").Location | undefined;
|
|
81
81
|
object: Record<string, unknown> | undefined;
|
|
82
82
|
origin: {
|
|
83
|
-
'@type'?: string | undefined;
|
|
84
83
|
'@id'?: string | number | undefined;
|
|
84
|
+
'@type'?: string | undefined;
|
|
85
85
|
} & {
|
|
86
86
|
[k: string]: unknown;
|
|
87
87
|
url?: string;
|
|
@@ -91,7 +91,7 @@ export declare function trackerEvent({ eventInput, sdkConfig }?: EventParams<Tra
|
|
|
91
91
|
tracker: import("./tracker-node").Tracker;
|
|
92
92
|
};
|
|
93
93
|
export declare namespace trackerEvent {
|
|
94
|
-
|
|
94
|
+
export { trackerEventInput as defaults };
|
|
95
95
|
}
|
|
96
96
|
export declare function engagementEvent({ eventInput, sdkConfig }?: EventParams<TrackerEventInput>): {
|
|
97
97
|
[k: string]: any;
|
|
@@ -107,8 +107,8 @@ export declare function engagementEvent({ eventInput, sdkConfig }?: EventParams<
|
|
|
107
107
|
location: import("./location").Location | undefined;
|
|
108
108
|
object: Record<string, unknown> | undefined;
|
|
109
109
|
origin: {
|
|
110
|
-
'@type'?: string | undefined;
|
|
111
110
|
'@id'?: string | number | undefined;
|
|
111
|
+
'@type'?: string | undefined;
|
|
112
112
|
} & {
|
|
113
113
|
[k: string]: unknown;
|
|
114
114
|
url?: string;
|
|
@@ -121,7 +121,7 @@ export declare function engagementEvent({ eventInput, sdkConfig }?: EventParams<
|
|
|
121
121
|
'@type': string;
|
|
122
122
|
};
|
|
123
123
|
export declare namespace engagementEvent {
|
|
124
|
-
|
|
124
|
+
export { trackerEventInput as defaults };
|
|
125
125
|
}
|
|
126
126
|
export declare function identityEvent({ eventInput }?: EventParams<IdentityEventInput>): IdentityEventInput;
|
|
127
127
|
export declare namespace identityEvent {
|
|
@@ -47,6 +47,6 @@ export type AnonymousObjectInput = {
|
|
|
47
47
|
* @param {object} input
|
|
48
48
|
* @param {object|undefined} pageInput Optional
|
|
49
49
|
*/
|
|
50
|
-
export declare const formatObject: (input: Pick<AnonymousTrackerEventInput,
|
|
50
|
+
export declare const formatObject: (input: Pick<AnonymousTrackerEventInput, 'object'>, pageInput?: PageInput) => Record<string, unknown> | undefined;
|
|
51
51
|
export default formatObject;
|
|
52
52
|
export declare const defaultValue: () => undefined;
|
|
@@ -49,7 +49,7 @@ export type ObjectInput = {
|
|
|
49
49
|
* @param pageInput
|
|
50
50
|
* @private
|
|
51
51
|
*/
|
|
52
|
-
export declare const formatObject: (input: Pick<TrackerEventInput,
|
|
52
|
+
export declare const formatObject: (input: Pick<TrackerEventInput, 'object'>, pageInput?: PageInput) => Record<string, unknown> | undefined;
|
|
53
53
|
/**
|
|
54
54
|
* @internal
|
|
55
55
|
*/
|
|
@@ -9,8 +9,8 @@ export type OriginInput = {
|
|
|
9
9
|
[k: string]: unknown | undefined;
|
|
10
10
|
};
|
|
11
11
|
export default function origin(input: Pick<TrackerEventInput, 'origin' | 'provider'>): {
|
|
12
|
-
'@type'?: string | undefined;
|
|
13
12
|
'@id'?: string | number | undefined;
|
|
13
|
+
'@type'?: string | undefined;
|
|
14
14
|
} & {
|
|
15
15
|
[k: string]: unknown;
|
|
16
16
|
url?: string;
|
|
@@ -31,10 +31,14 @@ export declare const pulseStorageKeys: {
|
|
|
31
31
|
PULSE_PPID_STORAGE_KEY: string;
|
|
32
32
|
PULSE_CIS_CACHE_STORAGE_KEY: string;
|
|
33
33
|
};
|
|
34
|
+
declare const getPPIDsFromStorage: () => AdvertisingIdentifiers;
|
|
35
|
+
declare const setPPIDsToStorage: (ppid: AdvertisingIdentifiers) => boolean;
|
|
36
|
+
declare const getCisCacheFromStorage: () => CisCache;
|
|
37
|
+
declare const setCisCacheToStorage: (cisPayload: CisCache) => boolean;
|
|
34
38
|
declare const _default: {
|
|
35
|
-
getCisCacheFromStorage:
|
|
36
|
-
setCisCacheToStorage:
|
|
37
|
-
getPPIDsFromStorage:
|
|
38
|
-
setPPIDsToStorage:
|
|
39
|
+
getCisCacheFromStorage: typeof getCisCacheFromStorage;
|
|
40
|
+
setCisCacheToStorage: typeof setCisCacheToStorage;
|
|
41
|
+
getPPIDsFromStorage: typeof getPPIDsFromStorage;
|
|
42
|
+
setPPIDsToStorage: typeof setPPIDsToStorage;
|
|
39
43
|
};
|
|
40
44
|
export default _default;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IDevice } from '../../tpaas-schemas';
|
|
2
2
|
import type { TpaasEventBuilderDependencies } from '../types';
|
|
3
|
-
export declare const builder: (environmentId: TpaasEventBuilderDependencies[
|
|
3
|
+
export declare const builder: (environmentId: TpaasEventBuilderDependencies['environmentId'], jwe: TpaasEventBuilderDependencies['jwe']) => {
|
|
4
4
|
device: IDevice;
|
|
5
5
|
};
|
|
@@ -3,7 +3,7 @@ import type { TpaasEventBuilderDependencies } from '../types';
|
|
|
3
3
|
type TpaasSchemasWithExperiments = Extract<ITpaasEvent, {
|
|
4
4
|
experiments?: IExperiments;
|
|
5
5
|
}>;
|
|
6
|
-
export declare const builder: (baseExperiments?: TpaasEventBuilderDependencies[
|
|
6
|
+
export declare const builder: (baseExperiments?: TpaasEventBuilderDependencies['experiments'], eventExperiments?: InputParams<TpaasSchemasWithExperiments>['experiments']) => {
|
|
7
7
|
experiments?: IExperiments;
|
|
8
8
|
};
|
|
9
9
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NavigationType, TpaasSchemasWithNavigationType } from '../../tpaas-schemas';
|
|
2
|
-
export declare const builder: <T extends Partial<TpaasSchemasWithNavigationType[
|
|
2
|
+
export declare const builder: <T extends Partial<TpaasSchemasWithNavigationType['page']['navigationType']>>(eventNavigationType: T | undefined) => {
|
|
3
3
|
page: {
|
|
4
|
-
navigationType: Exclude<NavigationType,
|
|
4
|
+
navigationType: Exclude<NavigationType, 'Scroll'> | T;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TpaasEventBuilderDependencies } from '../types';
|
|
2
|
-
export declare const builder: (pageviewId: TpaasEventBuilderDependencies[
|
|
2
|
+
export declare const builder: (pageviewId: TpaasEventBuilderDependencies['pageviewId']) => {
|
|
3
3
|
page: {
|
|
4
4
|
pageviewId: string;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ITracker } from '../../tpaas-schemas';
|
|
2
2
|
import type { TpaasEventBuilderDependencies } from '../types';
|
|
3
|
-
export declare const builder: (
|
|
3
|
+
export declare const builder: ({ autoTrackerVersion, isHybrid, routingStage, version, }: Pick<TpaasEventBuilderDependencies, 'autoTrackerVersion' | 'isHybrid' | 'routingStage' | 'version'>) => {
|
|
4
4
|
tracker: ITracker;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IUser } from '../../tpaas-schemas';
|
|
2
2
|
import type { TpaasEventBuilderDependencies } from '../types';
|
|
3
|
-
export declare const builder: (user: TpaasEventBuilderDependencies[
|
|
3
|
+
export declare const builder: (user: TpaasEventBuilderDependencies['user']) => {
|
|
4
4
|
user?: IUser;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type IAnonymousViewUIElement, type ICompletedHealthAction, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementTeaser, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IExperiments, type IImpressionAdSlot, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudioPage, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type InputParams, type ITpaasEvent, type IViewArticle, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudioPage, type IViewLockedVideoPage, type IViewPage, type IViewSportsPage, type IViewTitle, type IViewVideoPage, type IViewWeather } from '../tpaas-schemas';
|
|
2
|
-
import type { TpaasEventBuilderDependencies } from './types';
|
|
1
|
+
import { type IAnonymousViewUIElement, type ICompletedHealthAction, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementTeaser, type IEngagementTvModule, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IExperiments, type IImpressionAdSlot, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudioPage, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type InputParams, type ITpaasEvent, type IViewArticle, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudioPage, type IViewLockedVideoPage, type IViewPage, type IViewSportsPage, type IViewTitle, type IViewVideoPage, type IViewWeather } from '../tpaas-schemas';
|
|
2
|
+
import type { TpaasAnonymousEventBuilderDependencies, TpaasEventBuilderDependencies } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Common builders output to be merged into all events
|
|
5
5
|
* @param createdAt
|
|
@@ -9,71 +9,72 @@ import type { TpaasEventBuilderDependencies } from './types';
|
|
|
9
9
|
export declare const getCommonBuildersOutput: (createdAt: Date, dependencies: TpaasEventBuilderDependencies, input: InputParams<Extract<ITpaasEvent, {
|
|
10
10
|
experiments?: IExperiments;
|
|
11
11
|
}>>) => {
|
|
12
|
+
catalogVersion: string;
|
|
12
13
|
consents: {
|
|
13
|
-
source: string;
|
|
14
14
|
advertising: "Accepted" | "Rejected" | "Unknown";
|
|
15
15
|
analytics: "Accepted" | "Rejected" | "Unknown";
|
|
16
16
|
marketing: "Accepted" | "Rejected" | "Unknown";
|
|
17
17
|
personalization: "Accepted" | "Rejected" | "Unknown";
|
|
18
|
+
source: string;
|
|
18
19
|
};
|
|
19
20
|
device: {
|
|
20
|
-
environmentId: string;
|
|
21
|
-
userAgent: string | undefined;
|
|
22
|
-
deviceType: "Other" | "Desktop" | "Mobile" | "Tablet" | "SmartTv";
|
|
23
|
-
viewportSize: "XS" | "S" | "M" | "L" | "XL";
|
|
24
|
-
jweIds: string | undefined;
|
|
25
|
-
clientType: "Other" | "Chrome" | "Safari" | "Edge" | "Firefox" | "Samsung" | "NativeScreen" | "Webview";
|
|
26
|
-
operatingSystem: "Other" | "Windows" | "Mac" | "Linux" | "iOS" | "Android";
|
|
27
|
-
screenOrientation: "Portrait" | "Landscape";
|
|
28
21
|
browserVersion: string | undefined;
|
|
22
|
+
clientType: "Chrome" | "Edge" | "Firefox" | "NativeScreen" | "Other" | "Safari" | "Samsung" | "Webview";
|
|
23
|
+
deviceType: "Desktop" | "Mobile" | "Other" | "SmartTv" | "Tablet";
|
|
24
|
+
environmentId: string;
|
|
29
25
|
ipAddress: string | undefined;
|
|
26
|
+
jweIds: string | undefined;
|
|
30
27
|
mobileBrand: string | undefined;
|
|
31
28
|
mobileModel: string | undefined;
|
|
29
|
+
operatingSystem: "Android" | "Linux" | "Mac" | "Other" | "Windows" | "iOS";
|
|
30
|
+
screenOrientation: "Landscape" | "Portrait";
|
|
31
|
+
userAgent: string | undefined;
|
|
32
|
+
viewportSize: "L" | "M" | "S" | "XL" | "XS";
|
|
32
33
|
};
|
|
34
|
+
eventId: string;
|
|
33
35
|
experiments: IExperiments | undefined;
|
|
36
|
+
page: {
|
|
37
|
+
info: {
|
|
38
|
+
pageId: string | undefined;
|
|
39
|
+
pageType: "Article" | "AudioPage" | "Error" | "Frontpage" | "HealthPage" | "Landingpage" | "Listing" | "LockedArticle" | "LockedAudioPage" | "LockedVideoPage" | "Login" | "Page" | "SportsPage" | "Title" | "VideoPage" | "Weather" | undefined;
|
|
40
|
+
url: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
pageviewId: string;
|
|
43
|
+
referrer: import("..").IPageRef | undefined;
|
|
44
|
+
utm: import("..").IUtmTags | undefined;
|
|
45
|
+
};
|
|
34
46
|
provider: {
|
|
35
|
-
name: string | undefined;
|
|
36
|
-
providerId: string;
|
|
37
47
|
component: string | undefined;
|
|
38
48
|
componentVersion: string | undefined;
|
|
39
49
|
group: string | undefined;
|
|
50
|
+
name: string | undefined;
|
|
51
|
+
providerId: string;
|
|
40
52
|
providerSdrn: string;
|
|
41
53
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
proxyVersion: string | undefined;
|
|
48
|
-
trackerType: "JS" | "Android" | "IOS" | "Backend";
|
|
49
|
-
};
|
|
50
|
-
page: {
|
|
51
|
-
pageviewId: string;
|
|
52
|
-
referrer: import("../tpaas-schemas").IPageRef | undefined;
|
|
53
|
-
utm: import("../tpaas-schemas").IUtmTags | undefined;
|
|
54
|
-
info: {
|
|
55
|
-
url: string | undefined;
|
|
56
|
-
pageId: string | undefined;
|
|
57
|
-
pageType: "Article" | "AudioPage" | "Error" | "Frontpage" | "Landingpage" | "Listing" | "LockedArticle" | "LockedAudioPage" | "LockedVideoPage" | "Page" | "SportsPage" | "VideoPage" | "Weather" | "HealthPage" | "Title" | "Login" | undefined;
|
|
58
|
-
};
|
|
54
|
+
session: {
|
|
55
|
+
isFirstEvent: boolean;
|
|
56
|
+
sessionId: string;
|
|
57
|
+
startTime: string;
|
|
58
|
+
xDomainId: string | undefined;
|
|
59
59
|
};
|
|
60
|
-
user: import("../tpaas-schemas").IUser | undefined;
|
|
61
|
-
eventId: string;
|
|
62
60
|
time: {
|
|
63
61
|
createdAt: string;
|
|
64
62
|
publishedAt: string | undefined;
|
|
65
63
|
republishedAt: string | undefined;
|
|
66
64
|
sentAt: string;
|
|
67
65
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
tracker: {
|
|
67
|
+
autoTrackerVersion: string | undefined;
|
|
68
|
+
isAutoTracker: boolean;
|
|
69
|
+
isHybrid: boolean;
|
|
70
|
+
proxyVersion: string | undefined;
|
|
71
|
+
routingStage: "Dev" | "Pre" | "Pro";
|
|
72
|
+
trackerType: "Android" | "Backend" | "IOS" | "JS";
|
|
73
|
+
version: string;
|
|
73
74
|
};
|
|
74
|
-
|
|
75
|
+
user: import("..").IUser | undefined;
|
|
75
76
|
};
|
|
76
|
-
export declare function buildAnonymousViewUIElementEvent(input: InputParams<IAnonymousViewUIElement>, dependencies:
|
|
77
|
+
export declare function buildAnonymousViewUIElementEvent(input: InputParams<IAnonymousViewUIElement>, dependencies: TpaasAnonymousEventBuilderDependencies): IAnonymousViewUIElement;
|
|
77
78
|
export declare function buildViewArticleEvent(input: InputParams<IViewArticle>, dependencies: TpaasEventBuilderDependencies): IViewArticle;
|
|
78
79
|
export declare function buildViewAudioPageEvent(input: InputParams<IViewAudioPage>, dependencies: TpaasEventBuilderDependencies): IViewAudioPage;
|
|
79
80
|
export declare function buildViewErrorEvent(input: InputParams<IViewError>, dependencies: TpaasEventBuilderDependencies): IViewError;
|
|
@@ -105,6 +106,7 @@ export declare function buildEngagementAudioEvent(input: InputParams<IEngagement
|
|
|
105
106
|
export declare function buildEngagementFormEvent(input: InputParams<IEngagementForm>, dependencies: TpaasEventBuilderDependencies): IEngagementForm;
|
|
106
107
|
export declare function buildEngagementOfferEvent(input: InputParams<IEngagementOffer>, dependencies: TpaasEventBuilderDependencies): IEngagementOffer;
|
|
107
108
|
export declare function buildEngagementTeaserEvent(input: InputParams<IEngagementTeaser>, dependencies: TpaasEventBuilderDependencies): IEngagementTeaser;
|
|
109
|
+
export declare function buildEngagementTvModuleEvent(input: InputParams<IEngagementTvModule>, dependencies: TpaasEventBuilderDependencies): IEngagementTvModule;
|
|
108
110
|
export declare function buildEngagementUIElementEvent(input: InputParams<IEngagementUIElement>, dependencies: TpaasEventBuilderDependencies): IEngagementUIElement;
|
|
109
111
|
export declare function buildEngagementVideoEvent(input: InputParams<IEngagementVideo>, dependencies: TpaasEventBuilderDependencies): IEngagementVideo;
|
|
110
112
|
export declare function buildEngagementVideoAdEvent(input: InputParams<IEngagementVideoAd>, dependencies: TpaasEventBuilderDependencies): IEngagementVideoAd;
|
|
@@ -15,6 +15,7 @@ export interface TpaasEventBuilderDependencies {
|
|
|
15
15
|
autoTrackerVersion: ITracker['autoTrackerVersion'];
|
|
16
16
|
version: ITracker['version'];
|
|
17
17
|
isHybrid: ITracker['isHybrid'];
|
|
18
|
+
routingStage: ITracker['routingStage'];
|
|
18
19
|
consents?: IConsents;
|
|
19
20
|
providerId: IProvider['providerId'];
|
|
20
21
|
providerName?: IProvider['name'];
|
|
@@ -28,3 +29,4 @@ export interface TpaasEventBuilderDependencies {
|
|
|
28
29
|
currentPage?: IPageRef;
|
|
29
30
|
currentPageReferrer: IPageRef;
|
|
30
31
|
}
|
|
32
|
+
export type TpaasAnonymousEventBuilderDependencies = Pick<TpaasEventBuilderDependencies, 'autoTrackerVersion' | 'isHybrid' | 'version' | 'pageviewId' | 'providerId' | 'providerName' | 'providerGroup' | 'experiments' | 'component' | 'componentVersion' | 'currentPageReferrer' | 'routingStage'>;
|