@builder.io/sdk 6.2.0 → 6.2.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.
package/dist/index.esm.js CHANGED
@@ -950,7 +950,7 @@ function toError(err) {
950
950
 
951
951
  var DEFAULT_API_VERSION = 'v3';
952
952
 
953
- var SDK_VERSION = '6.2.0';
953
+ var SDK_VERSION = '6.2.1';
954
954
 
955
955
  function datePlusMinutes(minutes) {
956
956
  if (minutes === void 0) { minutes = 30; }
@@ -1702,7 +1702,15 @@ var Builder = /** @class */ (function () {
1702
1702
  if (isIframe || !isBrowser || Builder.isPreviewing) {
1703
1703
  return;
1704
1704
  }
1705
- var meta = typeof contentId === 'object' ? contentId : customProperties;
1705
+ var metadata = typeof contentId === 'object'
1706
+ ? __assign({}, contentId) : customProperties && typeof customProperties === 'object'
1707
+ ? __assign({}, customProperties) : undefined;
1708
+ if (amount !== undefined) {
1709
+ if (!metadata) {
1710
+ metadata = {};
1711
+ }
1712
+ metadata.amount = amount;
1713
+ }
1706
1714
  var useContentId = typeof contentId === 'string' ? contentId : undefined;
1707
1715
  if (!useContentId && !contentId && this.contentId) {
1708
1716
  useContentId = this.contentId;
@@ -1716,7 +1724,7 @@ var Builder = /** @class */ (function () {
1716
1724
  variationId: useVariationId && useContentId && useVariationId !== useContentId
1717
1725
  ? useVariationId
1718
1726
  : undefined,
1719
- meta: meta,
1727
+ meta: metadata,
1720
1728
  contentId: useContentId,
1721
1729
  }, context);
1722
1730
  };