parse 4.1.0-alpha.3 → 4.1.0-alpha.4

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.
Files changed (83) hide show
  1. package/dist/parse.js +192 -36
  2. package/dist/parse.min.js +2 -2
  3. package/dist/parse.weapp.js +192 -36
  4. package/dist/parse.weapp.min.js +2 -2
  5. package/lib/browser/AnonymousUtils.js +1 -1
  6. package/lib/browser/Cloud.js +1 -2
  7. package/lib/browser/CoreManager.js +1 -1
  8. package/lib/browser/EventuallyQueue.js +13 -1
  9. package/lib/browser/LiveQueryClient.js +1 -1
  10. package/lib/browser/LocalDatastore.js +3 -1
  11. package/lib/browser/LocalDatastoreController.js +3 -1
  12. package/lib/browser/ObjectStateMutations.js +14 -1
  13. package/lib/browser/ParseACL.js +2 -1
  14. package/lib/browser/ParseCLP.js +6 -1
  15. package/lib/browser/ParseConfig.js +1 -0
  16. package/lib/browser/ParseFile.js +4 -1
  17. package/lib/browser/ParseInstallation.js +4 -1
  18. package/lib/browser/ParseObject.js +10 -7
  19. package/lib/browser/ParseOp.js +3 -1
  20. package/lib/browser/ParseQuery.js +26 -5
  21. package/lib/browser/ParseRole.js +5 -1
  22. package/lib/browser/ParseSchema.js +1 -1
  23. package/lib/browser/ParseSession.js +5 -1
  24. package/lib/browser/ParseUser.js +42 -1
  25. package/lib/browser/Push.js +8 -2
  26. package/lib/browser/RESTController.js +20 -0
  27. package/lib/browser/SingleInstanceStateController.js +6 -1
  28. package/lib/browser/TaskQueue.js +4 -0
  29. package/lib/browser/UniqueInstanceStateController.js +3 -1
  30. package/lib/browser/unsavedChildren.js +4 -1
  31. package/lib/node/AnonymousUtils.js +1 -1
  32. package/lib/node/Cloud.js +1 -2
  33. package/lib/node/CoreManager.js +1 -1
  34. package/lib/node/EventuallyQueue.js +13 -1
  35. package/lib/node/LocalDatastore.js +1 -1
  36. package/lib/node/ObjectStateMutations.js +11 -1
  37. package/lib/node/ParseACL.js +2 -1
  38. package/lib/node/ParseCLP.js +3 -1
  39. package/lib/node/ParseConfig.js +1 -2
  40. package/lib/node/ParseFile.js +1 -1
  41. package/lib/node/ParseInstallation.js +1 -1
  42. package/lib/node/ParseObject.js +2 -1
  43. package/lib/node/ParseQuery.js +23 -1
  44. package/lib/node/ParseRole.js +2 -1
  45. package/lib/node/ParseSchema.js +1 -1
  46. package/lib/node/ParseSession.js +2 -1
  47. package/lib/node/ParseUser.js +37 -1
  48. package/lib/node/Push.js +8 -2
  49. package/lib/node/RESTController.js +20 -0
  50. package/lib/node/SingleInstanceStateController.js +6 -1
  51. package/lib/node/TaskQueue.js +4 -1
  52. package/lib/node/UniqueInstanceStateController.js +3 -1
  53. package/lib/node/unsavedChildren.js +4 -1
  54. package/lib/react-native/CoreManager.js +1 -1
  55. package/lib/react-native/ParseCLP.js +2 -2
  56. package/lib/react-native/ParseUser.js +25 -0
  57. package/lib/weapp/AnonymousUtils.js +1 -1
  58. package/lib/weapp/Cloud.js +1 -2
  59. package/lib/weapp/CoreManager.js +1 -1
  60. package/lib/weapp/EventuallyQueue.js +13 -1
  61. package/lib/weapp/LiveQueryClient.js +1 -1
  62. package/lib/weapp/LocalDatastore.js +3 -1
  63. package/lib/weapp/LocalDatastoreController.js +3 -1
  64. package/lib/weapp/ObjectStateMutations.js +14 -1
  65. package/lib/weapp/ParseACL.js +2 -1
  66. package/lib/weapp/ParseCLP.js +6 -1
  67. package/lib/weapp/ParseConfig.js +1 -0
  68. package/lib/weapp/ParseFile.js +4 -1
  69. package/lib/weapp/ParseInstallation.js +4 -1
  70. package/lib/weapp/ParseObject.js +10 -7
  71. package/lib/weapp/ParseOp.js +3 -1
  72. package/lib/weapp/ParseQuery.js +26 -5
  73. package/lib/weapp/ParseRole.js +5 -1
  74. package/lib/weapp/ParseSchema.js +1 -1
  75. package/lib/weapp/ParseSession.js +5 -1
  76. package/lib/weapp/ParseUser.js +42 -1
  77. package/lib/weapp/Push.js +8 -2
  78. package/lib/weapp/RESTController.js +20 -0
  79. package/lib/weapp/SingleInstanceStateController.js +6 -1
  80. package/lib/weapp/TaskQueue.js +4 -0
  81. package/lib/weapp/UniqueInstanceStateController.js +3 -1
  82. package/lib/weapp/unsavedChildren.js +4 -1
  83. package/package.json +12 -12
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v4.1.0-alpha.3
2
+ * Parse JavaScript SDK v4.1.0-alpha.4
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -94,7 +94,7 @@ var _ParseUser = _interopRequireDefault(_dereq_("./ParseUser"));
94
94
  /**
95
95
  * @flow-weak
96
96
  */
