utils.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.applyDeviceTokenExists = applyDeviceTokenExists;
  6. exports.bodiesPerLocales = bodiesPerLocales;
  7. exports.getLocalesFromPush = getLocalesFromPush;
  8. exports.groupByLocaleIdentifier = groupByLocaleIdentifier;
  9. exports.isPushIncrementing = isPushIncrementing;
  10. exports.stripLocalesFromBody = stripLocalesFromBody;
  11. exports.transformPushBodyForLocale = transformPushBodyForLocale;
  12. exports.validatePushType = validatePushType;
  13. var _node = _interopRequireDefault(require("parse/node"));
  14. var _deepcopy = _interopRequireDefault(require("deepcopy"));
  15. function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
  16. function isPushIncrementing(body) {
  17. if (!body.data || !body.data.badge) {
  18. return false;
  19. }
  20. const badge = body.data.badge;
  21. if (typeof badge == 'string' && badge.toLowerCase() == 'increment') {
  22. return true;
  23. }
  24. return typeof badge == 'object' && typeof badge.__op == 'string' && badge.__op.toLowerCase() == 'increment' && Number(badge.amount);
  25. }
  26. const localizableKeys = ['alert', 'title'];
  27. function getLocalesFromPush(body) {
  28. const data = body.data;
  29. if (!data) {
  30. return [];
  31. }
  32. return [...new Set(Object.keys(data).reduce((memo, key) => {
  33. localizableKeys.forEach(localizableKey => {
  34. if (key.indexOf(`${localizableKey}-`) == 0) {
  35. memo.push(key.slice(localizableKey.length + 1));
  36. }
  37. });
  38. return memo;
  39. }, []))];
  40. }
  41. function transformPushBodyForLocale(body, locale) {
  42. const data = body.data;
  43. if (!data) {
  44. return body;
  45. }
  46. body = (0, _deepcopy.default)(body);
  47. localizableKeys.forEach(key => {
  48. const localeValue = body.data[`${key}-${locale}`];
  49. if (localeValue) {
  50. body.data[key] = localeValue;
  51. }
  52. });
  53. return stripLocalesFromBody(body);
  54. }
  55. function stripLocalesFromBody(body) {
  56. if (!body.data) {
  57. return body;
  58. }
  59. Object.keys(body.data).forEach(key => {
  60. localizableKeys.forEach(localizableKey => {
  61. if (key.indexOf(`${localizableKey}-`) == 0) {
  62. delete body.data[key];
  63. }
  64. });
  65. });
  66. return body;
  67. }
  68. function bodiesPerLocales(body, locales = []) {
  69. // Get all tranformed bodies for each locale
  70. const result = locales.reduce((memo, locale) => {
  71. memo[locale] = transformPushBodyForLocale(body, locale);
  72. return memo;
  73. }, {});
  74. // Set the default locale, with the stripped body
  75. result.default = stripLocalesFromBody(body);
  76. return result;
  77. }
  78. function groupByLocaleIdentifier(installations, locales = []) {
  79. return installations.reduce((map, installation) => {
  80. let added = false;
  81. locales.forEach(locale => {
  82. if (added) {
  83. return;
  84. }
  85. if (installation.localeIdentifier && installation.localeIdentifier.indexOf(locale) === 0) {
  86. added = true;
  87. map[locale] = map[locale] || [];
  88. map[locale].push(installation);
  89. }
  90. });
  91. if (!added) {
  92. map.default.push(installation);
  93. }
  94. return map;
  95. }, {
  96. default: []
  97. });
  98. }
  99. /**
  100. * Check whether the deviceType parameter in qury condition is valid or not.
  101. * @param {Object} where A query condition
  102. * @param {Array} validPushTypes An array of valid push types(string)
  103. */
  104. function validatePushType(where = {}, validPushTypes = []) {
  105. var deviceTypeField = where.deviceType || {};
  106. var deviceTypes = [];
  107. if (typeof deviceTypeField === 'string') {
  108. deviceTypes.push(deviceTypeField);
  109. } else if (Array.isArray(deviceTypeField['$in'])) {
  110. deviceTypes.concat(deviceTypeField['$in']);
  111. }
  112. for (var i = 0; i < deviceTypes.length; i++) {
  113. var deviceType = deviceTypes[i];
  114. if (validPushTypes.indexOf(deviceType) < 0) {
  115. throw new _node.default.Error(_node.default.Error.PUSH_MISCONFIGURED, deviceType + ' is not supported push type.');
  116. }
  117. }
  118. }
  119. function applyDeviceTokenExists(where) {
  120. where = (0, _deepcopy.default)(where);
  121. if (!Object.prototype.hasOwnProperty.call(where, 'deviceToken')) {
  122. where['deviceToken'] = {
  123. $exists: true
  124. };
  125. }
  126. return where;
  127. }
  128. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbm9kZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2RlZXBjb3B5IiwiZSIsIl9fZXNNb2R1bGUiLCJkZWZhdWx0IiwiaXNQdXNoSW5jcmVtZW50aW5nIiwiYm9keSIsImRhdGEiLCJiYWRnZSIsInRvTG93ZXJDYXNlIiwiX19vcCIsIk51bWJlciIsImFtb3VudCIsImxvY2FsaXphYmxlS2V5cyIsImdldExvY2FsZXNGcm9tUHVzaCIsIlNldCIsIk9iamVjdCIsImtleXMiLCJyZWR1Y2UiLCJtZW1vIiwia2V5IiwiZm9yRWFjaCIsImxvY2FsaXphYmxlS2V5IiwiaW5kZXhPZiIsInB1c2giLCJzbGljZSIsImxlbmd0aCIsInRyYW5zZm9ybVB1c2hCb2R5Rm9yTG9jYWxlIiwibG9jYWxlIiwiZGVlcGNvcHkiLCJsb2NhbGVWYWx1ZSIsInN0cmlwTG9jYWxlc0Zyb21Cb2R5IiwiYm9kaWVzUGVyTG9jYWxlcyIsImxvY2FsZXMiLCJyZXN1bHQiLCJncm91cEJ5TG9jYWxlSWRlbnRpZmllciIsImluc3RhbGxhdGlvbnMiLCJtYXAiLCJpbnN0YWxsYXRpb24iLCJhZGRlZCIsImxvY2FsZUlkZW50aWZpZXIiLCJ2YWxpZGF0ZVB1c2hUeXBlIiwid2hlcmUiLCJ2YWxpZFB1c2hUeXBlcyIsImRldmljZVR5cGVGaWVsZCIsImRldmljZVR5cGUiLCJkZXZpY2VUeXBlcyIsIkFycmF5IiwiaXNBcnJheSIsImNvbmNhdCIsImkiLCJQYXJzZSIsIkVycm9yIiwiUFVTSF9NSVNDT05GSUdVUkVEIiwiYXBwbHlEZXZpY2VUb2tlbkV4aXN0cyIsInByb3RvdHlwZSIsImhhc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