parse 6.1.0-alpha.4 → 6.1.0-alpha.5

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v6.1.0-alpha.4
2
+ * Parse JavaScript SDK v6.1.0-alpha.5
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -355,7 +355,7 @@ const config = {
355
355
  SERVER_AUTH_TOKEN: null,
356
356
  LIVEQUERY_SERVER_URL: null,
357
357
  ENCRYPTED_KEY: null,
358
- VERSION: 'js' + "6.1.0-alpha.4",
358
+ VERSION: 'js' + "6.1.0-alpha.5",
359
359
  APPLICATION_ID: null,
360
360
  JAVASCRIPT_KEY: null,
361
361
  MAINTENANCE_KEY: null,
@@ -3410,7 +3410,7 @@ const Parse = {
3410
3410
  Hooks: undefined,
3411
3411
  Parse: undefined,
3412
3412
  /**
3413
- * @member {EventuallyQueue} Parse.EventuallyQueue
3413
+ * @property {EventuallyQueue} Parse.EventuallyQueue
3414
3414
  * @static
3415
3415
  */
3416
3416
  set EventuallyQueue(queue) {
@@ -3476,7 +3476,7 @@ const Parse = {
3476
3476
  return _CoreManager.default.getRESTController().request('GET', 'health');
3477
3477
  },
3478
3478
  /**
3479
- * @member {string} Parse.applicationId
3479
+ * @property {string} Parse.applicationId
3480
3480
  * @static
3481
3481
  */
3482
3482
  set applicationId(value) {
@@ -3486,7 +3486,7 @@ const Parse = {
3486
3486
  return _CoreManager.default.get('APPLICATION_ID');
3487
3487
  },
3488
3488
  /**
3489
- * @member {string} Parse.javaScriptKey
3489
+ * @property {string} Parse.javaScriptKey
3490
3490
  * @static
3491
3491
  */
3492
3492
  set javaScriptKey(value) {
@@ -3496,7 +3496,7 @@ const Parse = {
3496
3496
  return _CoreManager.default.get('JAVASCRIPT_KEY');
3497
3497
  },
3498
3498
  /**
3499
- * @member {string} Parse.masterKey
3499
+ * @property {string} Parse.masterKey
3500
3500
  * @static
3501
3501
  */
3502
3502
  set masterKey(value) {
@@ -3506,7 +3506,7 @@ const Parse = {
3506
3506
  return _CoreManager.default.get('MASTER_KEY');
3507
3507
  },
3508
3508
  /**
3509
- * @member {string} Parse.maintenanceKey
3509
+ * @property {string} Parse.maintenanceKey
3510
3510
  * @static
3511
3511
  */
3512
3512
  set maintenanceKey(value) {
@@ -3516,7 +3516,7 @@ const Parse = {
3516
3516
  return _CoreManager.default.get('MAINTENANCE_KEY');
3517
3517
  },
3518
3518
  /**
3519
- * @member {string} Parse.serverURL
3519
+ * @property {string} Parse.serverURL
3520
3520
  * @static
3521
3521
  */
3522
3522
  set serverURL(value) {
@@ -3526,7 +3526,7 @@ const Parse = {
3526
3526
  return _CoreManager.default.get('SERVER_URL');
3527
3527
  },
3528
3528
  /**
3529
- * @member {string} Parse.serverAuthToken
3529
+ * @property {string} Parse.serverAuthToken
3530
3530
  * @static
3531
3531
  */
3532
3532
  set serverAuthToken(value) {
@@ -3536,7 +3536,7 @@ const Parse = {
3536
3536
  return _CoreManager.default.get('SERVER_AUTH_TOKEN');
3537
3537
  },
3538
3538
  /**
3539
- * @member {string} Parse.serverAuthType
3539
+ * @property {string} Parse.serverAuthType
3540
3540
  * @static
3541
3541
  */
3542
3542
  set serverAuthType(value) {
@@ -3546,7 +3546,7 @@ const Parse = {
3546
3546
  return _CoreManager.default.get('SERVER_AUTH_TYPE');
3547
3547
  },
3548
3548
  /**
3549
- * @member {ParseLiveQuery} Parse.LiveQuery
3549
+ * @property {ParseLiveQuery} Parse.LiveQuery
3550
3550
  * @static
3551
3551
  */
3552
3552
  set LiveQuery(liveQuery) {
@@ -3556,7 +3556,7 @@ const Parse = {
3556
3556
  return _CoreManager.default.getLiveQuery();
3557
3557
  },
3558
3558
  /**
3559
- * @member {string} Parse.liveQueryServerURL
3559
+ * @property {string} Parse.liveQueryServerURL
3560
3560
  * @static
3561
3561
  */
3562
3562
  set liveQueryServerURL(value) {
@@ -3566,7 +3566,7 @@ const Parse = {
3566
3566
  return _CoreManager.default.get('LIVEQUERY_SERVER_URL');
3567
3567
  },
3568
3568
  /**
3569
- * @member {boolean} Parse.encryptedUser
3569
+ * @property {boolean} Parse.encryptedUser
3570
3570
  * @static
3571
3571
  */
3572
3572
  set encryptedUser(value) {
@@ -3576,7 +3576,7 @@ const Parse = {
3576
3576
  return _CoreManager.default.get('ENCRYPTED_USER');
3577
3577
  },
3578
3578
  /**
3579
- * @member {string} Parse.secret
3579
+ * @property {string} Parse.secret
3580
3580
  * @static
3581
3581
  */
3582
3582
  set secret(value) {
@@ -3586,7 +3586,7 @@ const Parse = {
3586
3586
  return _CoreManager.default.get('ENCRYPTED_KEY');
3587
3587
  },
3588
3588
  /**
3589
- * @member {boolean} Parse.idempotency
3589
+ * @property {boolean} Parse.idempotency
3590
3590
  * @static
3591
3591
  */
3592
3592
  set idempotency(value) {
@@ -3596,7 +3596,7 @@ const Parse = {
3596
3596
  return _CoreManager.default.get('IDEMPOTENCY');
3597
3597
  },
3598
3598
  /**
3599
- * @member {boolean} Parse.allowCustomObjectId
3599
+ * @property {boolean} Parse.allowCustomObjectId
3600
3600
  * @static
3601
3601
  */
3602
3602
  set allowCustomObjectId(value) {
@@ -10354,25 +10354,19 @@ class ParseQuery {
10354
10354
  * Executes a distinct query and returns unique values
10355
10355
  *
10356
10356
  * @param {string} key A field to find distinct values
10357
- * @param {object} options
10358
- * @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
10359
10357
  * @returns {Promise} A promise that is resolved with the query completes.
10360
10358
  */
10361
- distinct(key, options) {
10362
- options = options || {};
10359
+ distinct(key) {
10363
10360
  const distinctOptions = {
10364
10361
  useMasterKey: true
10365
10362
  };
10366
- if (Object.hasOwn(options, 'sessionToken')) {
10367
- distinctOptions.sessionToken = options.sessionToken;
10368
- }
10369
10363
  this._setRequestTask(distinctOptions);
10370
- const controller = _CoreManager.default.getQueryController();
10371
10364
  const params = {
10372
10365
  distinct: key,
10373
10366
  where: this._where,
10374
10367
  hint: this._hint
10375
10368
  };
10369
+ const controller = _CoreManager.default.getQueryController();
10376
10370
  return controller.aggregate(this.className, params, distinctOptions).then(results => {
10377
10371
  return results.results;
10378
10372
  });
@@ -10382,20 +10376,9 @@ class ParseQuery {
10382
10376
  * Executes an aggregate query and returns aggregate results
10383
10377
  *
10384
10378
  * @param {(Array|object)} pipeline Array or Object of stages to process query
10385
- * @param {object} options
10386
- * @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
10387
10379
  * @returns {Promise} A promise that is resolved with the query completes.
10388
10380
  */
10389
- aggregate(pipeline, options) {
10390
- options = options || {};
10391
- const aggregateOptions = {
10392
- useMasterKey: true
10393
- };
10394
- if (Object.hasOwn(options, 'sessionToken')) {
10395
- aggregateOptions.sessionToken = options.sessionToken;
10396
- }
10397
- this._setRequestTask(aggregateOptions);
10398
- const controller = _CoreManager.default.getQueryController();
10381
+ aggregate(pipeline) {
10399
10382
  if (!(0, _isArray.default)(pipeline) && typeof pipeline !== 'object') {
10400
10383
  throw new Error('Invalid pipeline must be Array or Object');
10401
10384
  }
@@ -10413,6 +10396,11 @@ class ParseQuery {
10413
10396
  explain: this._explain,
10414
10397
  readPreference: this._readPreference
10415
10398
  };
10399
+ const aggregateOptions = {
10400
+ useMasterKey: true
10401
+ };
10402
+ this._setRequestTask(aggregateOptions);
10403
+ const controller = _CoreManager.default.getQueryController();
10416
10404
  return controller.aggregate(this.className, params, aggregateOptions).then(results => {
10417
10405
  return results.results;
10418
10406
  });