parse 5.1.0-alpha.1 → 5.1.0-alpha.2

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.
@@ -187,7 +187,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
187
187
  SERVER_AUTH_TOKEN: null,
188
188
  LIVEQUERY_SERVER_URL: null,
189
189
  ENCRYPTED_KEY: null,
190
- VERSION: 'js' + "5.1.0-alpha.1",
190
+ VERSION: 'js' + "5.1.0-alpha.2",
191
191
  APPLICATION_ID: null,
192
192
  JAVASCRIPT_KEY: null,
193
193
  MASTER_KEY: null,
@@ -386,12 +386,13 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
386
386
  }
387
387
  // More complex cases
388
388
  for (var condition in constraints) {
389
+ var _compareTo, _compareTo2;
389
390
  compareTo = constraints[condition];
390
- if (compareTo.__type) {
391
+ if ((_compareTo = compareTo) !== null && _compareTo !== void 0 && _compareTo.__type) {
391
392
  compareTo = decode(compareTo);
392
393
  }
393
394
  // is it a $relativeTime? convert to date
394
- if (compareTo['$relativeTime']) {
395
+ if ((_compareTo2 = compareTo) !== null && _compareTo2 !== void 0 && _compareTo2['$relativeTime']) {
395
396
  var parserResult = relativeTimeToDate(compareTo['$relativeTime']);
396
397
  if (parserResult.status !== 'success') {
397
398
  var _context2;
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
4
+ var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
5
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
6
+ var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
7
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
8
+ var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
9
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
10
+ var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
4
11
  var _Object$defineProperty2 = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
5
12
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
13
  _Object$defineProperty2(exports, "__esModule", {
@@ -9,8 +16,9 @@ _Object$defineProperty2(exports, "__esModule", {
9
16
  exports.default = void 0;
10
17
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
11
18
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
12
- var _defineProperty = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/define-property"));
19
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/define-property"));
13
20
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
21
+ var _defineProperty3 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
14
22
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
15
23
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/typeof"));
16
24
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
@@ -25,6 +33,28 @@ var _ParseError = _interopRequireDefault(require("./ParseError"));
25
33
  var _ParseObject2 = _interopRequireDefault(require("./ParseObject"));
26
34
  var _ParseSession = _interopRequireDefault(require("./ParseSession"));
27
35
  var _Storage = _interopRequireDefault(require("./Storage"));
36
+ function ownKeys(object, enumerableOnly) {
37
+ var keys = _Object$keys(object);
38
+ if (_Object$getOwnPropertySymbols) {
39
+ var symbols = _Object$getOwnPropertySymbols(object);
40
+ enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {
41
+ return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
42
+ })), keys.push.apply(keys, symbols);
43
+ }
44
+ return keys;
45
+ }
46
+ function _objectSpread(target) {
47
+ for (var i = 1; i < arguments.length; i++) {
48
+ var _context7, _context8;
49
+ var source = null != arguments[i] ? arguments[i] : {};
50
+ i % 2 ? _forEachInstanceProperty(_context7 = ownKeys(Object(source), !0)).call(_context7, function (key) {
51
+ (0, _defineProperty3.default)(target, key, source[key]);
52
+ }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context8 = ownKeys(Object(source))).call(_context8, function (key) {
53
+ _Object$defineProperty2(target, key, _Object$getOwnPropertyDescriptor(source, key));
54
+ });
55
+ }
56
+ return target;
57
+ }
28
58
  function _createSuper(Derived) {
29
59
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
30
60
  return function () {
@@ -761,10 +791,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
761
791
  /**
762
792
  * Verify whether a given password is the password of the current user.
763
793
  *
764
- * @param {string} password A password to be verified
765
- * @param {object} options
766
- * @returns {Promise} A promise that is fulfilled with a user
767
- * when the password is correct.
794
+ * @param {string} password The password to be verified.
795
+ * @param {object} options The options.
796
+ * @param {boolean} [options.ignoreEmailVerification=false] Set to `true` to bypass email verification and verify
797
+ * the password regardless of whether the email has been verified. This requires the master key.
798
+ * @returns {Promise} A promise that is fulfilled with a user when the password is correct.
768
799
  */
769
800
  }, {
770
801
  key: "verifyPassword",
@@ -792,7 +823,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
792
823
  if (protoProps) {
793
824
  for (var _prop in protoProps) {
794
825
  if (_prop !== 'className') {
795
- (0, _defineProperty.default)(ParseUser.prototype, _prop, {
826
+ (0, _defineProperty2.default)(ParseUser.prototype, _prop, {
796
827
  value: protoProps[_prop],
797
828
  enumerable: false,
798
829
  writable: true,
@@ -804,7 +835,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
804
835
  if (classProps) {
805
836
  for (var _prop2 in classProps) {
806
837
  if (_prop2 !== 'className') {
807
- (0, _defineProperty.default)(ParseUser, _prop2, {
838
+ (0, _defineProperty2.default)(ParseUser, _prop2, {
808
839
  value: classProps[_prop2],
809
840
  enumerable: false,
810
841
  writable: true,
@@ -1107,13 +1138,14 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
1107
1138
 
1108
1139
  /**
1109
1140
  * Verify whether a given password is the password of the current user.
1110
- *
1111
- * @param {string} username A username to be used for identificaiton
1112
- * @param {string} password A password to be verified
1113
- * @param {object} options
1114
1141
  * @static
1115
- * @returns {Promise} A promise that is fulfilled with a user
1116
- * when the password is correct.
1142
+ *
1143
+ * @param {string} username The username of the user whose password should be verified.
1144
+ * @param {string} password The password to be verified.
1145
+ * @param {object} options The options.
1146
+ * @param {boolean} [options.ignoreEmailVerification=false] Set to `true` to bypass email verification and verify
1147
+ * the password regardless of whether the email has been verified. This requires the master key.
1148
+ * @returns {Promise} A promise that is fulfilled with a user when the password is correct.
1117
1149
  */
1118
1150
  }, {
1119
1151
  key: "verifyPassword",
@@ -1524,10 +1556,13 @@ var DefaultController = {
1524
1556
  },
1525
1557
  verifyPassword: function (username /*: string*/, password /*: string*/, options /*: RequestOptions*/) {
1526
1558
  var RESTController = _CoreManager.default.getRESTController();
1527
- return RESTController.request('GET', 'verifyPassword', {
1559
+ var data = _objectSpread({
1528
1560
  username: username,
1529
1561
  password: password
1530
- }, options);
1562
+ }, options.ignoreEmailVerification !== undefined && {
1563
+ ignoreEmailVerification: options.ignoreEmailVerification
1564
+ });
1565
+ return RESTController.request('GET', 'verifyPassword', data, options);
1531
1566
  },
1532
1567
  requestEmailVerification: function (email /*: string*/, options /*: RequestOptions*/) {
1533
1568
  var RESTController = _CoreManager.default.getRESTController();
@@ -272,9 +272,6 @@ var RESTController = {
272
272
  throw new Error('Cannot use the Master Key, it has not been provided.');
273
273
  }
274
274
  }
275
- if (options.ignoreEmailVerification !== undefined) {
276
- payload.ignoreEmailVerification = options.ignoreEmailVerification;
277
- }
278
275
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
279
276
  payload._RevocableSession = '1';
280
277
  }
@@ -183,7 +183,7 @@ const config /*: Config & { [key: string]: mixed }*/ = {
183
183
  SERVER_AUTH_TOKEN: null,
184
184
  LIVEQUERY_SERVER_URL: null,
185
185
  ENCRYPTED_KEY: null,
186
- VERSION: 'js' + "5.1.0-alpha.1",
186
+ VERSION: 'js' + "5.1.0-alpha.2",
187
187
  APPLICATION_ID: null,
188
188
  JAVASCRIPT_KEY: null,
189
189
  MASTER_KEY: null,
@@ -288,12 +288,13 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
288
288
  }
289
289
  // More complex cases
290
290
  for (const condition in constraints) {
291
+ var _compareTo, _compareTo2;
291
292
  compareTo = constraints[condition];
292
- if (compareTo.__type) {
293
+ if ((_compareTo = compareTo) !== null && _compareTo !== void 0 && _compareTo.__type) {
293
294
  compareTo = decode(compareTo);
294
295
  }
295
296
  // is it a $relativeTime? convert to date
296
- if (compareTo['$relativeTime']) {
297
+ if ((_compareTo2 = compareTo) !== null && _compareTo2 !== void 0 && _compareTo2['$relativeTime']) {
297
298
  const parserResult = relativeTimeToDate(compareTo['$relativeTime']);
298
299
  if (parserResult.status !== 'success') {
299
300
  throw new ParseError(ParseError.INVALID_JSON, `bad $relativeTime (${key}) value. ${parserResult.info}`);
@@ -528,10 +528,11 @@ class ParseUser extends _ParseObject.default {
528
528
  /**
529
529
  * Verify whether a given password is the password of the current user.
530
530
  *
531
- * @param {string} password A password to be verified
532
- * @param {object} options
533
- * @returns {Promise} A promise that is fulfilled with a user
534
- * when the password is correct.
531
+ * @param {string} password The password to be verified.
532
+ * @param {object} options The options.
533
+ * @param {boolean} [options.ignoreEmailVerification=false] Set to `true` to bypass email verification and verify
534
+ * the password regardless of whether the email has been verified. This requires the master key.
535
+ * @returns {Promise} A promise that is fulfilled with a user when the password is correct.
535
536
  */
536
537
  verifyPassword(password /*: string*/, options /*:: ?: RequestOptions*/) /*: Promise<ParseUser>*/{
537
538
  const username = this.getUsername() || '';
@@ -840,13 +841,14 @@ class ParseUser extends _ParseObject.default {
840
841
 
841
842
  /**
842
843
  * Verify whether a given password is the password of the current user.
843
- *
844
- * @param {string} username A username to be used for identificaiton
845
- * @param {string} password A password to be verified
846
- * @param {object} options
847
844
  * @static
848
- * @returns {Promise} A promise that is fulfilled with a user
849
- * when the password is correct.
845
+ *
846
+ * @param {string} username The username of the user whose password should be verified.
847
+ * @param {string} password The password to be verified.
848
+ * @param {object} options The options.
849
+ * @param {boolean} [options.ignoreEmailVerification=false] Set to `true` to bypass email verification and verify
850
+ * the password regardless of whether the email has been verified. This requires the master key.
851
+ * @returns {Promise} A promise that is fulfilled with a user when the password is correct.
850
852
  */
851
853
  static verifyPassword(username /*: string*/, password /*: string*/, options /*:: ?: RequestOptions*/) {
852
854
  if (typeof username !== 'string') {
@@ -1214,10 +1216,14 @@ const DefaultController = {
1214
1216
  },
1215
1217
  verifyPassword(username /*: string*/, password /*: string*/, options /*: RequestOptions*/) {
1216
1218
  const RESTController = _CoreManager.default.getRESTController();
1217
- return RESTController.request('GET', 'verifyPassword', {
1219
+ const data = {
1218
1220
  username,
1219
- password
1220
- }, options);
1221
+ password,
1222
+ ...(options.ignoreEmailVerification !== undefined && {
1223
+ ignoreEmailVerification: options.ignoreEmailVerification
1224
+ })
1225
+ };
1226
+ return RESTController.request('GET', 'verifyPassword', data, options);
1221
1227
  },
1222
1228
  requestEmailVerification(email /*: string*/, options /*: RequestOptions*/) {
1223
1229
  const RESTController = _CoreManager.default.getRESTController();
@@ -240,9 +240,6 @@ const RESTController = {
240
240
  throw new Error('Cannot use the Master Key, it has not been provided.');
241
241
  }
242
242
  }
243
- if (options.ignoreEmailVerification !== undefined) {
244
- payload.ignoreEmailVerification = options.ignoreEmailVerification;
245
- }
246
243
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
247
244
  payload._RevocableSession = '1';
248
245
  }
@@ -12,7 +12,7 @@ var config = {
12
12
  SERVER_AUTH_TOKEN: null,
13
13
  LIVEQUERY_SERVER_URL: null,
14
14
  ENCRYPTED_KEY: null,
15
- VERSION: 'js' + "5.1.0-alpha.1",
15
+ VERSION: 'js' + "5.1.0-alpha.2",
16
16
  APPLICATION_ID: null,
17
17
  JAVASCRIPT_KEY: null,
18
18
  MASTER_KEY: null,
@@ -233,11 +233,12 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
233
233
  return equalObjectsGeneric(decode(object[key]), decode(constraints), equalObjects);
234
234
  }
235
235
  for (var condition in constraints) {
236
+ var _compareTo, _compareTo2;
236
237
  compareTo = constraints[condition];
237
- if (compareTo.__type) {
238
+ if ((_compareTo = compareTo) != null && _compareTo.__type) {
238
239
  compareTo = decode(compareTo);
239
240
  }
240
- if (compareTo['$relativeTime']) {
241
+ if ((_compareTo2 = compareTo) != null && _compareTo2['$relativeTime']) {
241
242
  var parserResult = relativeTimeToDate(compareTo['$relativeTime']);
242
243
  if (parserResult.status !== 'success') {
243
244
  throw new ParseError(ParseError.INVALID_JSON, `bad $relativeTime (${key}) value. ${parserResult.info}`);
@@ -951,10 +951,13 @@ var DefaultController = {
951
951
  },
952
952
  verifyPassword: function (username, password, options) {
953
953
  var RESTController = _CoreManager.default.getRESTController();
954
- return RESTController.request('GET', 'verifyPassword', {
954
+ var data = Object.assign({
955
955
  username: username,
956
956
  password: password
957
- }, options);
957
+ }, options.ignoreEmailVerification !== undefined && {
958
+ ignoreEmailVerification: options.ignoreEmailVerification
959
+ });
960
+ return RESTController.request('GET', 'verifyPassword', data, options);
958
961
  },
959
962
  requestEmailVerification: function (email, options) {
960
963
  var RESTController = _CoreManager.default.getRESTController();
@@ -200,9 +200,6 @@ var RESTController = {
200
200
  throw new Error('Cannot use the Master Key, it has not been provided.');
201
201
  }
202
202
  }
203
- if (options.ignoreEmailVerification !== undefined) {
204
- payload.ignoreEmailVerification = options.ignoreEmailVerification;
205
- }
206
203
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
207
204
  payload._RevocableSession = '1';
208
205
  }
@@ -187,7 +187,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
187
187
  SERVER_AUTH_TOKEN: null,
188
188
  LIVEQUERY_SERVER_URL: null,
189
189
  ENCRYPTED_KEY: null,
190
- VERSION: 'js' + "5.1.0-alpha.1",
190
+ VERSION: 'js' + "5.1.0-alpha.2",
191
191
  APPLICATION_ID: null,
192
192
  JAVASCRIPT_KEY: null,
193
193
  MASTER_KEY: null,
@@ -386,12 +386,13 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
386
386
  }
387
387
  // More complex cases
388
388
  for (var condition in constraints) {
389
+ var _compareTo, _compareTo2;
389
390
  compareTo = constraints[condition];
390
- if (compareTo.__type) {
391
+ if ((_compareTo = compareTo) !== null && _compareTo !== void 0 && _compareTo.__type) {
391
392
  compareTo = decode(compareTo);
392
393
  }
393
394
  // is it a $relativeTime? convert to date
394
- if (compareTo['$relativeTime']) {
395
+ if ((_compareTo2 = compareTo) !== null && _compareTo2 !== void 0 && _compareTo2['$relativeTime']) {
395
396
  var parserResult = relativeTimeToDate(compareTo['$relativeTime']);
396
397
  if (parserResult.status !== 'success') {
397
398
  var _context2;
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
4
+ var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
5
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
6
+ var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
7
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
8
+ var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
9
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
10
+ var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
4
11
  var _Object$defineProperty2 = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
5
12
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
13
  _Object$defineProperty2(exports, "__esModule", {
@@ -9,8 +16,9 @@ _Object$defineProperty2(exports, "__esModule", {
9
16
  exports.default = void 0;
10
17
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
11
18
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
12
- var _defineProperty = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/define-property"));
19
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/define-property"));
13
20
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
21
+ var _defineProperty3 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
14
22
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
15
23
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/typeof"));
16
24
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
@@ -25,6 +33,28 @@ var _ParseError = _interopRequireDefault(require("./ParseError"));
25
33
  var _ParseObject2 = _interopRequireDefault(require("./ParseObject"));
26
34
  var _ParseSession = _interopRequireDefault(require("./ParseSession"));
27
35
  var _Storage = _interopRequireDefault(require("./Storage"));
36
+ function ownKeys(object, enumerableOnly) {
37
+ var keys = _Object$keys(object);
38
+ if (_Object$getOwnPropertySymbols) {
39
+ var symbols = _Object$getOwnPropertySymbols(object);
40
+ enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {
41
+ return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
42
+ })), keys.push.apply(keys, symbols);
43
+ }
44
+ return keys;
45
+ }
46
+ function _objectSpread(target) {
47
+ for (var i = 1; i < arguments.length; i++) {
48
+ var _context7, _context8;
49
+ var source = null != arguments[i] ? arguments[i] : {};
50
+ i % 2 ? _forEachInstanceProperty(_context7 = ownKeys(Object(source), !0)).call(_context7, function (key) {
51
+ (0, _defineProperty3.default)(target, key, source[key]);
52
+ }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context8 = ownKeys(Object(source))).call(_context8, function (key) {
53
+ _Object$defineProperty2(target, key, _Object$getOwnPropertyDescriptor(source, key));
54
+ });
55
+ }
56
+ return target;
57
+ }
28
58
  function _createSuper(Derived) {
29
59
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
30
60
  return function () {
@@ -761,10 +791,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
761
791
  /**
762
792
  * Verify whether a given password is the password of the current user.
763
793
  *
764
- * @param {string} password A password to be verified
765
- * @param {object} options
766
- * @returns {Promise} A promise that is fulfilled with a user
767
- * when the password is correct.
794
+ * @param {string} password The password to be verified.
795
+ * @param {object} options The options.
796
+ * @param {boolean} [options.ignoreEmailVerification=false] Set to `true` to bypass email verification and verify
797
+ * the password regardless of whether the email has been verified. This requires the master key.
798
+ * @returns {Promise} A promise that is fulfilled with a user when the password is correct.
768
799
  */
769
800
  }, {
770
801
  key: "verifyPassword",
@@ -792,7 +823,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
792
823
  if (protoProps) {
793
824
  for (var _prop in protoProps) {
794
825
  if (_prop !== 'className') {
795
- (0, _defineProperty.default)(ParseUser.prototype, _prop, {
826
+ (0, _defineProperty2.default)(ParseUser.prototype, _prop, {
796
827
  value: protoProps[_prop],
797
828
  enumerable: false,
798
829
  writable: true,
@@ -804,7 +835,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
804
835
  if (classProps) {
805
836
  for (var _prop2 in classProps) {
806
837
  if (_prop2 !== 'className') {
807
- (0, _defineProperty.default)(ParseUser, _prop2, {
838
+ (0, _defineProperty2.default)(ParseUser, _prop2, {
808
839
  value: classProps[_prop2],
809
840
  enumerable: false,
810
841
  writable: true,
@@ -1107,13 +1138,14 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
1107
1138
 
1108
1139
  /**
1109
1140
  * Verify whether a given password is the password of the current user.
1110
- *
1111
- * @param {string} username A username to be used for identificaiton
1112
- * @param {string} password A password to be verified
1113
- * @param {object} options
1114
1141
  * @static
1115
- * @returns {Promise} A promise that is fulfilled with a user
1116
- * when the password is correct.
1142
+ *
1143
+ * @param {string} username The username of the user whose password should be verified.
1144
+ * @param {string} password The password to be verified.
1145
+ * @param {object} options The options.
1146
+ * @param {boolean} [options.ignoreEmailVerification=false] Set to `true` to bypass email verification and verify
1147
+ * the password regardless of whether the email has been verified. This requires the master key.
1148
+ * @returns {Promise} A promise that is fulfilled with a user when the password is correct.
1117
1149
  */
1118
1150
  }, {
1119
1151
  key: "verifyPassword",
@@ -1524,10 +1556,13 @@ var DefaultController = {
1524
1556
  },
1525
1557
  verifyPassword: function (username /*: string*/, password /*: string*/, options /*: RequestOptions*/) {
1526
1558
  var RESTController = _CoreManager.default.getRESTController();
1527
- return RESTController.request('GET', 'verifyPassword', {
1559
+ var data = _objectSpread({
1528
1560
  username: username,
1529
1561
  password: password
1530
- }, options);
1562
+ }, options.ignoreEmailVerification !== undefined && {
1563
+ ignoreEmailVerification: options.ignoreEmailVerification
1564
+ });
1565
+ return RESTController.request('GET', 'verifyPassword', data, options);
1531
1566
  },
1532
1567
  requestEmailVerification: function (email /*: string*/, options /*: RequestOptions*/) {
1533
1568
  var RESTController = _CoreManager.default.getRESTController();
@@ -273,9 +273,6 @@ var RESTController = {
273
273
  throw new Error('Cannot use the Master Key, it has not been provided.');
274
274
  }
275
275
  }
276
- if (options.ignoreEmailVerification !== undefined) {
277
- payload.ignoreEmailVerification = options.ignoreEmailVerification;
278
- }
279
276
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
280
277
  payload._RevocableSession = '1';
281
278
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse",
3
- "version": "5.1.0-alpha.1",
3
+ "version": "5.1.0-alpha.2",
4
4
  "description": "Parse JavaScript SDK",
5
5
  "homepage": "https://parseplatform.org",
6
6
  "keywords": [