@schibsted/pulse-sdk 8.0.0-rc.0 → 8.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,7 +64,7 @@ const leaveTrackingTpaas_1 = require("./leaveTrackingTpaas");
64
64
  const network_1 = __importDefault(require("./network"));
65
65
  const config = __importStar(require("./remoteConfig"));
66
66
  const proxy_provider_1 = require("./tracker-proxy/proxy-provider");
67
- const version_json_1 = __importDefault(require("./version.json"));
67
+ const version_1 = require("./version");
68
68
  const visibility_observer_1 = require("./visibility-observer");
69
69
  const warnOnce_1 = __importDefault(require("./warnOnce"));
70
70
  const event_builder_1 = require("./wrapper/engagement/ui-element/event-builder");
@@ -250,7 +250,7 @@ class Tracker {
250
250
  id: providerId,
251
251
  },
252
252
  tracker: {
253
- version: version_json_1.default.SDK_VERSION,
253
+ version: version_1.SDK_VERSION,
254
254
  },
255
255
  });
256
256
  this.bookmark = new Map();
@@ -450,7 +450,7 @@ class Tracker {
450
450
  }
451
451
  return {
452
452
  autoTrackerVersion: this.builders.tracker?.autoTrackerVersion,
453
- version: version_json_1.default.SDK_VERSION,
453
+ version: version_1.SDK_VERSION,
454
454
  isHybrid: !!this.state.isHybrid,
455
455
  pageviewId: this.state.pageViewId,
456
456
  providerId: this.state.providerId,
@@ -526,7 +526,7 @@ class Tracker {
526
526
  const { environmentId, jwe } = (0, pulse_cis_sync_1.parsePulseCookies)();
527
527
  return {
528
528
  autoTrackerVersion: this.builders.tracker?.autoTrackerVersion,
529
- version: version_json_1.default.SDK_VERSION,
529
+ version: version_1.SDK_VERSION,
530
530
  isHybrid: !!this.state.isHybrid,
531
531
  user: adaptActorToNewFormat(actor),
532
532
  consents: adaptConsentsToNewFormat(consents),
@@ -840,6 +840,36 @@ class Tracker {
840
840
  }
841
841
  return result;
842
842
  }
843
+ /**
844
+ * @param input
845
+ * @param options
846
+ * @category TPaaS Tracking
847
+ */
848
+ async trackViewSportsPage(input, options) {
849
+ this.newPageView(); // Reset the page view ID if it is not set, to ensure a new page view is tracked
850
+ this.setCurrentPage(input.object.objectId, 'Page'); // ViewSportsPage.object.objectType is SportsPage, which is not allowed as a pageType
851
+ const dependencies = await this.prepareTpaasEvent();
852
+ const event = (0, tpaas_event_builder_1.buildViewSportsPageEvent)(input, dependencies);
853
+ const result = this.sendTpaasEvent(event);
854
+ if ((0, leaveTrackingTpaas_1.shouldEnableLeaveTracking)(options.leaveTracking)) {
855
+ const { objectElement, pageElement, heightBuilder, objectResizable } = options.leaveTracking;
856
+ const leaveSportsPageCallback = (leave) => {
857
+ this.trackLeaveSportsPage({
858
+ leave,
859
+ ...input,
860
+ });
861
+ };
862
+ (0, leaveTrackingTpaas_1.addTpaasLeaveTracking)({
863
+ objectElement,
864
+ pageElement,
865
+ objectResizable,
866
+ heightBuilder,
867
+ schema: tpaas_schemas_1.LeaveSportsPage.object.objectType,
868
+ trackMethod: leaveSportsPageCallback,
869
+ });
870
+ }
871
+ return result;
872
+ }
843
873
  /**
844
874
  * @param input
845
875
  * @category TPaaS Tracking
@@ -1488,6 +1518,15 @@ class Tracker {
1488
1518
  const event = (0, tpaas_event_builder_1.buildLeavePageEvent)(input, dependencies);
1489
1519
  return this.sendTpaasEvent(event);
1490
1520
  }
1521
+ /**
1522
+ * @param input
1523
+ * @category TPaaS Tracking
1524
+ */
1525
+ async trackLeaveSportsPage(input) {
1526
+ const dependencies = await this.prepareTpaasEvent();
1527
+ const event = (0, tpaas_event_builder_1.buildLeaveSportsPageEvent)(input, dependencies);
1528
+ return this.sendTpaasEvent(event);
1529
+ }
1491
1530
  /**
1492
1531
  * @param input
1493
1532
  * @category TPaaS Tracking
@@ -65,7 +65,7 @@ function anonymousTrackerEvent({ eventInput, sdkConfig } = {}) {
65
65
  return Object.assign({}, (0, pulse_utils_1.omit)(eventInput, ['type']), {
66
66
  '@type': eventInput?.type || 'View',
67
67
  schema: eventInput?.schema ||
68
- `http://${sdkConfig?.schemaLocation || events_node_1.DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/351.json`,
68
+ `http://${sdkConfig?.schemaLocation || events_node_1.DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/360.json`,
69
69
  consents: (0, consents_1.default)(parentInput),
70
70
  experiments: (0, experiments_1.default)(parentInput),
71
71
  experimentMetadata: (0, experimentMetadata_1.default)(parentInput),
@@ -98,7 +98,7 @@ function trackerEvent({ eventInput, sdkConfig } = {}) {
98
98
  '@type': eventInput?.type || 'View',
99
99
  pageViewId: pageViewIdInput || pageViewIdSdk,
100
100
  schema: eventInput?.schema ||
101
- `http://${sdkConfig?.schemaLocation || exports.DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/359.json`,
101
+ `http://${sdkConfig?.schemaLocation || exports.DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/360.json`,
102
102
  actor: (0, actor_1.default)(parentInput),
103
103
  consents: (0, consents_1.default)(parentInput),
104
104
  experiments: (0, experiments_1.default)(parentInput),
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.defaultValue = void 0;
7
4
  exports.default = tracker;
8
- const version_json_1 = __importDefault(require("../version.json"));
5
+ const version_1 = require("../version");
9
6
  /**
10
7
  * Format tracker objects
11
8
  */
@@ -14,7 +11,7 @@ function tracker(input) {
14
11
  const base = {
15
12
  name: 'Pulse Node.js SDK',
16
13
  type: 'JS',
17
- version: version_json_1.default.SDK_VERSION,
14
+ version: version_1.SDK_VERSION,
18
15
  };
19
16
  return Object.assign({}, base, trackerInput);
20
17
  }
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.requireCisSyncCallForAdvertisingIds = exports.cisSync = exports.clearCookieJweIfStale = void 0;
7
4
  const pulse_cis_sync_1 = require("@schibsted/pulse-cis-sync");
8
5
  Object.defineProperty(exports, "clearCookieJweIfStale", { enumerable: true, get: function () { return pulse_cis_sync_1.clearCookieJweIfStale; } });
9
- const version_json_1 = __importDefault(require("../version.json"));
6
+ const version_1 = require("../version");
10
7
  const actor_1 = require("./actor");
11
8
  const requireCisSyncCallForAdvertisingIds = () => {
12
9
  (0, pulse_cis_sync_1.resetRefreshAfter)(new Date());
@@ -55,7 +52,7 @@ const cisSync = async (data, builders, config) => {
55
52
  // @ts-expect-error
56
53
  return (0, pulse_cis_sync_1.syncWithCis)(
57
54
  // @ts-expect-error
58
- id, nativeJwe, cisBaseUrl, realm, providerId, isHybrid ? 'Hybrid' : 'Web', version_json_1.default.SDK_VERSION, {
55
+ id, nativeJwe, cisBaseUrl, realm, providerId, isHybrid ? 'Hybrid' : 'Web', version_1.SDK_VERSION, {
59
56
  includeAdvertising,
60
57
  vendors,
61
58
  trackerId,
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SDK_VERSION = void 0;
4
+ // This file is auto-generated by bin/generate-version.js. Do not edit manually.
5
+ exports.SDK_VERSION = '8.0.0-rc.1';
@@ -1,7 +1,7 @@
1
1
  import { parsePulseCookies } from '@schibsted/pulse-cis-sync';
2
2
  import { evaluateAndFlatten, isBrowser, isFunction, isPromise, isString, pulseMerge, throttle, } from '@schibsted/pulse-utils';
3
- import { buildAnonymousViewUIElementEvent, buildCompletedHealthActionEvent, buildEngagementAudioEvent, buildEngagementFormEvent, buildEngagementHealthUIElementEvent, buildEngagementOfferEvent, buildEngagementTeaserEvent, buildEngagementUIElementEvent, buildEngagementVideoAdEvent, buildEngagementVideoEvent, buildEngagementWidgetEvent, buildImpressionAdSlotEvent, buildImpressionFormEvent, buildImpressionHealthUIElementEvent, buildImpressionOfferEvent, buildImpressionPlayerEvent, buildImpressionTeaserEvent, buildImpressionUIElementEvent, buildImpressionWidgetEvent, buildLeaveArticleEvent, buildLeaveAudioPageEvent, buildLeaveErrorEvent, buildLeaveFrontpageEvent, buildLeaveLandingpageEvent, buildLeaveListingEvent, buildLeaveLockedArticleEvent, buildLeaveLockedAudioEvent, buildLeaveLockedAudioPageEvent, buildLeaveLockedVideoEvent, buildLeaveLockedVideoPageEvent, buildLeavePageEvent, buildLeaveVideoPageEvent, buildLeaveWeatherEvent, buildViewArticleEvent, buildViewAudioEvent, buildViewAudioPageEvent, buildViewErrorEvent, buildViewFrontpageEvent, buildViewHealthPageEvent, buildViewLandingpageEvent, buildViewListingEvent, buildViewLockedArticleEvent, buildViewLockedAudioEvent, buildViewLockedAudioPageEvent, buildViewLockedVideoEvent, buildViewLockedVideoPageEvent, buildViewPageEvent, buildViewTitleEvent, buildViewVideoEvent, buildViewVideoPageEvent, buildViewWeatherEvent, getCommonBuildersOutput, } from '@schibsted/tpaas-event-builder';
4
- import { LeaveArticle, LeaveAudioPage, LeaveError, LeaveFrontpage, LeaveLandingpage, LeaveListing, LeaveLockedArticle, LeaveLockedAudioPage, LeaveLockedVideoPage, LeavePage, LeaveVideoPage, LeaveWeather, ViewArticle, ViewError, ViewFrontpage, ViewListing, ViewLockedArticle, ViewLockedVideo, ViewPage, ViewTitle, } from '@schibsted/tpaas-schemas';
3
+ import { buildAnonymousViewUIElementEvent, buildCompletedHealthActionEvent, buildEngagementAudioEvent, buildEngagementFormEvent, buildEngagementHealthUIElementEvent, buildEngagementOfferEvent, buildEngagementTeaserEvent, buildEngagementUIElementEvent, buildEngagementVideoAdEvent, buildEngagementVideoEvent, buildEngagementWidgetEvent, buildImpressionAdSlotEvent, buildImpressionFormEvent, buildImpressionHealthUIElementEvent, buildImpressionOfferEvent, buildImpressionPlayerEvent, buildImpressionTeaserEvent, buildImpressionUIElementEvent, buildImpressionWidgetEvent, buildLeaveArticleEvent, buildLeaveAudioPageEvent, buildLeaveErrorEvent, buildLeaveFrontpageEvent, buildLeaveLandingpageEvent, buildLeaveListingEvent, buildLeaveLockedArticleEvent, buildLeaveLockedAudioEvent, buildLeaveLockedAudioPageEvent, buildLeaveLockedVideoEvent, buildLeaveLockedVideoPageEvent, buildLeavePageEvent, buildLeaveSportsPageEvent, buildLeaveVideoPageEvent, buildLeaveWeatherEvent, buildViewArticleEvent, buildViewAudioEvent, buildViewAudioPageEvent, buildViewErrorEvent, buildViewFrontpageEvent, buildViewHealthPageEvent, buildViewLandingpageEvent, buildViewListingEvent, buildViewLockedArticleEvent, buildViewLockedAudioEvent, buildViewLockedAudioPageEvent, buildViewLockedVideoEvent, buildViewLockedVideoPageEvent, buildViewPageEvent, buildViewSportsPageEvent, buildViewTitleEvent, buildViewVideoEvent, buildViewVideoPageEvent, buildViewWeatherEvent, getCommonBuildersOutput, } from '@schibsted/tpaas-event-builder';
4
+ import { LeaveArticle, LeaveAudioPage, LeaveError, LeaveFrontpage, LeaveLandingpage, LeaveListing, LeaveLockedArticle, LeaveLockedAudioPage, LeaveLockedVideoPage, LeavePage, LeaveSportsPage, LeaveVideoPage, LeaveWeather, ViewArticle, ViewError, ViewFrontpage, ViewListing, ViewLockedArticle, ViewLockedVideo, ViewPage, ViewTitle, } from '@schibsted/tpaas-schemas';
5
5
  import logger from 'loglevel';
6
6
  import { v4 } from 'uuid';
7
7
  import { getDefaultAltHandler, getDefaultNativeJwe } from './app-integration';
@@ -21,7 +21,7 @@ import { addTpaasLeaveTracking, getTpaasLeaveObject, leaveTpaasTrackingIsActive,
21
21
  import send from './network';
22
22
  import * as config from './remoteConfig';
23
23
  import { startProxyProviderListener } from './tracker-proxy/proxy-provider';
24
- import version from './version.json';
24
+ import { SDK_VERSION } from './version';
25
25
  import { VisibilityObserver } from './visibility-observer';
26
26
  import warnOnce from './warnOnce';
27
27
  import { buildClickUIElementEvent } from './wrapper/engagement/ui-element/event-builder';
@@ -207,7 +207,7 @@ export default class Tracker {
207
207
  id: providerId,
208
208
  },
209
209
  tracker: {
210
- version: version.SDK_VERSION,
210
+ version: SDK_VERSION,
211
211
  },
212
212
  });
213
213
  this.bookmark = new Map();
@@ -407,7 +407,7 @@ export default class Tracker {
407
407
  }
408
408
  return {
409
409
  autoTrackerVersion: this.builders.tracker?.autoTrackerVersion,
410
- version: version.SDK_VERSION,
410
+ version: SDK_VERSION,
411
411
  isHybrid: !!this.state.isHybrid,
412
412
  pageviewId: this.state.pageViewId,
413
413
  providerId: this.state.providerId,
@@ -483,7 +483,7 @@ export default class Tracker {
483
483
  const { environmentId, jwe } = parsePulseCookies();
484
484
  return {
485
485
  autoTrackerVersion: this.builders.tracker?.autoTrackerVersion,
486
- version: version.SDK_VERSION,
486
+ version: SDK_VERSION,
487
487
  isHybrid: !!this.state.isHybrid,
488
488
  user: adaptActorToNewFormat(actor),
489
489
  consents: adaptConsentsToNewFormat(consents),
@@ -797,6 +797,36 @@ export default class Tracker {
797
797
  }
798
798
  return result;
799
799
  }
800
+ /**
801
+ * @param input
802
+ * @param options
803
+ * @category TPaaS Tracking
804
+ */
805
+ async trackViewSportsPage(input, options) {
806
+ this.newPageView(); // Reset the page view ID if it is not set, to ensure a new page view is tracked
807
+ this.setCurrentPage(input.object.objectId, 'Page'); // ViewSportsPage.object.objectType is SportsPage, which is not allowed as a pageType
808
+ const dependencies = await this.prepareTpaasEvent();
809
+ const event = buildViewSportsPageEvent(input, dependencies);
810
+ const result = this.sendTpaasEvent(event);
811
+ if (shouldEnableLeaveTracking(options.leaveTracking)) {
812
+ const { objectElement, pageElement, heightBuilder, objectResizable } = options.leaveTracking;
813
+ const leaveSportsPageCallback = (leave) => {
814
+ this.trackLeaveSportsPage({
815
+ leave,
816
+ ...input,
817
+ });
818
+ };
819
+ addTpaasLeaveTracking({
820
+ objectElement,
821
+ pageElement,
822
+ objectResizable,
823
+ heightBuilder,
824
+ schema: LeaveSportsPage.object.objectType,
825
+ trackMethod: leaveSportsPageCallback,
826
+ });
827
+ }
828
+ return result;
829
+ }
800
830
  /**
801
831
  * @param input
802
832
  * @category TPaaS Tracking
@@ -1445,6 +1475,15 @@ export default class Tracker {
1445
1475
  const event = buildLeavePageEvent(input, dependencies);
1446
1476
  return this.sendTpaasEvent(event);
1447
1477
  }
1478
+ /**
1479
+ * @param input
1480
+ * @category TPaaS Tracking
1481
+ */
1482
+ async trackLeaveSportsPage(input) {
1483
+ const dependencies = await this.prepareTpaasEvent();
1484
+ const event = buildLeaveSportsPageEvent(input, dependencies);
1485
+ return this.sendTpaasEvent(event);
1486
+ }
1448
1487
  /**
1449
1488
  * @param input
1450
1489
  * @category TPaaS Tracking
@@ -25,7 +25,7 @@ export function anonymousTrackerEvent({ eventInput, sdkConfig } = {}) {
25
25
  return Object.assign({}, omit(eventInput, ['type']), {
26
26
  '@type': eventInput?.type || 'View',
27
27
  schema: eventInput?.schema ||
28
- `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/351.json`,
28
+ `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/360.json`,
29
29
  consents: consentsBuilder(parentInput),
30
30
  experiments: experimentsBuilder(parentInput),
31
31
  experimentMetadata: experimentMetadataBuilder(parentInput),
@@ -55,7 +55,7 @@ export function trackerEvent({ eventInput, sdkConfig } = {}) {
55
55
  '@type': eventInput?.type || 'View',
56
56
  pageViewId: pageViewIdInput || pageViewIdSdk,
57
57
  schema: eventInput?.schema ||
58
- `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/359.json`,
58
+ `http://${sdkConfig?.schemaLocation || DEFAULT_SCHEMA_LOCATION}/events/tracker-event.json/360.json`,
59
59
  actor: actorBuilder(parentInput),
60
60
  consents: consentsBuilder(parentInput),
61
61
  experiments: experimentsBuilder(parentInput),
@@ -1,4 +1,4 @@
1
- import version from '../version.json';
1
+ import { SDK_VERSION } from '../version';
2
2
  /**
3
3
  * Format tracker objects
4
4
  */
@@ -7,7 +7,7 @@ export default function tracker(input) {
7
7
  const base = {
8
8
  name: 'Pulse Node.js SDK',
9
9
  type: 'JS',
10
- version: version.SDK_VERSION,
10
+ version: SDK_VERSION,
11
11
  };
12
12
  return Object.assign({}, base, trackerInput);
13
13
  }
@@ -1,5 +1,5 @@
1
1
  import { clearCookieJweIfStale, resetRefreshAfter, syncWithCis } from '@schibsted/pulse-cis-sync';
2
- import version from '../version.json';
2
+ import { SDK_VERSION } from '../version';
3
3
  import { evaluateActor } from './actor';
4
4
  const requireCisSyncCallForAdvertisingIds = () => {
5
5
  resetRefreshAfter(new Date());
@@ -47,7 +47,7 @@ const cisSync = async (data, builders, config) => {
47
47
  // @ts-expect-error
48
48
  return syncWithCis(
49
49
  // @ts-expect-error
50
- id, nativeJwe, cisBaseUrl, realm, providerId, isHybrid ? 'Hybrid' : 'Web', version.SDK_VERSION, {
50
+ id, nativeJwe, cisBaseUrl, realm, providerId, isHybrid ? 'Hybrid' : 'Web', SDK_VERSION, {
51
51
  includeAdvertising,
52
52
  vendors,
53
53
  trackerId,
@@ -0,0 +1,2 @@
1
+ // This file is auto-generated by bin/generate-version.js. Do not edit manually.
2
+ export const SDK_VERSION = '8.0.0-rc.1';
@@ -1,6 +1,6 @@
1
1
  import { type AdvertisingIdentifiers, type AdvertisingVendor } from '@schibsted/pulse-cis-sync';
2
2
  import { getCommonBuildersOutput, type InputParams } from '@schibsted/tpaas-event-builder';
3
- 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 ILeaveLockedAudio, type ILeaveLockedAudioPage, type ILeaveLockedVideo, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveVideoPage, type ILeaveWeather, type ITpaasEvent, type IViewArticle, type IViewAudio, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudio, type IViewLockedAudioPage, type IViewLockedVideo, type IViewLockedVideoPage, type IViewPage, type IViewTitle, type IViewVideo, type IViewVideoPage, type IViewWeather } from '@schibsted/tpaas-schemas';
3
+ 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 ILeaveLockedAudio, type ILeaveLockedAudioPage, type ILeaveLockedVideo, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type ITpaasEvent, type IViewArticle, type IViewAudio, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudio, type IViewLockedAudioPage, type IViewLockedVideo, type IViewLockedVideoPage, type IViewPage, type IViewSportsPage, type IViewTitle, type IViewVideo, type IViewVideoPage, type IViewWeather } from '@schibsted/tpaas-schemas';
4
4
  import logger from 'loglevel';
5
5
  import type { ActorInput, Consents, ConsentsInput, DeviceInput, LocationInput, ObjectInput, OriginInput, ProviderInput, TrackerInput } from './builders';
6
6
  import { engagementEvent, identityEvent, routableEvent, trackerEvent } from './builders/events';
@@ -557,6 +557,12 @@ export default class Tracker {
557
557
  * @category TPaaS Tracking
558
558
  */
559
559
  trackViewPage(input: InputParams<IViewPage>, options: TrackViewEventOptions): Promise<unknown>;
560
+ /**
561
+ * @param input
562
+ * @param options
563
+ * @category TPaaS Tracking
564
+ */
565
+ trackViewSportsPage(input: InputParams<IViewSportsPage>, options: TrackViewEventOptions): Promise<unknown>;
560
566
  /**
561
567
  * @param input
562
568
  * @category TPaaS Tracking
@@ -817,6 +823,11 @@ export default class Tracker {
817
823
  * @category TPaaS Tracking
818
824
  */
819
825
  trackLeavePage(input: InputParams<ILeavePage>): Promise<unknown>;
826
+ /**
827
+ * @param input
828
+ * @category TPaaS Tracking
829
+ */
830
+ trackLeaveSportsPage(input: InputParams<ILeaveSportsPage>): Promise<unknown>;
820
831
  /**
821
832
  * @param input
822
833
  * @category TPaaS Tracking
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION = "8.0.0-rc.1";
@@ -5,6 +5,7 @@ type ClickUIElementInputObject = {
5
5
  id: string;
6
6
  elementType: string;
7
7
  name: string;
8
+ containerName?: string;
8
9
  duration?: number;
9
10
  layout?: Layout;
10
11
  page?: Page;
@@ -5,6 +5,7 @@ type ViewUIElementInputObject = {
5
5
  elementType: string;
6
6
  name: string;
7
7
  placement: Placement;
8
+ containerName?: string;
8
9
  duration?: number;
9
10
  layout?: Layout;
10
11
  /** added automatically */
@@ -16,6 +16,7 @@ exports.buildViewLockedVideoEvent = buildViewLockedVideoEvent;
16
16
  exports.buildViewLockedVideoPageEvent = buildViewLockedVideoPageEvent;
17
17
  exports.buildLeaveLockedVideoPageEvent = buildLeaveLockedVideoPageEvent;
18
18
  exports.buildViewPageEvent = buildViewPageEvent;
19
+ exports.buildViewSportsPageEvent = buildViewSportsPageEvent;
19
20
  exports.buildViewTitleEvent = buildViewTitleEvent;
20
21
  exports.buildViewVideoEvent = buildViewVideoEvent;
21
22
  exports.buildViewVideoPageEvent = buildViewVideoPageEvent;
@@ -31,6 +32,7 @@ exports.buildLeaveLockedAudioEvent = buildLeaveLockedAudioEvent;
31
32
  exports.buildLeaveLockedAudioPageEvent = buildLeaveLockedAudioPageEvent;
32
33
  exports.buildLeaveLockedVideoEvent = buildLeaveLockedVideoEvent;
33
34
  exports.buildLeavePageEvent = buildLeavePageEvent;
35
+ exports.buildLeaveSportsPageEvent = buildLeaveSportsPageEvent;
34
36
  exports.buildLeaveVideoPageEvent = buildLeaveVideoPageEvent;
35
37
  exports.buildLeaveWeatherEvent = buildLeaveWeatherEvent;
36
38
  exports.buildEngagementAudioEvent = buildEngagementAudioEvent;
@@ -143,6 +145,9 @@ function buildLeaveLockedVideoPageEvent(input, dependencies) {
143
145
  function buildViewPageEvent(input, dependencies) {
144
146
  return (0, ts_deepmerge_1.merge)(omitNavigationType(input), tpaas_schemas_1.ViewPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies), (0, experiments_1.builder)(dependencies.experiments, input.experiments), (0, navigationType_1.builder)(input.page.navigationType));
145
147
  }
148
+ function buildViewSportsPageEvent(input, dependencies) {
149
+ return (0, ts_deepmerge_1.merge)(omitNavigationType(input), tpaas_schemas_1.ViewSportsPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies), (0, experiments_1.builder)(dependencies.experiments, input.experiments), (0, navigationType_1.builder)(input.page.navigationType));
150
+ }
146
151
  function buildViewTitleEvent(input, dependencies) {
147
152
  return (0, ts_deepmerge_1.merge)(omitNavigationType(input), tpaas_schemas_1.ViewTitle, (0, exports.getCommonBuildersOutput)(new Date(), dependencies), (0, experiments_1.builder)(dependencies.experiments, input.experiments), (0, navigationType_1.builder)(input.page.navigationType));
148
153
  }
@@ -190,6 +195,9 @@ function buildLeaveLockedVideoEvent(input, dependencies) {
190
195
  function buildLeavePageEvent(input, dependencies) {
191
196
  return (0, ts_deepmerge_1.merge)(omitNavigationType(input), tpaas_schemas_1.LeavePage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies), (0, navigationType_1.builder)(input.page.navigationType), (0, experiments_1.builder)(dependencies.experiments, input.experiments));
192
197
  }
198
+ function buildLeaveSportsPageEvent(input, dependencies) {
199
+ return (0, ts_deepmerge_1.merge)(omitNavigationType(input), tpaas_schemas_1.LeaveSportsPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies), (0, navigationType_1.builder)(input.page.navigationType), (0, experiments_1.builder)(dependencies.experiments, input.experiments));
200
+ }
193
201
  function buildLeaveVideoPageEvent(input, dependencies) {
194
202
  return (0, ts_deepmerge_1.merge)(omitNavigationType(input), tpaas_schemas_1.LeaveVideoPage, (0, exports.getCommonBuildersOutput)(new Date(), dependencies), (0, navigationType_1.builder)(input.page.navigationType));
195
203
  }
@@ -1,4 +1,4 @@
1
- import { AnonymousViewUIElement, CompletedHealthAction, EngagementAudio, EngagementForm, EngagementHealthUIElement, EngagementOffer, EngagementTeaser, EngagementUIElement, EngagementVideo, EngagementVideoAd, EngagementWidget, ImpressionAdSlot, ImpressionForm, ImpressionHealthUIElement, ImpressionOffer, ImpressionPlayer, ImpressionTeaser, ImpressionUIElement, ImpressionWidget, LeaveArticle, LeaveAudioPage, LeaveError, LeaveFrontpage, LeaveLandingpage, LeaveListing, LeaveLockedArticle, LeaveLockedAudio, LeaveLockedAudioPage, LeaveLockedVideo, LeaveLockedVideoPage, LeavePage, LeaveVideoPage, LeaveWeather, ViewArticle, ViewAudio, ViewAudioPage, ViewError, ViewFrontpage, ViewHealthPage, ViewLandingpage, ViewListing, ViewLockedArticle, ViewLockedAudio, ViewLockedAudioPage, ViewLockedVideo, ViewLockedVideoPage, ViewPage, ViewTitle, ViewVideo, ViewVideoPage, ViewWeather, } from '@schibsted/tpaas-schemas';
1
+ import { AnonymousViewUIElement, CompletedHealthAction, EngagementAudio, EngagementForm, EngagementHealthUIElement, EngagementOffer, EngagementTeaser, EngagementUIElement, EngagementVideo, EngagementVideoAd, EngagementWidget, ImpressionAdSlot, ImpressionForm, ImpressionHealthUIElement, ImpressionOffer, ImpressionPlayer, ImpressionTeaser, ImpressionUIElement, ImpressionWidget, LeaveArticle, LeaveAudioPage, LeaveError, LeaveFrontpage, LeaveLandingpage, LeaveListing, LeaveLockedArticle, LeaveLockedAudio, LeaveLockedAudioPage, LeaveLockedVideo, LeaveLockedVideoPage, LeavePage, LeaveSportsPage, LeaveVideoPage, LeaveWeather, ViewArticle, ViewAudio, ViewAudioPage, ViewError, ViewFrontpage, ViewHealthPage, ViewLandingpage, ViewListing, ViewLockedArticle, ViewLockedAudio, ViewLockedAudioPage, ViewLockedVideo, ViewLockedVideoPage, ViewPage, ViewSportsPage, ViewTitle, ViewVideo, ViewVideoPage, ViewWeather, } from '@schibsted/tpaas-schemas';
2
2
  import { merge } from 'ts-deepmerge';
3
3
  import { builder as anonymousBuilder } from './builders/anonymous';
4
4
  import { builder as baseEventBuilder } from './builders/baseEvent';
@@ -88,6 +88,9 @@ export function buildLeaveLockedVideoPageEvent(input, dependencies) {
88
88
  export function buildViewPageEvent(input, dependencies) {
89
89
  return merge(omitNavigationType(input), ViewPage, getCommonBuildersOutput(new Date(), dependencies), experimentsBuilder(dependencies.experiments, input.experiments), navigationTypeBuilder(input.page.navigationType));
90
90
  }
91
+ export function buildViewSportsPageEvent(input, dependencies) {
92
+ return merge(omitNavigationType(input), ViewSportsPage, getCommonBuildersOutput(new Date(), dependencies), experimentsBuilder(dependencies.experiments, input.experiments), navigationTypeBuilder(input.page.navigationType));
93
+ }
91
94
  export function buildViewTitleEvent(input, dependencies) {
92
95
  return merge(omitNavigationType(input), ViewTitle, getCommonBuildersOutput(new Date(), dependencies), experimentsBuilder(dependencies.experiments, input.experiments), navigationTypeBuilder(input.page.navigationType));
93
96
  }
@@ -135,6 +138,9 @@ export function buildLeaveLockedVideoEvent(input, dependencies) {
135
138
  export function buildLeavePageEvent(input, dependencies) {
136
139
  return merge(omitNavigationType(input), LeavePage, getCommonBuildersOutput(new Date(), dependencies), navigationTypeBuilder(input.page.navigationType), experimentsBuilder(dependencies.experiments, input.experiments));
137
140
  }
141
+ export function buildLeaveSportsPageEvent(input, dependencies) {
142
+ return merge(omitNavigationType(input), LeaveSportsPage, getCommonBuildersOutput(new Date(), dependencies), navigationTypeBuilder(input.page.navigationType), experimentsBuilder(dependencies.experiments, input.experiments));
143
+ }
138
144
  export function buildLeaveVideoPageEvent(input, dependencies) {
139
145
  return merge(omitNavigationType(input), LeaveVideoPage, getCommonBuildersOutput(new Date(), dependencies), navigationTypeBuilder(input.page.navigationType));
140
146
  }