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.
package/dist/parse.js CHANGED
@@ -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,
@@ -3411,7 +3411,7 @@ const Parse = {
3411
3411
  Hooks: undefined,
3412
3412
  Parse: undefined,
3413
3413
  /**
3414
- * @member {EventuallyQueue} Parse.EventuallyQueue
3414
+ * @property {EventuallyQueue} Parse.EventuallyQueue
3415
3415
  * @static
3416
3416
  */
3417
3417
  set EventuallyQueue(queue) {
@@ -3481,7 +3481,7 @@ const Parse = {
3481
3481
  return _CoreManager.default.getRESTController().request('GET', 'health');
3482
3482
  },
3483
3483
  /**
3484
- * @member {string} Parse.applicationId
3484
+ * @property {string} Parse.applicationId
3485
3485
  * @static
3486
3486
  */
3487
3487
  set applicationId(value) {
@@ -3491,7 +3491,7 @@ const Parse = {
3491
3491
  return _CoreManager.default.get('APPLICATION_ID');
3492
3492
  },
3493
3493
  /**
3494
- * @member {string} Parse.javaScriptKey
3494
+ * @property {string} Parse.javaScriptKey
3495
3495
  * @static
3496
3496
  */
3497
3497
  set javaScriptKey(value) {
@@ -3501,7 +3501,7 @@ const Parse = {
3501
3501
  return _CoreManager.default.get('JAVASCRIPT_KEY');
3502
3502
  },
3503
3503
  /**
3504
- * @member {string} Parse.masterKey
3504
+ * @property {string} Parse.masterKey
3505
3505
  * @static
3506
3506
  */
3507
3507
  set masterKey(value) {
@@ -3511,7 +3511,7 @@ const Parse = {
3511
3511
  return _CoreManager.default.get('MASTER_KEY');
3512
3512
  },
3513
3513
  /**
3514
- * @member {string} Parse.maintenanceKey
3514
+ * @property {string} Parse.maintenanceKey
3515
3515
  * @static
3516
3516
  */
3517
3517
  set maintenanceKey(value) {
@@ -3521,7 +3521,7 @@ const Parse = {
3521
3521
  return _CoreManager.default.get('MAINTENANCE_KEY');
3522
3522
  },
3523
3523
  /**
3524
- * @member {string} Parse.serverURL
3524
+ * @property {string} Parse.serverURL
3525
3525
  * @static
3526
3526
  */
3527
3527
  set serverURL(value) {
@@ -3531,7 +3531,7 @@ const Parse = {
3531
3531
  return _CoreManager.default.get('SERVER_URL');
3532
3532
  },
3533
3533
  /**
3534
- * @member {string} Parse.serverAuthToken
3534
+ * @property {string} Parse.serverAuthToken
3535
3535
  * @static
3536
3536
  */
3537
3537
  set serverAuthToken(value) {
@@ -3541,7 +3541,7 @@ const Parse = {
3541
3541
  return _CoreManager.default.get('SERVER_AUTH_TOKEN');
3542
3542
  },
3543
3543
  /**
3544
- * @member {string} Parse.serverAuthType
3544
+ * @property {string} Parse.serverAuthType
3545
3545
  * @static
3546
3546
  */
3547
3547
  set serverAuthType(value) {
@@ -3551,7 +3551,7 @@ const Parse = {
3551
3551
  return _CoreManager.default.get('SERVER_AUTH_TYPE');
3552
3552
  },
3553
3553
  /**
3554
- * @member {ParseLiveQuery} Parse.LiveQuery
3554
+ * @property {ParseLiveQuery} Parse.LiveQuery
3555
3555
  * @static
3556
3556
  */
3557
3557
  set LiveQuery(liveQuery) {
@@ -3561,7 +3561,7 @@ const Parse = {
3561
3561
  return _CoreManager.default.getLiveQuery();
3562
3562
  },
3563
3563
  /**
3564
- * @member {string} Parse.liveQueryServerURL
3564
+ * @property {string} Parse.liveQueryServerURL
3565
3565
  * @static
3566
3566
  */
3567
3567
  set liveQueryServerURL(value) {
@@ -3571,7 +3571,7 @@ const Parse = {
3571
3571
  return _CoreManager.default.get('LIVEQUERY_SERVER_URL');
3572
3572
  },
3573
3573
  /**
3574
- * @member {boolean} Parse.encryptedUser
3574
+ * @property {boolean} Parse.encryptedUser
3575
3575
  * @static
3576
3576
  */
3577
3577
  set encryptedUser(value) {
@@ -3581,7 +3581,7 @@ const Parse = {
3581
3581
  return _CoreManager.default.get('ENCRYPTED_USER');
3582
3582
  },
3583
3583
  /**
3584
- * @member {string} Parse.secret
3584
+ * @property {string} Parse.secret
3585
3585
  * @static
3586
3586
  */
3587
3587
  set secret(value) {
@@ -3591,7 +3591,7 @@ const Parse = {
3591
3591
  return _CoreManager.default.get('ENCRYPTED_KEY');
3592
3592
  },
3593
3593
  /**
3594
- * @member {boolean} Parse.idempotency
3594
+ * @property {boolean} Parse.idempotency
3595
3595
  * @static
3596
3596
  */
3597
3597
  set idempotency(value) {
@@ -3601,7 +3601,7 @@ const Parse = {
3601
3601
  return _CoreManager.default.get('IDEMPOTENCY');
3602
3602
  },
3603
3603
  /**
3604
- * @member {boolean} Parse.allowCustomObjectId
3604
+ * @property {boolean} Parse.allowCustomObjectId
3605
3605
  * @static
3606
3606
  */
3607
3607
  set allowCustomObjectId(value) {
@@ -10359,25 +10359,19 @@ class ParseQuery {
10359
10359
  * Executes a distinct query and returns unique values
10360
10360
  *
10361
10361
  * @param {string} key A field to find distinct values
10362
- * @param {object} options
10363
- * @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
10364
10362
  * @returns {Promise} A promise that is resolved with the query completes.
10365
10363
  */
10366
- distinct(key, options) {
10367
- options = options || {};
10364
+ distinct(key) {
10368
10365
  const distinctOptions = {
10369
10366
  useMasterKey: true
10370
10367
  };
10371
- if (Object.hasOwn(options, 'sessionToken')) {
10372
- distinctOptions.sessionToken = options.sessionToken;
10373
- }
10374
10368
  this._setRequestTask(distinctOptions);
10375
- const controller = _CoreManager.default.getQueryController();
10376
10369
  const params = {
10377
10370
  distinct: key,
10378
10371
  where: this._where,
10379
10372
  hint: this._hint
10380
10373
  };
10374
+ const controller = _CoreManager.default.getQueryController();
10381
10375
  return controller.aggregate(this.className, params, distinctOptions).then(results => {
10382
10376
  return results.results;
10383
10377
  });
@@ -10387,20 +10381,9 @@ class ParseQuery {
10387
10381
  * Executes an aggregate query and returns aggregate results
10388
10382
  *
10389
10383
  * @param {(Array|object)} pipeline Array or Object of stages to process query
10390
- * @param {object} options
10391
- * @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
10392
10384
  * @returns {Promise} A promise that is resolved with the query completes.
10393
10385
  */
10394
- aggregate(pipeline, options) {
10395
- options = options || {};
10396
- const aggregateOptions = {
10397
- useMasterKey: true
10398
- };
10399
- if (Object.hasOwn(options, 'sessionToken')) {
10400
- aggregateOptions.sessionToken = options.sessionToken;
10401
- }
10402
- this._setRequestTask(aggregateOptions);
10403
- const controller = _CoreManager.default.getQueryController();
10386
+ aggregate(pipeline) {
10404
10387
  if (!(0, _isArray.default)(pipeline) && typeof pipeline !== 'object') {
10405
10388
  throw new Error('Invalid pipeline must be Array or Object');
10406
10389
  }
@@ -10418,6 +10401,11 @@ class ParseQuery {
10418
10401
  explain: this._explain,
10419
10402
  readPreference: this._readPreference
10420
10403
  };
10404
+ const aggregateOptions = {
10405
+ useMasterKey: true
10406
+ };
10407
+ this._setRequestTask(aggregateOptions);
10408
+ const controller = _CoreManager.default.getQueryController();
10421
10409
  return controller.aggregate(this.className, params, aggregateOptions).then(results => {
10422
10410
  return results.results;
10423
10411
  });