@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
package/dist/types/Tracker.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { type AdvertisingIdentifiers, type AdvertisingVendor } from '@schibsted/pulse-cis-sync';
|
|
2
|
-
import { getCommonBuildersOutput, type InputParams } from '@schibsted/tpaas-event-builder';
|
|
3
|
-
import { type IAnonymousViewUIElement, type ICompletedHealthAction, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementTeaser, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IImpressionAdSlot, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeave, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudio, type ILeaveLockedAudioPage, type ILeaveLockedVideo, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type ITpaasEvent, type IViewArticle, type IViewAudio, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudio, type IViewLockedAudioPage, type IViewLockedVideo, type IViewLockedVideoPage, type IViewPage, type IViewSportsPage, type IViewTitle, type IViewVideo, type IViewVideoPage, type IViewWeather } from '@schibsted/tpaas-schemas';
|
|
4
1
|
import logger from 'loglevel';
|
|
5
2
|
import type { ActorInput, Consents, ConsentsInput, DeviceInput, LocationInput, ObjectInput, OriginInput, ProviderInput, TrackerInput } from './builders';
|
|
6
3
|
import { engagementEvent, identityEvent, routableEvent, trackerEvent } from './builders/events';
|
|
7
4
|
import { anonymousEngagementEvent, anonymousTrackerEvent } from './builders/events-anonymous-node';
|
|
5
|
+
import { type AdvertisingIdentifiers, type AdvertisingVendor } from './cis-sync';
|
|
8
6
|
import type { Deferred, ResolvedInput } from './defer';
|
|
9
7
|
import { type Listener } from './EventBus/EventBus';
|
|
10
8
|
import type { LeaveEvent, LeaveEventBuilder, LeaveEventOptions } from './leaveTracking/types';
|
|
11
|
-
import type
|
|
9
|
+
import { type IAnonymousViewUIElement, type ICompletedHealthAction, type IEngagementAd, type IEngagementAffiliate, type IEngagementAudio, type IEngagementForm, type IEngagementHealthUIElement, type IEngagementOffer, type IEngagementSchoolUIElement, type IEngagementSportsUIElement, type IEngagementTeaser, type IEngagementTvModule, type IEngagementTvSearch, type IEngagementUIElement, type IEngagementVideo, type IEngagementVideoAd, type IEngagementWidget, type IHeartbeatCommercialArticle, type IImpressionAd, type IImpressionAdSlot, type IImpressionAffiliate, type IImpressionForm, type IImpressionHealthUIElement, type IImpressionOffer, type IImpressionPlayer, type IImpressionSchoolUIElement, type IImpressionSportsUIElement, type IImpressionTeaser, type IImpressionUIElement, type IImpressionWidget, type ILeave, type ILeaveArticle, type ILeaveAudioPage, type ILeaveError, type ILeaveFrontpage, type ILeaveLandingpage, type ILeaveListing, type ILeaveLockedArticle, type ILeaveLockedAudioPage, type ILeaveLockedPage, type ILeaveLockedVideoPage, type ILeavePage, type ILeaveSchoolPage, type ILeaveSportsPage, type ILeaveVideoPage, type ILeaveWeather, type ILoadAd, type InputParams, type IProvider, type IRequestAd, type ITpaasEvent, type IViewArticle, type IViewAudioPage, type IViewError, type IViewFrontpage, type IViewHealthPage, type IViewLandingpage, type IViewListing, type IViewLockedArticle, type IViewLockedAudioPage, type IViewLockedPage, type IViewLockedVideoPage, type IViewPage, type IViewSchoolPage, type IViewSportsPage, type IViewTitle, type IViewVideoPage, type IViewWeather } from './tpaas-schemas';
|
|
10
|
+
import type { AnonymousEventInputTypesByTrackingMethod, EventInput, EventInputTypesByTrackingMethod, TrackViewEventOptions } from './types';
|
|
11
|
+
import { type ObserverOptions } from './visibility-observer';
|
|
12
12
|
import type { ClickUIElementInputProperties } from './wrapper/engagement/ui-element/types';
|
|
13
|
-
import type
|
|
13
|
+
import { type BaseEventExperiment } from './wrapper/types';
|
|
14
14
|
import type { ViewArticleInputProperties } from './wrapper/view/article/types';
|
|
15
15
|
import type { ViewFrontpageInputProperties } from './wrapper/view/frontpage/types';
|
|
16
16
|
import type { ViewListingInputProperties } from './wrapper/view/listing/types';
|
|
@@ -74,6 +74,43 @@ export type DeployStage = 'dev' | 'pre' | 'pro';
|
|
|
74
74
|
* **Note** that the `username` and `password` is *for Node.js environments only*.
|
|
75
75
|
*/
|
|
76
76
|
export interface SDKConfigInput {
|
|
77
|
+
/**
|
|
78
|
+
* AdChoices: dictates which advertising identifiers are issued, in relation to advertising consents given by the user.
|
|
79
|
+
* When `true` and `requireAdvertisingOptIn` is `true`, if the user has not given consent to advertising purpose,
|
|
80
|
+
* neither `adId` nor `ppId` are issued.
|
|
81
|
+
* @see requireAdvertisingOptIn
|
|
82
|
+
*/
|
|
83
|
+
adChoicesEnabled?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The component name to include in tracked events.
|
|
86
|
+
* Automatically populated as `.provider.component` for both TPaaS and legacy events.
|
|
87
|
+
*/
|
|
88
|
+
component?: IProvider['component'];
|
|
89
|
+
/**
|
|
90
|
+
* The component version to include in tracked events.
|
|
91
|
+
* Automatically populated as `.provider.componentVersion` for both TPaaS and legacy events.
|
|
92
|
+
*/
|
|
93
|
+
componentVersion?: IProvider['componentVersion'];
|
|
94
|
+
/**
|
|
95
|
+
* The provider deployment stage to include in tracked events.
|
|
96
|
+
* Automatically populated as `.provider.stage` for TPaaS events.
|
|
97
|
+
*/
|
|
98
|
+
stage: IProvider['stage'];
|
|
99
|
+
/**
|
|
100
|
+
* The product name to include in tracked events.
|
|
101
|
+
* Automatically populated as `.provider.product` for TPaaS events.
|
|
102
|
+
*/
|
|
103
|
+
product: NonNullable<IProvider['product']>;
|
|
104
|
+
/**
|
|
105
|
+
* The product version to include in tracked events.
|
|
106
|
+
* Automatically populated as `.provider.version` for TPaaS events.
|
|
107
|
+
*/
|
|
108
|
+
version: NonNullable<IProvider['version']>;
|
|
109
|
+
/**
|
|
110
|
+
* Provider metadata to include in TPaaS events.
|
|
111
|
+
* Automatically populated as `.provider.name` and `.provider.group`.
|
|
112
|
+
*/
|
|
113
|
+
provider?: Pick<IProvider, 'name' | 'group'>;
|
|
77
114
|
/**
|
|
78
115
|
* Function handler to call in place of the built-in tracker call.
|
|
79
116
|
* @function
|
|
@@ -97,9 +134,24 @@ export interface SDKConfigInput {
|
|
|
97
134
|
*/
|
|
98
135
|
nativeJwe?: string;
|
|
99
136
|
password?: string;
|
|
137
|
+
/**
|
|
138
|
+
* When true, user's consents are (waited and) evaluated in order to instruct the apis to restrict the issuing of
|
|
139
|
+
* advertising identifiers;
|
|
140
|
+
* It has direct effect on the issuing of `adId`.
|
|
141
|
+
* In connection with `adChoicesEnabled` option, restricts the issuing of `ppId` as well.
|
|
142
|
+
* @see adChoicesEnabled
|
|
143
|
+
*/
|
|
100
144
|
requireAdvertisingOptIn?: boolean;
|
|
101
145
|
trackerId?: string;
|
|
146
|
+
/**
|
|
147
|
+
* @deprecated Starting with 8.0.0-rc.13, the SDK will default this config to true instead of undefined (basically false).
|
|
148
|
+
* In v9, this config will be removed and the SDK will always use Beacon when available.
|
|
149
|
+
*/
|
|
102
150
|
useBeacon?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* @deprecated Starting with 8.0.0-rc.13, the SDK will default this config to true instead of undefined (basically false).
|
|
153
|
+
* In v9, this config will be removed and the SDK will always use Beacon when available.
|
|
154
|
+
*/
|
|
103
155
|
useBeaconWhenAvailable?: boolean;
|
|
104
156
|
username?: string;
|
|
105
157
|
vendors?: AdvertisingVendor[];
|
|
@@ -116,37 +168,18 @@ export interface SDKConfigInput {
|
|
|
116
168
|
* @internal
|
|
117
169
|
*/
|
|
118
170
|
export type SDKState = {
|
|
119
|
-
altEventHandler?: AltEventHandler;
|
|
120
|
-
autoCreateConsents?: boolean;
|
|
121
|
-
cisBaseUrl?: string;
|
|
122
|
-
cisEnabled?: boolean;
|
|
123
|
-
collectorBaseUrl?: string;
|
|
124
171
|
collectorPath: string;
|
|
125
|
-
configurationTag?: string;
|
|
126
|
-
consents?: Consents | ConsentsInput | Promise<Consents>;
|
|
127
172
|
deployStage: DeployStage;
|
|
128
173
|
deployStageTpaas: DeployStage;
|
|
129
174
|
environment: 'node' | 'browser';
|
|
130
|
-
eventDebounce?: number;
|
|
131
175
|
includeAdvertising: boolean | Promise<boolean>;
|
|
132
|
-
isHybrid?: boolean;
|
|
133
|
-
nativeJwe?: string;
|
|
134
176
|
pageViewId: string;
|
|
135
|
-
password?: string;
|
|
136
177
|
providerId: string;
|
|
137
178
|
remoteConfigurationUrl: string;
|
|
138
|
-
requireAdvertisingOptIn?: boolean;
|
|
139
179
|
schemaLocation: string;
|
|
140
|
-
trackerId
|
|
180
|
+
trackerId: string;
|
|
141
181
|
tpaasCollectorBaseUrl: string;
|
|
142
|
-
useBeacon?: boolean;
|
|
143
|
-
useBeaconWhenAvailable?: boolean;
|
|
144
|
-
username?: string;
|
|
145
182
|
vendors: AdvertisingVendor[];
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated Xandr sync and AnId functionality no longer supported.
|
|
148
|
-
*/
|
|
149
|
-
xandrEnabled?: boolean;
|
|
150
183
|
} & SDKConfigInput & FallbackSDKConfig;
|
|
151
184
|
/**
|
|
152
185
|
* Input for event builders. Different events will read and process different
|
|
@@ -278,8 +311,14 @@ export default class Tracker {
|
|
|
278
311
|
private bookmark;
|
|
279
312
|
private legacyVisibilityObservers;
|
|
280
313
|
private visibilityObservers;
|
|
281
|
-
|
|
282
|
-
|
|
314
|
+
/**
|
|
315
|
+
* Current page state shared by legacy and TPaaS tracking. See CurrentPageContext for
|
|
316
|
+
* which properties are shared and which are exclusively TPaaS metadata.
|
|
317
|
+
*/
|
|
318
|
+
private currentPageContext;
|
|
319
|
+
private getCurrentTpaasPage;
|
|
320
|
+
private getCurrentLegacyPage;
|
|
321
|
+
private setCurrentTpaasPageData;
|
|
283
322
|
/**
|
|
284
323
|
* Promise that resolves when a session ID becomes available
|
|
285
324
|
* @private
|
|
@@ -303,7 +342,7 @@ export default class Tracker {
|
|
|
303
342
|
* @param config Options to set the SDK with
|
|
304
343
|
* @param builders Initial values for event properties that will be persisted across events
|
|
305
344
|
*/
|
|
306
|
-
constructor(providerId: string, config
|
|
345
|
+
constructor(providerId: string, config: SDKConfigInput, builders?: Builders);
|
|
307
346
|
/**
|
|
308
347
|
* Add event to the tracker event queue
|
|
309
348
|
*
|
|
@@ -381,24 +420,10 @@ export default class Tracker {
|
|
|
381
420
|
*/
|
|
382
421
|
private prepareAnonymousTpaasEvent;
|
|
383
422
|
/**
|
|
384
|
-
*
|
|
385
423
|
* @private
|
|
386
424
|
* @category TPaaS Tracking
|
|
387
425
|
*/
|
|
388
426
|
private prepareTpaasEvent;
|
|
389
|
-
/**
|
|
390
|
-
* Generate a generic TPaaS event with common builders output
|
|
391
|
-
* The method should be used for experiments, not for real production work.
|
|
392
|
-
* It doesn't have any real TPaaS schema associated with it.
|
|
393
|
-
* The method doesn't queue or send the event, it just returns the merged object.
|
|
394
|
-
* The method can be removed at any time in the future, so use it with caution.
|
|
395
|
-
*
|
|
396
|
-
* @param input - The input object to merge with the common builders output
|
|
397
|
-
* @returns A promise that resolves to the merged object
|
|
398
|
-
* @private
|
|
399
|
-
* @category TPaaS Tracking
|
|
400
|
-
*/
|
|
401
|
-
generateGenericTpaasEvent<T>(input: T): Promise<T & ReturnType<typeof getCommonBuildersOutput>>;
|
|
402
427
|
/**
|
|
403
428
|
* This method extends the list of base experiments that will be automatically included in every event sent by the tracker.
|
|
404
429
|
*
|
|
@@ -466,6 +491,28 @@ export default class Tracker {
|
|
|
466
491
|
* @category Tracking
|
|
467
492
|
*/
|
|
468
493
|
addUIElementVisibilityTracking(selector: string, buildEventFromElement: (element: HTMLElement) => InputParams<IImpressionUIElement>): void;
|
|
494
|
+
/**
|
|
495
|
+
* The `addElementVisibilityObserver` function provides an interface for executing arbitrary code when specific DOM Elements become visible within the viewport.
|
|
496
|
+
* It is built on the `VisibilityObserver` class, which efficiently detects visibility changes in DOM elements.
|
|
497
|
+
* When an element becomes at least 2/3 visible, a callback is triggered, with the Element that invoked the callback call as argument.
|
|
498
|
+
* It leverages the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) for viewport tracking
|
|
499
|
+
* and the [Mutation Observer API](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) to monitor lazy-loaded elements.
|
|
500
|
+
*
|
|
501
|
+
* Example usage:
|
|
502
|
+
*
|
|
503
|
+
* ```ts
|
|
504
|
+
* tracker.addElementVisibilityObserver('[data-pulse-entity-id]', (element) => {
|
|
505
|
+
* const eventInput = parseElementIntoEventInput(element); // user-defined function
|
|
506
|
+
* tracker.trackImpressionTeaser(eventInput); // can be anything actually, not necessarily a Teaser tracking call
|
|
507
|
+
* });
|
|
508
|
+
* ```
|
|
509
|
+
* @param selector
|
|
510
|
+
* @param callback
|
|
511
|
+
* @param options {ObserverOptions}
|
|
512
|
+
* @param options.threshold - A number between 0 and 1 indicating how much of the element should be visible to trigger
|
|
513
|
+
* the callback. Default is 0.67 (2/3 of the element).
|
|
514
|
+
*/
|
|
515
|
+
addElementVisibilityObserver(selector: string, callback: (element: HTMLElement) => void, options?: ObserverOptions): void;
|
|
469
516
|
private setPageDefaults;
|
|
470
517
|
/**
|
|
471
518
|
* The old trackViewArticle method from the Media Wrapper.
|
|
@@ -551,23 +598,28 @@ export default class Tracker {
|
|
|
551
598
|
* @category TPaaS Tracking
|
|
552
599
|
*/
|
|
553
600
|
trackAnonymousViewUIElement(input: InputParams<IAnonymousViewUIElement>): Promise<unknown>;
|
|
554
|
-
private setCurrentPage;
|
|
555
601
|
trackCompletedHealthAction(input: InputParams<ICompletedHealthAction>): Promise<unknown>;
|
|
556
602
|
trackEngagementHealthUIElement(input: InputParams<IEngagementHealthUIElement>): Promise<unknown>;
|
|
557
|
-
trackViewHealthPage(input: InputParams<IViewHealthPage>, options: TrackViewEventOptions): Promise<unknown>;
|
|
603
|
+
trackViewHealthPage(input: InputParams<IViewHealthPage>, options: TrackViewEventOptions<IViewHealthPage>): Promise<unknown>;
|
|
558
604
|
trackImpressionHealthUIElement(input: InputParams<IImpressionHealthUIElement>): Promise<unknown>;
|
|
559
605
|
/**
|
|
560
606
|
* @param input
|
|
561
607
|
* @param options
|
|
562
608
|
* @category TPaaS Tracking
|
|
563
609
|
*/
|
|
564
|
-
trackViewPage(input: InputParams<IViewPage>, options: TrackViewEventOptions): Promise<unknown>;
|
|
610
|
+
trackViewPage(input: InputParams<IViewPage>, options: TrackViewEventOptions<IViewPage>): Promise<unknown>;
|
|
565
611
|
/**
|
|
566
612
|
* @param input
|
|
567
613
|
* @param options
|
|
568
614
|
* @category TPaaS Tracking
|
|
569
615
|
*/
|
|
570
|
-
trackViewSportsPage(input: InputParams<IViewSportsPage>, options: TrackViewEventOptions): Promise<unknown>;
|
|
616
|
+
trackViewSportsPage(input: InputParams<IViewSportsPage>, options: TrackViewEventOptions<IViewSportsPage>): Promise<unknown>;
|
|
617
|
+
/**
|
|
618
|
+
* @param input
|
|
619
|
+
* @param options
|
|
620
|
+
* @category TPaaS Tracking
|
|
621
|
+
*/
|
|
622
|
+
trackViewSchoolPage(input: InputParams<IViewSchoolPage>, options: TrackViewEventOptions<IViewSchoolPage>): Promise<unknown>;
|
|
571
623
|
/**
|
|
572
624
|
* @param input
|
|
573
625
|
* @category TPaaS Tracking
|
|
@@ -582,19 +634,18 @@ export default class Tracker {
|
|
|
582
634
|
* @param input
|
|
583
635
|
* @category TPaaS Tracking
|
|
584
636
|
*/
|
|
585
|
-
|
|
637
|
+
trackLoadAd(input: InputParams<ILoadAd>): Promise<unknown>;
|
|
586
638
|
/**
|
|
587
639
|
* @param input
|
|
588
|
-
* @param options
|
|
589
640
|
* @category TPaaS Tracking
|
|
590
641
|
*/
|
|
591
|
-
|
|
642
|
+
trackRequestAd(input: InputParams<IRequestAd>): Promise<unknown>;
|
|
592
643
|
/**
|
|
593
644
|
* @param input
|
|
594
645
|
* @param options
|
|
595
646
|
* @category TPaaS Tracking
|
|
596
647
|
*/
|
|
597
|
-
|
|
648
|
+
trackViewArticle(input: InputParams<IViewArticle>, options: TrackViewEventOptions<IViewArticle>): Promise<unknown>;
|
|
598
649
|
/**
|
|
599
650
|
* Tracks a View AudioPage event and automatically fires a Leave AudioPage event when the user
|
|
600
651
|
* navigates away.
|
|
@@ -635,13 +686,28 @@ export default class Tracker {
|
|
|
635
686
|
* @param options
|
|
636
687
|
* @category TPaaS Tracking
|
|
637
688
|
*/
|
|
638
|
-
trackViewAudioPage(input: InputParams<IViewAudioPage>, options:
|
|
689
|
+
trackViewAudioPage(input: InputParams<IViewAudioPage>, options: TrackViewEventOptions<IViewAudioPage>): Promise<unknown>;
|
|
639
690
|
/**
|
|
640
691
|
* @param input
|
|
641
692
|
* @param options
|
|
642
693
|
* @category TPaaS Tracking
|
|
643
694
|
*/
|
|
644
|
-
trackViewError(input: InputParams<IViewError>, options: TrackViewEventOptions): Promise<unknown>;
|
|
695
|
+
trackViewError(input: InputParams<IViewError>, options: TrackViewEventOptions<IViewError>): Promise<unknown>;
|
|
696
|
+
/**
|
|
697
|
+
* @param input
|
|
698
|
+
* @category TPaaS Tracking
|
|
699
|
+
*/
|
|
700
|
+
trackImpressionAd(input: InputParams<IImpressionAd>): Promise<unknown>;
|
|
701
|
+
/**
|
|
702
|
+
* @param input
|
|
703
|
+
* @category TPaaS Tracking
|
|
704
|
+
*/
|
|
705
|
+
trackImpressionAdSlot(input: InputParams<IImpressionAdSlot>): Promise<unknown>;
|
|
706
|
+
/**
|
|
707
|
+
* @param input
|
|
708
|
+
* @category TPaaS Tracking
|
|
709
|
+
*/
|
|
710
|
+
trackImpressionAffiliate(input: InputParams<IImpressionAffiliate>): Promise<unknown>;
|
|
645
711
|
/**
|
|
646
712
|
* @param input
|
|
647
713
|
* @category TPaaS Tracking
|
|
@@ -661,64 +727,64 @@ export default class Tracker {
|
|
|
661
727
|
* @param input
|
|
662
728
|
* @category TPaaS Tracking
|
|
663
729
|
*/
|
|
664
|
-
|
|
730
|
+
trackImpressionSportsUIElement(input: InputParams<IImpressionSportsUIElement>): Promise<unknown>;
|
|
665
731
|
/**
|
|
666
732
|
* @param input
|
|
667
733
|
* @category TPaaS Tracking
|
|
668
734
|
*/
|
|
669
|
-
|
|
735
|
+
trackImpressionSchoolUIElement(input: InputParams<IImpressionSchoolUIElement>): Promise<unknown>;
|
|
670
736
|
/**
|
|
671
737
|
* @param input
|
|
672
|
-
* @param options
|
|
673
738
|
* @category TPaaS Tracking
|
|
674
739
|
*/
|
|
675
|
-
|
|
740
|
+
trackImpressionTeaser(input: InputParams<IImpressionTeaser>): Promise<unknown>;
|
|
676
741
|
/**
|
|
677
742
|
* @param input
|
|
678
|
-
* @param options
|
|
679
743
|
* @category TPaaS Tracking
|
|
680
744
|
*/
|
|
681
|
-
|
|
745
|
+
trackImpressionUIElement(input: InputParams<IImpressionUIElement>): Promise<unknown>;
|
|
682
746
|
/**
|
|
683
747
|
* @param input
|
|
684
748
|
* @param options
|
|
685
749
|
* @category TPaaS Tracking
|
|
686
750
|
*/
|
|
687
|
-
|
|
751
|
+
trackViewFrontpage(input: InputParams<IViewFrontpage>, options: TrackViewEventOptions<IViewFrontpage>): Promise<unknown>;
|
|
688
752
|
/**
|
|
689
753
|
* @param input
|
|
690
754
|
* @param options
|
|
691
755
|
* @category TPaaS Tracking
|
|
692
756
|
*/
|
|
693
|
-
|
|
757
|
+
trackViewLandingpage(input: InputParams<IViewLandingpage>, options: TrackViewEventOptions<IViewLandingpage>): Promise<unknown>;
|
|
694
758
|
/**
|
|
695
759
|
* @param input
|
|
696
760
|
* @param options
|
|
697
761
|
* @category TPaaS Tracking
|
|
698
762
|
*/
|
|
699
|
-
|
|
763
|
+
trackViewListing(input: InputParams<IViewListing>, options: TrackViewEventOptions<IViewListing>): Promise<unknown>;
|
|
700
764
|
/**
|
|
701
765
|
* @param input
|
|
702
766
|
* @param options
|
|
703
767
|
* @category TPaaS Tracking
|
|
704
768
|
*/
|
|
705
|
-
|
|
769
|
+
trackViewLockedArticle(input: InputParams<IViewLockedArticle>, options: TrackViewEventOptions<IViewLockedArticle>): Promise<unknown>;
|
|
706
770
|
/**
|
|
707
771
|
* @param input
|
|
772
|
+
* @param options
|
|
708
773
|
* @category TPaaS Tracking
|
|
709
774
|
*/
|
|
710
|
-
|
|
775
|
+
trackViewLockedAudioPage(input: InputParams<IViewLockedAudioPage>, options: TrackViewEventOptions<IViewLockedAudioPage>): Promise<unknown>;
|
|
711
776
|
/**
|
|
712
777
|
* @param input
|
|
713
778
|
* @param options
|
|
714
779
|
* @category TPaaS Tracking
|
|
715
780
|
*/
|
|
716
|
-
|
|
781
|
+
trackViewLockedPage(input: InputParams<IViewLockedPage>, options: TrackViewEventOptions<IViewLockedPage>): Promise<unknown>;
|
|
717
782
|
/**
|
|
718
783
|
* @param input
|
|
784
|
+
* @param options
|
|
719
785
|
* @category TPaaS Tracking
|
|
720
786
|
*/
|
|
721
|
-
|
|
787
|
+
trackViewLockedVideoPage(input: InputParams<IViewLockedVideoPage>, options: TrackViewEventOptions<IViewLockedVideoPage>): Promise<unknown>;
|
|
722
788
|
/**
|
|
723
789
|
* Tracks a View VideoPage event and automatically fires a Leave VideoPage event when the user
|
|
724
790
|
* navigates away.
|
|
@@ -761,13 +827,13 @@ export default class Tracker {
|
|
|
761
827
|
* @param options
|
|
762
828
|
* @category TPaaS Tracking
|
|
763
829
|
*/
|
|
764
|
-
trackViewVideoPage(input: InputParams<IViewVideoPage>, options:
|
|
830
|
+
trackViewVideoPage(input: InputParams<IViewVideoPage>, options: TrackViewEventOptions<IViewVideoPage>): Promise<unknown>;
|
|
765
831
|
/**
|
|
766
832
|
* @param input
|
|
767
833
|
* @param options
|
|
768
834
|
* @category TPaaS Tracking
|
|
769
835
|
*/
|
|
770
|
-
trackViewWeather(input: InputParams<IViewWeather>, options: TrackViewEventOptions): Promise<unknown>;
|
|
836
|
+
trackViewWeather(input: InputParams<IViewWeather>, options: TrackViewEventOptions<IViewWeather>): Promise<unknown>;
|
|
771
837
|
/**
|
|
772
838
|
* @param input
|
|
773
839
|
* @category TPaaS Tracking
|
|
@@ -803,11 +869,6 @@ export default class Tracker {
|
|
|
803
869
|
* @category TPaaS Tracking
|
|
804
870
|
*/
|
|
805
871
|
trackLeaveLockedArticle(input: InputParams<ILeaveLockedArticle>): Promise<unknown>;
|
|
806
|
-
/**
|
|
807
|
-
* @param input
|
|
808
|
-
* @category TPaaS Tracking
|
|
809
|
-
*/
|
|
810
|
-
trackLeaveLockedAudio(input: InputParams<ILeaveLockedAudio>): Promise<unknown>;
|
|
811
872
|
/**
|
|
812
873
|
* @param input
|
|
813
874
|
* @category TPaaS Tracking
|
|
@@ -817,7 +878,7 @@ export default class Tracker {
|
|
|
817
878
|
* @param input
|
|
818
879
|
* @category TPaaS Tracking
|
|
819
880
|
*/
|
|
820
|
-
|
|
881
|
+
trackLeaveLockedPage(input: InputParams<ILeaveLockedPage>): Promise<unknown>;
|
|
821
882
|
/**
|
|
822
883
|
* @param input
|
|
823
884
|
* @category TPaaS Tracking
|
|
@@ -833,6 +894,11 @@ export default class Tracker {
|
|
|
833
894
|
* @category TPaaS Tracking
|
|
834
895
|
*/
|
|
835
896
|
trackLeaveSportsPage(input: InputParams<ILeaveSportsPage>): Promise<unknown>;
|
|
897
|
+
/**
|
|
898
|
+
* @param input
|
|
899
|
+
* @category TPaaS Tracking
|
|
900
|
+
*/
|
|
901
|
+
trackLeaveSchoolPage(input: InputParams<ILeaveSchoolPage>): Promise<unknown>;
|
|
836
902
|
/**
|
|
837
903
|
* @param input
|
|
838
904
|
* @category TPaaS Tracking
|
|
@@ -843,6 +909,16 @@ export default class Tracker {
|
|
|
843
909
|
* @category TPaaS Tracking
|
|
844
910
|
*/
|
|
845
911
|
trackLeaveWeather(input: InputParams<ILeaveWeather>): Promise<unknown>;
|
|
912
|
+
/**
|
|
913
|
+
* @param input
|
|
914
|
+
* @category TPaaS Tracking
|
|
915
|
+
*/
|
|
916
|
+
trackEngagementAd(input: InputParams<IEngagementAd>): Promise<unknown>;
|
|
917
|
+
/**
|
|
918
|
+
* @param input
|
|
919
|
+
* @category TPaaS Tracking
|
|
920
|
+
*/
|
|
921
|
+
trackEngagementAffiliate(input: InputParams<IEngagementAffiliate>): Promise<unknown>;
|
|
846
922
|
/**
|
|
847
923
|
* @param input
|
|
848
924
|
* @category TPaaS Tracking
|
|
@@ -858,11 +934,31 @@ export default class Tracker {
|
|
|
858
934
|
* @category TPaaS Tracking
|
|
859
935
|
*/
|
|
860
936
|
trackEngagementOffer(input: InputParams<IEngagementOffer>): Promise<unknown>;
|
|
937
|
+
/**
|
|
938
|
+
* @param input
|
|
939
|
+
* @category TPaaS Tracking
|
|
940
|
+
*/
|
|
941
|
+
trackEngagementSportsUIElement(input: InputParams<IEngagementSportsUIElement>): Promise<unknown>;
|
|
942
|
+
/**
|
|
943
|
+
* @param input
|
|
944
|
+
* @category TPaaS Tracking
|
|
945
|
+
*/
|
|
946
|
+
trackEngagementSchoolUIElement(input: InputParams<IEngagementSchoolUIElement>): Promise<unknown>;
|
|
861
947
|
/**
|
|
862
948
|
* @param input
|
|
863
949
|
* @category TPaaS Tracking
|
|
864
950
|
*/
|
|
865
951
|
trackEngagementTeaser(input: InputParams<IEngagementTeaser>): Promise<unknown>;
|
|
952
|
+
/**
|
|
953
|
+
* @param input
|
|
954
|
+
* @category TPaaS Tracking
|
|
955
|
+
*/
|
|
956
|
+
trackEngagementTvModule(input: InputParams<IEngagementTvModule>): Promise<unknown>;
|
|
957
|
+
/**
|
|
958
|
+
* @param input
|
|
959
|
+
* @category TPaaS Tracking
|
|
960
|
+
*/
|
|
961
|
+
trackEngagementTvSearch(input: InputParams<IEngagementTvSearch>): Promise<unknown>;
|
|
866
962
|
/**
|
|
867
963
|
* @param input
|
|
868
964
|
* @category TPaaS Tracking
|
|
@@ -883,6 +979,11 @@ export default class Tracker {
|
|
|
883
979
|
* @category TPaaS Tracking
|
|
884
980
|
*/
|
|
885
981
|
trackEngagementWidget(input: InputParams<IEngagementWidget>): Promise<unknown>;
|
|
982
|
+
/**
|
|
983
|
+
* @param input
|
|
984
|
+
* @category TPaaS Tracking
|
|
985
|
+
*/
|
|
986
|
+
trackHeartbeatCommercialArticle(input: InputParams<IHeartbeatCommercialArticle>): Promise<unknown>;
|
|
886
987
|
/**
|
|
887
988
|
* this is the method that actually sends the event to the server
|
|
888
989
|
* @private
|
|
@@ -1074,11 +1175,11 @@ export default class Tracker {
|
|
|
1074
1175
|
* @internal
|
|
1075
1176
|
* @category Configuration
|
|
1076
1177
|
*/
|
|
1077
|
-
syncRemoteResources(input?:
|
|
1178
|
+
syncRemoteResources(input?: Partial<Builders>, builders?: Builders): Promise<{
|
|
1078
1179
|
adId?: string;
|
|
1079
1180
|
doTracking: boolean;
|
|
1080
1181
|
environmentId?: string;
|
|
1081
|
-
ppId?: import("
|
|
1182
|
+
ppId?: import("./cis-sync").PPIDsByVendor;
|
|
1082
1183
|
}>;
|
|
1083
1184
|
/**
|
|
1084
1185
|
* @internal
|
|
@@ -1286,7 +1387,7 @@ export default class Tracker {
|
|
|
1286
1387
|
* with the added guarantee that a second Leave event will not be triggered if one already has been sent.
|
|
1287
1388
|
* @category TPaaS Leave Tracking
|
|
1288
1389
|
*/
|
|
1289
|
-
trackTpaasActiveLeave(): void
|
|
1390
|
+
trackTpaasActiveLeave(): Promise<void>;
|
|
1290
1391
|
/**
|
|
1291
1392
|
* Check if leave tracking is enabled (if an event will be sent when the user leaves the page)
|
|
1292
1393
|
* ```
|
|
@@ -1308,7 +1409,7 @@ export default class Tracker {
|
|
|
1308
1409
|
/**
|
|
1309
1410
|
* @private
|
|
1310
1411
|
*/
|
|
1311
|
-
private
|
|
1412
|
+
private resolveAnonymousTrackGlobals;
|
|
1312
1413
|
/**
|
|
1313
1414
|
* Send all anonymous events that are in the internal anonymous event queue.
|
|
1314
1415
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Builders } from '../Tracker';
|
|
1
2
|
import type { TrackerEventInput } from './events';
|
|
2
3
|
/**
|
|
3
4
|
* generateActorSDRN
|
|
@@ -24,11 +25,11 @@ export type Actor = {
|
|
|
24
25
|
'spt:userId': string;
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
|
-
* Type guard to check if the input
|
|
28
|
+
* Type guard to check if the input has an Actor Builder
|
|
28
29
|
* @param input
|
|
29
30
|
* @internal
|
|
30
31
|
*/
|
|
31
|
-
export declare function
|
|
32
|
+
export declare function hasActorBuilder(input: unknown): input is Pick<Builders, 'actor'>;
|
|
32
33
|
/**
|
|
33
34
|
* Function to generate a builder for Actor objects.
|
|
34
35
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TrackerEventInput } from './events';
|
|
2
2
|
/**
|
|
3
|
-
* @enum
|
|
3
|
+
* @enum ConsentsCategory
|
|
4
4
|
*/
|
|
5
5
|
export declare enum ConsentsCategory {
|
|
6
6
|
CMP_ANALYTICS = "CMP_ANALYTICS",
|
|
@@ -8,9 +8,9 @@ export declare enum ConsentsCategory {
|
|
|
8
8
|
CMP_ADVERTISING = "CMP_ADVERTISING",
|
|
9
9
|
CMP_PERSONALIZATION = "CMP_PERSONALIZATION"
|
|
10
10
|
}
|
|
11
|
-
export declare const ConsentsSourceValues: readonly [
|
|
11
|
+
export declare const ConsentsSourceValues: readonly ['default', 'cmp', 'cache', 'url'];
|
|
12
12
|
export type ConsentsSource = (typeof ConsentsSourceValues)[number];
|
|
13
|
-
export declare const ConsentsPurposeCategoryStatusValues: readonly [
|
|
13
|
+
export declare const ConsentsPurposeCategoryStatusValues: readonly ['accepted', 'rejected', 'unknown'];
|
|
14
14
|
export type ConsentsPurposeCategoryStatus = (typeof ConsentsPurposeCategoryStatusValues)[number];
|
|
15
15
|
export interface ConsentsBase {
|
|
16
16
|
source?: ConsentsSource;
|
|
@@ -53,7 +53,7 @@ export type Device = {
|
|
|
53
53
|
*
|
|
54
54
|
* @internal
|
|
55
55
|
*/
|
|
56
|
-
export declare const device: (defaultValueHandler: () => unknown) => (input?: Pick<TrackerEventInput,
|
|
56
|
+
export declare const device: (defaultValueHandler: () => unknown) => (input?: Pick<TrackerEventInput, 'device'>) => Device | undefined;
|
|
57
57
|
/**
|
|
58
58
|
* @internal
|
|
59
59
|
*/
|
|
@@ -61,5 +61,5 @@ export declare const defaultValue: () => {};
|
|
|
61
61
|
/**
|
|
62
62
|
* Builder for Device objects.
|
|
63
63
|
*/
|
|
64
|
-
declare const _default: (input?: Pick<TrackerEventInput,
|
|
64
|
+
declare const _default: (input?: Pick<TrackerEventInput, 'device'>) => Device | undefined;
|
|
65
65
|
export default _default;
|
|
@@ -38,8 +38,8 @@ export declare function anonymousTrackerEvent({ eventInput, sdkConfig }?: EventP
|
|
|
38
38
|
experimentMetadata: ExperimentMetadata | undefined;
|
|
39
39
|
object: Record<string, unknown> | undefined;
|
|
40
40
|
origin: {
|
|
41
|
-
'@type'?: string | undefined;
|
|
42
41
|
'@id'?: string | number | undefined;
|
|
42
|
+
'@type'?: string | undefined;
|
|
43
43
|
} & {
|
|
44
44
|
[k: string]: unknown;
|
|
45
45
|
url?: string;
|
|
@@ -50,7 +50,7 @@ export declare function anonymousTrackerEvent({ eventInput, sdkConfig }?: EventP
|
|
|
50
50
|
isAnonymous: boolean;
|
|
51
51
|
};
|
|
52
52
|
export declare namespace anonymousTrackerEvent {
|
|
53
|
-
|
|
53
|
+
export { trackerAnonymousEventInput as defaults };
|
|
54
54
|
}
|
|
55
55
|
export declare function anonymousEngagementEvent({ eventInput, sdkConfig }?: EventParams<AnonymousTrackerEventInput>): {
|
|
56
56
|
[k: string]: any;
|
|
@@ -62,8 +62,8 @@ export declare function anonymousEngagementEvent({ eventInput, sdkConfig }?: Eve
|
|
|
62
62
|
experimentMetadata: ExperimentMetadata | undefined;
|
|
63
63
|
object: Record<string, unknown> | undefined;
|
|
64
64
|
origin: {
|
|
65
|
-
'@type'?: string | undefined;
|
|
66
65
|
'@id'?: string | number | undefined;
|
|
66
|
+
'@type'?: string | undefined;
|
|
67
67
|
} & {
|
|
68
68
|
[k: string]: unknown;
|
|
69
69
|
url?: string;
|
|
@@ -77,6 +77,6 @@ export declare function anonymousEngagementEvent({ eventInput, sdkConfig }?: Eve
|
|
|
77
77
|
'@type': string;
|
|
78
78
|
};
|
|
79
79
|
export declare namespace anonymousEngagementEvent {
|
|
80
|
-
|
|
80
|
+
export { trackerAnonymousEventInput as defaults };
|
|
81
81
|
}
|
|
82
82
|
export {};
|
|
@@ -57,7 +57,7 @@ export declare function routableEvent({ eventInput, sdkConfig }?: EventParams<Ro
|
|
|
57
57
|
actor: import("./actor").Actor | undefined;
|
|
58
58
|
};
|
|
59
59
|
export declare namespace routableEvent {
|
|
60
|
-
|
|
60
|
+
export { routableEventDefaults as defaults };
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Add default value to TrackerEventInput.
|
|
@@ -80,8 +80,8 @@ export declare function trackerEvent({ eventInput, sdkConfig }?: EventParams<Tra
|
|
|
80
80
|
location: import("./location").Location | undefined;
|
|
81
81
|
object: Record<string, unknown> | undefined;
|
|
82
82
|
origin: {
|
|
83
|
-
'@type'?: string | undefined;
|
|
84
83
|
'@id'?: string | number | undefined;
|
|
84
|
+
'@type'?: string | undefined;
|
|
85
85
|
} & {
|
|
86
86
|
[k: string]: unknown;
|
|
87
87
|
url?: string;
|
|
@@ -91,7 +91,7 @@ export declare function trackerEvent({ eventInput, sdkConfig }?: EventParams<Tra
|
|
|
91
91
|
tracker: import("./tracker-node").Tracker;
|
|
92
92
|
};
|
|
93
93
|
export declare namespace trackerEvent {
|
|
94
|
-
|
|
94
|
+
export { trackerEventInput as defaults };
|
|
95
95
|
}
|
|
96
96
|
export declare function engagementEvent({ eventInput, sdkConfig }?: EventParams<TrackerEventInput>): {
|
|
97
97
|
[k: string]: any;
|
|
@@ -107,8 +107,8 @@ export declare function engagementEvent({ eventInput, sdkConfig }?: EventParams<
|
|
|
107
107
|
location: import("./location").Location | undefined;
|
|
108
108
|
object: Record<string, unknown> | undefined;
|
|
109
109
|
origin: {
|
|
110
|
-
'@type'?: string | undefined;
|
|
111
110
|
'@id'?: string | number | undefined;
|
|
111
|
+
'@type'?: string | undefined;
|
|
112
112
|
} & {
|
|
113
113
|
[k: string]: unknown;
|
|
114
114
|
url?: string;
|
|
@@ -121,7 +121,7 @@ export declare function engagementEvent({ eventInput, sdkConfig }?: EventParams<
|
|
|
121
121
|
'@type': string;
|
|
122
122
|
};
|
|
123
123
|
export declare namespace engagementEvent {
|
|
124
|
-
|
|
124
|
+
export { trackerEventInput as defaults };
|
|
125
125
|
}
|
|
126
126
|
export declare function identityEvent({ eventInput }?: EventParams<IdentityEventInput>): IdentityEventInput;
|
|
127
127
|
export declare namespace identityEvent {
|
|
@@ -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';
|