@adobe/alloy 2.30.1-beta.2 → 2.30.1-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/libEs5/components/Advertising/handlers/onBeforeSendEventHandler.js +8 -2
  2. package/libEs5/components/Advertising/handlers/viewThroughHandler.js +8 -2
  3. package/libEs5/components/Advertising/identities/collectSurferId.js +8 -1
  4. package/libEs5/components/BrandConcierge/constants.js +16 -0
  5. package/libEs5/components/BrandConcierge/createBuildEndpointUrl.js +33 -0
  6. package/libEs5/components/BrandConcierge/createConversationServiceRequest.js +35 -0
  7. package/libEs5/components/BrandConcierge/createSendConversationEvent.js +146 -0
  8. package/libEs5/components/BrandConcierge/createSendConversationServiceRequest.js +85 -0
  9. package/libEs5/components/BrandConcierge/createStreamParser.js +96 -0
  10. package/libEs5/components/BrandConcierge/createTimeoutWrapper.js +52 -0
  11. package/libEs5/components/BrandConcierge/index.js +104 -0
  12. package/libEs5/components/BrandConcierge/utils.js +33 -0
  13. package/libEs5/components/BrandConcierge/validateMessage.js +41 -0
  14. package/libEs5/components/Consent/types.js +12 -0
  15. package/libEs5/components/Context/createComponent.js +1 -2
  16. package/libEs5/components/Context/implementationDetails.js +7 -9
  17. package/libEs5/components/Context/index.js +4 -1
  18. package/libEs5/components/Context/injectDevice.js +2 -2
  19. package/libEs5/components/Context/injectEnvironment.js +2 -2
  20. package/libEs5/components/Context/injectHighEntropyUserAgentHints.js +2 -2
  21. package/libEs5/components/Context/injectOneTimeAnalyticsReferrer.js +49 -0
  22. package/libEs5/components/Context/injectPlaceContext.js +2 -2
  23. package/libEs5/components/Context/injectTimestamp.js +2 -3
  24. package/libEs5/components/Context/injectWeb.js +9 -11
  25. package/libEs5/components/EventMerge/createEventMergeId.js +1 -1
  26. package/libEs5/components/Personalization/createComponent.js +3 -1
  27. package/libEs5/components/Personalization/createFetchDataHandler.js +4 -3
  28. package/libEs5/components/Personalization/createNotificationHandler.js +5 -3
  29. package/libEs5/components/Personalization/createOnDecisionHandler.js +4 -3
  30. package/libEs5/components/Personalization/createPersonalizationDetails.js +1 -1
  31. package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +1 -1
  32. package/libEs5/components/Personalization/handlers/createProcessInAppMessage.js +2 -1
  33. package/libEs5/components/Personalization/handlers/createProcessRedirect.js +2 -1
  34. package/libEs5/components/Personalization/handlers/injectCreateProposition.js +4 -1
  35. package/libEs5/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +4 -2
  36. package/libEs5/components/Personalization/index.js +2 -2
  37. package/libEs5/components/PushNotifications/request/makeSendServiceWorkerTrackingData.js +1 -1
  38. package/libEs5/components/PushNotifications/types.js +12 -0
  39. package/libEs5/components/RulesEngine/createApplyResponse.js +3 -1
  40. package/libEs5/components/RulesEngine/types.js +12 -0
  41. package/libEs5/constants/libraryVersion.js +1 -1
  42. package/libEs5/constants/surface.js +19 -0
  43. package/libEs5/core/componentCreators.js +8 -1
  44. package/libEs5/core/consent/types.js +12 -0
  45. package/libEs5/core/createEvent.js +3 -0
  46. package/libEs5/core/edgeNetwork/types.js +12 -0
  47. package/libEs5/core/identity/types.js +12 -0
  48. package/libEs5/core/index.js +5 -1
  49. package/libEs5/core/types.js +12 -0
  50. package/libEs5/utils/createCollect.js +4 -2
  51. package/libEs5/utils/deepAssign.js +5 -0
  52. package/libEs5/utils/dom/createGetPageLocation.js +20 -0
  53. package/libEs5/utils/index.js +8 -1
  54. package/libEs5/utils/request/createRequest.js +5 -1
  55. package/libEs5/utils/request/types.js +12 -0
  56. package/libEs5/utils/surfaceUtils.js +82 -0
  57. package/libEs5/utils/types.js +12 -0
  58. package/libEs5/utils/uuid.js +1 -0
  59. package/libEs6/components/Advertising/handlers/onBeforeSendEventHandler.js +8 -2
  60. package/libEs6/components/Advertising/handlers/viewThroughHandler.js +8 -2
  61. package/libEs6/components/Advertising/identities/collectSurferId.js +8 -1
  62. package/libEs6/components/BrandConcierge/constants.js +13 -0
  63. package/libEs6/components/BrandConcierge/createBuildEndpointUrl.js +30 -0
  64. package/libEs6/components/BrandConcierge/createConversationServiceRequest.js +31 -0
  65. package/libEs6/components/BrandConcierge/createSendConversationEvent.js +142 -0
  66. package/libEs6/components/BrandConcierge/createSendConversationServiceRequest.js +81 -0
  67. package/libEs6/components/BrandConcierge/createStreamParser.js +92 -0
  68. package/libEs6/components/BrandConcierge/createTimeoutWrapper.js +49 -0
  69. package/libEs6/components/BrandConcierge/index.js +100 -0
  70. package/libEs6/components/BrandConcierge/utils.js +27 -0
  71. package/libEs6/components/BrandConcierge/validateMessage.js +37 -0
  72. package/libEs6/components/Consent/types.js +12 -0
  73. package/libEs6/components/Context/createComponent.js +1 -2
  74. package/libEs6/components/Context/implementationDetails.js +7 -9
  75. package/libEs6/components/Context/index.js +4 -1
  76. package/libEs6/components/Context/injectDevice.js +3 -3
  77. package/libEs6/components/Context/injectEnvironment.js +3 -3
  78. package/libEs6/components/Context/injectHighEntropyUserAgentHints.js +3 -3
  79. package/libEs6/components/Context/injectOneTimeAnalyticsReferrer.js +46 -0
  80. package/libEs6/components/Context/injectPlaceContext.js +3 -3
  81. package/libEs6/components/Context/injectTimestamp.js +2 -3
  82. package/libEs6/components/Context/injectWeb.js +9 -11
  83. package/libEs6/components/EventMerge/createEventMergeId.js +1 -1
  84. package/libEs6/components/Personalization/createComponent.js +3 -1
  85. package/libEs6/components/Personalization/createFetchDataHandler.js +4 -3
  86. package/libEs6/components/Personalization/createNotificationHandler.js +5 -3
  87. package/libEs6/components/Personalization/createOnDecisionHandler.js +4 -3
  88. package/libEs6/components/Personalization/createPersonalizationDetails.js +1 -1
  89. package/libEs6/components/Personalization/dom-actions/initDomActionsModules.js +1 -1
  90. package/libEs6/components/Personalization/handlers/createProcessInAppMessage.js +2 -1
  91. package/libEs6/components/Personalization/handlers/createProcessRedirect.js +2 -1
  92. package/libEs6/components/Personalization/handlers/injectCreateProposition.js +4 -1
  93. package/libEs6/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +4 -2
  94. package/libEs6/components/Personalization/index.js +2 -2
  95. package/libEs6/components/PushNotifications/request/makeSendServiceWorkerTrackingData.js +1 -1
  96. package/libEs6/components/PushNotifications/types.js +12 -0
  97. package/libEs6/components/RulesEngine/createApplyResponse.js +3 -1
  98. package/libEs6/components/RulesEngine/types.js +12 -0
  99. package/libEs6/constants/libraryVersion.js +1 -1
  100. package/libEs6/constants/surface.js +16 -0
  101. package/libEs6/core/componentCreators.js +2 -1
  102. package/libEs6/core/consent/types.js +12 -0
  103. package/libEs6/core/createEvent.js +3 -0
  104. package/libEs6/core/edgeNetwork/types.js +12 -0
  105. package/libEs6/core/identity/types.js +12 -0
  106. package/libEs6/core/index.js +5 -1
  107. package/libEs6/core/types.js +12 -0
  108. package/libEs6/utils/createCollect.js +4 -2
  109. package/libEs6/utils/deepAssign.js +6 -0
  110. package/libEs6/utils/dom/createGetPageLocation.js +17 -0
  111. package/libEs6/utils/index.js +2 -1
  112. package/libEs6/utils/request/createRequest.js +5 -1
  113. package/libEs6/utils/request/types.js +12 -0
  114. package/libEs6/utils/surfaceUtils.js +76 -0
  115. package/libEs6/utils/types.js +12 -0
  116. package/libEs6/utils/uuid.js +1 -0
  117. package/package.json +44 -48
  118. package/scripts/helpers/path.js +12 -0
  119. package/scripts/helpers/versionBabelPlugin.js +12 -0
  120. package/types/components/Advertising/handlers/onBeforeSendEventHandler.d.ts.map +1 -1
  121. package/types/components/Advertising/handlers/viewThroughHandler.d.ts.map +1 -1
  122. package/types/components/Advertising/identities/collectSurferId.d.ts.map +1 -1
  123. package/types/components/BrandConcierge/constants.d.ts +3 -0
  124. package/types/components/BrandConcierge/constants.d.ts.map +1 -0
  125. package/types/components/BrandConcierge/createBuildEndpointUrl.d.ts +9 -0
  126. package/types/components/BrandConcierge/createBuildEndpointUrl.d.ts.map +1 -0
  127. package/types/components/BrandConcierge/createConversationServiceRequest.d.ts +7 -0
  128. package/types/components/BrandConcierge/createConversationServiceRequest.d.ts.map +1 -0
  129. package/types/components/BrandConcierge/createSendConversationEvent.d.ts +15 -0
  130. package/types/components/BrandConcierge/createSendConversationEvent.d.ts.map +1 -0
  131. package/types/components/BrandConcierge/createSendConversationServiceRequest.d.ts +11 -0
  132. package/types/components/BrandConcierge/createSendConversationServiceRequest.d.ts.map +1 -0
  133. package/types/components/BrandConcierge/createStreamParser.d.ts +3 -0
  134. package/types/components/BrandConcierge/createStreamParser.d.ts.map +1 -0
  135. package/types/components/BrandConcierge/createTimeoutWrapper.d.ts +3 -0
  136. package/types/components/BrandConcierge/createTimeoutWrapper.d.ts.map +1 -0
  137. package/types/components/BrandConcierge/index.d.ts +31 -0
  138. package/types/components/BrandConcierge/index.d.ts.map +1 -0
  139. package/types/components/BrandConcierge/utils.d.ts +6 -0
  140. package/types/components/BrandConcierge/utils.d.ts.map +1 -0
  141. package/types/components/BrandConcierge/validateMessage.d.ts +5 -0
  142. package/types/components/BrandConcierge/validateMessage.d.ts.map +1 -0
  143. package/types/components/Consent/types.d.ts.map +1 -1
  144. package/types/components/Context/createComponent.d.ts +1 -1
  145. package/types/components/Context/createComponent.d.ts.map +1 -1
  146. package/types/components/Context/implementationDetails.d.ts +1 -1
  147. package/types/components/Context/implementationDetails.d.ts.map +1 -1
  148. package/types/components/Context/index.d.ts +1 -1
  149. package/types/components/Context/index.d.ts.map +1 -1
  150. package/types/components/Context/injectDevice.d.ts +1 -1
  151. package/types/components/Context/injectDevice.d.ts.map +1 -1
  152. package/types/components/Context/injectEnvironment.d.ts +1 -1
  153. package/types/components/Context/injectEnvironment.d.ts.map +1 -1
  154. package/types/components/Context/injectHighEntropyUserAgentHints.d.ts +1 -1
  155. package/types/components/Context/injectHighEntropyUserAgentHints.d.ts.map +1 -1
  156. package/types/components/Context/injectOneTimeAnalyticsReferrer.d.ts +3 -0
  157. package/types/components/Context/injectOneTimeAnalyticsReferrer.d.ts.map +1 -0
  158. package/types/components/Context/injectPlaceContext.d.ts +1 -1
  159. package/types/components/Context/injectPlaceContext.d.ts.map +1 -1
  160. package/types/components/Context/injectTimestamp.d.ts +1 -1
  161. package/types/components/Context/injectTimestamp.d.ts.map +1 -1
  162. package/types/components/Context/injectWeb.d.ts +1 -1
  163. package/types/components/Context/injectWeb.d.ts.map +1 -1
  164. package/types/components/Personalization/createComponent.d.ts.map +1 -1
  165. package/types/components/Personalization/createFetchDataHandler.d.ts +2 -1
  166. package/types/components/Personalization/createFetchDataHandler.d.ts.map +1 -1
  167. package/types/components/Personalization/createNotificationHandler.d.ts +1 -1
  168. package/types/components/Personalization/createNotificationHandler.d.ts.map +1 -1
  169. package/types/components/Personalization/createOnDecisionHandler.d.ts +2 -1
  170. package/types/components/Personalization/createOnDecisionHandler.d.ts.map +1 -1
  171. package/types/components/Personalization/createPersonalizationDetails.d.ts.map +1 -1
  172. package/types/components/Personalization/handlers/createProcessInAppMessage.d.ts.map +1 -1
  173. package/types/components/Personalization/handlers/createProcessRedirect.d.ts.map +1 -1
  174. package/types/components/Personalization/handlers/injectCreateProposition.d.ts +2 -1
  175. package/types/components/Personalization/handlers/injectCreateProposition.d.ts.map +1 -1
  176. package/types/components/Personalization/in-app-message-actions/actions/displayIframeContent.d.ts.map +1 -1
  177. package/types/components/Personalization/index.d.ts.map +1 -1
  178. package/types/components/PushNotifications/types.d.ts.map +1 -1
  179. package/types/components/RulesEngine/createApplyResponse.d.ts.map +1 -1
  180. package/types/components/RulesEngine/index.d.ts.map +1 -1
  181. package/types/components/RulesEngine/types.d.ts.map +1 -1
  182. package/types/constants/surface.d.ts +5 -0
  183. package/types/constants/surface.d.ts.map +1 -0
  184. package/types/core/componentCreators.d.ts +1 -0
  185. package/types/core/consent/types.d.ts.map +1 -1
  186. package/types/core/createEvent.d.ts +1 -0
  187. package/types/core/createEvent.d.ts.map +1 -1
  188. package/types/core/edgeNetwork/types.d.ts.map +1 -1
  189. package/types/core/identity/types.d.ts.map +1 -1
  190. package/types/core/index.d.ts.map +1 -1
  191. package/types/core/types.d.ts.map +1 -1
  192. package/types/utils/createCollect.d.ts +2 -1
  193. package/types/utils/createCollect.d.ts.map +1 -1
  194. package/types/utils/deepAssign.d.ts.map +1 -1
  195. package/types/utils/dom/createGetPageLocation.d.ts +5 -0
  196. package/types/utils/dom/createGetPageLocation.d.ts.map +1 -0
  197. package/types/utils/index.d.ts +1 -0
  198. package/types/utils/request/createRequest.d.ts.map +1 -1
  199. package/types/utils/request/types.d.ts.map +1 -1
  200. package/types/utils/surfaceUtils.d.ts +4 -0
  201. package/types/utils/surfaceUtils.d.ts.map +1 -0
  202. package/types/utils/types.d.ts.map +1 -1
  203. package/types/utils/uuid.d.ts.map +1 -1
