@blotoutio/providers-tiktok-sdk 0.34.0 → 0.35.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/index.cjs.js CHANGED
@@ -103,7 +103,7 @@ const prepareData = (data, productIdMapping) => {
103
103
  if (data['search']) {
104
104
  payload['query'] = data['search'];
105
105
  }
106
- if (data['value']) {
106
+ if (data['value'] || data['value'] === 0) {
107
107
  payload['value'] = data['value'];
108
108
  }
109
109
  if (data['currency']) {
@@ -133,7 +133,7 @@ const prepareData = (data, productIdMapping) => {
133
133
  if (item.quantity) {
134
134
  content['quantity'] = item.quantity;
135
135
  }
136
- if (item.item_price) {
136
+ if (item.item_price || item.item_price === 0) {
137
137
  content['price'] = item.item_price;
138
138
  }
139
139
  if (item.category) {
@@ -149,7 +149,8 @@ const prepareData = (data, productIdMapping) => {
149
149
  });
150
150
  }
151
151
  else if (data['contents'].length === 1) {
152
- if (data['contents'][0].item_price) {
152
+ if (data['contents'][0].item_price ||
153
+ data['contents'][0].item_price === 0) {
153
154
  payload['price'] = data['contents'][0].item_price;
154
155
  }
155
156
  if (data['contents'][0].quantity) {
@@ -187,7 +188,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
187
188
  });
188
189
  }
189
190
  return {
190
- sdkVersion: "0.34.0" ,
191
+ sdkVersion: "0.35.1" ,
191
192
  };
192
193
  };
193
194
 
package/index.js CHANGED
@@ -104,7 +104,7 @@ var ProvidersTiktokSdk = (function () {
104
104
  if (data['search']) {
105
105
  payload['query'] = data['search'];
106
106
  }
107
- if (data['value']) {
107
+ if (data['value'] || data['value'] === 0) {
108
108
  payload['value'] = data['value'];
109
109
  }
110
110
  if (data['currency']) {
@@ -134,7 +134,7 @@ var ProvidersTiktokSdk = (function () {
134
134
  if (item.quantity) {
135
135
  content['quantity'] = item.quantity;
136
136
  }
137
- if (item.item_price) {
137
+ if (item.item_price || item.item_price === 0) {
138
138
  content['price'] = item.item_price;
139
139
  }
140
140
  if (item.category) {
@@ -150,7 +150,8 @@ var ProvidersTiktokSdk = (function () {
150
150
  });
151
151
  }
152
152
  else if (data['contents'].length === 1) {
153
- if (data['contents'][0].item_price) {
153
+ if (data['contents'][0].item_price ||
154
+ data['contents'][0].item_price === 0) {
154
155
  payload['price'] = data['contents'][0].item_price;
155
156
  }
156
157
  if (data['contents'][0].quantity) {
@@ -188,7 +189,7 @@ var ProvidersTiktokSdk = (function () {
188
189
  });
189
190
  }
190
191
  return {
191
- sdkVersion: "0.34.0" ,
192
+ sdkVersion: "0.35.1" ,
192
193
  };
193
194
  };
194
195
 
package/index.mjs CHANGED
@@ -101,7 +101,7 @@ const prepareData = (data, productIdMapping) => {
101
101
  if (data['search']) {
102
102
  payload['query'] = data['search'];
103
103
  }
104
- if (data['value']) {
104
+ if (data['value'] || data['value'] === 0) {
105
105
  payload['value'] = data['value'];
106
106
  }
107
107
  if (data['currency']) {
@@ -131,7 +131,7 @@ const prepareData = (data, productIdMapping) => {
131
131
  if (item.quantity) {
132
132
  content['quantity'] = item.quantity;
133
133
  }
134
- if (item.item_price) {
134
+ if (item.item_price || item.item_price === 0) {
135
135
  content['price'] = item.item_price;
136
136
  }
137
137
  if (item.category) {
@@ -147,7 +147,8 @@ const prepareData = (data, productIdMapping) => {
147
147
  });
148
148
  }
149
149
  else if (data['contents'].length === 1) {
150
- if (data['contents'][0].item_price) {
150
+ if (data['contents'][0].item_price ||
151
+ data['contents'][0].item_price === 0) {
151
152
  payload['price'] = data['contents'][0].item_price;
152
153
  }
153
154
  if (data['contents'][0].quantity) {
@@ -185,7 +186,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
185
186
  });
186
187
  }
187
188
  return {
188
- sdkVersion: "0.34.0" ,
189
+ sdkVersion: "0.35.1" ,
189
190
  };
190
191
  };
191
192
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-tiktok-sdk",
3
- "version": "0.34.0",
3
+ "version": "0.35.1",
4
4
  "description": "Tiktok Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",