@adobe/alloy 2.33.1 → 2.34.0-beta.1

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 (88) hide show
  1. package/dist/alloy.js +9 -13
  2. package/dist/alloy.min.js +1 -1
  3. package/dist/alloyServiceWorker.js +16 -18
  4. package/dist/alloyServiceWorker.min.js +1 -1
  5. package/dist/types/browser/src/components/ActivityCollector/configValidators.d.ts +1 -1
  6. package/dist/types/browser/src/components/ActivityCollector/createClickedElementProperties.d.ts +1 -1
  7. package/dist/types/browser/src/components/ActivityCollector/createGetClickedElementProperties.d.ts +1 -1
  8. package/dist/types/browser/src/components/Advertising/configValidators.d.ts +1 -1
  9. package/dist/types/browser/src/components/Advertising/handlers/clickThroughHandler.d.ts +5 -5
  10. package/dist/types/browser/src/components/Advertising/handlers/createOnBeforeSendEventHandler.d.ts +6 -6
  11. package/dist/types/browser/src/components/Advertising/identities/collectAllIdentities.d.ts +1 -1
  12. package/dist/types/browser/src/components/Advertising/identities/collectRampId.d.ts +2 -2
  13. package/dist/types/browser/src/components/Advertising/identities/collectSurferId.d.ts +1 -1
  14. package/dist/types/browser/src/components/Advertising/identities/createHashedIpHandler.d.ts +1 -1
  15. package/dist/types/browser/src/components/Advertising/identities/initiateAdvertisingIdentityCall.d.ts +3 -3
  16. package/dist/types/browser/src/components/Advertising/utils/helpers.d.ts +4 -4
  17. package/dist/types/browser/src/components/Context/index.d.ts +1 -1
  18. package/dist/types/browser/src/components/Personalization/createApplyPropositions.d.ts +2 -2
  19. package/dist/types/browser/src/components/Personalization/createComponent.d.ts +4 -4
  20. package/dist/types/browser/src/components/Personalization/createOnDecisionHandler.d.ts +1 -1
  21. package/dist/types/browser/src/components/Personalization/dom-actions/clicks/collectClicks.d.ts +1 -1
  22. package/dist/types/browser/src/components/Personalization/dom-actions/dom/getChildNodes.d.ts +1 -1
  23. package/dist/types/browser/src/components/Personalization/dom-actions/dom/getChildren.d.ts +1 -1
  24. package/dist/types/browser/src/components/Personalization/handlers/injectCreateProposition.d.ts +2 -2
  25. package/dist/types/browser/src/components/Personalization/in-app-message-actions/actions/displayIframeContent.d.ts +1 -1
  26. package/dist/types/browser/src/components/Personalization/index.d.ts +5 -5
  27. package/dist/types/browser/src/components/Personalization/utils/surfaceUtils.d.ts +1 -1
  28. package/dist/types/browser/src/components/Personalization/validateApplyPropositionsOptions.d.ts +1 -1
  29. package/dist/types/browser/src/components/PushNotifications/helpers/readFromIndexedDb.d.ts +1 -1
  30. package/dist/types/browser/src/components/PushNotifications/helpers/saveToIndexedDb.d.ts +1 -1
  31. package/dist/types/browser/src/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.d.ts +1 -1
  32. package/dist/types/browser/src/components/PushNotifications/index.d.ts +1 -1
  33. package/dist/types/browser/src/components/PushNotifications/request/makeSendServiceWorkerTrackingData.d.ts +2 -2
  34. package/dist/types/browser/src/components/PushNotifications/types.d.ts +7 -7
  35. package/dist/types/browser/src/createEventListeners.d.ts +1 -1
  36. package/dist/types/browser/src/index.d.ts +3 -3
  37. package/dist/types/core/src/components/BrandConcierge/configValidators.d.ts +1 -1
  38. package/dist/types/core/src/components/BrandConcierge/createConversationServiceRequest.d.ts +4 -3
  39. package/dist/types/core/src/components/BrandConcierge/createSendConversationServiceRequest.d.ts +1 -1
  40. package/dist/types/core/src/components/BrandConcierge/createTimeoutWrapper.d.ts +1 -1
  41. package/dist/types/core/src/components/Consent/configValidators.d.ts +1 -1
  42. package/dist/types/core/src/components/Consent/parseConsentCookie.d.ts +1 -1
  43. package/dist/types/core/src/components/Identity/configValidators.d.ts +1 -1
  44. package/dist/types/core/src/components/MediaAnalyticsBridge/createMediaAnalyticsBridgeComponent.d.ts +1 -1
  45. package/dist/types/core/src/components/MediaAnalyticsBridge/index.d.ts +1 -1
  46. package/dist/types/core/src/components/RulesEngine/createApplyResponse.d.ts +2 -2
  47. package/dist/types/core/src/components/RulesEngine/createEventRegistry.d.ts +3 -3
  48. package/dist/types/core/src/components/RulesEngine/index.d.ts +4 -4
  49. package/dist/types/core/src/components/RulesEngine/types.d.ts +1 -1
  50. package/dist/types/core/src/components/RulesEngine/utils/generateEventHash.d.ts +1 -1
  51. package/dist/types/core/src/components/StreamingMedia/configValidators.d.ts +1 -1
  52. package/dist/types/core/src/components/StreamingMedia/createStreamingMediaComponent.d.ts +1 -1
  53. package/dist/types/core/src/components/StreamingMedia/createTrackMediaSession.d.ts +1 -1
  54. package/dist/types/core/src/components/StreamingMedia/index.d.ts +1 -1
  55. package/dist/types/core/src/core/consent/types.d.ts +2 -2
  56. package/dist/types/core/src/core/createEvent.d.ts +1 -1
  57. package/dist/types/core/src/core/createEventManager.d.ts +2 -2
  58. package/dist/types/core/src/core/createLogger.d.ts +3 -3
  59. package/dist/types/core/src/core/edgeNetwork/injectApplyResponse.d.ts +2 -2
  60. package/dist/types/core/src/core/edgeNetwork/injectSendEdgeNetworkRequest.d.ts +1 -1
  61. package/dist/types/core/src/core/edgeNetwork/types.d.ts +1 -1
  62. package/dist/types/core/src/core/injectCreateResponse.d.ts +1 -1
  63. package/dist/types/core/src/core/injectShouldTransferCookie.d.ts +1 -1
  64. package/dist/types/core/src/core/types.d.ts +27 -27
  65. package/dist/types/core/src/index.d.ts +7 -8
  66. package/dist/types/core/src/utils/bytes.d.ts +1 -1
  67. package/dist/types/core/src/utils/createCollect.d.ts +4 -4
  68. package/dist/types/core/src/utils/createSubscription.d.ts +1 -1
  69. package/dist/types/core/src/utils/deepAssign.d.ts +1 -1
  70. package/dist/types/core/src/utils/dom/loadScript.d.ts +1 -1
  71. package/dist/types/core/src/utils/dom/querySelectorAll.d.ts +1 -1
  72. package/dist/types/core/src/utils/dom/selectNodesWithShadow.d.ts +1 -1
  73. package/dist/types/core/src/utils/getApexDomain.d.ts +1 -1
  74. package/dist/types/core/src/utils/groupBy.d.ts +1 -1
  75. package/dist/types/core/src/utils/injectFireReferrerHideableImage.d.ts +4 -4
  76. package/dist/types/core/src/utils/injectStorage.d.ts +1 -1
  77. package/dist/types/core/src/utils/request/createRequest.d.ts +2 -2
  78. package/dist/types/core/src/utils/request/createRequestParams.d.ts +1 -1
  79. package/dist/types/core/src/utils/request/createRequestPayload.d.ts +1 -1
  80. package/dist/types/core/src/utils/sortObjectKeysRecursively.d.ts +1 -1
  81. package/dist/types/core/src/utils/surfaceUtils.d.ts +1 -1
  82. package/dist/types/core/src/utils/toArray.d.ts +1 -1
  83. package/dist/types/core/src/utils/types.d.ts +7 -7
  84. package/dist/types/core/src/utils/validateConfigOverride.d.ts +1 -1
  85. package/dist/types/core/src/utils/validateIdentityMap.d.ts +1 -1
  86. package/dist/types/core/src/utils/validation/index.d.ts +11 -11
  87. package/package.json +10 -10
  88. package/src/components/PushNotifications/helpers/serviceWorkerPushListener.js +16 -18