97
-
97
+ /*:: import type { RequestOptions } from './RESTController';*/
98
98
  var uuidv4 = _dereq_('./uuid');
99
99
  var registered = false;
100
100
 
@@ -229,7 +229,7 @@ var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
229
229
  /**
230
230
  * @flow
231
231
  */
232
-
232
+ /*:: import type { RequestOptions } from './RESTController';*/
233
233
  /**
234
234
  * Contains functions for calling and declaring
235
235
  * <a href="/docs/cloud_code_guide#functions">cloud functions</a>.
@@ -241,7 +241,6 @@ var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
241
241
  * @static
242
242
  * @hideconstructor
243
243
  */
244
-
245
244
  /**
246
245
  * Makes a call to a cloud function.
247
246
  *
@@ -531,7 +530,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
531
530
  SERVER_AUTH_TOKEN: null,
532
531
  LIVEQUERY_SERVER_URL: null,
533
532
  ENCRYPTED_KEY: null,
534
- VERSION: 'js' + "4.1.0-alpha.3",
533
+ VERSION: 'js' + "4.1.0-alpha.4",
535
534
  APPLICATION_ID: null,
536
535
  JAVASCRIPT_KEY: null,
537
536
  MASTER_KEY: null,
@@ -760,7 +759,19 @@ var _Storage = _interopRequireDefault(_dereq_("./Storage"));
760
759
  *
761
760
  * @flow
762
761
  */
763
-
762
+ /*:: import type { SaveOptions } from './ParseObject';*/
763
+ /*:: import type { RequestOptions } from './RESTController';*/
764
+ /*:: type QueueObject = {
765
+ queueId: string,
766
+ action: string,
767
+ object: ParseObject,
768
+ serverOptions: SaveOptions | RequestOptions,
769
+ id: string,
770
+ className: string,
771
+ hash: string,
772
+ createdAt: Date,
773
+ };*/
774
+ /*:: type Queue = Array<QueueObject>;*/
764
775
  var QUEUE_KEY = 'Parse/Eventually/Queue';
765
776
  var queueCache = [];
766
777
  var dirtyCache = true;
@@ -1708,7 +1719,7 @@ function _isNativeReflectConstruct() {
1708
1719
  } catch (e) {
1709
1720
  return false;
1710
1721
  }
1711
- }
1722
+ } /* global WebSocket */
1712
1723
  // The LiveQuery client inner state
1713
1724
  var CLIENT_STATE = {
1714
1725
  INITIALIZED: 'initialized',
@@ -2511,7 +2522,9 @@ function _arrayLikeToArray(arr, len) {
2511
2522
  if (len == null || len > arr.length) len = arr.length;
2512
2523
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
2513
2524
  return arr2;
2514
- }
2525
+ } /**
2526
+ * @flow
2527
+ */ /*:: import type ParseObject from './ParseObject';*/
2515
2528
  /**
2516
2529
  * Provides a local datastore which can be used to store and retrieve <code>Parse.Object</code>. <br />
2517
2530
  * To enable this functionality, call <code>Parse.enableLocalDatastore()</code>.
@@ -3202,7 +3215,9 @@ function _arrayLikeToArray(arr, len) {
3202
3215
  if (len == null || len > arr.length) len = arr.length;
3203
3216
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
3204
3217
  return arr2;
3205
- }
3218
+ } /**
3219
+ * @flow
3220
+ */
3206
3221
  var LocalDatastoreController = {
3207
3222
  fromPinWithName: function (name /*: string*/) /*: Array<Object>*/{
3208
3223
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
@@ -3448,7 +3463,20 @@ function _objectSpread(target) {
3448
3463
  });
3449
3464
  }
