@schibsted/pulse-sdk 8.0.0-rc.2 → 8.0.0-rc.21
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 +582 -471
- 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 -80
- 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/session/store.js +96 -0
- 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 +50 -72
- 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 -3
- 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/dist/cjs/tpaas-builders/builders/session.js +5 -0
- 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 -9
- package/dist/cjs/tpaas-builders/builders.js +326 -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/dist/cjs/tpaas-context/adapters.js +85 -0
- package/dist/cjs/tpaas-context/browser.js +51 -0
- package/dist/cjs/tpaas-context/index.js +6 -0
- package/dist/cjs/tpaas-context/prepare.js +177 -0
- package/dist/cjs/tpaas-context/session.js +23 -0
- package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/cjs/tpaas-context}/types.js +0 -1
- package/{node_modules/@schibsted/tpaas-schemas/dist/cjs → dist/cjs/tpaas-schemas}/constants.js +189 -158
- 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 -7
- 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 +558 -447
- 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 +5 -77
- 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/session/store.js +90 -0
- 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 +50 -72
- 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 +2 -3
- 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/dist/ejs/tpaas-builders/builders/session.js +1 -0
- 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 +3 -9
- package/dist/ejs/tpaas-builders/builders.js +259 -0
- package/dist/ejs/tpaas-builders/guards.js +4 -0
- package/dist/ejs/tpaas-builders/index.js +2 -0
- package/dist/ejs/tpaas-context/adapters.js +80 -0
- package/dist/ejs/tpaas-context/browser.js +47 -0
- package/dist/ejs/tpaas-context/index.js +1 -0
- package/dist/ejs/tpaas-context/prepare.js +137 -0
- package/dist/ejs/tpaas-context/session.js +19 -0
- package/{node_modules/@schibsted/tpaas-schemas/dist/ejs → dist/ejs/tpaas-schemas}/constants.js +187 -156
- 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 -7
- 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 +198 -93
- 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 -13
- 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/session/store.d.ts +34 -0
- 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 +7 -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 +4 -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 +7 -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 +2 -0
- package/dist/types/tpaas-context/adapters.d.ts +26 -0
- package/dist/types/tpaas-context/browser.d.ts +8 -0
- package/dist/types/tpaas-context/index.d.ts +2 -0
- package/dist/types/tpaas-context/prepare.d.ts +38 -0
- package/dist/types/tpaas-context/session.d.ts +10 -0
- package/dist/types/tpaas-context/types.d.ts +66 -0
- package/dist/types/tpaas-schemas/constants.d.ts +471 -0
- package/dist/types/tpaas-schemas/index.d.ts +5 -0
- package/dist/types/tpaas-schemas/types/ITpaasEvent.d.ts +130 -0
- package/dist/types/tpaas-schemas/types/schemas/IAnonymousImpressionUIElement.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 +213 -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 +133 -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 +238 -0
- package/dist/types/tpaas-schemas/types/schemas/IEngagementVideoAd.d.ts +147 -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 +96 -0
- package/dist/types/tpaas-schemas/types/schemas/ILoadAd.d.ts +119 -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 +63 -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 +21 -17
- 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/session.js +0 -114
- 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/session.js +0 -108
- 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-context/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
|
@@ -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 {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TrackerEventInput } from './events';
|
|
2
|
+
export declare function generateExperimentSDRN(id?: string | number, experimentationPlatform?: string): string;
|
|
2
3
|
/**
|
|
3
4
|
* The necessary values to construct a valid "sdrn" for experiment.
|
|
4
5
|
* Additional properties are allowed.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { ActorInput } from './actor';
|
|
2
2
|
export * as actor from './actor';
|
|
3
|
-
export type { ConsentCategory, ConsentedToPurposeInput, ConsentPurposeCategory, Consents, ConsentsInput, ConsentsOutput, } from './consents';
|
|
3
|
+
export type { ConsentCategory, ConsentedToPurposeInput, ConsentPurposeCategory, Consents, ConsentsCategory, ConsentsInput, ConsentsOutput, ConsentsPurposeCategory, } from './consents';
|
|
4
4
|
export * as consents from './consents';
|
|
5
5
|
export type { DeviceInput } from './device';
|
|
6
6
|
export * as device from './device';
|
|
@@ -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;
|
|
@@ -2,19 +2,7 @@ import type { TrackerEventInput } from './events-node';
|
|
|
2
2
|
export type Session = {
|
|
3
3
|
'@id': string;
|
|
4
4
|
startTime: string;
|
|
5
|
+
xDomainId?: string;
|
|
5
6
|
};
|
|
6
|
-
type StoredSession = {
|
|
7
|
-
id: string;
|
|
8
|
-
startTime: Date;
|
|
9
|
-
lastEventTime: Date;
|
|
10
|
-
};
|
|
11
|
-
type StoredSessionSerialized = [
|
|
12
|
-
id: string,
|
|
13
|
-
startTime: number,
|
|
14
|
-
lastEventTime: number
|
|
15
|
-
];
|
|
16
|
-
export declare const readAndParse: (storageKey: string) => StoredSessionSerialized | undefined;
|
|
17
|
-
export declare const readSession: () => StoredSession | undefined;
|
|
18
7
|
export declare const defaultValue: () => undefined;
|
|
19
8
|
export default function session(_input?: TrackerEventInput, eventCreationDate?: Date): Session;
|
|
20
|
-
export {};
|
package/{node_modules/@schibsted/pulse-cis-sync/dist/types → dist/types/cis-sync}/cis-browser.d.ts
RENAMED
|
@@ -19,6 +19,7 @@ import type { AdvertisingVendor } from './types';
|
|
|
19
19
|
* immediately.
|
|
20
20
|
*/
|
|
21
21
|
export declare function syncWithCis(shortUserId?: string, nativeJwe?: string, userServiceLocation?: string, realm?: string, clientId?: string, trackerType?: string, trackerVersion?: string, options?: {
|
|
22
|
+
adChoicesEnabled?: boolean;
|
|
22
23
|
forceSync: boolean;
|
|
23
24
|
includeAdvertising: boolean;
|
|
24
25
|
trackerId: string;
|
|
@@ -27,10 +27,18 @@ export type CisCache = {
|
|
|
27
27
|
includeAdvertising?: boolean;
|
|
28
28
|
};
|
|
29
29
|
export type PulseStorage = PulseCookie & PPID & CisCache;
|
|
30
|
+
export declare const pulseStorageKeys: {
|
|
31
|
+
PULSE_PPID_STORAGE_KEY: string;
|
|
32
|
+
PULSE_CIS_CACHE_STORAGE_KEY: string;
|
|
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;
|
|
30
38
|
declare const _default: {
|
|
31
|
-
getCisCacheFromStorage:
|
|
32
|
-
setCisCacheToStorage:
|
|
33
|
-
getPPIDsFromStorage:
|
|
34
|
-
setPPIDsToStorage:
|
|
39
|
+
getCisCacheFromStorage: typeof getCisCacheFromStorage;
|
|
40
|
+
setCisCacheToStorage: typeof setCisCacheToStorage;
|
|
41
|
+
getPPIDsFromStorage: typeof getPPIDsFromStorage;
|
|
42
|
+
setPPIDsToStorage: typeof setPPIDsToStorage;
|
|
35
43
|
};
|
|
36
44
|
export default _default;
|
package/{node_modules/@schibsted/pulse-cis-sync/dist/cjs → dist/types/cis-sync}/storage/storage.d.ts
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type StorageType } from '
|
|
1
|
+
import { type StorageType } from '../../utils';
|
|
2
2
|
declare const getStorage: (storageType?: StorageType) => {
|
|
3
3
|
getItem: (key: string) => string | null | undefined;
|
|
4
|
+
removeItem: (key: string) => void;
|
|
4
5
|
setItem: (key: string, value: string) => void;
|
|
5
6
|
};
|
|
6
7
|
export { getStorage };
|
package/dist/types/config.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Builders } from '../Tracker';
|
|
|
3
3
|
/**
|
|
4
4
|
* @internal exported for testing
|
|
5
5
|
*/
|
|
6
|
-
export declare const WARN_CIS_SYNC_LOGIN_UNDEFINED
|
|
6
|
+
export declare const WARN_CIS_SYNC_LOGIN_UNDEFINED = "No Actor Builder found in event input or tracker builders. Please provide an Actor Builder to ensure the SDK resolves logged-in and logged-out scenarios correctly.";
|
|
7
7
|
/**
|
|
8
8
|
* Get the actor id (userId) from the current browser. A promise is returned
|
|
9
9
|
* because a call may be made to complete the login process.
|
|
@@ -24,5 +24,5 @@ declare const userIsLoggedIn: (builders: Builders) => Promise<boolean>;
|
|
|
24
24
|
* @category Tracker
|
|
25
25
|
* @private
|
|
26
26
|
*/
|
|
27
|
-
declare const evaluateActor: (eventInput?:
|
|
28
|
-
export {
|
|
27
|
+
declare const evaluateActor: (eventInput?: Partial<Builders>, builders?: Builders) => Promise<ActorInput>;
|
|
28
|
+
export { evaluateActor, getActor, getUserId, userIsLoggedIn };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdvertisingIdentifiers } from '
|
|
1
|
+
import type { AdvertisingIdentifiers } from '../cis-sync';
|
|
2
2
|
import type { Builders, SDKState } from '../Tracker';
|
|
3
3
|
/**
|
|
4
4
|
* Get the includeAdvertising flag, set on initialisation.
|
|
@@ -27,4 +27,4 @@ declare const getAdId: (builders: Builders, sdkState: SDKState) => Promise<strin
|
|
|
27
27
|
* @deprecated Advertising Identifiers methods will be removed in the next major version.
|
|
28
28
|
*/
|
|
29
29
|
declare const getAdvertisingIdentifiers: (builders: Builders, sdkState: SDKState) => Promise<AdvertisingIdentifiers>;
|
|
30
|
-
export { getAdId,
|
|
30
|
+
export { getAdId, getAdvertisingIdentifiers, getIncludeAdvertising };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PPIDsByVendor } from '
|
|
2
|
-
import { clearCookieJweIfStale } from '
|
|
1
|
+
import type { PPIDsByVendor } from '../cis-sync';
|
|
2
|
+
import { clearCookieJweIfStale } from '../cis-sync';
|
|
3
3
|
import type { Builders, SDKState } from '../Tracker';
|
|
4
4
|
declare const requireCisSyncCallForAdvertisingIds: () => void;
|
|
5
5
|
/**
|
|
@@ -12,10 +12,10 @@ declare const requireCisSyncCallForAdvertisingIds: () => void;
|
|
|
12
12
|
* @returns the parsed pulse cookie after syncing with cis.
|
|
13
13
|
* @category Identifiers
|
|
14
14
|
*/
|
|
15
|
-
declare const cisSync: (data?:
|
|
15
|
+
declare const cisSync: (data?: Partial<Builders>, builders?: Builders, config?: SDKState) => Promise<{
|
|
16
16
|
adId?: string;
|
|
17
17
|
doTracking: boolean;
|
|
18
18
|
environmentId?: string;
|
|
19
19
|
ppId?: PPIDsByVendor;
|
|
20
20
|
}>;
|
|
21
|
-
export {
|
|
21
|
+
export { cisSync, clearCookieJweIfStale, requireCisSyncCallForAdvertisingIds };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,26 +2,24 @@ import T from './Tracker';
|
|
|
2
2
|
export default T;
|
|
3
3
|
export * as EventBuilders from './builders';
|
|
4
4
|
export { TrackerEventInput } from './builders/events-node';
|
|
5
|
-
export * from './Tracker';
|
|
6
|
-
export { EventInput } from './types';
|
|
7
|
-
export { T as Tracker };
|
|
8
|
-
export type { InputParams } from '@schibsted/tpaas-event-builder';
|
|
9
|
-
export * from '@schibsted/tpaas-schemas';
|
|
10
5
|
export type { IPulseTrackerCreateParams } from './createPulseTracker';
|
|
11
6
|
export { createPulseTracker } from './createPulseTracker';
|
|
12
7
|
export { getPulseTracker } from './getPulseTracker';
|
|
13
8
|
export { AdditionalHeightInfo, LeaveEngagement, LeaveEvent, LeaveEventBuilder, LeaveEventOptions, } from './leaveTracking/types';
|
|
9
|
+
export * from './Tracker';
|
|
14
10
|
export { subscribe, subscribeOnce, subscribeWithState, unsubscribe } from './Tracker';
|
|
11
|
+
export * from './tpaas-schemas';
|
|
15
12
|
/**
|
|
16
13
|
* TPaaS specific type exports
|
|
17
14
|
*/
|
|
18
|
-
export type {
|
|
15
|
+
export type { LeaveAudioInput, LeaveStoriesInput, LeaveTrackingDisabled, LeaveTrackingOptions, TrackViewEventOptions, TrackViewEventOptionsForProxy, } from './types';
|
|
16
|
+
export { EventInput } from './types';
|
|
19
17
|
/**
|
|
20
18
|
* Media Wrapper Types exports below
|
|
21
19
|
*/
|
|
22
20
|
export type { ClickUIElementEvent, ClickUIElementInputObject, ClickUIElementInputProperties, ClickUIElementOutputObject, } from './wrapper/engagement/ui-element/types.js';
|
|
23
|
-
export type { Actor, BaseEvent, BaseEventCustom, BaseEventObject, BaseEventOrigin, BaseEventProvider, EventProperties, } from './wrapper/types/base-event.js';
|
|
24
|
-
export type { AccessLevel, Layout, NavigationType, Page, PageType, Placement, Target, TargetCategory, TargetType, } from './wrapper/types/event.js';
|
|
21
|
+
export type { Actor, BaseEvent, BaseEventCustom, BaseEventExperiment, BaseEventObject, BaseEventOrigin, BaseEventProvider, EventProperties, } from './wrapper/types/base-event.js';
|
|
22
|
+
export type { AccessLevel, Layout, NavigationType, Page, PageType, Placement, SalesPosterType, Target, TargetCategory, TargetType, } from './wrapper/types/event.js';
|
|
25
23
|
export type { ViewArticleEvent, ViewArticleInputObject, ViewArticleInputProperties, ViewArticleOutputObject, } from './wrapper/view/article/types.js';
|
|
26
24
|
export type { ViewFrontpageEvent, ViewFrontpageInputObject, ViewFrontpageInputProperties, ViewFrontpageOutputObject, } from './wrapper/view/frontpage/types.js';
|
|
27
25
|
export type { ViewListingEvent, ViewListingInputObject, ViewListingInputProperties, ViewListingOutputObject, } from './wrapper/view/listing/types.js';
|
|
@@ -29,3 +27,4 @@ export type { ViewLoginPosterEvent, ViewLoginPosterInputObject, ViewLoginPosterI
|
|
|
29
27
|
export type { ViewPageEvent, ViewPageInputObject, ViewPageInputProperties, ViewPageOutputObject, } from './wrapper/view/page/types.js';
|
|
30
28
|
export type { ViewSalesPosterEvent, ViewSalesPosterInputObject, ViewSalesPosterInputProperties, ViewSalesPosterOutputObject, } from './wrapper/view/salesposter/types.js';
|
|
31
29
|
export type { ViewUIElementEvent, ViewUIElementInputObject, ViewUIElementInputProperties, ViewUIElementOutputObject, } from './wrapper/view/ui-element/types.js';
|
|
30
|
+
export { T as Tracker };
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export declare const DEFAULT_ACTIVITY_DURATION: () => {
|
|
2
|
-
value: number;
|
|
3
|
-
interval: undefined;
|
|
4
|
-
timeSinceLastActivity: number;
|
|
5
|
-
};
|
|
6
1
|
export declare const DEFAULT_PAGE_LEAVE_EVENT: () => {
|
|
7
2
|
objectViewPercentage: number;
|
|
8
3
|
maxObjectViewPercentage: number;
|
|
@@ -11,3 +6,4 @@ export declare const DEFAULT_PAGE_LEAVE_EVENT: () => {
|
|
|
11
6
|
pageScrollPosition: number;
|
|
12
7
|
maxPageScrollPosition: number;
|
|
13
8
|
};
|
|
9
|
+
export declare const ACTIVITY_DURATION_LIMIT_MS = 30000;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ILeave } from '
|
|
2
|
-
import type { LeaveTrackingOptions, TrackViewEventOptions } from '../types';
|
|
1
|
+
import type { ILeave, ITpaasEvent } from '../tpaas-schemas';
|
|
2
|
+
import type { LeaveTrackingOptions, LeaveTrackingOptionsForProxy, TrackViewEventOptions } from '../types';
|
|
3
3
|
import type { LeaveObjectTypes, Listener, TrackMethod } from './types';
|
|
4
|
-
export declare function addTpaasLeaveTracking({ objectElement, pageElement, schema, objectResizable, heightBuilder, trackMethod, }: LeaveTrackingOptions & {
|
|
4
|
+
export declare function addTpaasLeaveTracking({ objectElement, pageElement, schema, objectResizable, heightBuilder, trackMethod, }: (LeaveTrackingOptions | LeaveTrackingOptionsForProxy) & {
|
|
5
5
|
schema: LeaveObjectTypes;
|
|
6
6
|
trackMethod: TrackMethod;
|
|
7
7
|
}): void;
|
|
@@ -15,8 +15,8 @@ export declare function removeTpaasLeaveTracking(): void;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function updateTpaasLeaveTracking(objectElement: Element, pageElement: Element, resetProperties: boolean): void;
|
|
17
17
|
export declare const resetTpaasViewedContent: () => void;
|
|
18
|
-
export declare function trackTpaasActiveLeave(): void
|
|
19
|
-
export declare function trackTpaasLeave(): void
|
|
18
|
+
export declare function trackTpaasActiveLeave(): Promise<void>;
|
|
19
|
+
export declare function trackTpaasLeave(): Promise<void>;
|
|
20
20
|
export declare function getTpaasLeaveObject(): ILeave;
|
|
21
21
|
export declare function updateTpaasViewedContent(objectElement: Element, pageElement: Element): void;
|
|
22
22
|
export declare const calculateScrolledPixels: (element: Element) => number;
|
|
@@ -25,4 +25,4 @@ export declare function addEventListeners(events: string[], handler: () => void,
|
|
|
25
25
|
export declare function removeEventListeners(eventListeners: Listener[], options?: {
|
|
26
26
|
capture?: boolean;
|
|
27
27
|
}): Listener[];
|
|
28
|
-
export declare function shouldEnableLeaveTracking(leaveOptions: TrackViewEventOptions['leaveTracking']): leaveOptions is LeaveTrackingOptions;
|
|
28
|
+
export declare function shouldEnableLeaveTracking(leaveOptions: TrackViewEventOptions<ITpaasEvent>['leaveTracking']): leaveOptions is LeaveTrackingOptions | LeaveTrackingOptionsForProxy;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ILeave, ITpaasEvent } from '
|
|
1
|
+
import type { ILeave, ITpaasEvent } from '../tpaas-schemas';
|
|
2
2
|
/**
|
|
3
3
|
* @typedef BrowserEvents
|
|
4
4
|
*/
|
|
@@ -15,14 +15,6 @@ export declare enum BrowserEvents {
|
|
|
15
15
|
TOUCHSTART = "touchstart"
|
|
16
16
|
}
|
|
17
17
|
export type Listener = [name: string, listener: () => void];
|
|
18
|
-
/**
|
|
19
|
-
* @typedef ActivityDuration
|
|
20
|
-
*/
|
|
21
|
-
export type ActivityDuration = {
|
|
22
|
-
value: number;
|
|
23
|
-
interval: number | undefined;
|
|
24
|
-
timeSinceLastActivity: number;
|
|
25
|
-
};
|
|
26
18
|
/**
|
|
27
19
|
* Used to provide extra height to view %-calculations for objects that have fake-scrolls or similar
|
|
28
20
|
* For instance if you have an element that captures scroll for about 1000px
|
|
@@ -39,7 +31,7 @@ export interface AdditionalHeightInfo {
|
|
|
39
31
|
*/
|
|
40
32
|
viewedHeight: number;
|
|
41
33
|
}
|
|
42
|
-
export type TrackMethod = (leave: ILeave) => void
|
|
34
|
+
export type TrackMethod = (leave: ILeave) => Promise<void>;
|
|
43
35
|
export type LeaveObjectTypes = Extract<ITpaasEvent, {
|
|
44
36
|
eventType: 'Leave';
|
|
45
37
|
}>['object']['objectType'];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The session as stored in the `_pulsesession` cookie, shared by legacy and TPaaS events.
|
|
3
|
+
* @private
|
|
4
|
+
*/
|
|
5
|
+
export type StoredSession = {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
startTime: Date;
|
|
8
|
+
lastEventTime: Date;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
export type TouchedSession = StoredSession & {
|
|
14
|
+
isFirstEvent: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export declare const generateSessionSDRN: (sessionId: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Reads the stored session. Any invalid or unreadable data is ignored.
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export declare const readSession: () => StoredSession | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Registers an event created at `createdAt` in the stored session: extends the current session,
|
|
27
|
+
* or starts a new one when it expired, and stores the result.
|
|
28
|
+
*
|
|
29
|
+
* Call it synchronously, together with capturing `createdAt`, before any asynchronous work,
|
|
30
|
+
* so sessions are updated in the order events are tracked.
|
|
31
|
+
*
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
export declare const touchSession: (createdAt: Date) => TouchedSession;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
2
|
+
import type { IDevice } from '../../tpaas-schemas';
|
|
3
|
+
export declare const builder: (environmentId: TpaasEventContext['environmentId'], jwe: TpaasEventContext['jwe'], browser: TpaasEventContext['browser']) => {
|
|
4
|
+
device: IDevice;
|
|
5
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
2
|
+
import type { IExperiments, InputParams, ITpaasEvent } from '../../tpaas-schemas';
|
|
3
|
+
type TpaasSchemasWithExperiments = Extract<ITpaasEvent, {
|
|
4
|
+
experiments?: IExperiments;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const builder: (baseExperiments?: TpaasEventContext['experiments'], eventExperiments?: InputParams<TpaasSchemasWithExperiments>['experiments']) => {
|
|
7
|
+
experiments?: IExperiments;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NavigationType, TpaasSchemasWithNavigationType } from '../../tpaas-schemas';
|
|
2
|
+
export declare const builder: <T extends Partial<TpaasSchemasWithNavigationType['page']['navigationType']>>(eventNavigationType: T | undefined) => {
|
|
3
|
+
page: {
|
|
4
|
+
navigationType: Exclude<NavigationType, 'Scroll'> | T;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
2
|
+
import type { IPageRef } from '../../tpaas-schemas';
|
|
3
|
+
export declare const builder: (currentPage: IPageRef | undefined, url: TpaasEventContext['browser']['url']) => {
|
|
4
|
+
page: {
|
|
5
|
+
info: IPageRef;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IViewSportsPage } from '../../tpaas-schemas';
|
|
2
|
+
type SportsPageContext = Pick<IViewSportsPage['object'], 'sportName' | 'sportSubview' | 'sportView' | 'sports'>;
|
|
3
|
+
export declare const builder: (sports?: SportsPageContext) => {
|
|
4
|
+
page: Partial<SportsPageContext>;
|
|
5
|
+
};
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
2
|
+
import type { IProvider } from '../../tpaas-schemas';
|
|
3
|
+
export declare function builder(providerId: TpaasEventContext['providerId'], providerStage: TpaasEventContext['providerStage'], providerProduct: TpaasEventContext['providerProduct'], providerVersion: TpaasEventContext['providerVersion'], component?: TpaasEventContext['component'], componentVersion?: TpaasEventContext['componentVersion'], providerName?: TpaasEventContext['providerName'], providerGroup?: TpaasEventContext['providerGroup']): {
|
|
4
|
+
provider: Pick<IProvider, 'component' | 'componentVersion' | 'name' | 'group'> & Required<Pick<IProvider, 'product' | 'providerId' | 'providerSdrn' | 'stage' | 'version'>>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TpaasEventContext } from '../../tpaas-context/types';
|
|
2
|
+
import type { ITracker } from '../../tpaas-schemas';
|
|
3
|
+
export declare const builder: ({ isHybrid, routingStage, version, }: Pick<TpaasEventContext, 'isHybrid' | 'routingStage' | 'version'>) => {
|
|
4
|
+
tracker: ITracker;
|
|
5
|
+
};
|