123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = exports.PushController = void 0;
- var _node = require("parse/node");
- var _RestQuery = _interopRequireDefault(require("../RestQuery"));
- var _RestWrite = _interopRequireDefault(require("../RestWrite"));
- var _Auth = require("../Auth");
- var _StatusHandler = require("../StatusHandler");
- var _utils = require("../Push/utils");
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
- class PushController {
- sendPush(body = {}, where = {}, config, auth, onPushStatusSaved = () => {}, now = new Date()) {
- if (!config.hasPushSupport) {
- throw new _node.Parse.Error(_node.Parse.Error.PUSH_MISCONFIGURED, 'Missing push configuration');
- }
- // Replace the expiration_time and push_time with a valid Unix epoch milliseconds time
- body.expiration_time = PushController.getExpirationTime(body);
- body.expiration_interval = PushController.getExpirationInterval(body);
- if (body.expiration_time && body.expiration_interval) {
- throw new _node.Parse.Error(_node.Parse.Error.PUSH_MISCONFIGURED, 'Both expiration_time and expiration_interval cannot be set');
- }
- // Immediate push
- if (body.expiration_interval && !Object.prototype.hasOwnProperty.call(body, 'push_time')) {
- const ttlMs = body.expiration_interval * 1000;
- body.expiration_time = new Date(now.valueOf() + ttlMs).valueOf();
- }
- const pushTime = PushController.getPushTime(body);
- if (pushTime && pushTime.date !== 'undefined') {
- body['push_time'] = PushController.formatPushTime(pushTime);
- }
- // TODO: If the req can pass the checking, we return immediately instead of waiting
- // pushes to be sent. We probably change this behaviour in the future.
- let badgeUpdate = () => {
- return Promise.resolve();
- };
- if (body.data && body.data.badge) {
- const badge = body.data.badge;
- let restUpdate = {};
- if (typeof badge == 'string' && badge.toLowerCase() === 'increment') {
- restUpdate = {
- badge: {
- __op: 'Increment',
- amount: 1
- }
- };
- } else if (typeof badge == 'object' && typeof badge.__op == 'string' && badge.__op.toLowerCase() == 'increment' && Number(badge.amount)) {
- restUpdate = {
- badge: {
- __op: 'Increment',
- amount: badge.amount
- }
- };
- } else if (Number(badge)) {
- restUpdate = {
- badge: badge
- };
- } else {
- throw "Invalid value for badge, expected number or 'Increment' or {increment: number}";
- }
- // Force filtering on only valid device tokens
- const updateWhere = (0, _utils.applyDeviceTokenExists)(where);
- badgeUpdate = async () => {
- // Build a real RestQuery so we can use it in RestWrite
- const restQuery = await (0, _RestQuery.default)({
- method: _RestQuery.default.Method.find,
- config,
- runBeforeFind: false,
- auth: (0, _Auth.master)(config),
- className: '_Installation',
- restWhere: updateWhere
- });
- return restQuery.buildRestWhere().then(() => {
- const write = new _RestWrite.default(config, (0, _Auth.master)(config), '_Installation', restQuery.restWhere, restUpdate);
- write.runOptions.many = true;
- return write.execute();
- });
- };
- }
- const pushStatus = (0, _StatusHandler.pushStatusHandler)(config);
- return Promise.resolve().then(() => {
- return pushStatus.setInitial(body, where);
- }).then(() => {
- onPushStatusSaved(pushStatus.objectId);
- return badgeUpdate();
- }).then(() => {
- // Update audience lastUsed and timesUsed
- if (body.audience_id) {
- const audienceId = body.audience_id;
- var updateAudience = {
- lastUsed: {
- __type: 'Date',
- iso: new Date().toISOString()
- },
- timesUsed: {
- __op: 'Increment',
- amount: 1
- }
- };
- const write = new _RestWrite.default(config, (0, _Auth.master)(config), '_Audience', {
- objectId: audienceId
- }, updateAudience);
- write.execute();
- }
- // Don't wait for the audience update promise to resolve.
- return Promise.resolve();
- }).then(() => {
- if (Object.prototype.hasOwnProperty.call(body, 'push_time') && config.hasPushScheduledSupport) {
- return Promise.resolve();
- }
- return config.pushControllerQueue.enqueue(body, where, config, auth, pushStatus);
- }).catch(err => {
- return pushStatus.fail(err).then(() => {
- throw err;
- });
- });
- }
- /**
- * Get expiration time from the request body.
- * @param {Object} request A request object
- * @returns {Number|undefined} The expiration time if it exists in the request
- */
- static getExpirationTime(body = {}) {
- var hasExpirationTime = Object.prototype.hasOwnProperty.call(body, 'expiration_time');
- if (!hasExpirationTime) {
- return;
- }
- var expirationTimeParam = body['expiration_time'];
- var expirationTime;
- if (typeof expirationTimeParam === 'number') {
- expirationTime = new Date(expirationTimeParam * 1000);
- } else if (typeof expirationTimeParam === 'string') {
- expirationTime = new Date(expirationTimeParam);
- } else {
- throw new _node.Parse.Error(_node.Parse.Error.PUSH_MISCONFIGURED, body['expiration_time'] + ' is not valid time.');
- }
- // Check expirationTime is valid or not, if it is not valid, expirationTime is NaN
- if (!isFinite(expirationTime)) {
- throw new _node.Parse.Error(_node.Parse.Error.PUSH_MISCONFIGURED, body['expiration_time'] + ' is not valid time.');
- }
- return expirationTime.valueOf();
- }
- static getExpirationInterval(body = {}) {
- const hasExpirationInterval = Object.prototype.hasOwnProperty.call(body, 'expiration_interval');
- if (!hasExpirationInterval) {
- return;
- }
- var expirationIntervalParam = body['expiration_interval'];
- if (typeof expirationIntervalParam !== 'number' || expirationIntervalParam <= 0) {
- throw new _node.Parse.Error(_node.Parse.Error.PUSH_MISCONFIGURED, `expiration_interval must be a number greater than 0`);
- }
- return expirationIntervalParam;
- }
- /**
- * Get push time from the request body.
- * @param {Object} request A request object
- * @returns {Number|undefined} The push time if it exists in the request
- */
- static getPushTime(body = {}) {
- var hasPushTime = Object.prototype.hasOwnProperty.call(body, 'push_time');
- if (!hasPushTime) {
- return;
- }
- var pushTimeParam = body['push_time'];
- var date;
- var isLocalTime = true;
- if (typeof pushTimeParam === 'number') {
- date = new Date(pushTimeParam * 1000);
- } else if (typeof pushTimeParam === 'string') {
- isLocalTime = !PushController.pushTimeHasTimezoneComponent(pushTimeParam);
- date = new Date(pushTimeParam);
- } else {
- throw new _node.Parse.Error(_node.Parse.Error.PUSH_MISCONFIGURED, body['push_time'] + ' is not valid time.');
- }
- // Check pushTime is valid or not, if it is not valid, pushTime is NaN
- if (!isFinite(date)) {
- throw new _node.Parse.Error(_node.Parse.Error.PUSH_MISCONFIGURED, body['push_time'] + ' is not valid time.');
- }
- return {
- date,
- isLocalTime
- };
- }
- /**
- * Checks if a ISO8601 formatted date contains a timezone component
- * @param pushTimeParam {string}
- * @returns {boolean}
- */
- static pushTimeHasTimezoneComponent(pushTimeParam) {
- const offsetPattern = /(.+)([+-])\d\d:\d\d$/;
- return pushTimeParam.indexOf('Z') === pushTimeParam.length - 1 || offsetPattern.test(pushTimeParam) // 2007-04-05T12:30Z
- ; // 2007-04-05T12:30.000+02:00, 2007-04-05T12:30.000-02:00
- }
- /**
- * Converts a date to ISO format in UTC time and strips the timezone if `isLocalTime` is true
- * @param date {Date}
- * @param isLocalTime {boolean}
- * @returns {string}
- */
- static formatPushTime({
- date,
- isLocalTime
- }) {
- if (isLocalTime) {
- // Strip 'Z'
- const isoString = date.toISOString();
- return isoString.substring(0, isoString.indexOf('Z'));
- }
- return date.toISOString();
- }
- }
- exports.PushController = PushController;
- var _default = exports.default = PushController;
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbm9kZSIsInJlcXVpcmUiLCJfUmVzdFF1ZXJ5IiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsIl9SZXN0V3JpdGUiLCJfQXV0aCIsIl9TdGF0dXNIYW5kbGVyIiwiX3V0aWxzIiwiZSIsIl9fZXNNb2R1bGUiLCJkZWZhdWx0IiwiUHVzaENvbnRyb2xsZXIiLCJzZW5kUHVzaCIsImJvZHkiLCJ3aGVyZSIsImNvbmZpZyIsImF1dGgiLCJvblB1c2hTdGF0dXNTYXZlZCIsIm5vdyIsIkRhdGUiLCJoYXNQdXNoU3VwcG9ydCIsIlBhcnNlIiwiRXJyb3IiLCJQVVNIX01JU0NPTkZJR1VSRUQiLCJleHBpcmF0aW9uX3RpbWUiLCJnZXRFeHBpcmF0aW9uVGltZSIsImV4cGlyYXRpb25faW50ZXJ2YW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pZyxcbiAgICAgICAgICAgIG1hc3Rlcihjb25maWcpLFxuICAgICAgICAgICAgJ19BdWRpZW5jZScsXG4gICAgICAgICAgICB7IG9iamVjdElkOiBhdWRpZW5jZUlkIH0sXG4gICAgICAgICAgICB1cGRhdGVBdWRpZW5jZVxuICAgICAgICAgICk7XG4gICAgICAgICAgd3JpdGUuZXhlY3V0ZSgpO1xuICAgICAgICB9XG4gICAgICAgIC8vIERvbid0IHdhaXQgZm9yIHRoZSBhdWRpZW5jZSB1cGRhdGUgcHJvbWlzZSB0byByZXNvbHZlLlxuICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKCk7XG4gICAgICB9KVxuICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKGJvZHksICdwdXNoX3RpbWUnKSAmJlxuICAgICAgICAgIGNvbmZpZy5oYXNQdXNoU2NoZWR1bGVkU3VwcG9ydFxuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGNvbmZpZy5wdXNoQ29udHJvbGxlclF1ZXVlLmVucXVldWUoYm9keSwgd2hlcmUsIGNvbmZpZywgYXV0aCwgcHVzaFN0YXR1cyk7XG4gICAgICB9KVxuICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgIHJldHVybiBwdXNoU3RhdHVzLmZhaWwoZXJyKS50aGVuKCgpID0+IHtcbiAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gIH1cblxuICAvKipcbiAgICogR2V0IGV4cGlyYXRpb24gdGltZSBmcm9tIHRoZSByZXF1ZXN0IGJvZHkuXG4gICAqIEBwYXJhbSB7T2JqZWN0fSByZXF1ZXN0IEEgcmVxdWVzdCBvYmplY3RcbiAgICogQHJldHVybnMge051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