@schibsted/pulse-sdk 8.0.0-rc.2 → 8.0.0-rc.20
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 +578 -303
- package/dist/cjs/app-integration.js +3 -3
- package/dist/cjs/builders/actor.js +6 -6
- package/dist/cjs/builders/consents.js +8 -8
- package/dist/cjs/builders/device-browser.js +8 -8
- package/dist/cjs/builders/device-node.js +3 -3
- package/dist/cjs/builders/events-anonymous-node.js +3 -3
- package/dist/cjs/builders/events-node.js +7 -7
- package/dist/cjs/builders/experimentMetadata.js +2 -2
- package/dist/cjs/builders/experiments.js +1 -0
- package/dist/cjs/builders/objects/objects-anonymous-browser.js +2 -2
- package/dist/cjs/builders/objects/objects-anonymous-node.js +9 -9
- package/dist/cjs/builders/objects/objects-browser.js +2 -2
- package/dist/cjs/builders/objects/objects-node.js +10 -10
- package/dist/cjs/builders/objects/utils.js +3 -3
- package/dist/cjs/builders/origin-browser.js +2 -2
- package/dist/cjs/builders/origin-node.js +4 -4
- package/dist/cjs/builders/session-browser.js +6 -5
- package/dist/cjs/cis-sync/cis-browser.js +219 -0
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/cis-sync}/cis.js +0 -1
- package/dist/cjs/cis-sync/eventEmitter.js +37 -0
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/cis-sync}/index.js +0 -1
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/cis-sync}/pulse-cookie.js +53 -63
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/cis-sync}/storage/pulseStorage.js +28 -21
- package/dist/cjs/cis-sync/storage/storage.js +24 -0
- package/dist/cjs/createPulseTracker.js +4 -4
- package/dist/cjs/identity/actor.js +20 -8
- package/dist/cjs/identity/advertising.js +1 -1
- package/dist/cjs/identity/cis.js +7 -6
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/leaveTracking/index.js +10 -10
- package/dist/cjs/leaveTrackingTpaas/constants.js +2 -7
- package/dist/cjs/leaveTrackingTpaas/index.js +70 -46
- package/dist/cjs/network-browser.js +3 -3
- package/dist/cjs/remoteConfig/index.js +5 -5
- package/dist/cjs/tpaas-builders/builders/catalogVersion.js +9 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/device.js +11 -5
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/navigationType.js +2 -3
- package/dist/cjs/tpaas-builders/builders/pageContent.js +7 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/pageInfo.js +2 -2
- package/dist/cjs/tpaas-builders/builders/pageSports.js +7 -0
- package/dist/cjs/tpaas-builders/builders/provider.js +19 -0
- package/dist/cjs/tpaas-builders/builders/referrer.js +17 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/session.js +23 -20
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/trackerBuilder.js +2 -3
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/user.js +1 -1
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/utm.js +3 -3
- package/dist/cjs/tpaas-builders/builders.js +339 -0
- package/dist/cjs/tpaas-builders/guards.js +7 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/index.js +3 -0
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/tpaas-builders}/types.js +0 -1
- package/{node_modules/@schibsted/tpaas-schemas/dist/cjs → dist/cjs/tpaas-schemas}/constants.js +193 -155
- package/{node_modules/@schibsted/tpaas-schemas/dist/cjs → dist/cjs/tpaas-schemas}/index.js +1 -0
- package/dist/cjs/tpaas-schemas/types.js +2 -0
- package/dist/cjs/tracker-proxy/consts.js +29 -6
- package/dist/cjs/tracker-proxy/proxy-provider.js +2 -2
- package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/index.js +4 -1
- package/dist/cjs/utils/xDomainId.js +15 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/visibility-observer/index.js +9 -7
- package/dist/cjs/wrapper/types/event.js +5 -0
- package/dist/cjs/wrapper/utils/map-page-to-page-ref.js +13 -0
- package/dist/ejs/Tracker.js +510 -235
- package/dist/ejs/app-integration.js +1 -1
- package/dist/ejs/builders/actor.js +3 -3
- package/dist/ejs/builders/consents.js +4 -4
- package/dist/ejs/builders/device-browser.js +2 -2
- package/dist/ejs/builders/device-node.js +1 -1
- package/dist/ejs/builders/events-anonymous-node.js +1 -1
- package/dist/ejs/builders/events-node.js +4 -4
- package/dist/ejs/builders/experimentMetadata.js +1 -1
- package/dist/ejs/builders/experiments.js +1 -1
- package/dist/ejs/builders/objects/objects-anonymous-browser.js +1 -1
- package/dist/ejs/builders/objects/objects-anonymous-node.js +1 -1
- package/dist/ejs/builders/objects/objects-browser.js +1 -1
- package/dist/ejs/builders/objects/objects-node.js +1 -1
- package/dist/ejs/builders/objects/utils.js +1 -1
- package/dist/ejs/builders/origin-browser.js +1 -1
- package/dist/ejs/builders/origin-node.js +1 -1
- package/dist/ejs/builders/session-browser.js +2 -1
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/cis-browser.js +17 -4
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/cis.js +0 -1
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/eventEmitter.js +0 -1
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/index.js +0 -1
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/pulse-cookie.js +1 -2
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/storage/pulseStorage.js +12 -4
- package/{node_modules/@schibsted/pulse-cis-sync/dist/ejs → dist/ejs/cis-sync}/storage/storage.js +6 -2
- package/dist/ejs/createPulseTracker.js +1 -1
- package/dist/ejs/identity/actor.js +21 -9
- package/dist/ejs/identity/advertising.js +1 -1
- package/dist/ejs/identity/cis.js +4 -3
- package/dist/ejs/index.js +4 -3
- package/dist/ejs/leaveTracking/index.js +1 -1
- package/dist/ejs/leaveTrackingTpaas/constants.js +1 -5
- package/dist/ejs/leaveTrackingTpaas/index.js +65 -41
- package/dist/ejs/network-browser.js +1 -1
- package/dist/ejs/remoteConfig/index.js +1 -1
- package/dist/ejs/tpaas-builders/builders/catalogVersion.js +6 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/device.js +10 -4
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/navigationType.js +2 -3
- package/dist/ejs/tpaas-builders/builders/pageContent.js +3 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/pageInfo.js +1 -1
- package/dist/ejs/tpaas-builders/builders/pageSports.js +3 -0
- package/dist/ejs/tpaas-builders/builders/provider.js +16 -0
- package/dist/ejs/tpaas-builders/builders/referrer.js +13 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/session.js +18 -15
- package/dist/ejs/tpaas-builders/builders/trackerBuilder.js +10 -0
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/user.js +1 -1
- package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/utm.js +2 -2
- package/dist/ejs/tpaas-builders/builders.js +271 -0
- package/dist/ejs/tpaas-builders/guards.js +4 -0
- package/dist/ejs/tpaas-builders/index.js +2 -0
- package/{node_modules/@schibsted/tpaas-schemas/dist/ejs → dist/ejs/tpaas-schemas}/constants.js +191 -153
- package/{node_modules/@schibsted/tpaas-schemas/dist/ejs → dist/ejs/tpaas-schemas}/index.js +1 -0
- package/dist/ejs/tpaas-schemas/types.js +1 -0
- package/dist/ejs/tracker-proxy/consts.js +29 -6
- package/dist/ejs/tracker-proxy/proxy-provider.js +1 -1
- package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/index.js +1 -0
- package/dist/ejs/utils/xDomainId.js +11 -0
- package/dist/ejs/version.js +1 -1
- package/dist/ejs/visibility-observer/index.js +9 -7
- package/dist/ejs/wrapper/types/event.js +4 -1
- package/dist/ejs/wrapper/utils/map-page-to-page-ref.js +10 -0
- package/dist/types/Tracker.d.ts +178 -77
- package/dist/types/builders/actor.d.ts +3 -2
- package/dist/types/builders/consents.d.ts +3 -3
- 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/experiments.d.ts +1 -0
- package/dist/types/builders/index.d.ts +1 -1
- 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/builders/session-browser.d.ts +1 -0
- package/{node_modules/@schibsted/pulse-cis-sync/dist/types → dist/types/cis-sync}/cis-browser.d.ts +1 -0
- package/{node_modules/@schibsted/pulse-cis-sync/dist/types → dist/types/cis-sync}/storage/pulseStorage.d.ts +12 -4
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/storage/storage.d.ts +2 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/createPulseTracker.d.ts +1 -1
- package/dist/types/identity/actor.d.ts +3 -3
- package/dist/types/identity/advertising.d.ts +2 -2
- package/dist/types/identity/cis.d.ts +4 -4
- package/dist/types/index.d.ts +7 -8
- package/dist/types/leaveTrackingTpaas/constants.d.ts +1 -5
- package/dist/types/leaveTrackingTpaas/index.d.ts +6 -6
- package/dist/types/leaveTrackingTpaas/types.d.ts +2 -10
- package/dist/types/tpaas-builders/builders/anonymous.d.ts +3 -0
- package/dist/types/tpaas-builders/builders/baseEvent.d.ts +3 -0
- package/dist/types/tpaas-builders/builders/catalogVersion.d.ts +3 -0
- package/dist/types/tpaas-builders/builders/consents.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/device.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/experiments.d.ts +9 -0
- package/dist/types/tpaas-builders/builders/navigationType.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/pageContent.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/pageInfo.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/pageSports.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/pageviewId.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/provider.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/referrer.d.ts +6 -0
- package/dist/types/tpaas-builders/builders/session.d.ts +15 -0
- package/dist/types/tpaas-builders/builders/time.d.ts +4 -0
- package/dist/types/tpaas-builders/builders/trackerBuilder.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/user.d.ts +5 -0
- package/dist/types/tpaas-builders/builders/utm.d.ts +6 -0
- package/dist/types/tpaas-builders/builders.d.ts +141 -0
- package/dist/types/tpaas-builders/guards.d.ts +2 -0
- package/dist/types/tpaas-builders/index.d.ts +3 -0
- package/dist/types/tpaas-builders/types.d.ts +36 -0
- package/dist/types/tpaas-schemas/constants.d.ts +478 -0
- package/dist/types/tpaas-schemas/index.d.ts +5 -0
- package/dist/types/tpaas-schemas/types/ITpaasEvent.d.ts +132 -0
- package/dist/types/tpaas-schemas/types/schemas/IAnonymousViewUIElement.d.ts +58 -0
- package/dist/types/tpaas-schemas/types/schemas/ICompletedHealthAction.d.ts +139 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementAd.d.ts +117 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementAffiliate.d.ts +144 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementAudio.d.ts +209 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementForm.d.ts +111 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementHealthUIElement.d.ts +133 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementOffer.d.ts +107 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementSchoolUIElement.d.ts +107 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementSportsUIElement.d.ts +157 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTeaser.d.ts +114 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTvModule.d.ts +130 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementTvSearch.d.ts +142 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementUIElement.d.ts +105 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementVideo.d.ts +234 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementVideoAd.d.ts +145 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementWidget.d.ts +91 -0
- package/dist/types/tpaas-schemas/types/schemas/IHeartbeatCommercialArticle.d.ts +96 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionAd.d.ts +115 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionAdSlot.d.ts +89 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionAffiliate.d.ts +142 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionForm.d.ts +113 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionHealthUIElement.d.ts +138 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionOffer.d.ts +109 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionPlayer.d.ts +108 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionSchoolUIElement.d.ts +109 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionSportsUIElement.d.ts +159 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionTeaser.d.ts +112 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionUIElement.d.ts +107 -0
- package/dist/types/tpaas-schemas/types/schemas/IImpressionWidget.d.ts +89 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveArticle.d.ts +133 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveAudioPage.d.ts +88 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveError.d.ts +95 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveFrontpage.d.ts +83 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLandingpage.d.ts +90 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveListing.d.ts +123 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLockedArticle.d.ts +139 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLockedAudioPage.d.ts +97 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLockedPage.d.ts +90 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveLockedVideoPage.d.ts +97 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeavePage.d.ts +82 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveSchoolPage.d.ts +84 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveSportsPage.d.ts +137 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveVideoPage.d.ts +91 -0
- package/dist/types/tpaas-schemas/types/schemas/ILeaveWeather.d.ts +94 -0
- package/dist/types/tpaas-schemas/types/schemas/ILoadAd.d.ts +119 -0
- package/dist/types/tpaas-schemas/types/schemas/IRequestAd.d.ts +95 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewArticle.d.ts +133 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewAudioPage.d.ts +87 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewError.d.ts +90 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewFrontpage.d.ts +80 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewHealthPage.d.ts +119 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLandingpage.d.ts +76 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewListing.d.ts +118 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLockedArticle.d.ts +139 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLockedAudioPage.d.ts +95 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLockedPage.d.ts +94 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewLockedVideoPage.d.ts +95 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewPage.d.ts +86 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewSchoolPage.d.ts +88 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewSportsPage.d.ts +135 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewTitle.d.ts +92 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewVideoPage.d.ts +87 -0
- package/dist/types/tpaas-schemas/types/schemas/IViewWeather.d.ts +94 -0
- package/dist/types/tpaas-schemas/types/schemas/index.d.ts +64 -0
- package/dist/types/tpaas-schemas/types/templates/IBranded.d.ts +42 -0
- package/dist/types/tpaas-schemas/types/templates/IConsents.d.ts +34 -0
- package/dist/types/tpaas-schemas/types/templates/IContent.d.ts +56 -0
- package/dist/types/tpaas-schemas/types/templates/IDevice.d.ts +62 -0
- package/dist/types/tpaas-schemas/types/templates/IEngagement.d.ts +21 -0
- package/dist/types/tpaas-schemas/types/templates/IExperiments.d.ts +35 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthFood.d.ts +55 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthOrigin.d.ts +27 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthPhysicalActivity.d.ts +36 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthTraining.d.ts +74 -0
- package/dist/types/tpaas-schemas/types/templates/IHealthUserData.d.ts +25 -0
- package/dist/types/tpaas-schemas/types/templates/ILeave.d.ts +54 -0
- package/dist/types/tpaas-schemas/types/templates/ILeaveAudio.d.ts +37 -0
- package/dist/types/tpaas-schemas/types/templates/ILeaveStories.d.ts +34 -0
- package/dist/types/tpaas-schemas/types/templates/ILocation.d.ts +21 -0
- package/dist/types/tpaas-schemas/types/templates/IMetrics.d.ts +32 -0
- package/dist/types/tpaas-schemas/types/templates/IPageRef.d.ts +46 -0
- package/dist/types/tpaas-schemas/types/templates/IPlacement.d.ts +45 -0
- package/dist/types/tpaas-schemas/types/templates/IProvider.d.ts +73 -0
- package/dist/types/tpaas-schemas/types/templates/ISchool.d.ts +74 -0
- package/dist/types/tpaas-schemas/types/templates/ISession.d.ts +33 -0
- package/dist/types/tpaas-schemas/types/templates/ISports.d.ts +98 -0
- package/dist/types/tpaas-schemas/types/templates/ISportsUserFeatures.d.ts +28 -0
- package/dist/types/tpaas-schemas/types/templates/ITime.d.ts +32 -0
- package/dist/types/tpaas-schemas/types/templates/ITracker.d.ts +37 -0
- package/dist/types/tpaas-schemas/types/templates/IUser.d.ts +34 -0
- package/dist/types/tpaas-schemas/types/templates/IUtmTags.d.ts +38 -0
- package/dist/types/tpaas-schemas/types/templates/index.d.ts +27 -0
- package/dist/types/tpaas-schemas/types.d.ts +42 -0
- package/dist/types/tracker-proxy/consts.d.ts +2 -2
- package/dist/types/types.d.ts +19 -13
- package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/index.d.ts +1 -0
- package/dist/types/utils/xDomainId.d.ts +2 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/visibility-observer/index.d.ts +6 -1
- package/dist/types/wrapper/engagement/ui-element/types.d.ts +1 -1
- package/dist/types/wrapper/types/base-event.d.ts +1 -1
- package/dist/types/wrapper/types/event.d.ts +4 -2
- package/dist/types/wrapper/types/utils.d.ts +1 -1
- package/dist/types/wrapper/utils/map-page-to-page-ref.d.ts +3 -0
- package/dist/types/wrapper/view/article/types.d.ts +1 -1
- package/dist/types/wrapper/view/frontpage/types.d.ts +1 -1
- package/dist/types/wrapper/view/listing/types.d.ts +1 -1
- package/dist/types/wrapper/view/loginposter/types.d.ts +1 -1
- package/dist/types/wrapper/view/page/types.d.ts +1 -1
- package/dist/types/wrapper/view/salesposter/types.d.ts +1 -1
- package/dist/types/wrapper/view/ui-element/types.d.ts +1 -1
- package/package.json +21 -20
- package/dist/cjs/Tracker.test-d.js +0 -76
- package/dist/ejs/Tracker.test-d.js +0 -71
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis-browser.d.ts +0 -26
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis-browser.js +0 -273
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis-browser.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/cis.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/eventEmitter.js +0 -39
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/eventEmitter.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/index.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/pulse-cookie.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/pulseStorage.d.ts +0 -36
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/pulseStorage.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/storage.js +0 -21
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/storage/storage.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/cjs/types.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis-browser.d.ts +0 -26
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis-browser.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis.d.ts +0 -10
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/cis.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/eventEmitter.d.ts +0 -14
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/eventEmitter.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/index.d.ts +0 -4
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/index.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/pulse-cookie.d.ts +0 -55
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/pulse-cookie.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/pulseStorage.d.ts +0 -36
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/pulseStorage.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/storage.d.ts +0 -6
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/storage/storage.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/types.d.ts +0 -24
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/types.js +0 -2
- package/node_modules/@schibsted/pulse-cis-sync/dist/ejs/types.js.map +0 -1
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/cis.d.ts +0 -10
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/eventEmitter.d.ts +0 -14
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/index.d.ts +0 -4
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/pulse-cookie.d.ts +0 -55
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/storage/storage.d.ts +0 -6
- package/node_modules/@schibsted/pulse-cis-sync/dist/types/types.d.ts +0 -24
- package/node_modules/@schibsted/pulse-cis-sync/package.json +0 -44
- package/node_modules/@schibsted/pulse-utils/package.json +0 -36
- package/node_modules/@schibsted/tpaas-event-builder/dist/cjs/builders/provider.js +0 -12
- package/node_modules/@schibsted/tpaas-event-builder/dist/cjs/builders/referrer.js +0 -19
- package/node_modules/@schibsted/tpaas-event-builder/dist/cjs/builders.js +0 -272
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders/provider.js +0 -9
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders/referrer.js +0 -15
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders/trackerBuilder.js +0 -11
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/builders.js +0 -215
- package/node_modules/@schibsted/tpaas-event-builder/dist/ejs/index.js +0 -1
- package/node_modules/@schibsted/tpaas-event-builder/dist/index.d.ts +0 -5403
- package/node_modules/@schibsted/tpaas-event-builder/package.json +0 -40
- package/node_modules/@schibsted/tpaas-schemas/dist/index.d.ts +0 -6176
- package/node_modules/@schibsted/tpaas-schemas/package.json +0 -35
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/cis-sync}/types.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/anonymous.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/baseEvent.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/consents.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/experiments.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/pageviewId.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/cjs → dist/cjs/tpaas-builders}/builders/time.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/cookie-config.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/cookie.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/events.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/get.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/getRootDomain.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/merge.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/objects.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/omit.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/randomString.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/throttle.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/cjs → dist/cjs/utils}/webApi.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/cis-sync}/types.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/anonymous.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/baseEvent.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/consents.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/experiments.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/pageviewId.js +0 -0
- /package/{node_modules/@schibsted/tpaas-event-builder/dist/ejs → dist/ejs/tpaas-builders}/builders/time.js +0 -0
- /package/dist/{types/Tracker.test-d.d.ts → ejs/tpaas-builders/types.js} +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/cookie-config.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/cookie.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/events.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/get.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/getRootDomain.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/merge.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/objects.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/omit.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/randomString.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/throttle.js +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/ejs → dist/ejs/utils}/webApi.js +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/cis.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/eventEmitter.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/index.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/pulse-cookie.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/types.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/cookie-config.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/cookie.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/events.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/get.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/getRootDomain.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/merge.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/objects.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/omit.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/randomString.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/throttle.d.ts +0 -0
- /package/{node_modules/@schibsted/pulse-utils/dist/types → dist/types/utils}/webApi.d.ts +0 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { merge } from 'ts-deepmerge';
|
|
2
|
+
import { AnonymousViewUIElement, CompletedHealthAction, EngagementAd, EngagementAffiliate, EngagementAudio, EngagementForm, EngagementHealthUIElement, EngagementOffer, EngagementSchoolUIElement, EngagementSportsUIElement, EngagementTeaser, EngagementTvModule, EngagementTvSearch, EngagementUIElement, EngagementVideo, EngagementVideoAd, EngagementWidget, HeartbeatCommercialArticle, ImpressionAd, ImpressionAdSlot, ImpressionAffiliate, ImpressionForm, ImpressionHealthUIElement, ImpressionOffer, ImpressionPlayer, ImpressionSchoolUIElement, ImpressionSportsUIElement, ImpressionTeaser, ImpressionUIElement, ImpressionWidget, LeaveArticle, LeaveAudioPage, LeaveError, LeaveFrontpage, LeaveLandingpage, LeaveListing, LeaveLockedArticle, LeaveLockedAudioPage, LeaveLockedPage, LeaveLockedVideoPage, LeavePage, LeaveSchoolPage, LeaveSportsPage, LeaveVideoPage, LeaveWeather, LoadAd, RequestAd, ViewArticle, ViewAudioPage, ViewError, ViewFrontpage, ViewHealthPage, ViewLandingpage, ViewListing, ViewLockedArticle, ViewLockedAudioPage, ViewLockedPage, ViewLockedVideoPage, ViewPage, ViewSchoolPage, ViewSportsPage, ViewTitle, ViewVideoPage, ViewWeather, } from '../tpaas-schemas';
|
|
3
|
+
import { builder as anonymousBuilder } from './builders/anonymous';
|
|
4
|
+
import { builder as baseEventBuilder } from './builders/baseEvent';
|
|
5
|
+
import { builder as catalogVersionBuilder } from './builders/catalogVersion';
|
|
6
|
+
import { builder as consentsBuilder } from './builders/consents';
|
|
7
|
+
import { builder as deviceBuilder } from './builders/device';
|
|
8
|
+
import { builder as experimentsBuilder } from './builders/experiments';
|
|
9
|
+
import { builder as navigationTypeBuilder } from './builders/navigationType';
|
|
10
|
+
import { builder as pageContentBuilder } from './builders/pageContent';
|
|
11
|
+
import { builder as pageInfoBuilder } from './builders/pageInfo';
|
|
12
|
+
import { builder as pageSportsBuilder } from './builders/pageSports';
|
|
13
|
+
import { builder as pageviewIdBuilder } from './builders/pageviewId';
|
|
14
|
+
import { builder as providerBuilder } from './builders/provider';
|
|
15
|
+
import { builder as referrerBuilder } from './builders/referrer';
|
|
16
|
+
import { builder as sessionBuilder } from './builders/session';
|
|
17
|
+
import { builder as timeBuilder } from './builders/time';
|
|
18
|
+
import { builder as trackerBuilder } from './builders/trackerBuilder';
|
|
19
|
+
import { builder as userBuilder } from './builders/user';
|
|
20
|
+
import { builder as utmBuilder } from './builders/utm';
|
|
21
|
+
/**
|
|
22
|
+
* Common builders output to be merged into all events
|
|
23
|
+
* @param createdAt
|
|
24
|
+
* @param dependencies {TpaasEventBuilderDependencies}
|
|
25
|
+
* @private
|
|
26
|
+
*/
|
|
27
|
+
export const getCommonBuildersOutput = (createdAt, dependencies, input) => {
|
|
28
|
+
const { isHybrid, version, environmentId, jwe, user, consents, providerId, providerName, providerGroup, providerStage, providerProduct, providerVersion, component, componentVersion, pageviewId, currentPage, currentPageReferrer, routingStage, } = dependencies;
|
|
29
|
+
const { experiments } = input;
|
|
30
|
+
return merge(trackerBuilder({ isHybrid, version, routingStage }), timeBuilder(createdAt), sessionBuilder(createdAt), deviceBuilder(environmentId, jwe), userBuilder(user), baseEventBuilder(), consentsBuilder(consents), providerBuilder(providerId, providerStage, providerProduct, providerVersion, component, componentVersion, providerName, providerGroup), pageInfoBuilder(currentPage), pageviewIdBuilder(pageviewId), utmBuilder(), referrerBuilder(currentPageReferrer), catalogVersionBuilder(), experimentsBuilder(dependencies.experiments, experiments));
|
|
31
|
+
};
|
|
32
|
+
const getElementEventBuildersOutput = (createdAt, dependencies, input) => merge(getCommonBuildersOutput(createdAt, dependencies, input), pageContentBuilder(dependencies.currentPageContent));
|
|
33
|
+
const getSportsElementEventBuildersOutput = (createdAt, dependencies, input) => merge(getElementEventBuildersOutput(createdAt, dependencies, input), pageSportsBuilder(dependencies.currentPageSports));
|
|
34
|
+
// there's a bug in the ts-deepmerge library that doesn't properly resolve merging optionals with required properties
|
|
35
|
+
// due to this, we need to do 2 things:
|
|
36
|
+
// (1) manually omit navigationType from the input before merging.
|
|
37
|
+
// it has no effect on the final value since navigationType will always be set by the navigationTypeBuilder.
|
|
38
|
+
// (2) ensure page is always defined in the input, even when it's not passed to the SDK
|
|
39
|
+
// again, it has no effect on the final value because several builders are passing a page object
|
|
40
|
+
// But this makes TS happy in an elegant way, without type assertions at the merge level
|
|
41
|
+
const normalizePageInput = (input) => {
|
|
42
|
+
const { page, ...rest } = input;
|
|
43
|
+
if (!page) {
|
|
44
|
+
return {
|
|
45
|
+
...rest,
|
|
46
|
+
page: {},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if (!('navigationType' in page)) {
|
|
50
|
+
return input;
|
|
51
|
+
}
|
|
52
|
+
const { navigationType: _, ...pageRest } = page;
|
|
53
|
+
return {
|
|
54
|
+
...rest,
|
|
55
|
+
page: {
|
|
56
|
+
...pageRest,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
// #region AnonymousView Event Builders
|
|
61
|
+
export function buildAnonymousViewUIElementEvent(input, dependencies) {
|
|
62
|
+
const createdAt = new Date();
|
|
63
|
+
const { isHybrid, version, pageviewId, providerId, providerName, providerGroup, providerStage, providerProduct, providerVersion, component, componentVersion, currentPageReferrer, routingStage, } = dependencies;
|
|
64
|
+
return merge(AnonymousViewUIElement, baseEventBuilder(), trackerBuilder({ isHybrid, version, routingStage }), timeBuilder(createdAt), pageviewIdBuilder(pageviewId), utmBuilder(), anonymousBuilder(), providerBuilder(providerId, providerStage, providerProduct, providerVersion, component, componentVersion, providerName, providerGroup), referrerBuilder(currentPageReferrer), experimentsBuilder(dependencies.experiments, input.experiments), catalogVersionBuilder(), normalizePageInput(input));
|
|
65
|
+
}
|
|
66
|
+
// #endregion
|
|
67
|
+
// #region View Event Builders
|
|
68
|
+
export function buildViewArticleEvent(input, dependencies) {
|
|
69
|
+
return merge(ViewArticle, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
70
|
+
}
|
|
71
|
+
export function buildViewAudioPageEvent(input, dependencies) {
|
|
72
|
+
return merge(ViewAudioPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
73
|
+
}
|
|
74
|
+
export function buildViewErrorEvent(input, dependencies) {
|
|
75
|
+
return merge(ViewError, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
76
|
+
}
|
|
77
|
+
export function buildViewFrontpageEvent(input, dependencies) {
|
|
78
|
+
return merge(ViewFrontpage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
79
|
+
}
|
|
80
|
+
export function buildViewLandingpageEvent(input, dependencies) {
|
|
81
|
+
return merge(ViewLandingpage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
82
|
+
}
|
|
83
|
+
export function buildViewListingEvent(input, dependencies) {
|
|
84
|
+
return merge(ViewListing, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
85
|
+
}
|
|
86
|
+
export function buildViewLockedArticleEvent(input, dependencies) {
|
|
87
|
+
return merge(ViewLockedArticle, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
88
|
+
}
|
|
89
|
+
export function buildViewLockedAudioPageEvent(input, dependencies) {
|
|
90
|
+
return merge(ViewLockedAudioPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
91
|
+
}
|
|
92
|
+
export function buildViewLockedPageEvent(input, dependencies) {
|
|
93
|
+
return merge(ViewLockedPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
94
|
+
}
|
|
95
|
+
export function buildViewLockedVideoPageEvent(input, dependencies) {
|
|
96
|
+
return merge(ViewLockedVideoPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
97
|
+
}
|
|
98
|
+
export function buildLeaveLockedVideoPageEvent(input, dependencies) {
|
|
99
|
+
return merge(LeaveLockedVideoPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
100
|
+
}
|
|
101
|
+
export function buildViewPageEvent(input, dependencies) {
|
|
102
|
+
return merge(ViewPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
103
|
+
}
|
|
104
|
+
export function buildViewSportsPageEvent(input, dependencies) {
|
|
105
|
+
return merge(ViewSportsPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
106
|
+
}
|
|
107
|
+
export function buildViewSchoolPageEvent(input, dependencies) {
|
|
108
|
+
return merge(ViewSchoolPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
109
|
+
}
|
|
110
|
+
export function buildViewTitleEvent(input, dependencies) {
|
|
111
|
+
return merge(ViewTitle, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
112
|
+
}
|
|
113
|
+
export function buildViewVideoPageEvent(input, dependencies) {
|
|
114
|
+
return merge(ViewVideoPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
115
|
+
}
|
|
116
|
+
export function buildViewWeatherEvent(input, dependencies) {
|
|
117
|
+
return merge(ViewWeather, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
118
|
+
}
|
|
119
|
+
// #endregion
|
|
120
|
+
// #region Leave Event Builders
|
|
121
|
+
export function buildLeaveArticleEvent(input, dependencies) {
|
|
122
|
+
return merge(LeaveArticle, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
123
|
+
}
|
|
124
|
+
export function buildLeaveAudioPageEvent(input, dependencies) {
|
|
125
|
+
return merge(LeaveAudioPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
126
|
+
}
|
|
127
|
+
export function buildLeaveErrorEvent(input, dependencies) {
|
|
128
|
+
return merge(LeaveError, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
129
|
+
}
|
|
130
|
+
export function buildLeaveFrontpageEvent(input, dependencies) {
|
|
131
|
+
return merge(LeaveFrontpage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
132
|
+
}
|
|
133
|
+
export function buildLeaveLandingpageEvent(input, dependencies) {
|
|
134
|
+
return merge(LeaveLandingpage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
135
|
+
}
|
|
136
|
+
export function buildLeaveListingEvent(input, dependencies) {
|
|
137
|
+
return merge(LeaveListing, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
138
|
+
}
|
|
139
|
+
export function buildLeaveLockedArticleEvent(input, dependencies) {
|
|
140
|
+
return merge(LeaveLockedArticle, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
141
|
+
}
|
|
142
|
+
export function buildLeaveLockedAudioPageEvent(input, dependencies) {
|
|
143
|
+
return merge(LeaveLockedAudioPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
144
|
+
}
|
|
145
|
+
export function buildLeaveLockedPageEvent(input, dependencies) {
|
|
146
|
+
return merge(LeaveLockedPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
147
|
+
}
|
|
148
|
+
export function buildLeavePageEvent(input, dependencies) {
|
|
149
|
+
return merge(LeavePage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
150
|
+
}
|
|
151
|
+
export function buildLeaveSportsPageEvent(input, dependencies) {
|
|
152
|
+
return merge(LeaveSportsPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
153
|
+
}
|
|
154
|
+
export function buildLeaveSchoolPageEvent(input, dependencies) {
|
|
155
|
+
return merge(LeaveSchoolPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
156
|
+
}
|
|
157
|
+
export function buildLeaveVideoPageEvent(input, dependencies) {
|
|
158
|
+
return merge(LeaveVideoPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
159
|
+
}
|
|
160
|
+
export function buildLeaveWeatherEvent(input, dependencies) {
|
|
161
|
+
const createdAt = new Date();
|
|
162
|
+
const { isHybrid, version, providerId, providerName, providerGroup, providerStage, providerProduct, providerVersion, component, componentVersion, user, experiments, routingStage, } = dependencies;
|
|
163
|
+
return merge(normalizePageInput(input), LeaveWeather, timeBuilder(createdAt), trackerBuilder({ isHybrid, version, routingStage }), baseEventBuilder(), providerBuilder(providerId, providerStage, providerProduct, providerVersion, component, componentVersion, providerName, providerGroup), userBuilder(user), experimentsBuilder(experiments, input.experiments), consentsBuilder(dependencies.consents), deviceBuilder(dependencies.environmentId, dependencies.jwe), catalogVersionBuilder(), navigationTypeBuilder(input.page?.navigationType), pageviewIdBuilder(dependencies.pageviewId), pageInfoBuilder(dependencies.currentPage), referrerBuilder(dependencies.currentPageReferrer));
|
|
164
|
+
}
|
|
165
|
+
// #endregion
|
|
166
|
+
// #region Engagement Event Builders
|
|
167
|
+
export function buildEngagementAdEvent(input, dependencies) {
|
|
168
|
+
return merge(EngagementAd, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
169
|
+
}
|
|
170
|
+
export function buildEngagementAffiliateEvent(input, dependencies) {
|
|
171
|
+
return merge(EngagementAffiliate, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
172
|
+
}
|
|
173
|
+
export function buildEngagementAudioEvent(input, dependencies) {
|
|
174
|
+
return merge(EngagementAudio, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
175
|
+
}
|
|
176
|
+
export function buildEngagementFormEvent(input, dependencies) {
|
|
177
|
+
return merge(EngagementForm, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
178
|
+
}
|
|
179
|
+
export function buildEngagementOfferEvent(input, dependencies) {
|
|
180
|
+
return merge(EngagementOffer, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
181
|
+
}
|
|
182
|
+
export function buildEngagementSportsUIElementEvent(input, dependencies) {
|
|
183
|
+
return merge(EngagementSportsUIElement, getSportsElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
184
|
+
}
|
|
185
|
+
export function buildEngagementSchoolUIElementEvent(input, dependencies) {
|
|
186
|
+
return merge(EngagementSchoolUIElement, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
187
|
+
}
|
|
188
|
+
export function buildEngagementTeaserEvent(input, dependencies) {
|
|
189
|
+
return merge(EngagementTeaser, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
190
|
+
}
|
|
191
|
+
export function buildEngagementTvModuleEvent(input, dependencies) {
|
|
192
|
+
return merge(EngagementTvModule, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
193
|
+
}
|
|
194
|
+
export function buildEngagementTvSearchEvent(input, dependencies) {
|
|
195
|
+
return merge(EngagementTvSearch, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
196
|
+
}
|
|
197
|
+
export function buildEngagementUIElementEvent(input, dependencies) {
|
|
198
|
+
return merge(EngagementUIElement, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
199
|
+
}
|
|
200
|
+
export function buildEngagementVideoEvent(input, dependencies) {
|
|
201
|
+
return merge(EngagementVideo, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
202
|
+
}
|
|
203
|
+
export function buildEngagementVideoAdEvent(input, dependencies) {
|
|
204
|
+
return merge(EngagementVideoAd, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
205
|
+
}
|
|
206
|
+
export function buildEngagementWidgetEvent(input, dependencies) {
|
|
207
|
+
return merge(EngagementWidget, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
208
|
+
}
|
|
209
|
+
// #endregion
|
|
210
|
+
// #region Heartbeat Event Builders
|
|
211
|
+
export function buildHeartbeatCommercialArticleEvent(input, dependencies) {
|
|
212
|
+
return merge(HeartbeatCommercialArticle, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
213
|
+
}
|
|
214
|
+
// #endregion
|
|
215
|
+
// #region Health Event Builders
|
|
216
|
+
export function buildCompletedHealthActionEvent(input, dependencies) {
|
|
217
|
+
return merge(CompletedHealthAction, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
218
|
+
}
|
|
219
|
+
export function buildEngagementHealthUIElementEvent(input, dependencies) {
|
|
220
|
+
return merge(EngagementHealthUIElement, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
221
|
+
}
|
|
222
|
+
export function buildViewHealthPageEvent(input, dependencies) {
|
|
223
|
+
return merge(ViewHealthPage, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input), navigationTypeBuilder(input.page?.navigationType));
|
|
224
|
+
}
|
|
225
|
+
export function buildImpressionHealthUIElementEvent(input, dependencies) {
|
|
226
|
+
return merge(ImpressionHealthUIElement, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
227
|
+
}
|
|
228
|
+
// #endregion
|
|
229
|
+
// #region Impression Event Builders
|
|
230
|
+
export function buildImpressionAdEvent(input, dependencies) {
|
|
231
|
+
return merge(ImpressionAd, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
232
|
+
}
|
|
233
|
+
export function buildImpressionAdSlotEvent(input, dependencies) {
|
|
234
|
+
return merge(ImpressionAdSlot, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
235
|
+
}
|
|
236
|
+
export function buildImpressionAffiliateEvent(input, dependencies) {
|
|
237
|
+
return merge(ImpressionAffiliate, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
238
|
+
}
|
|
239
|
+
export function buildImpressionFormEvent(input, dependencies) {
|
|
240
|
+
return merge(ImpressionForm, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
241
|
+
}
|
|
242
|
+
export function buildImpressionOfferEvent(input, dependencies) {
|
|
243
|
+
return merge(ImpressionOffer, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
244
|
+
}
|
|
245
|
+
export function buildImpressionPlayerEvent(input, dependencies) {
|
|
246
|
+
return merge(ImpressionPlayer, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
247
|
+
}
|
|
248
|
+
export function buildImpressionSportsUIElementEvent(input, dependencies) {
|
|
249
|
+
return merge(ImpressionSportsUIElement, getSportsElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
250
|
+
}
|
|
251
|
+
export function buildImpressionSchoolUIElementEvent(input, dependencies) {
|
|
252
|
+
return merge(ImpressionSchoolUIElement, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
253
|
+
}
|
|
254
|
+
export function buildImpressionTeaserEvent(input, dependencies) {
|
|
255
|
+
return merge(ImpressionTeaser, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
256
|
+
}
|
|
257
|
+
export function buildImpressionUIElementEvent(input, dependencies) {
|
|
258
|
+
return merge(ImpressionUIElement, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
259
|
+
}
|
|
260
|
+
export function buildImpressionWidgetEvent(input, dependencies) {
|
|
261
|
+
return merge(ImpressionWidget, getElementEventBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
262
|
+
}
|
|
263
|
+
// #endregion
|
|
264
|
+
// #region Ad Lifecycle Event Builders
|
|
265
|
+
export function buildLoadAdEvent(input, dependencies) {
|
|
266
|
+
return merge(LoadAd, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
267
|
+
}
|
|
268
|
+
export function buildRequestAdEvent(input, dependencies) {
|
|
269
|
+
return merge(RequestAd, getCommonBuildersOutput(new Date(), dependencies, input), normalizePageInput(input));
|
|
270
|
+
}
|
|
271
|
+
// #endregion
|