package/dist/alloy.js CHANGED
@@ -3988,7 +3988,6 @@
3988
3988
  ecid = new TextDecoder().decode(
3989
3989
  buffer.slice(offset, offset + fieldValueLength.value),
3990
3990
  );
3991
- offset += fieldValueLength.value;
3992
3991
  return ecid;
3993
3992
  }
3994
3993
  } else {
@@ -4829,7 +4828,7 @@
4829
4828
  validatedOptions = optionsValidator(options);
4830
4829
  } catch (validationError) {
4831
4830
  const invalidOptionsMessage = `Invalid ${commandName} command options:\n\t - ${validationError} For command documentation see: ${documentationUri}`;
4832
- throw new Error(invalidOptionsMessage);
4831
+ throw new Error(invalidOptionsMessage, { cause: validationError });
4833
4832
  }
4834
4833
  }
4835
4834
  return validatedOptions;
@@ -4860,6 +4859,7 @@
4860
4859
  .join(
4861
4860
  "\n\t - ",
4862
4861
  )}\nFor configuration documentation see: ${CONFIG_DOC_URI}`,
4862
+ { cause: e },
4863
4863
  );
4864
4864
  }
4865
4865
  };
@@ -7922,10 +7922,10 @@
7922
7922
  governing permissions and limitations under the License.
7923
7923
  */
7924
7924
 
7925
- // The 2.33.1 keyword will be replace at alloy build time with the package.json version.
7925
+ // The 2.34.0-beta.1 keyword will be replace at alloy build time with the package.json version.
7926
7926
  // see babel-plugin-version
7927
7927
 
7928
- var libraryVersion = "2.33.1";
7928
+ var libraryVersion = "2.34.0-beta.1";
7929
7929
 
7930
7930
  /*
7931
7931
  Copyright 2019 Adobe. All rights reserved.
@@ -12558,10 +12558,11 @@
12558
12558
  action = "conversations",
12559
12559
  sessionId,
12560
12560
  voiceEnabled = false,
12561
+ region,
12561
12562
  }) => {
12562
12563
  const edgeSubPath = voiceEnabled
12563
12564
  ? VOICE_BRAND_CONCIERGE_PATH
12564
- : BRAND_CONCIERGE_PATH;
12565
+ : `${BRAND_CONCIERGE_PATH}${region ? `/${region}` : ""}`;
12565
12566
 
12566
12567
  return createRequest({
12567
12568
  payload: payload,
@@ -13009,13 +13010,7 @@
13009
13010
  consent,
13010
13011
  session,
13011
13012
  }) => {
13012
- const {
13013
- edgeDomain,
13014
- edgeBasePath,
13015
- datastreamId,
13016
- onBeforeEventSend,
13017
- conversation,
13018
- } = config;
13013
+ const { edgeDomain, datastreamId, onBeforeEventSend, conversation } = config;
13019
13014
  return (options) => {
13020
13015
  let streamingEnabled = false;
13021
13016
  const {
@@ -13030,6 +13025,7 @@
13030
13025
  payload,
13031
13026
  sessionId: session.id,
13032
13027
  voiceEnabled,
13028
+ region: conversation.region,
13033
13029
  });
13034
13030
 
13035
13031
  const event = eventManager.createEvent();
@@ -13070,7 +13066,6 @@
13070
13066
  }
13071
13067
  const url = buildEndpointUrl({
13072
13068
  edgeDomain,
13073
- edgeBasePath,
13074
13069
  datastreamId,
13075
13070
  request,
13076
13071
  });
@@ -13260,6 +13255,7 @@
13260
13255
  .minimum(STREAM_START_TIMEOUT_MS)
13261
13256
  .default(STREAM_START_TIMEOUT_MS),
13262
13257
  collectSources: boundBoolean().default(false),
13258
+ region: boundString().matches(/^[a-z]{2,4}[0-9]{1,2}$/i),
13263
13259
  }).default({
13264
13260
  stickyConversationSession: false,
13265
13261
  streamTimeout: STREAM_START_TIMEOUT_MS,