3450
3465
  return target;
3451
- }
3466
+ } /**
3467
+ * @flow
3468
+ */
3469
+ /*:: import type { Op } from './ParseOp';*/
3470
+ /*:: export type AttributeMap = { [attr: string]: any };*/
3471
+ /*:: export type OpsMap = { [attr: string]: Op };*/
3472
+ /*:: export type ObjectCache = { [attr: string]: string };*/
3473
+ /*:: export type State = {
3474
+ serverData: AttributeMap,
3475
+ pendingOps: Array<OpsMap>,
3476
+ objectCache: ObjectCache,
3477
+ tasks: TaskQueue,
3478
+ existed: boolean,
3479
+ };*/
3452
3480
  function defaultState() /*: State*/{
3453
3481
  return {
3454
3482
  serverData: {},
@@ -4608,7 +4636,8 @@ var _ParseUser = _interopRequireDefault(_dereq_("./ParseUser"));
4608
4636
  /**
4609
4637
  * @flow
4610
4638
  */
4611
-
4639
+ /*:: type PermissionsMap = { [permission: string]: boolean };*/
4640
+ /*:: type ByIdMap = { [userId: string]: PermissionsMap };*/
4612
4641
  var PUBLIC_KEY = '*';
4613
4642
 
4614
4643
  /**
@@ -5072,7 +5101,12 @@ function _arrayLikeToArray(arr, len) {
5072
5101
  if (len == null || len > arr.length) len = arr.length;
5073
5102
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
5074
5103
  return arr2;
5075
- }
5104
+ } /**
5105
+ * @flow
5106
+ */
5107
+ /*:: type Entity = Entity;*/
5108
+ /*:: type UsersMap = { [userId: string]: boolean | any };*/
5109
+ /*:: export type PermissionsMap = { [permission: string]: UsersMap };*/
5076
5110
  var PUBLIC_KEY = '*';
5077
5111
  var VALID_PERMISSIONS /*: Map<string, UsersMap>*/ = new _map.default(
5078
5112
  /*:: <string, UsersMap>*/
@@ -5754,6 +5788,7 @@ var _Storage = _interopRequireDefault(_dereq_("./Storage"));
5754
5788
  /**
5755
5789
  * @flow
5756
5790
  */
5791
+ /*:: import type { RequestOptions } from './RESTController';*/
5757
5792
  /**
5758
5793
  * Parse.Config is a local representation of configuration data that
5759
5794
  * can be set from the Parse dashboard.
@@ -6605,7 +6640,10 @@ function _objectSpread(target) {
6605
6640
  });
6606
6641
  }
6607
6642
  return target;
6608
- }
6643
+ } /**
6644
+ * @flow
6645
+ */ /* global XMLHttpRequest, Blob */
6646
+ /*:: import type { FullOptions } from './RESTController';*/
6609
6647
  var ParseError = _dereq_('./ParseError').default;
6610
6648
  var XHR = null;
6611
6649
  if (typeof XMLHttpRequest !== 'undefined') {
@@ -7457,7 +7495,10 @@ function _isNativeReflectConstruct() {
7457
7495
  } catch (e) {
7458
7496
  return false;
7459
7497
  }
7460
- }
7498
+ } /**
7499
+ * @flow
7500
+ */
7501
+ /*:: import type { AttributeMap } from './ObjectStateMutations';*/
7461
7502
  var Installation = /*#__PURE__*/function (_ParseObject) {
7462
7503
  (0, _inherits2.default)(Installation, _ParseObject);
7463
7504
  var _super = _createSuper(Installation);
@@ -7839,7 +7880,11 @@ function _objectSpread(target) {
7839
7880
  });
7840
7881
  }
7841
7882
  return target;
7842
- }
7883
+ } /**
7884
+ * @flow
7885
+ */
7886
+ /*:: import type { AttributeMap, OpsMap } from './ObjectStateMutations';*/
7887
+ /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
7843
7888
  var uuidv4 = _dereq_('./uuid');
