@adobe/alloy 2.33.1 → 2.34.0-beta.0
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/alloy.js +10 -14
- package/dist/alloy.min.js +1 -1
- package/dist/alloyServiceWorker.js +16 -18
- package/dist/alloyServiceWorker.min.js +1 -1
- package/dist/types/browser/src/components/ActivityCollector/configValidators.d.ts +1 -1
- package/dist/types/browser/src/components/ActivityCollector/createClickedElementProperties.d.ts +1 -1
- package/dist/types/browser/src/components/ActivityCollector/createGetClickedElementProperties.d.ts +1 -1
- package/dist/types/browser/src/components/Advertising/configValidators.d.ts +1 -1
- package/dist/types/browser/src/components/Advertising/handlers/clickThroughHandler.d.ts +5 -5
- package/dist/types/browser/src/components/Advertising/handlers/createOnBeforeSendEventHandler.d.ts +6 -6
- package/dist/types/browser/src/components/Advertising/identities/collectAllIdentities.d.ts +1 -1
- package/dist/types/browser/src/components/Advertising/identities/collectRampId.d.ts +2 -2
- package/dist/types/browser/src/components/Advertising/identities/collectSurferId.d.ts +1 -1
- package/dist/types/browser/src/components/Advertising/identities/createHashedIpHandler.d.ts +1 -1
- package/dist/types/browser/src/components/Advertising/identities/initiateAdvertisingIdentityCall.d.ts +3 -3
- package/dist/types/browser/src/components/Advertising/utils/helpers.d.ts +4 -4
- package/dist/types/browser/src/components/Context/index.d.ts +1 -1
- package/dist/types/browser/src/components/Personalization/createApplyPropositions.d.ts +2 -2
- package/dist/types/browser/src/components/Personalization/createComponent.d.ts +4 -4
- package/dist/types/browser/src/components/Personalization/createOnDecisionHandler.d.ts +1 -1
- package/dist/types/browser/src/components/Personalization/dom-actions/clicks/collectClicks.d.ts +1 -1
- package/dist/types/browser/src/components/Personalization/dom-actions/dom/getChildNodes.d.ts +1 -1
- package/dist/types/browser/src/components/Personalization/dom-actions/dom/getChildren.d.ts +1 -1
- package/dist/types/browser/src/components/Personalization/handlers/injectCreateProposition.d.ts +2 -2
- package/dist/types/browser/src/components/Personalization/in-app-message-actions/actions/displayIframeContent.d.ts +1 -1
- package/dist/types/browser/src/components/Personalization/index.d.ts +5 -5
- package/dist/types/browser/src/components/Personalization/utils/surfaceUtils.d.ts +1 -1
- package/dist/types/browser/src/components/Personalization/validateApplyPropositionsOptions.d.ts +1 -1
- package/dist/types/browser/src/components/PushNotifications/helpers/readFromIndexedDb.d.ts +1 -1
- package/dist/types/browser/src/components/PushNotifications/helpers/saveToIndexedDb.d.ts +1 -1
- package/dist/types/browser/src/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.d.ts +1 -1
- package/dist/types/browser/src/components/PushNotifications/index.d.ts +1 -1
- package/dist/types/browser/src/components/PushNotifications/request/makeSendServiceWorkerTrackingData.d.ts +2 -2
- package/dist/types/browser/src/components/PushNotifications/types.d.ts +7 -7
- package/dist/types/browser/src/createEventListeners.d.ts +1 -1
- package/dist/types/browser/src/index.d.ts +3 -3
- package/dist/types/core/src/components/BrandConcierge/configValidators.d.ts +1 -1
- package/dist/types/core/src/components/BrandConcierge/createBuildEndpointUrl.d.ts +2 -1
- package/dist/types/core/src/components/BrandConcierge/createConversationServiceRequest.d.ts +2 -2
- package/dist/types/core/src/components/BrandConcierge/createSendConversationServiceRequest.d.ts +1 -1
- package/dist/types/core/src/components/BrandConcierge/createTimeoutWrapper.d.ts +1 -1
- package/dist/types/core/src/components/Consent/configValidators.d.ts +1 -1
- package/dist/types/core/src/components/Consent/parseConsentCookie.d.ts +1 -1
- package/dist/types/core/src/components/Identity/configValidators.d.ts +1 -1
- package/dist/types/core/src/components/MediaAnalyticsBridge/createMediaAnalyticsBridgeComponent.d.ts +1 -1
- package/dist/types/core/src/components/MediaAnalyticsBridge/index.d.ts +1 -1
- package/dist/types/core/src/components/RulesEngine/createApplyResponse.d.ts +2 -2
- package/dist/types/core/src/components/RulesEngine/createEventRegistry.d.ts +3 -3
- package/dist/types/core/src/components/RulesEngine/index.d.ts +4 -4
- package/dist/types/core/src/components/RulesEngine/types.d.ts +1 -1
- package/dist/types/core/src/components/RulesEngine/utils/generateEventHash.d.ts +1 -1
- package/dist/types/core/src/components/StreamingMedia/configValidators.d.ts +1 -1
- package/dist/types/core/src/components/StreamingMedia/createStreamingMediaComponent.d.ts +1 -1
- package/dist/types/core/src/components/StreamingMedia/createTrackMediaSession.d.ts +1 -1
- package/dist/types/core/src/components/StreamingMedia/index.d.ts +1 -1
- package/dist/types/core/src/core/consent/types.d.ts +2 -2
- package/dist/types/core/src/core/createEvent.d.ts +1 -1
- package/dist/types/core/src/core/createEventManager.d.ts +2 -2
- package/dist/types/core/src/core/createLogger.d.ts +3 -3
- package/dist/types/core/src/core/edgeNetwork/injectApplyResponse.d.ts +2 -2
- package/dist/types/core/src/core/edgeNetwork/injectSendEdgeNetworkRequest.d.ts +1 -1
- package/dist/types/core/src/core/edgeNetwork/types.d.ts +1 -1
- package/dist/types/core/src/core/injectCreateResponse.d.ts +1 -1
- package/dist/types/core/src/core/injectShouldTransferCookie.d.ts +1 -1
- package/dist/types/core/src/core/types.d.ts +27 -27
- package/dist/types/core/src/index.d.ts +7 -8
- package/dist/types/core/src/utils/bytes.d.ts +1 -1
- package/dist/types/core/src/utils/createCollect.d.ts +4 -4
- package/dist/types/core/src/utils/createSubscription.d.ts +1 -1
- package/dist/types/core/src/utils/deepAssign.d.ts +1 -1
- package/dist/types/core/src/utils/dom/loadScript.d.ts +1 -1
- package/dist/types/core/src/utils/dom/querySelectorAll.d.ts +1 -1
- package/dist/types/core/src/utils/dom/selectNodesWithShadow.d.ts +1 -1
- package/dist/types/core/src/utils/getApexDomain.d.ts +1 -1
- package/dist/types/core/src/utils/groupBy.d.ts +1 -1
- package/dist/types/core/src/utils/injectFireReferrerHideableImage.d.ts +4 -4
- package/dist/types/core/src/utils/injectStorage.d.ts +1 -1
- package/dist/types/core/src/utils/request/createRequest.d.ts +2 -2
- package/dist/types/core/src/utils/request/createRequestParams.d.ts +1 -1
- package/dist/types/core/src/utils/request/createRequestPayload.d.ts +1 -1
- package/dist/types/core/src/utils/sortObjectKeysRecursively.d.ts +1 -1
- package/dist/types/core/src/utils/surfaceUtils.d.ts +1 -1
- package/dist/types/core/src/utils/toArray.d.ts +1 -1
- package/dist/types/core/src/utils/types.d.ts +7 -7
- package/dist/types/core/src/utils/validateConfigOverride.d.ts +1 -1
- package/dist/types/core/src/utils/validateIdentityMap.d.ts +1 -1
- package/dist/types/core/src/utils/validation/index.d.ts +11 -11
- package/package.json +10 -10
- package/src/components/PushNotifications/helpers/serviceWorkerPushListener.js +16 -18
|
@@ -57,30 +57,28 @@ var serviceWorkerPushListener = async ({ sw, event, logger }) => {
|
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/** @type {Record<string, unknown>} */
|
|
60
61
|
const notificationOptions = {
|
|
61
|
-
body: webData.body,
|
|
62
|
-
icon: webData.media,
|
|
63
|
-
image: webData.media,
|
|
64
62
|
data: webData,
|
|
65
|
-
actions:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
Object.keys(notificationOptions).forEach((k) => {
|
|
69
|
-
if (notificationOptions[k] == null) {
|
|
70
|
-
delete notificationOptions[k];
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
if (webData.actions && webData.actions.buttons) {
|
|
75
|
-
notificationOptions.actions = webData.actions.buttons.map(
|
|
76
|
-
(button, index) => ({
|
|
63
|
+
actions:
|
|
64
|
+
webData.actions?.buttons?.map((button, index) => ({
|
|
77
65
|
action: `action_${index}`,
|
|
78
66
|
title: button.label,
|
|
79
|
-
}),
|
|
80
|
-
|
|
67
|
+
})) ?? [],
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
if (webData.body != null) {
|
|
71
|
+
notificationOptions.body = webData.body;
|
|
72
|
+
}
|
|
73
|
+
if (webData.media != null) {
|
|
74
|
+
notificationOptions.icon = webData.media;
|
|
75
|
+
notificationOptions.image = webData.media;
|
|
81
76
|
}
|
|
82
77
|
|
|
83
|
-
return sw.registration.showNotification(
|
|
78
|
+
return sw.registration.showNotification(
|
|
79
|
+
webData.title,
|
|
80
|
+
/** @type {NotificationOptions} */ (notificationOptions),
|
|
81
|
+
);
|
|
84
82
|
};
|
|
85
83
|
|
|
86
84
|
/*
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
const e=e=>["DEEPLINK","WEBURL"].includes(e);const t="config";var n=async e=>{try{const e=await(n="alloyPushNotifications",o=1,r=e=>{e.objectStoreNames.contains(t)||e.createObjectStore(t,{keyPath:"id"})},new Promise((e,t)=>{const a=indexedDB.open(n,o);a.onerror=()=>t(a.error),a.onsuccess=()=>e(a.result),a.onupgradeneeded=e=>{const t=e.target.result;r&&r(t)}})),a=await((e,t,n)=>new Promise((o,r)=>{const a=e.transaction([t],"readonly").objectStore(t).get(n);a.onerror=()=>r(a.error),a.onsuccess=()=>o(a.result)}))(e,t,"alloyConfig");return e.close(),a}catch(t){e.error("Failed to read data from IndexedDB",{error:t})}var n,o,r};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));const r=new Uint8Array(16);function a(e,t,n){return t||e||!crypto.randomUUID?function(e,t,n){e=e||{};const a=e.random??e.rng?.()??crypto.getRandomValues(r);if(a.length<16)throw new Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=a[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(a)}(e,t,n):crypto.randomUUID()}const i=self,s={namespace:"[alloy][pushNotificationWorker]",info:(...e)=>console.log(s.namespace,...e),error:(...e)=>console.error(s.namespace,...e)},c=(({platform:t,sw:o})=>{const r=(({readFromIndexedDb:e,uuidv4:t,logger:n,fetch:o})=>async({xdm:r,actionLabel:a,applicationLaunches:i=0})=>{const s=await e(n),{browser:c,ecid:l,edgeDomain:d,edgeBasePath:u,datastreamId:g,datasetId:m}=s||{};let f={};a&&(f={customAction:{actionID:a}});const p=[{name:"browser",errorField:"Browser"},{name:"ecid",errorField:"ECID"},{name:"edgeDomain",errorField:"Edge domain"},{name:"edgeBasePath",errorField:"Edge base path"},{name:"datastreamId",errorField:"Datastream ID"},{name:"datasetId",errorField:"Dataset ID"}];try{for(const e of p)if(!s[e.name])throw new Error(`Cannot send tracking call. ${e.errorField} is missing.`);const e=`https://${d}/${u}/v1/interact?configId=${g}&requestId=${t()}`,h={events:[{xdm:{identityMap:{ECID:[{id:l}]},timestamp:(new Date).toISOString(),pushNotificationTracking:{...f,pushProviderMessageID:t(),pushProvider:c.toLowerCase()},application:{launches:{value:i}},eventType:a?"pushTracking.customAction":"pushTracking.applicationOpened",_experience:{...r._experience,customerJourneyManagement:{...r._experience.customerJourneyManagement,pushChannelContext:{platform:"web"},messageProfile:{channel:{_id:"https://ns.adobe.com/xdm/channels/push"}}}}},meta:{collect:{datasetId:m}}}]},w=await o(e,{method:"POST",headers:{"content-type":"text/plain; charset=UTF-8"},body:JSON.stringify(h)});return!!w.ok||(n.error("Tracking call failed: ",w.status,w.statusText),!1)}catch(e){return n.error("Error sending tracking call:",e),!1}})({readFromIndexedDb:n,uuidv4:a,logger:t.logger,fetch:t.fetch}),i=(({makeSendServiceWorkerTrackingData:t,sw:n,logger:o})=>({event:r})=>{r.notification.close();const a=r.notification.data;let i=null,s=null;if(r.action){const t=parseInt(r.action.replace("action_",""),10);if(a?.actions?.buttons[t]){const n=a.actions.buttons[t];s=n.label,e(n.type)&&n.uri&&(i=n.uri)}}else e(a?.interaction?.type)&&a?.interaction?.uri&&(i=a.interaction.uri);t({xdm:a._xdm.mixins,actionLabel:s,applicationLaunches:1}).catch(e=>{o.error("Failed to send tracking call:",e)}),i&&r.waitUntil(n.clients.matchAll({type:"window"}).then(e=>{for(const t of e)if(t.url===i&&"focus"in t)return t.focus();if(n.clients.openWindow)return n.clients.openWindow(i)}))})({makeSendServiceWorkerTrackingData:r,sw:o,logger:t.logger});return{pushNotifications:{onPush:e=>(async({sw:e,event:t,logger:n})=>{if(!t.data)return;let o;try{o=t.data.json()}catch(e){return void n.error("Error decoding notification JSON data:",e)}const r=o.web;if(!r?.title)return;const a={
|
|
13
|
+
const e=e=>["DEEPLINK","WEBURL"].includes(e);const t="config";var n=async e=>{try{const e=await(n="alloyPushNotifications",o=1,r=e=>{e.objectStoreNames.contains(t)||e.createObjectStore(t,{keyPath:"id"})},new Promise((e,t)=>{const a=indexedDB.open(n,o);a.onerror=()=>t(a.error),a.onsuccess=()=>e(a.result),a.onupgradeneeded=e=>{const t=e.target.result;r&&r(t)}})),a=await((e,t,n)=>new Promise((o,r)=>{const a=e.transaction([t],"readonly").objectStore(t).get(n);a.onerror=()=>r(a.error),a.onsuccess=()=>o(a.result)}))(e,t,"alloyConfig");return e.close(),a}catch(t){e.error("Failed to read data from IndexedDB",{error:t})}var n,o,r};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));const r=new Uint8Array(16);function a(e,t,n){return t||e||!crypto.randomUUID?function(e,t,n){e=e||{};const a=e.random??e.rng?.()??crypto.getRandomValues(r);if(a.length<16)throw new Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=a[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(a)}(e,t,n):crypto.randomUUID()}const i=self,s={namespace:"[alloy][pushNotificationWorker]",info:(...e)=>console.log(s.namespace,...e),error:(...e)=>console.error(s.namespace,...e)},c=(({platform:t,sw:o})=>{const r=(({readFromIndexedDb:e,uuidv4:t,logger:n,fetch:o})=>async({xdm:r,actionLabel:a,applicationLaunches:i=0})=>{const s=await e(n),{browser:c,ecid:l,edgeDomain:d,edgeBasePath:u,datastreamId:g,datasetId:m}=s||{};let f={};a&&(f={customAction:{actionID:a}});const p=[{name:"browser",errorField:"Browser"},{name:"ecid",errorField:"ECID"},{name:"edgeDomain",errorField:"Edge domain"},{name:"edgeBasePath",errorField:"Edge base path"},{name:"datastreamId",errorField:"Datastream ID"},{name:"datasetId",errorField:"Dataset ID"}];try{for(const e of p)if(!s[e.name])throw new Error(`Cannot send tracking call. ${e.errorField} is missing.`);const e=`https://${d}/${u}/v1/interact?configId=${g}&requestId=${t()}`,h={events:[{xdm:{identityMap:{ECID:[{id:l}]},timestamp:(new Date).toISOString(),pushNotificationTracking:{...f,pushProviderMessageID:t(),pushProvider:c.toLowerCase()},application:{launches:{value:i}},eventType:a?"pushTracking.customAction":"pushTracking.applicationOpened",_experience:{...r._experience,customerJourneyManagement:{...r._experience.customerJourneyManagement,pushChannelContext:{platform:"web"},messageProfile:{channel:{_id:"https://ns.adobe.com/xdm/channels/push"}}}}},meta:{collect:{datasetId:m}}}]},w=await o(e,{method:"POST",headers:{"content-type":"text/plain; charset=UTF-8"},body:JSON.stringify(h)});return!!w.ok||(n.error("Tracking call failed: ",w.status,w.statusText),!1)}catch(e){return n.error("Error sending tracking call:",e),!1}})({readFromIndexedDb:n,uuidv4:a,logger:t.logger,fetch:t.fetch}),i=(({makeSendServiceWorkerTrackingData:t,sw:n,logger:o})=>({event:r})=>{r.notification.close();const a=r.notification.data;let i=null,s=null;if(r.action){const t=parseInt(r.action.replace("action_",""),10);if(a?.actions?.buttons[t]){const n=a.actions.buttons[t];s=n.label,e(n.type)&&n.uri&&(i=n.uri)}}else e(a?.interaction?.type)&&a?.interaction?.uri&&(i=a.interaction.uri);t({xdm:a._xdm.mixins,actionLabel:s,applicationLaunches:1}).catch(e=>{o.error("Failed to send tracking call:",e)}),i&&r.waitUntil(n.clients.matchAll({type:"window"}).then(e=>{for(const t of e)if(t.url===i&&"focus"in t)return t.focus();if(n.clients.openWindow)return n.clients.openWindow(i)}))})({makeSendServiceWorkerTrackingData:r,sw:o,logger:t.logger});return{pushNotifications:{onPush:e=>(async({sw:e,event:t,logger:n})=>{if(!t.data)return;let o;try{o=t.data.json()}catch(e){return void n.error("Error decoding notification JSON data:",e)}const r=o.web;if(!r?.title)return;const a={data:r,actions:r.actions?.buttons?.map((e,t)=>({action:`action_${t}`,title:e.label}))??[]};return null!=r.body&&(a.body=r.body),null!=r.media&&(a.icon=r.media,a.image=r.media),e.registration.showNotification(r.title,a)})({event:e,sw:o,logger:t.logger}),onNotificationClick(e){i({event:e})},async onNotificationClose(e){const n=e.notification.data;try{await r({xdm:n._xdm.mixins,actionLabel:"Dismiss"})}catch(e){t.logger.error("Failed to send tracking call:",e)}}}}})({sw:i,platform:{logger:s,fetch:fetch}});i.addEventListener("install",()=>{i.skipWaiting()}),i.addEventListener("activate",e=>{e.waitUntil(i.clients.claim())}),i.addEventListener("push",e=>c.pushNotifications.onPush(e)),i.addEventListener("notificationclick",e=>c.pushNotifications.onNotificationClick(e)),i.addEventListener("notificationclose",e=>{c.pushNotifications.onNotificationClose(e)});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: Function;
|
|
2
2
|
export default _default;
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* @returns {Promise} Result of the ad conversion tracking
|
|
12
12
|
*/
|
|
13
13
|
export default function handleClickThrough({ eventManager, cookieManager, adConversionHandler, logger, skwcid: rawSkwcid, efid: rawEfId, }: {
|
|
14
|
-
eventManager:
|
|
15
|
-
cookieManager:
|
|
16
|
-
adConversionHandler:
|
|
17
|
-
logger:
|
|
14
|
+
eventManager: Object;
|
|
15
|
+
cookieManager: Object;
|
|
16
|
+
adConversionHandler: Object;
|
|
17
|
+
logger: Object;
|
|
18
18
|
skwcid: string | string[];
|
|
19
19
|
efid: string | string[];
|
|
20
|
-
optionsFromCommand:
|
|
20
|
+
optionsFromCommand: Object;
|
|
21
21
|
}): Promise<any>;
|
package/dist/types/browser/src/components/Advertising/handlers/createOnBeforeSendEventHandler.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare function _default({ cookieManager, logger, componentConfig, getBrowser, consent, collectSurferId, getID5Id, getRampId, appendAdvertisingIdQueryToEvent, appendAdCloudIdentityToEvent, collectHashedIPAddr, getUrlParams, isThrottled, normalizeAdvertiser, }: {
|
|
2
|
-
cookieManager:
|
|
3
|
-
logger:
|
|
4
|
-
componentConfig:
|
|
2
|
+
cookieManager: Object;
|
|
3
|
+
logger: Object;
|
|
4
|
+
componentConfig: Object;
|
|
5
5
|
getBrowser: Function;
|
|
6
|
-
consent:
|
|
6
|
+
consent: Object;
|
|
7
7
|
collectSurferId: Function;
|
|
8
8
|
getID5Id: Function;
|
|
9
9
|
getRampId: Function;
|
|
@@ -14,7 +14,7 @@ declare function _default({ cookieManager, logger, componentConfig, getBrowser,
|
|
|
14
14
|
isThrottled: Function;
|
|
15
15
|
normalizeAdvertiser: Function;
|
|
16
16
|
}): ({ event, advertising }: {
|
|
17
|
-
event:
|
|
18
|
-
advertising?:
|
|
17
|
+
event: Object;
|
|
18
|
+
advertising?: Object | undefined;
|
|
19
19
|
}) => Promise<void>;
|
|
20
20
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function getRampId(logger: any, rampIdScriptPath: any, cookieManager: any, resolveRampIdIfNotAvailable?: boolean, useShortTimeout?: boolean): any;
|
|
2
|
-
export function initiateRampIDCall(rampIdScriptPath: any, cookieManager: any, logger: any, useShortTimeout?: boolean):
|
|
1
|
+
export function getRampId(logger: any, rampIdScriptPath: any, cookieManager: any, resolveRampIdIfNotAvailable?: boolean, useShortTimeout?: boolean): Promise<any> | null;
|
|
2
|
+
export function initiateRampIDCall(rampIdScriptPath: any, cookieManager: any, logger: any, useShortTimeout?: boolean): null;
|
|
@@ -10,6 +10,6 @@ export default createCollectSurferId;
|
|
|
10
10
|
*/
|
|
11
11
|
declare function createCollectSurferId({ initiateAdvertisingIdentityCall, cookieManager, getBrowser, }: {
|
|
12
12
|
initiateAdvertisingIdentityCall: Function;
|
|
13
|
-
cookieManager:
|
|
13
|
+
cookieManager: Object;
|
|
14
14
|
getBrowser: Function;
|
|
15
15
|
}): Function;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function createInitiateAdvertisingIdentityCall({ appendNode: appendNodeFn, awaitSelector: awaitSelectorFn, createNode: createNodeFn, }?: {
|
|
2
|
-
appendNode?: Function;
|
|
3
|
-
awaitSelector?: Function;
|
|
4
|
-
createNode?: Function;
|
|
2
|
+
appendNode?: Function | undefined;
|
|
3
|
+
awaitSelector?: Function | undefined;
|
|
4
|
+
createNode?: Function | undefined;
|
|
5
5
|
}): Function;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export function getUrlParams(): {
|
|
2
|
-
skwcid: string | string[];
|
|
3
|
-
efid: string | string[];
|
|
2
|
+
skwcid: string | string[] | undefined;
|
|
3
|
+
efid: string | string[] | undefined;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
6
|
* Normalizes advertiser settings - extracts enabled advertiser IDs
|
|
7
7
|
* @param {Object[]} advertiserSettings - Array of advertiserSettings objects with advertiserId and enabled properties
|
|
8
8
|
* @returns {string} Comma-separated string of enabled advertiser IDs
|
|
9
9
|
*/
|
|
10
|
-
export function normalizeAdvertiser(advertiserSettings:
|
|
10
|
+
export function normalizeAdvertiser(advertiserSettings: Object[]): string;
|
|
11
11
|
/**
|
|
12
12
|
* Manages a single, ongoing asynchronous operation to prevent redundant calls.
|
|
13
13
|
* @param {string} operationName - A name for the operation for logging purposes.
|
|
@@ -28,7 +28,7 @@ export function appendAdCloudIdentityToEvent(idsToInclude: {
|
|
|
28
28
|
rampId?: string;
|
|
29
29
|
adfId?: string;
|
|
30
30
|
}, event: {
|
|
31
|
-
mergeXdm: (xdm:
|
|
31
|
+
mergeXdm: (xdm: Object) => void;
|
|
32
32
|
}): void;
|
|
33
33
|
export function isAnyIdUnused(availableIds: any, conversionCalled: any): boolean;
|
|
34
34
|
export function markIdsAsConverted(idTypes: any, conversionCalled: any, cookieManager: any, logger: any): void;
|
|
@@ -4,8 +4,8 @@ declare function _default({ processPropositions, createProposition, renderedProp
|
|
|
4
4
|
renderedPropositions: any;
|
|
5
5
|
viewCache: any;
|
|
6
6
|
}): ({ propositions, metadata, viewName }: {
|
|
7
|
-
propositions?:
|
|
8
|
-
metadata?: {};
|
|
7
|
+
propositions?: never[] | undefined;
|
|
8
|
+
metadata?: {} | undefined;
|
|
9
9
|
viewName: any;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
propositions: any;
|
|
@@ -24,10 +24,10 @@ declare function _default({ getPageLocation, logger, fetchDataHandler, viewChang
|
|
|
24
24
|
onBeforeEvent({ event, renderDecisions, decisionScopes, personalization, onResponse, onRequestFailure, }: {
|
|
25
25
|
event: any;
|
|
26
26
|
renderDecisions: any;
|
|
27
|
-
decisionScopes?:
|
|
28
|
-
personalization?: {};
|
|
29
|
-
onResponse?: () => void;
|
|
30
|
-
onRequestFailure?: () => void;
|
|
27
|
+
decisionScopes?: never[] | undefined;
|
|
28
|
+
personalization?: {} | undefined;
|
|
29
|
+
onResponse?: (() => void) | undefined;
|
|
30
|
+
onRequestFailure?: (() => void) | undefined;
|
|
31
31
|
}): Promise<void>;
|
|
32
32
|
onClick({ event, clickedElement }: {
|
|
33
33
|
event: any;
|
|
@@ -6,7 +6,7 @@ declare function _default({ processPropositions, createProposition, notification
|
|
|
6
6
|
renderDecisions: any;
|
|
7
7
|
propositions: any;
|
|
8
8
|
event: any;
|
|
9
|
-
personalization?: {};
|
|
9
|
+
personalization?: {} | undefined;
|
|
10
10
|
identityMap: any;
|
|
11
11
|
}) => Promise<void> | Promise<{
|
|
12
12
|
propositions: any;
|
package/dist/types/browser/src/components/Personalization/dom-actions/dom/getChildNodes.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function _default(element: any): any;
|
|
1
|
+
declare function _default(element: any): any[];
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function _default(element: any): any;
|
|
1
|
+
declare function _default(element: any): any[];
|
|
2
2
|
export default _default;
|
package/dist/types/browser/src/components/Personalization/handlers/injectCreateProposition.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare function _default({ preprocess, isPageWideSurface }: {
|
|
2
2
|
preprocess: any;
|
|
3
3
|
isPageWideSurface: any;
|
|
4
|
-
}): (payload: any, visibleInReturnedItems?: boolean, shouldSuppressDisplay?: boolean, identityMap?:
|
|
4
|
+
}): (payload: any, visibleInReturnedItems?: boolean, shouldSuppressDisplay?: boolean, identityMap?: undefined) => {
|
|
5
5
|
getScope(): any;
|
|
6
6
|
getScopeType(): "view" | "page" | "proposition";
|
|
7
7
|
getItems(): any;
|
|
@@ -11,7 +11,7 @@ declare function _default({ preprocess, isPageWideSurface }: {
|
|
|
11
11
|
scopeDetails: any;
|
|
12
12
|
};
|
|
13
13
|
getId(): any;
|
|
14
|
-
getIdentityMap():
|
|
14
|
+
getIdentityMap(): undefined;
|
|
15
15
|
toJSON(): any;
|
|
16
16
|
shouldSuppressDisplay(): boolean;
|
|
17
17
|
addToReturnValues(propositions: any, decisions: any, includedItems: any, renderAttempted: any): void;
|
|
@@ -18,6 +18,6 @@ export function mobileOverlay(mobileParameters: any): {
|
|
|
18
18
|
opacity: any;
|
|
19
19
|
backgroundColor: any;
|
|
20
20
|
};
|
|
21
|
-
export function displayHTMLContentInIframe(settings: {}, interact: any): void;
|
|
21
|
+
export function displayHTMLContentInIframe(settings: {} | undefined, interact: any): void;
|
|
22
22
|
declare function _default(settings: any, collect: any): Promise<any>;
|
|
23
23
|
export default _default;
|
|
@@ -14,10 +14,10 @@ declare function createPersonalization({ config, logger, eventManager, consent }
|
|
|
14
14
|
onBeforeEvent({ event, renderDecisions, decisionScopes, personalization, onResponse, onRequestFailure, }: {
|
|
15
15
|
event: any;
|
|
16
16
|
renderDecisions: any;
|
|
17
|
-
decisionScopes?:
|
|
18
|
-
personalization?: {};
|
|
19
|
-
onResponse?: () => void;
|
|
20
|
-
onRequestFailure?: () => void;
|
|
17
|
+
decisionScopes?: never[] | undefined;
|
|
18
|
+
personalization?: {} | undefined;
|
|
19
|
+
onResponse?: (() => void) | undefined;
|
|
20
|
+
onRequestFailure?: (() => void) | undefined;
|
|
21
21
|
}): Promise<void>;
|
|
22
22
|
onClick({ event, clickedElement }: {
|
|
23
23
|
event: any;
|
|
@@ -33,5 +33,5 @@ declare function createPersonalization({ config, logger, eventManager, consent }
|
|
|
33
33
|
};
|
|
34
34
|
declare namespace createPersonalization {
|
|
35
35
|
let namespace: string;
|
|
36
|
-
let configValidators:
|
|
36
|
+
let configValidators: Function;
|
|
37
37
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export function buildPageSurface(getPageLocation: any): string;
|
|
2
2
|
export function isPageWideSurface(scope: any): boolean;
|
|
3
|
-
export function normalizeSurfaces(surfaces: any[], getPageLocation: any, logger: any): string[];
|
|
3
|
+
export function normalizeSurfaces(surfaces: any[] | undefined, getPageLocation: any, logger: any): string[];
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @returns {Promise<void>}
|
|
6
6
|
*/
|
|
7
|
-
export default function saveToIndexedDB(data:
|
|
7
|
+
export default function saveToIndexedDB(data: Object, logger: Logger): Promise<void>;
|
|
8
8
|
import type { Logger } from '@adobe/alloy-core/core/types.js';
|
|
@@ -40,7 +40,7 @@ declare function createPushNotifications({ createNamespacedStorage, eventManager
|
|
|
40
40
|
};
|
|
41
41
|
declare namespace createPushNotifications {
|
|
42
42
|
let namespace: string;
|
|
43
|
-
let configValidators:
|
|
43
|
+
let configValidators: Function;
|
|
44
44
|
}
|
|
45
45
|
import type { StorageCreator } from '@adobe/alloy-core/utils/types.js';
|
|
46
46
|
import type { EventManager } from '@adobe/alloy-core/core/types.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export function createMakeSendServiceWorkerTrackingData({ readFromIndexedDb, uuidv4, logger, fetch, }: {
|
|
2
|
-
readFromIndexedDb: (logger: ServiceWorkerLogger) => Promise<
|
|
2
|
+
readFromIndexedDb: (logger: ServiceWorkerLogger) => Promise<Object>;
|
|
3
3
|
uuidv4: () => string;
|
|
4
4
|
logger: ServiceWorkerLogger;
|
|
5
5
|
fetch: (url: string, options: object) => Promise<Response>;
|
|
6
6
|
}): (options: {
|
|
7
|
-
xdm:
|
|
7
|
+
xdm: Object;
|
|
8
8
|
actionLabel?: string;
|
|
9
9
|
applicationLaunches?: number;
|
|
10
10
|
}) => Promise<boolean>;
|
|
@@ -105,13 +105,13 @@ export type CustomerJourneyManagement = {
|
|
|
105
105
|
batchInstanceID: string;
|
|
106
106
|
};
|
|
107
107
|
pushChannelContext?: {
|
|
108
|
-
platform?: "web";
|
|
109
|
-
};
|
|
108
|
+
platform?: "web" | undefined;
|
|
109
|
+
} | undefined;
|
|
110
110
|
messageProfile?: {
|
|
111
111
|
channel?: {
|
|
112
|
-
_id?: string;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
112
|
+
_id?: string | undefined;
|
|
113
|
+
} | undefined;
|
|
114
|
+
} | undefined;
|
|
115
115
|
};
|
|
116
116
|
export type Decisioning = {
|
|
117
117
|
propositions: {
|
|
@@ -161,8 +161,8 @@ export type TrackingDataPayload = {
|
|
|
161
161
|
pushProviderMessageID: string;
|
|
162
162
|
pushProvider: string;
|
|
163
163
|
customAction?: {
|
|
164
|
-
actionID?: string;
|
|
165
|
-
};
|
|
164
|
+
actionID?: string | undefined;
|
|
165
|
+
} | undefined;
|
|
166
166
|
};
|
|
167
167
|
application: {
|
|
168
168
|
launches: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function createCustomInstance({ components, ...options }?: {
|
|
2
|
-
components?:
|
|
3
|
-
}): (commandName: string, options?:
|
|
4
|
-
export function createInstance(options?: {}): (commandName: string, options?:
|
|
2
|
+
components?: never[] | undefined;
|
|
3
|
+
}): (commandName: string, options?: Object) => Promise<any>;
|
|
4
|
+
export function createInstance(options?: {}): (commandName: string, options?: Object) => Promise<any>;
|
|
5
5
|
export { allOptionalComponents as components };
|
|
6
6
|
import * as allOptionalComponents from "./allOptionalComponents.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: Function;
|
|
2
2
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare function _default({ payload, action, sessionId, voiceEnabled, }: {
|
|
2
2
|
payload: any;
|
|
3
|
-
action?: string;
|
|
3
|
+
action?: string | undefined;
|
|
4
4
|
sessionId: any;
|
|
5
|
-
voiceEnabled?: boolean;
|
|
5
|
+
voiceEnabled?: boolean | undefined;
|
|
6
6
|
}): import("../../utils/request/types.js").Request;
|
|
7
7
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: Function;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function _default(cookieValue: string):
|
|
1
|
+
declare function _default(cookieValue: string): Object;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export default configValidators;
|
|
2
|
-
declare const configValidators:
|
|
2
|
+
declare const configValidators: Function;
|
package/dist/types/core/src/components/MediaAnalyticsBridge/createMediaAnalyticsBridgeComponent.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare function _default({ trackMediaEvent, trackMediaSession, mediaResponseHan
|
|
|
10
10
|
lifecycle: {
|
|
11
11
|
onBeforeEvent({ mediaOptions, onResponse }: {
|
|
12
12
|
mediaOptions: any;
|
|
13
|
-
onResponse?: () => void;
|
|
13
|
+
onResponse?: (() => void) | undefined;
|
|
14
14
|
}): void;
|
|
15
15
|
};
|
|
16
16
|
commands: {
|
|
@@ -9,7 +9,7 @@ declare function createMediaAnalyticsBridge({ eventManager, sendEdgeNetworkReque
|
|
|
9
9
|
lifecycle: {
|
|
10
10
|
onBeforeEvent({ mediaOptions, onResponse }: {
|
|
11
11
|
mediaOptions: any;
|
|
12
|
-
onResponse?: () => void;
|
|
12
|
+
onResponse?: (() => void) | undefined;
|
|
13
13
|
}): void;
|
|
14
14
|
};
|
|
15
15
|
commands: {
|
|
@@ -2,8 +2,8 @@ declare function _default({ lifecycle, eventRegistry }: {
|
|
|
2
2
|
lifecycle: any;
|
|
3
3
|
eventRegistry: any;
|
|
4
4
|
}): ({ renderDecisions, propositions, event, personalization, }: {
|
|
5
|
-
renderDecisions?: boolean;
|
|
6
|
-
propositions?:
|
|
5
|
+
renderDecisions?: boolean | undefined;
|
|
6
|
+
propositions?: never[] | undefined;
|
|
7
7
|
event: any;
|
|
8
8
|
personalization: any;
|
|
9
9
|
}) => {
|
|
@@ -15,8 +15,8 @@ declare function createRulesEngine({ config, eventManager, createNamespacedStora
|
|
|
15
15
|
onBeforeEvent({ event, renderDecisions, personalization, onResponse, }: {
|
|
16
16
|
event: any;
|
|
17
17
|
renderDecisions: any;
|
|
18
|
-
personalization?: {};
|
|
19
|
-
onResponse?: () => void;
|
|
18
|
+
personalization?: {} | undefined;
|
|
19
|
+
onResponse?: (() => void) | undefined;
|
|
20
20
|
}): void;
|
|
21
21
|
onBeforeRequest({ request }: {
|
|
22
22
|
request: any;
|
|
@@ -26,7 +26,7 @@ declare function createRulesEngine({ config, eventManager, createNamespacedStora
|
|
|
26
26
|
evaluateRulesets: {
|
|
27
27
|
run: ({ renderDecisions, personalization }: {
|
|
28
28
|
renderDecisions: any;
|
|
29
|
-
personalization?: {};
|
|
29
|
+
personalization?: {} | undefined;
|
|
30
30
|
}) => any;
|
|
31
31
|
optionsValidator: (options: any) => any;
|
|
32
32
|
};
|
|
@@ -44,5 +44,5 @@ declare function createRulesEngine({ config, eventManager, createNamespacedStora
|
|
|
44
44
|
};
|
|
45
45
|
declare namespace createRulesEngine {
|
|
46
46
|
let namespace: string;
|
|
47
|
-
let configValidators:
|
|
47
|
+
let configValidators: Function;
|
|
48
48
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function _default(o:
|
|
1
|
+
declare function _default(o: Object): string;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: Function;
|
|
2
2
|
export default _default;
|
|
@@ -7,7 +7,7 @@ declare function _default({ config, trackMediaEvent, trackMediaSession, mediaRes
|
|
|
7
7
|
lifecycle: {
|
|
8
8
|
onBeforeEvent({ mediaOptions, onResponse }: {
|
|
9
9
|
mediaOptions: any;
|
|
10
|
-
onResponse?: () => void;
|
|
10
|
+
onResponse?: (() => void) | undefined;
|
|
11
11
|
}): void;
|
|
12
12
|
};
|
|
13
13
|
commands: {
|