@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.cjs.js CHANGED
@@ -958,7 +958,7 @@ function toError(err) {
958
958
 
959
959
  var DEFAULT_API_VERSION = 'v3';
960
960
 
961
- var SDK_VERSION = '6.2.0';
961
+ var SDK_VERSION = '6.2.1';
962
962
 
963
963
  function datePlusMinutes(minutes) {
964
964
  if (minutes === void 0) { minutes = 30; }
@@ -1710,7 +1710,15 @@ var Builder = /** @class */ (function () {
1710
1710
  if (isIframe || !isBrowser || Builder.isPreviewing) {
1711
1711
  return;
1712
1712
  }
1713
- var meta = typeof contentId === 'object' ? contentId : customProperties;
1713
+ var metadata = typeof contentId === 'object'
1714
+ ? tslib.__assign({}, contentId) : customProperties && typeof customProperties === 'object'
1715
+ ? tslib.__assign({}, customProperties) : undefined;
1716
+ if (amount !== undefined) {
1717
+ if (!metadata) {
1718
+ metadata = {};
1719
+ }
1720
+ metadata.amount = amount;
1721
+ }
1714
1722
  var useContentId = typeof contentId === 'string' ? contentId : undefined;
1715
1723
  if (!useContentId && !contentId && this.contentId) {
1716
1724
  useContentId = this.contentId;
@@ -1724,7 +1732,7 @@ var Builder = /** @class */ (function () {
1724
1732
  variationId: useVariationId && useContentId && useVariationId !== useContentId
1725
1733
  ? useVariationId
1726
1734
  : undefined,
1727
- meta: meta,
1735
+ meta: metadata,
1728
1736
  contentId: useContentId,
1729
1737
  }, context);
1730
1738
  };