@smartico/public-api 0.0.311 → 0.0.313

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.
@@ -821,7 +821,8 @@ const InboxMessagesTransform = items => {
821
821
  message_guid: item.engagement_uid,
822
822
  read: item.is_read,
823
823
  favorite: item.is_starred,
824
- category_id: item.category_id
824
+ category_id: item.category_id,
825
+ expire_on_dt: item.expire_on_dt
825
826
  };
826
827
  return x;
827
828
  });
@@ -842,6 +843,7 @@ const InboxMessageBodyTransform = item => {
842
843
  }));
843
844
  }
844
845
  x.html_body = (item == null ? void 0 : item.html_body) || null;
846
+ x.custom_data = IntUtils.JsonOrText(item == null ? void 0 : item.custom_data);
845
847
  }
846
848
  return x;
847
849
  };
@@ -1267,11 +1269,11 @@ MissionUtils.getMs = ts => {
1267
1269
  return new Date(ts).getTime();
1268
1270
  };
1269
1271
  MissionUtils.replaceFavGameNameTag = task => {
1270
- var _task$user_state_para, _task$task_public_met;
1272
+ var _task$task_public_met;
1271
1273
  if (!task) {
1272
1274
  return task;
1273
1275
  }
1274
- const userStateParams = ((_task$user_state_para = task.user_state_params) == null ? void 0 : _task$user_state_para.map) || {};
1276
+ const userStateParams = task.user_state_params || {};
1275
1277
  const userStateOperator = (_task$task_public_met = task.task_public_meta) == null ? void 0 : _task$task_public_met.user_state_operations;
1276
1278
  const userStateParamsKeys = Object.keys(userStateParams);
1277
1279
  if (userStateParamsKeys.length === 0 || !userStateOperator) {
@@ -1286,7 +1288,10 @@ MissionUtils.replaceFavGameNameTag = task => {
1286
1288
  if (operatorsMulti.includes(operator)) {
1287
1289
  const value = userStateParams[k];
1288
1290
  if (value && value.length > 0) {
1289
- replacementValue = value.join(' ,');
1291
+ replacementValue = value.map(v => {
1292
+ const cleaned = v.replace(/_/g, ' ').toLowerCase();
1293
+ return cleaned.charAt(0).toUpperCase() + cleaned.slice(1);
1294
+ }).join(' ,');
1290
1295
  }
1291
1296
  }
1292
1297
  if (operatorsPos.includes(operator)) {
@@ -1294,6 +1299,10 @@ MissionUtils.replaceFavGameNameTag = task => {
1294
1299
  const pos = Number(operator.replace('pos', '')) - 1;
1295
1300
  if (IntUtils.isNotNull(pos) && value && value[pos]) {
1296
1301
  replacementValue = value[pos];
1302
+ if (replacementValue) {
1303
+ replacementValue = replacementValue.replace('_', ' ').toLowerCase();
1304
+ replacementValue = replacementValue.charAt(0).toUpperCase() + replacementValue.slice(1);
1305
+ }
1297
1306
  }
1298
1307
  }
1299
1308
  });