@@ -82,11 +82,13 @@ export default ({
82
82
  if (personalizationDetails.shouldFetchData()) {
83
83
  const cacheUpdate = viewCache.createCacheUpdate(personalizationDetails.getViewName());
84
84
  onRequestFailure(() => cacheUpdate.cancel());
85
+ const identityMap = event.getUserIdentityMap();
85
86
  fetchDataHandler({
86
87
  cacheUpdate,
87
88
  personalizationDetails,
88
89
  event,
89
- onResponse
90
+ onResponse,
91
+ identityMap
90
92
  });
91
93
  } else if (personalizationDetails.shouldUseCachedData()) {
92
94
  decisionsMetaPromises.push(viewChangeHandler({
@@ -27,7 +27,8 @@ export default ({
27
27
  cacheUpdate,
28
28
  personalizationDetails,
29
29
  event,
30
- onResponse
30
+ onResponse,
31
+ identityMap
31
32
  }) => {
32
33
  const {
33
34
  state,
@@ -44,7 +45,7 @@ export default ({
44
45
 
45
46
  // This needs to be called before the response so that future sendEvent calls
46
47
  // can know to wait until this request is complete for pending display notifications.
47
- const handleNotifications = notificationHandler(personalizationDetails.isRenderDecisions(), personalizationDetails.isSendDisplayEvent(), personalizationDetails.getViewName());
48
+ const handleNotifications = notificationHandler(personalizationDetails.isRenderDecisions(), personalizationDetails.isSendDisplayEvent(), personalizationDetails.getViewName(), identityMap);
48
49
  onResponse(({
49
50
  response
50
51
  }) => {
@@ -59,7 +60,7 @@ export default ({
59
60
  }
60
61
  });
61
62
  }
62
- const propositions = handles.map(handle => createProposition(handle));
63
+ const propositions = handles.map(handle => createProposition(handle, true, false, identityMap));
63
64
  const {
64
65
  page: pagePropositions = [],
65
66
  view: viewPropositions = [],
@@ -13,7 +13,7 @@ import { defer } from "../../utils/index.js";
13
13
  import { SUPPRESS } from "../../constants/eventType.js";
14
14
  import isNonEmptyArray from "../../utils/isNonEmptyArray.js";
15
15
  export default (collect, renderedPropositions) => {
16
- return (isRenderDecisions, isSendDisplayEvent, viewName) => {
16
+ return (isRenderDecisions, isSendDisplayEvent, viewName, identityMap) => {
17
17
  if (!isRenderDecisions) {
18
18
  // If we aren't rendering anything, then we don't need to sendDisplayEvents.
19
19
  return () => undefined;
@@ -27,7 +27,8 @@ export default (collect, renderedPropositions) => {
27
27
  if (isNonEmptyArray(decisionsMetaDisplay)) {
28
28
  collect({
29
29
  decisionsMeta: decisionsMetaDisplay,
30
- viewName
30
+ viewName,
31
+ identityMap
31
32
  });
32
33
  }
33
34
  if (isNonEmptyArray(decisionsMetaSuppressed)) {
@@ -37,7 +38,8 @@ export default (collect, renderedPropositions) => {
37
38
  propositionAction: {
38
39
  reason: "Conflict"
39
40
  },
40
- viewName
41
+ viewName,
42
+ identityMap
41
43
  });
42
44
  }
43
45
  };
@@ -38,7 +38,8 @@ export default ({
38
38
  renderDecisions,
39
39
  propositions,
40
40
  event,
41
- personalization = {}
41
+ personalization = {},
42
+ identityMap
42
43
  }) => {
43
44
  if (!renderDecisions) {
44
45
  return Promise.resolve();
@@ -48,12 +49,12 @@ export default ({
48
49
  } = personalization;
49
50
  const viewName = event ? event.getViewName() : undefined;
50
51
  const shouldSuppressDisplay = createShouldSuppressDisplay();
51
- const propositionsToExecute = propositions.map(proposition => createProposition(proposition, true, shouldSuppressDisplay(proposition)));
52
+ const propositionsToExecute = propositions.map(proposition => createProposition(proposition, true, shouldSuppressDisplay(proposition), identityMap));
52
53
  const {
53
54
  render,
54
55
  returnedPropositions
55
56
  } = processPropositions(propositionsToExecute);
56
- const handleNotifications = notificationHandler(renderDecisions, sendDisplayEvent, viewName);
57
+ const handleNotifications = notificationHandler(renderDecisions, sendDisplayEvent, viewName, identityMap);
57
58
  const propositionsById = propositionsToExecute.reduce((tot, proposition) => {
58
59
  tot[proposition.getId()] = proposition;
59
60
  return tot;
@@ -11,9 +11,9 @@ governing permissions and limitations under the License.
11
11
  */
12
12
 
13
13
  import { isNonEmptyString, isNonEmptyArray } from "../../utils/index.js";
14
- import { buildPageSurface, normalizeSurfaces } from "./utils/surfaceUtils.js";
15
14
  import PAGE_WIDE_SCOPE from "../../constants/pageWideScope.js";
16
15
  import { DEFAULT_CONTENT_ITEM, DOM_ACTION, HTML_CONTENT_ITEM, MESSAGE_IN_APP, JSON_CONTENT_ITEM, REDIRECT_ITEM, RULESET_ITEM, MESSAGE_CONTENT_CARD } from "../../constants/schema.js";
16
+ import { buildPageSurface, normalizeSurfaces } from "../../utils/surfaceUtils.js";
17
17
  const addPageWideScope = scopes => {
18
18
  if (!scopes.includes(PAGE_WIDE_SCOPE)) {
19
19
  scopes.push(PAGE_WIDE_SCOPE);
@@ -46,7 +46,7 @@ export const DOM_ACTION_COLLECT_INTERACTIONS = "collectInteractions";
46
46
  export default () => {
47
47
  return {
48
48
  [DOM_ACTION_SET_HTML]: createAction(setHtml, true),
49
- [DOM_ACTION_CUSTOM_CODE]: createAction(prependHtml),
49
+ [DOM_ACTION_CUSTOM_CODE]: createAction(prependHtml, true),
50
50
  [DOM_ACTION_SET_TEXT]: createAction(setText, true),
51
51
  [DOM_ACTION_SET_ATTRIBUTE]: createAction(setAttributes, true),
52
52
  [DOM_ACTION_SET_IMAGE_SOURCE]: createAction(swapImage, true),
@@ -69,7 +69,8 @@ export default ({
69
69
  render: () => {
70
70
  return shouldSuppressDisplay ? null : modules[type]({
71
71
  ...data,
72
- meta
72
+ meta,
73
+ identityMap: proposition.getIdentityMap()
73
74
  });
74
75
  },
75
76
  setRenderAttempted: true,
@@ -27,7 +27,8 @@ export default ({
27
27
  hideElements(REDIRECT_HIDING_ELEMENT);
28
28
  return collect({
29
29
  decisionsMeta: [item.getProposition().getNotification()],
30
- documentMayUnload: true
30
+ documentMayUnload: true,
31
+ identityMap: item.getProposition().getIdentityMap()
31
32
  }).then(() => {
32
33
  logger.logOnContentRendering({
33
34
  status: "rendering-redirect",
@@ -57,7 +57,7 @@ export default ({
57
57
  }
58
58
  };
59
59
  };
60
- return (payload, visibleInReturnedItems = true, shouldSuppressDisplay = false) => {
60
+ return (payload, visibleInReturnedItems = true, shouldSuppressDisplay = false, identityMap = undefined) => {
61
61
  const {
62
62
  id,
63
63
  scope,
@@ -95,6 +95,9 @@ export default ({
95
95
  getId() {
96
96
  return id;
97
97
  },
98
+ getIdentityMap() {
99
+ return identityMap;
100
+ },
98
101
  toJSON() {
99
102
  return payload;
100
103
  },
@@ -271,7 +271,8 @@ export const displayHTMLContentInIframe = (settings = {}, interact) => {
271
271
  export default (settings, collect) => {
272
272
  return new Promise(resolve => {
273
273
  const {
274
- meta
274
+ meta,
275
+ identityMap
275
276
  } = settings;
276
277
  displayHTMLContentInIframe(settings, (action, propositionAction) => {
277
278
  const propositionEventTypes = {};
@@ -283,7 +284,8 @@ export default (settings, collect) => {
283
284
  decisionsMeta: [meta],
284
285
  propositionAction,
285
286
  eventType: INTERACT,
286
- propositionEventTypes: Object.keys(propositionEventTypes)
287
+ propositionEventTypes: Object.keys(propositionEventTypes),
288
+ identityMap
287
289
  });
288
290
  });
289
291
  resolve({
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2019 Adobe. Ackll rights reserved.
2
+ Copyright 2025 Adobe. All rights reserved.
3
3
  This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License. You may obtain a copy
5
5
  of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -34,7 +34,7 @@ import injectCreateProposition from "./handlers/injectCreateProposition.js";
34
34
  import createAsyncArray from "./utils/createAsyncArray.js";
35
35
  import * as schema from "../../constants/schema.js";
36
36
  import processDefaultContent from "./handlers/processDefaultContent.js";
37
- import { isPageWideSurface } from "./utils/surfaceUtils.js";
37
+ import { isPageWideSurface } from "../../utils/surfaceUtils.js";
38
38
  import createProcessDomAction from "./handlers/createProcessDomAction.js";
39
39
  import createProcessHtmlContent from "./handlers/createProcessHtmlContent.js";
40
40
  import createProcessRedirect from "./handlers/createProcessRedirect.js";
@@ -82,7 +82,7 @@ export default async ({
82
82
  throw new Error(`Cannot send tracking call. ${field.errorField} is missing.`);
83
83
  }
84
84
  }
85
- const url = `https://${edgeDomain}/${edgeBasePath}/v1/interact?configId=${datastreamId}`;
85
+ const url = `https://${edgeDomain}/${edgeBasePath}/v1/interact?configId=${datastreamId}&requestId=${uuidv4()}`;
86
86
 
87
87
  /** @type {TrackingDataPayload} */
88
88
  const payload = {
@@ -1,3 +1,15 @@
1
+ /*
2
+ Copyright 2025 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
1
13
  /** @import { Identity } from '../../utils/request/types.js' */
2
14
 
3
15
  /**
@@ -26,11 +26,13 @@ export default ({
26
26
  // We extract them and add the events to the event registry.
27
27
  const eventPayloads = extractPayloadsFromEventHistoryOperations(propositions);
28
28
  eventRegistry.addEventPayloads(eventPayloads);
29
+ const identityMap = event?.getUserIdentityMap();
29
30
  lifecycle.onDecision({
30
31
  renderDecisions,
31
32
  propositions,
32
33
  event,
33
- personalization
34
+ personalization,
35
+ identityMap
34
36
  });
35
37
  }
36
38
  return {
@@ -1,3 +1,15 @@
1
+ /*
2
+ Copyright 2025 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
1
13
  /**
2
14
  * @typedef {Record<string, EventRecord>} EventRegistry
3
15
  */
@@ -13,4 +13,4 @@ governing permissions and limitations under the License.
13
13
  // The __VERSION__ keyword will be replace at alloy build time with the package.json version.
14
14
  // see babel-plugin-version
15
15
 
16
- export default "2.30.1-beta.2";
16
+ export default "2.30.1-beta.21";
@@ -0,0 +1,16 @@
1
+ /*
2
+ Copyright 2022 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
13
+ export const WEB = "web";
14
+ export const WEBAPP = "webapp";
15
+ export const SURFACE_TYPE_DELIMITER = "://";
16
+ export const FRAGMENT_DELIMITER = "#";
@@ -23,4 +23,5 @@ export { default as personalization } from "../components/Personalization/index.
23
23
  export { default as rulesEngine } from "../components/RulesEngine/index.js";
24
24
  export { default as streamingMedia } from "../components/StreamingMedia/index.js";
25
25
  export { default as advertising } from "../components/Advertising/index.js";
26
- export { default as pushNotifications } from "../components/PushNotifications/index.js";
26
+ export { default as pushNotifications } from "../components/PushNotifications/index.js";
27
+ export { default as brandConcierge } from "../components/BrandConcierge/index.js";
@@ -1,3 +1,15 @@
1
+ /*
2
+ Copyright 2025 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
1
13
  /**
2
14
  * @typedef {Object} ConsentStateMachine
3
15
  * @property {function(string): void} in
@@ -150,6 +150,9 @@ export default () => {
150
150
  }
151
151
  return userXdm.web.webPageDetails.viewName;
152
152
  },
153
+ getUserIdentityMap() {
154
+ return userXdm?.identityMap;
155
+ },
153
156
  toJSON() {
154
157
  if (!isFinalized) {
155
158
  throw new Error("toJSON called before finalize");
@@ -1,3 +1,15 @@
1
+ /*
2
+ Copyright 2025 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
1
13
  /** @import { Request } from '../../utils/request/types.js' */
2
14
 
3
15
  /**
@@ -1,3 +1,15 @@
1
+ /*
2
+ Copyright 2025 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
1
13
  /** @import { Logger } from '../../core/types.js' */
2
14
  /** @import { CookieJar } from '../../utils/types.js' */
3
15
 
@@ -181,6 +181,8 @@ export const createExecuteCommand = ({
181
181
  getImmediatelyAvailableTools(componentName) {
182
182
  const componentLogger = createComponentLogger(componentName);
183
183
  return {
184
+ loggingCookieJar,
185
+ instanceName,
184
186
  config,
185
187
  componentRegistry,
186
188
  consent,
@@ -196,7 +198,9 @@ export const createExecuteCommand = ({
196
198
  }),
197
199
  createNamespacedStorage,
198
200
  apexDomain,
199
- getBrowser
201
+ getBrowser,
202
+ cookieTransfer,
203
+ createResponse
200
204
  };
201
205
  }
202
206
  });
@@ -1,3 +1,15 @@
1
+ /*
2
+ Copyright 2025 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
1
13
  /**
2
14
  * @typedef {object} AlloyMonitor
3
15
  * @property {function(any): void} [onBeforeLog]
@@ -23,11 +23,13 @@ export default ({
23
23
  documentMayUnload = false,
24
24
  eventType = DISPLAY,
25
25
  propositionEventTypes = [getPropositionEventType(eventType)],
26
- viewName
26
+ viewName,
27
+ identityMap
27
28
  }) => {
28
29
  const event = eventManager.createEvent();
29
30
  const data = {
30
- eventType
31
+ eventType,
32
+ identityMap
31
33
  };
32
34
  if (viewName) {
33
35
  data.web = {
@@ -12,8 +12,14 @@ governing permissions and limitations under the License.
12
12
 
13
13
  import isNil from "./isNil.js";
14
14
  import isObject from "./isObject.js";
15
+
16
+ // Keys that should never be copied to prevent prototype pollution.
17
+ const DANGEROUS_KEYS = ["__proto__", "constructor", "prototype"];
15
18
  const deepAssignObject = (target, source) => {
16
19
  Object.keys(source).forEach(key => {
20
+ if (DANGEROUS_KEYS.includes(key)) {
21
+ return;
22
+ }
17
23
  if (isObject(target[key]) && isObject(source[key])) {
18
24
  deepAssignObject(target[key], source[key]);
19
25
  return;
@@ -0,0 +1,17 @@
1
+ /*
2
+ Copyright 2022 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
13
+ export default ({
14
+ window
15
+ }) => () => {
16
+ return window.location;
17
+ };
@@ -61,4 +61,5 @@ export { default as toISOStringLocal } from "./toISOStringLocal.js";
61
61
  export { default as uuid } from "./uuid.js";
62
62
  export { default as updateErrorMessage } from "./updateErrorMessage.js";
63
63
  export { default as validateIdentityMap } from "./validateIdentityMap.js";
64
- export { default as validateConfigOverride } from "./validateConfigOverride.js";
64
+ export { default as validateConfigOverride } from "./validateConfigOverride.js";
65
+ export { default as createGetPageLocation } from "./dom/createGetPageLocation.js";
@@ -47,7 +47,8 @@ export default options => {
47
47
  getAction,
48
48
  getUseSendBeacon,
49
49
  datastreamIdOverride,
50
- edgeSubPath
50
+ edgeSubPath,
51
+ requestParams = {}
51
52
  } = options;
52
53
  const id = uuid();
53
54
  let shouldUseThirdPartyDomain = false;
@@ -86,6 +87,9 @@ export default options => {
86
87
  },
87
88
  setIsIdentityEstablished() {
88
89
  isIdentityEstablished = true;
90
+ },
91
+ getRequestParams() {
92
+ return requestParams;
89
93
  }
90
94
  };
91
95
  };
@@ -1,3 +1,15 @@
1
+ /*
2
+ Copyright 2025 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
1
13
  /**
2
14
  * Request object with methods to access and modify request properties.
3
15
  *
@@ -0,0 +1,76 @@
1
+ /*
2
+ Copyright 2022 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { WEB, WEBAPP, SURFACE_TYPE_DELIMITER, FRAGMENT_DELIMITER } from "../constants/surface.js";
14
+ import { isNil, isNonEmptyString } from "./index.js";
15
+ const SURFACE_REGEX = /^(\w+):\/\/([^/#]+)(\/[^#]*)?(#.*)?$/;
16
+ const AUTHORITY_REGEX = /^(?:.*@)?(?:[a-z\d\u00a1-\uffff.-]+|\[[a-f\d:]+])(?::\d+)?$/;
17
+ const PATH_REGEX = /^\/(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})*$/;
18
+ const FRAGMENT_REGEX = /^#(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})+$/;
19
+ const normalizePath = (path = "/") => {
20
+ let end = path.length;
21
+ while (end > 0 && "/".indexOf(path.charAt(end - 1)) !== -1) {
22
+ end -= 1;
23
+ }
24
+ return path.substring(0, end) || "/";
25
+ };
26
+ const getSurfaceType = surfaceTypeMatch => isNonEmptyString(surfaceTypeMatch) ? surfaceTypeMatch.toLowerCase() : "";
27
+ const getAuthority = authorityMatch => isNonEmptyString(authorityMatch) ? authorityMatch.toLowerCase() : "";
28
+ const getPath = pathMatch => isNonEmptyString(pathMatch) ? normalizePath(pathMatch) : "/";
29
+ const parseSurface = surfaceString => {
30
+ const matched = surfaceString.match(SURFACE_REGEX);
31
+ return matched ? {
32
+ surfaceType: getSurfaceType(matched[1]),
33
+ authority: getAuthority(matched[2]),
34
+ path: getPath(matched[3]),
35
+ fragment: matched[4]
36
+ } : null;
37
+ };
38
+ const stringifySurface = surface => `${surface.surfaceType}${SURFACE_TYPE_DELIMITER}${surface.authority}${surface.path || ""}${surface.fragment || ""}`;
39
+ export const buildPageSurface = getPageLocation => {
40
+ const location = getPageLocation();
41
+ const host = location.host.toLowerCase();
42
+ const path = location.pathname;
43
+ return WEB + SURFACE_TYPE_DELIMITER + host + normalizePath(path);
44
+ };
45
+ const expandFragmentSurface = (surface, getPageLocation) => surface.startsWith(FRAGMENT_DELIMITER) ? buildPageSurface(getPageLocation) + surface : surface;
46
+ const validateSurface = (surface, getPageLocation, logger) => {
47
+ const invalidateSurface = validationError => {
48
+ logger.warn(validationError);
49
+ return null;
50
+ };
51
+ if (!isNonEmptyString(surface)) {
52
+ return invalidateSurface(`Invalid surface: ${surface}`);
53
+ }
54
+ const expanded = expandFragmentSurface(surface, getPageLocation);
55
+ const parsed = parseSurface(expanded);
56
+ if (parsed === null) {
57
+ return invalidateSurface(`Invalid surface: ${surface}`);
58
+ }
59
+ if (![WEB, WEBAPP].includes(parsed.surfaceType)) {
60
+ return invalidateSurface(`Unsupported surface type ${parsed.surfaceType} in surface: ${surface}`);
61
+ }
62
+ if (!parsed.authority || !AUTHORITY_REGEX.test(parsed.authority)) {
63
+ return invalidateSurface(`Invalid authority ${parsed.authority} in surface: ${surface}`);
64
+ }
65
+ if (parsed.path && !PATH_REGEX.test(parsed.path)) {
66
+ return invalidateSurface(`Invalid path ${parsed.path} in surface: ${surface}`);
67
+ }
68
+ if (parsed.fragment && !FRAGMENT_REGEX.test(parsed.fragment)) {
69
+ return invalidateSurface(`Invalid fragment ${parsed.fragment} in surface: ${surface}`);
70
+ }
71
+ return parsed;
72
+ };
73
+ export const isPageWideSurface = scope => !!scope && scope.indexOf(WEB + SURFACE_TYPE_DELIMITER) === 0 && scope.indexOf(FRAGMENT_DELIMITER) === -1;
74
+
75
+ // eslint-disable-next-line default-param-last
76
+ export const normalizeSurfaces = (surfaces = [], getPageLocation, logger) => surfaces.map(surface => validateSurface(surface, getPageLocation, logger)).filter(surface => !isNil(surface)).map(stringifySurface);
@@ -1,3 +1,15 @@
1
+ /*
2
+ Copyright 2025 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+
1
13
  /**
2
14
  * @typedef {Object} Storage
3
15
  * @property {function(string): string|null} getItem
@@ -10,5 +10,6 @@ OF ANY KIND, either express or implied. See the License for the specific languag
10
10
  governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ // eslint-disable-next-line import/no-unresolved
13
14
  import { v4 as uuidv4 } from "uuid";
14
15
  export default uuidv4;