7844
7889
  /*:: export type Pointer = {
7845
7890
  __type: string,
@@ -7905,6 +7950,11 @@ var ParseObject = /*#__PURE__*/function () {
7905
7950
  */
7906
7951
  function ParseObject(className /*: ?string | { className: string, [attr: string]: mixed }*/, attributes /*:: ?: { [attr: string]: mixed }*/, options /*:: ?: { ignoreValidation: boolean }*/) {
7907
7952
  (0, _classCallCheck2.default)(this, ParseObject);
7953
+ /**
7954
+ * The ID of this object, unique within its class.
7955
+ *
7956
+ * @property {string} id
7957
+ */
7908
7958
  (0, _defineProperty2.default)(this, "id", void 0);
7909
7959
  (0, _defineProperty2.default)(this, "_localId", void 0);
7910
7960
  (0, _defineProperty2.default)(this, "_objCount", void 0);
@@ -7936,12 +7986,6 @@ var ParseObject = /*#__PURE__*/function () {
7936
7986
  throw new Error("Can't create an invalid Parse Object");
7937
7987
  }
7938
7988
  }
7939
-
7940
- /**
7941
- * The ID of this object, unique within its class.
7942
- *
7943
- * @property {string} id
7944
- */
7945
7989
  (0, _createClass2.default)(ParseObject, [{
7946
7990
  key: "attributes",
7947
7991
  get: /* Prototype getters / setters */
@@ -10747,7 +10791,9 @@ function _isNativeReflectConstruct() {
10747
10791
  } catch (e) {
10748
10792
  return false;
10749
10793
  }
10750
- }
10794
+ } /**
10795
+ * @flow
10796
+ */
10751
10797
  function opFromJSON(json /*: { [key: string]: any }*/) /*: ?Op*/{
10752
10798
  if (!json || !json.__op) {
10753
10799
  return null;
@@ -11494,7 +11540,29 @@ var _LocalDatastoreUtils = _dereq_("./LocalDatastoreUtils");
11494
11540
  /*
11495
11541
  * @flow
11496
11542
  */
11497
-
11543
+ /*:: import type LiveQuerySubscription from './LiveQuerySubscription';*/
11544
+ /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
11545
+ /*:: type BatchOptions = FullOptions & { batchSize?: number };*/
11546
+ /*:: export type WhereClause = {
11547
+ [attr: string]: mixed,
11548
+ };*/
11549
+ /*:: export type QueryJSON = {
11550
+ where: WhereClause,
11551
+ watch?: string,
11552
+ include?: string,
11553
+ excludeKeys?: string,
11554
+ keys?: string,
11555
+ limit?: number,
11556
+ skip?: number,
11557
+ order?: string,
11558
+ className?: string,
11559
+ count?: number,
11560
+ hint?: mixed,
11561
+ explain?: boolean,
11562
+ readPreference?: string,
11563
+ includeReadPreference?: string,
11564
+ subqueryReadPreference?: string,
11565
+ };*/
11498
11566
  /**
11499
11567
  * Converts a string into a regex that matches it.
11500
11568
  * Surrounding with \Q .. \E does this, we just need to escape any \E's in
@@ -11669,15 +11737,14 @@ function handleOfflineSort(a, b, sorts) {
11669
11737
  * @alias Parse.Query
11670
11738
  */
11671
11739
  var ParseQuery = /*#__PURE__*/function () {
11672
- /**
11673
- * @property {string} className
11674
- */
11675
-
11676
11740
  /**
11677
11741
  * @param {(string | Parse.Object)} objectClass An instance of a subclass of Parse.Object, or a Parse className string.
11678
11742
  */
11679
11743
  function ParseQuery(objectClass /*: string | ParseObject*/) {
11680
11744
  (0, _classCallCheck2.default)(this, ParseQuery);
11745
+ /**
11746
+ * @property {string} className
11747
+ */
11681
11748
  (0, _defineProperty2.default)(this, "className", void 0);
11682
11749
  (0, _defineProperty2.default)(this, "_where", void 0);
11683
11750
  (0, _defineProperty2.default)(this, "_watch", void 0);
@@ -14045,7 +14112,11 @@ function _isNativeReflectConstruct() {
14045
14112
  } catch (e) {
14046
14113
  return false;
14047
14114
  }
14048
- }
14115
+ } /**
14116
+ * @flow
14117
+ */
14118
+ /*:: import type { AttributeMap } from './ObjectStateMutations';*/
14119
+ /*:: import type ParseRelation from './ParseRelation';*/
14049
14120
  /**
14050
14121
  * Represents a Role on the Parse server. Roles represent groupings of
14051
14122
  * Users for the purposes of granting permissions (e.g. specifying an ACL
@@ -14209,7 +14280,7 @@ var _ParseCLP = _interopRequireDefault(_dereq_("./ParseCLP"));
14209
14280
  /**
14210
14281
  * @flow
14211
14282
  */
14212
-
14283
+ /*:: import type { PermissionsMap } from './ParseCLP';*/
14213
14284
  var FIELD_TYPES = ['String', 'Number', 'Boolean', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
14214
14285
  /*:: type FieldOptions = {
14215
14286
  required: boolean,
@@ -14750,7 +14821,11 @@ function _isNativeReflectConstruct() {
14750
14821
  } catch (e) {
14751
14822
  return false;
14752
14823
  }
14753
- }
14824
+ } /**
14825
+ * @flow
14826
+ */
14827
+ /*:: import type { AttributeMap } from './ObjectStateMutations';*/
14828
+ /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
14754
14829
  /**
14755
14830
  * <p>A Parse.Session object is a local representation of a revocable session.
14756
14831
  * This class is a subclass of a Parse.Object, and retains the same
@@ -14913,7 +14988,12 @@ function _isNativeReflectConstruct() {
14913
14988
  } catch (e) {
14914
14989
  return false;
14915
14990
  }
14916
- }
14991
+ } /**
14992
+ * @flow
14993
+ */
14994
+ /*:: import type { AttributeMap } from './ObjectStateMutations';*/
14995
+ /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
14996
+ /*:: export type AuthData = ?{ [key: string]: mixed };*/
14917
14997
  var CURRENT_USER_KEY = 'currentUser';
14918
14998
  var canUseCurrentUser = !_CoreManager.default.get('IS_NODE');
14919
14999
  var currentUserCacheMatchesDisk = false;
@@ -15739,6 +15819,27 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
15739
15819
  return user.logIn(options);
15740
15820
  }
15741
15821
 
15822
+ /**
15823
+ * Logs in a user with an objectId. On success, this saves the session
15824
+ * to disk, so you can retrieve the currently logged in user using
15825
+ * <code>current</code>.
15826
+ *
15827
+ * @param {string} userId The objectId for the user.
15828
+ * @static
15829
+ * @returns {Promise} A promise that is fulfilled with the user when
15830
+ * the login completes.
15831
+ */
15832
+ }, {
15833
+ key: "loginAs",
15834
+ value: function (userId /*: string*/) {
15835
+ if (!userId) {
15836
+ throw new _ParseError.default(_ParseError.default.USERNAME_MISSING, 'Cannot log in as user with an empty user id');
15837
+ }
15838
+ var controller = _CoreManager.default.getUserController();
15839
+ var user = new this();
15840
+ return controller.loginAs(user, userId);
15841
+ }
15842
+
15742
15843
  /**
15743
15844
  * Logs in a user with a session token. On success, this saves the session
15744
15845
  * to disk, so you can retrieve the currently logged in user using
@@ -16183,6 +16284,21 @@ var DefaultController = {
16183
16284
  return DefaultController.setCurrentUser(user);
16184
16285
  });
16185
16286
  },
16287
+ loginAs: function (user /*: ParseUser*/, userId /*: string*/) /*: Promise<ParseUser>*/{
16288
+ var RESTController = _CoreManager.default.getRESTController();
16289
+ return RESTController.request('POST', 'loginAs', {
16290
+ userId: userId
16291
+ }, {
16292
+ useMasterKey: true
16293
+ }).then(function (response) {
16294
+ user._finishFetch(response);
16295
+ user._setExisted(true);
16296
+ if (!canUseCurrentUser) {
16297
+ return _promise.default.resolve(user);
16298
+ }
16299
+ return DefaultController.setCurrentUser(user);
16300
+ });
16301
+ },
16186
16302
  become: function (user /*: ParseUser*/, options /*: RequestOptions*/) /*: Promise<ParseUser>*/{
16187
16303
  var RESTController = _CoreManager.default.getRESTController();
16188
16304
  return RESTController.request('GET', 'users/me', {}, options).then(function (response) {
@@ -16326,7 +16442,14 @@ var _ParseQuery = _interopRequireDefault(_dereq_("./ParseQuery"));
16326
16442
  /**
16327
16443
  * @flow
16328
16444
  */
16329
-
16445
+ /*:: import type { WhereClause } from './ParseQuery';*/
16446
+ /*:: import type { FullOptions } from './RESTController';*/
16447
+ /*:: export type PushData = {
16448
+ where?: WhereClause | ParseQuery,
16449
+ push_time?: Date | string,
16450
+ expiration_time?: Date | string,
16451
+ expiration_interval?: number,
16452
+ };*/
16330
16453
  /**
16331
16454
  * Contains functions to deal with Push in Parse.
16332
16455
  *
@@ -16334,7 +16457,6 @@ var _ParseQuery = _interopRequireDefault(_dereq_("./ParseQuery"));
16334
16457
  * @static
16335
16458
  * @hideconstructor
16336
16459
  */
16337
-
16338
16460
  /**
16339
16461
  * Sends a push notification.
16340
16462
  * **Available in Cloud Code only.**
@@ -16465,6 +16587,26 @@ function _objectSpread(target) {
16465
16587
  */
16466
16588
  /* global XMLHttpRequest, XDomainRequest */
16467
16589
  var uuidv4 = _dereq_('./uuid');
16590
+ /*:: export type RequestOptions = {
16591
+ useMasterKey?: boolean,
16592
+ sessionToken?: string,
16593
+ installationId?: string,
16594
+ returnStatus?: boolean,
16595
+ batchSize?: number,
16596
+ include?: any,
16597
+ progress?: any,
16598
+ context?: any,
16599
+ usePost?: boolean,
16600
+ };*/
16601
+ /*:: export type FullOptions = {
16602
+ success?: any,
16603
+ error?: any,
16604
+ useMasterKey?: boolean,
16605
+ sessionToken?: string,
16606
+ installationId?: string,
16607
+ progress?: any,
16608
+ usePost?: boolean,
16609
+ };*/
16468
16610
  var XHR = null;
16469
16611
  if (typeof XMLHttpRequest !== 'undefined') {
16470
16612
  XHR = XMLHttpRequest;
@@ -16810,7 +16952,12 @@ function _interopRequireWildcard(obj, nodeInterop) {
16810
16952
  /**
16811
16953
  * @flow
16812
16954
  */
16813
-
16955
+ /*:: import type { Op } from './ParseOp';*/
16956
+ /*:: import type { AttributeMap, ObjectCache, OpsMap, State } from './ObjectStateMutations';*/
16957
+ /*:: type ObjectIdentifier = {
16958
+ className: string,
16959
+ id: string,
16960
+ };*/
16814
16961
  var objectState
16815
16962
  /*: {
16816
16963
  [className: string]: {
@@ -17050,6 +17197,10 @@ var _promiseUtils = _dereq_("./promiseUtils");
17050
17197
  /**
17051
17198
  * @flow
17052
17199
  */
17200
+ /*:: type Task = {
17201
+ task: () => Promise,
17202
+ _completion: Promise,
17203
+ };*/
17053
17204
  var TaskQueue = /*#__PURE__*/function () {
17054
17205
  function TaskQueue() {
17055
17206
  (0, _classCallCheck2.default)(this, TaskQueue);
@@ -17168,7 +17319,9 @@ function _interopRequireWildcard(obj, nodeInterop) {
17168
17319
  /**
17169
17320
  * @flow
17170
17321
  */
17171
-
17322
+ /*:: import type { Op } from './ParseOp';*/
17323
+ /*:: import type ParseObject from './ParseObject';*/
17324
+ /*:: import type { AttributeMap, ObjectCache, OpsMap, State } from './ObjectStateMutations';*/
17172
17325
  var objectState = new _weakMap.default();
17173
17326
  function getState(obj /*: ParseObject*/) /*: ?State*/{
17174
17327
  var classData = objectState.get(obj);
@@ -17785,7 +17938,10 @@ var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
17785
17938
  /**
17786
17939
  * @flow
17787
17940
  */
17788
-
17941
+ /*:: type EncounterMap = {
17942
+ objects: { [identifier: string]: ParseObject | boolean },
17943
+ files: Array<ParseFile>,
17944
+ };*/
17789
17945
  /**
17790
17946
  * Return an array of unsaved children, which are either Parse Objects or Files.
17791
17947
  * If it encounters any dirty Objects without Ids, it will throw an exception.