parse 6.1.0-alpha.2 → 6.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 (186) hide show
  1. package/README.md +0 -8
  2. package/dist/parse.js +31 -49
  3. package/dist/parse.min.js +2 -2
  4. package/dist/parse.weapp.js +31 -49
  5. package/dist/parse.weapp.min.js +2 -2
  6. package/lib/browser/CoreManager.js +1 -2
  7. package/lib/browser/CryptoController.js +0 -1
  8. package/lib/browser/EventEmitter.js +0 -1
  9. package/lib/browser/EventuallyQueue.js +0 -1
  10. package/lib/browser/IndexedDBStorageController.js +0 -1
  11. package/lib/browser/InstallationController.js +0 -1
  12. package/lib/browser/LocalDatastore.js +0 -1
  13. package/lib/browser/LocalDatastoreController.default.js +0 -1
  14. package/lib/browser/LocalDatastoreController.js +0 -1
  15. package/lib/browser/LocalDatastoreController.react-native.js +0 -1
  16. package/lib/browser/OfflineQuery.js +0 -1
  17. package/lib/browser/ParseInstallation.js +0 -1
  18. package/lib/browser/ParseObject.js +2 -1
  19. package/lib/browser/ParseOp.js +1 -1
  20. package/lib/browser/ParseQuery.js +19 -17
  21. package/lib/browser/RESTController.js +4 -3
  22. package/lib/browser/Socket.weapp.js +0 -1
  23. package/lib/browser/Storage.js +0 -1
  24. package/lib/browser/StorageController.browser.js +0 -1
  25. package/lib/browser/StorageController.default.js +0 -1
  26. package/lib/browser/StorageController.js +0 -1
  27. package/lib/browser/StorageController.react-native.js +0 -1
  28. package/lib/browser/StorageController.weapp.js +0 -1
  29. package/lib/browser/TaskQueue.js +1 -1
  30. package/lib/browser/WebSocketController.js +0 -1
  31. package/lib/browser/Xhr.weapp.js +0 -1
  32. package/lib/browser/uuid.js +0 -1
  33. package/lib/node/CoreManager.js +1 -2
  34. package/lib/node/CryptoController.js +0 -1
  35. package/lib/node/EventEmitter.js +0 -1
  36. package/lib/node/EventuallyQueue.js +0 -1
  37. package/lib/node/IndexedDBStorageController.js +0 -1
  38. package/lib/node/InstallationController.js +0 -1
  39. package/lib/node/LocalDatastore.js +0 -1
  40. package/lib/node/LocalDatastoreController.default.js +0 -1
  41. package/lib/node/LocalDatastoreController.js +0 -1
  42. package/lib/node/LocalDatastoreController.react-native.js +0 -1
  43. package/lib/node/OfflineQuery.js +0 -1
  44. package/lib/node/ParseInstallation.js +0 -1
  45. package/lib/node/ParseObject.js +2 -1
  46. package/lib/node/ParseOp.js +1 -1
  47. package/lib/node/RESTController.js +0 -1
  48. package/lib/node/Socket.weapp.js +0 -1
  49. package/lib/node/Storage.js +0 -1
  50. package/lib/node/StorageController.browser.js +0 -1
  51. package/lib/node/StorageController.default.js +0 -1
  52. package/lib/node/StorageController.js +0 -1
  53. package/lib/node/StorageController.react-native.js +0 -1
  54. package/lib/node/StorageController.weapp.js +0 -1
  55. package/lib/node/TaskQueue.js +1 -1
  56. package/lib/node/WebSocketController.js +0 -1
  57. package/lib/node/Xhr.weapp.js +0 -1
  58. package/lib/node/uuid.js +0 -1
  59. package/lib/react-native/CoreManager.js +1 -2
  60. package/lib/react-native/CryptoController.js +0 -1
  61. package/lib/react-native/EventEmitter.js +0 -1
  62. package/lib/react-native/EventuallyQueue.js +0 -1
  63. package/lib/react-native/IndexedDBStorageController.js +0 -1
  64. package/lib/react-native/InstallationController.js +0 -1
  65. package/lib/react-native/LocalDatastore.js +0 -1
  66. package/lib/react-native/LocalDatastoreController.default.js +0 -1
  67. package/lib/react-native/LocalDatastoreController.js +0 -1
  68. package/lib/react-native/LocalDatastoreController.react-native.js +0 -1
  69. package/lib/react-native/ObjectStateMutations.js +13 -13
  70. package/lib/react-native/OfflineQuery.js +0 -1
  71. package/lib/react-native/ParseACL.js +7 -7
  72. package/lib/react-native/ParseCLP.js +15 -15
  73. package/lib/react-native/ParseInstallation.js +0 -1
  74. package/lib/react-native/ParseObject.js +9 -9
  75. package/lib/react-native/ParseUser.js +15 -15
  76. package/lib/react-native/RESTController.js +0 -1
  77. package/lib/react-native/Socket.weapp.js +0 -1
  78. package/lib/react-native/Storage.js +0 -1
  79. package/lib/react-native/StorageController.browser.js +0 -1
  80. package/lib/react-native/StorageController.default.js +0 -1
  81. package/lib/react-native/StorageController.js +0 -1
  82. package/lib/react-native/StorageController.react-native.js +0 -1
  83. package/lib/react-native/StorageController.weapp.js +0 -1
  84. package/lib/react-native/TaskQueue.js +0 -1
  85. package/lib/react-native/WebSocketController.js +0 -1
  86. package/lib/react-native/Xhr.weapp.js +0 -1
  87. package/lib/react-native/uuid.js +0 -1
  88. package/lib/weapp/CoreManager.js +1 -2
  89. package/lib/weapp/CryptoController.js +0 -1
  90. package/lib/weapp/EventEmitter.js +0 -1
  91. package/lib/weapp/EventuallyQueue.js +0 -1
  92. package/lib/weapp/IndexedDBStorageController.js +0 -1
  93. package/lib/weapp/InstallationController.js +0 -1
  94. package/lib/weapp/LocalDatastore.js +0 -1
  95. package/lib/weapp/LocalDatastoreController.default.js +0 -1
  96. package/lib/weapp/LocalDatastoreController.js +0 -1
  97. package/lib/weapp/LocalDatastoreController.react-native.js +0 -1
  98. package/lib/weapp/OfflineQuery.js +0 -1
  99. package/lib/weapp/ParseInstallation.js +0 -1
  100. package/lib/weapp/ParseObject.js +2 -1
  101. package/lib/weapp/ParseOp.js +1 -1
  102. package/lib/weapp/ParseQuery.js +19 -17
  103. package/lib/weapp/RESTController.js +4 -3
  104. package/lib/weapp/Socket.weapp.js +0 -1
  105. package/lib/weapp/Storage.js +0 -1
  106. package/lib/weapp/StorageController.browser.js +0 -1
  107. package/lib/weapp/StorageController.default.js +0 -1
  108. package/lib/weapp/StorageController.js +0 -1
  109. package/lib/weapp/StorageController.react-native.js +0 -1
  110. package/lib/weapp/StorageController.weapp.js +0 -1
  111. package/lib/weapp/TaskQueue.js +1 -1
  112. package/lib/weapp/WebSocketController.js +0 -1
  113. package/lib/weapp/Xhr.weapp.js +0 -1
  114. package/lib/weapp/uuid.js +0 -1
  115. package/package.json +14 -12
  116. package/types/Analytics.d.ts +40 -0
  117. package/types/AnonymousUtils.d.ts +84 -0
  118. package/types/Cloud.d.ts +65 -0
  119. package/types/CloudCode.d.ts +307 -0
  120. package/types/CoreManager.d.ts +319 -0
  121. package/types/CryptoController.d.ts +5 -0
  122. package/types/EventEmitter.d.ts +5 -0
  123. package/types/EventuallyQueue.d.ts +168 -0
  124. package/types/FacebookUtils.d.ts +107 -0
  125. package/types/IndexedDBStorageController.d.ts +2 -0
  126. package/types/InstallationController.d.ts +10 -0
  127. package/types/LiveQueryClient.d.ts +128 -0
  128. package/types/LiveQuerySubscription.d.ts +103 -0
  129. package/types/LocalDatastore.d.ts +56 -0
  130. package/types/LocalDatastoreController.d.ts +2 -0
  131. package/types/LocalDatastoreController.default.d.ts +9 -0
  132. package/types/LocalDatastoreController.react-native.d.ts +9 -0
  133. package/types/LocalDatastoreUtils.d.ts +5 -0
  134. package/types/ObjectStateMutations.d.ts +22 -0
  135. package/types/OfflineQuery.d.ts +20 -0
  136. package/types/Parse.d.ts +372 -0
  137. package/types/ParseACL.d.ts +137 -0
  138. package/types/ParseCLP.d.ts +289 -0
  139. package/types/ParseConfig.d.ts +69 -0
  140. package/types/ParseError.d.ts +476 -0
  141. package/types/ParseFile.d.ts +188 -0
  142. package/types/ParseGeoPoint.d.ts +104 -0
  143. package/types/ParseHooks.d.ts +27 -0
  144. package/types/ParseInstallation.d.ts +179 -0
  145. package/types/ParseLiveQuery.d.ts +48 -0
  146. package/types/ParseObject.d.ts +1070 -0
  147. package/types/ParseOp.d.ts +76 -0
  148. package/types/ParsePolygon.d.ts +69 -0
  149. package/types/ParseQuery.d.ts +953 -0
  150. package/types/ParseRelation.d.ts +56 -0
  151. package/types/ParseRole.d.ts +79 -0
  152. package/types/ParseSchema.d.ts +270 -0
  153. package/types/ParseSession.d.ts +45 -0
  154. package/types/ParseUser.d.ts +511 -0
  155. package/types/Push.d.ts +62 -0
  156. package/types/RESTController.d.ts +35 -0
  157. package/types/SingleInstanceStateController.d.ts +24 -0
  158. package/types/Socket.weapp.d.ts +10 -0
  159. package/types/Storage.d.ts +14 -0
  160. package/types/StorageController.browser.d.ts +9 -0
  161. package/types/StorageController.d.ts +2 -0
  162. package/types/StorageController.default.d.ts +9 -0
  163. package/types/StorageController.react-native.d.ts +11 -0
  164. package/types/StorageController.weapp.d.ts +9 -0
  165. package/types/TaskQueue.d.ts +11 -0
  166. package/types/UniqueInstanceStateController.d.ts +20 -0
  167. package/types/WebSocketController.d.ts +2 -0
  168. package/types/Xhr.weapp.d.ts +29 -0
  169. package/types/arrayContainsObject.d.ts +2 -0
  170. package/types/canBeSerialized.d.ts +2 -0
  171. package/types/decode.d.ts +1 -0
  172. package/types/encode.d.ts +1 -0
  173. package/types/equals.d.ts +1 -0
  174. package/types/escape.d.ts +1 -0
  175. package/types/eslint.config.mjs +30 -0
  176. package/types/index.d.ts +66 -0
  177. package/types/isRevocableSession.d.ts +1 -0
  178. package/types/node.d.ts +3 -0
  179. package/types/parseDate.d.ts +1 -0
  180. package/types/promiseUtils.d.ts +9 -0
  181. package/types/react-native.d.ts +3 -0
  182. package/types/tests.ts +2256 -0
  183. package/types/tsconfig.json +25 -0
  184. package/types/unique.d.ts +1 -0
  185. package/types/unsavedChildren.d.ts +11 -0
  186. package/types/uuid.d.ts +2 -0
@@ -9,8 +9,9 @@ exports.default = void 0;
9
9
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
10
10
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
11
11
  var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
12
- var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
13
12
  var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
13
+ var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
14
+ var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
14
15
  var _setTimeout2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/set-timeout"));
15
16
  var _uuid = _interopRequireDefault(require("./uuid"));
16
17
  var _CoreManager = _interopRequireDefault(require("./CoreManager"));
@@ -94,10 +95,11 @@ const RESTController = {
94
95
  if (xhr.status >= 200 && xhr.status < 300) {
95
96
  let response;
96
97
  try {
98
+ var _context2, _context3;
97
99
  response = JSON.parse(xhr.responseText);
98
100
  const availableHeaders = typeof xhr.getAllResponseHeaders === 'function' ? xhr.getAllResponseHeaders() : '';
99
101
  headers = {};
100
- if (typeof xhr.getResponseHeader === 'function' && availableHeaders?.indexOf('access-control-expose-headers') >= 0) {
102
+ if (typeof xhr.getResponseHeader === 'function' && ((_context2 = availableHeaders) == null ? void 0 : (0, _bind.default)(_context3 = Function.call).call(_context3, (0, _indexOf.default)(_context2), _context2))?.('access-control-expose-headers') >= 0) {
101
103
  const responseHeaders = xhr.getResponseHeader('access-control-expose-headers').split(', ');
102
104
  (0, _forEach.default)(responseHeaders).call(responseHeaders, header => {
103
105
  if ((0, _indexOf.default)(availableHeaders).call(availableHeaders, header.toLowerCase()) >= 0) {
@@ -312,5 +314,4 @@ const RESTController = {
312
314
  return XHR;
313
315
  }
314
316
  };
315
- module.exports = RESTController;
316
317
  var _default = exports.default = RESTController;
@@ -57,5 +57,4 @@ class SocketWeapp {
57
57
  wx.closeSocket();
58
58
  }
59
59
  }
60
- module.exports = SocketWeapp;
61
60
  var _default = exports.default = SocketWeapp;
@@ -88,5 +88,4 @@ const Storage = {
88
88
  }
89
89
  }
90
90
  };
91
- module.exports = Storage;
92
91
  var _default = exports.default = Storage;
@@ -34,5 +34,4 @@ const StorageController = {
34
34
  localStorage.clear();
35
35
  }
36
36
  };
37
- module.exports = StorageController;
38
37
  var _default = exports.default = StorageController;
@@ -34,5 +34,4 @@ const StorageController = {
34
34
  }
35
35
  }
36
36
  };
37
- module.exports = StorageController;
38
37
  var _default = exports.default = StorageController;
@@ -12,5 +12,4 @@ var _StorageController3 = _interopRequireDefault(require("./StorageController.we
12
12
  var _StorageController4 = _interopRequireDefault(require("./StorageController.default"));
13
13
  let StorageController = _StorageController4.default;
14
14
  StorageController = _StorageController3.default;
15
- module.exports = StorageController;
16
15
  var _default = exports.default = StorageController;
@@ -80,5 +80,4 @@ const StorageController = {
80
80
  return _CoreManager.default.getAsyncStorage().clear();
81
81
  }
82
82
  };
83
- module.exports = StorageController;
84
83
  var _default = exports.default = StorageController;
@@ -35,5 +35,4 @@ const StorageController = {
35
35
  wx.clearStorageSync();
36
36
  }
37
37
  };
38
- module.exports = StorageController;
39
38
  var _default = exports.default = StorageController;
@@ -14,6 +14,7 @@ class TaskQueue {
14
14
  this.queue = [];
15
15
  }
16
16
  enqueue(task) {
17
+ // eslint-disable-next-line
17
18
  const taskComplete = (0, _promiseUtils.resolvingPromise)();
18
19
  this.queue.push({
19
20
  task: task,
@@ -44,5 +45,4 @@ class TaskQueue {
44
45
  }
45
46
  }
46
47
  }
47
- module.exports = TaskQueue;
48
48
  var _default = exports.default = TaskQueue;
@@ -16,5 +16,4 @@ try {
16
16
  } catch (_) {
17
17
  // WebSocket unavailable
18
18
  }
19
- module.exports = WebSocketController;
20
19
  var _default = exports.default = WebSocketController;
@@ -109,5 +109,4 @@ class XhrWeapp {
109
109
  });
110
110
  }
111
111
  }
112
- module.exports = XhrWeapp;
113
112
  var _default = exports.default = XhrWeapp;
package/lib/weapp/uuid.js CHANGED
@@ -17,5 +17,4 @@ let uuid = function () {
17
17
  s[8] = s[13] = s[18] = s[23] = '-';
18
18
  return s.join('');
19
19
  };
20
- module.exports = uuid;
21
20
  var _default = exports.default = uuid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse",
3
- "version": "6.1.0-alpha.2",
3
+ "version": "6.1.0-alpha.4",
4
4
  "description": "Parse JavaScript SDK",
5
5
  "homepage": "https://parseplatform.org",
6
6
  "keywords": [
@@ -21,15 +21,17 @@
21
21
  "weapp.js",
22
22
  "dist/",
23
23
  "lib/",
24
+ "types/",
24
25
  "LICENSE",
25
26
  "NOTICE",
26
27
  "README.md"
27
28
  ],
29
+ "types": "types/index.d.ts",
28
30
  "browser": {
29
31
  "react-native": false
30
32
  },
31
33
  "dependencies": {
32
- "@babel/runtime-corejs3": "7.26.9",
34
+ "@babel/runtime-corejs3": "7.27.0",
33
35
  "idb-keyval": "6.2.1",
34
36
  "react-native-crypto-js": "1.0.0",
35
37
  "uuid": "10.0.0",
@@ -37,13 +39,13 @@
37
39
  "xmlhttprequest": "1.8.0"
38
40
  },
39
41
  "devDependencies": {
40
- "@babel/core": "7.26.9",
42
+ "@babel/core": "7.26.10",
41
43
  "@babel/plugin-proposal-class-properties": "7.18.6",
42
- "@babel/plugin-transform-runtime": "7.26.9",
44
+ "@babel/plugin-transform-runtime": "7.26.10",
43
45
  "@babel/preset-env": "7.26.9",
44
46
  "@babel/preset-react": "7.26.3",
45
- "@babel/preset-typescript": "7.26.0",
46
- "@eslint/js": "9.21.0",
47
+ "@babel/preset-typescript": "7.27.0",
48
+ "@eslint/js": "9.23.0",
47
49
  "@parse/minami": "git+https://github.com/parse-community/minami#main",
48
50
  "@saithodev/semantic-release-backmerge": "4.0.1",
49
51
  "@semantic-release/changelog": "6.0.3",
@@ -61,9 +63,9 @@
61
63
  "codecov": "3.8.3",
62
64
  "core-js": "3.41.0",
63
65
  "cross-env": "7.0.2",
64
- "eslint": "9.21.0",
66
+ "eslint": "9.23.0",
65
67
  "eslint-plugin-expect-type": "0.6.2",
66
- "eslint-plugin-jsdoc": "50.6.3",
68
+ "eslint-plugin-jsdoc": "50.6.9",
67
69
  "express": "4.21.2",
68
70
  "gulp": "5.0.0",
69
71
  "gulp-babel": "8.0.0",
@@ -80,16 +82,16 @@
80
82
  "jest-environment-jsdom": "29.7.0",
81
83
  "jsdoc": "4.0.4",
82
84
  "jsdoc-babel": "0.5.0",
83
- "lint-staged": "15.4.3",
85
+ "lint-staged": "15.5.0",
84
86
  "madge": "8.0.0",
85
87
  "metro-react-native-babel-preset": "0.77.0",
86
88
  "mongodb-runner": "5.8.0",
87
89
  "parse-server": "7.3.0",
88
90
  "prettier": "3.5.2",
89
- "puppeteer": "24.2.1",
91
+ "puppeteer": "24.4.0",
90
92
  "regenerator-runtime": "0.14.1",
91
93
  "semantic-release": "24.2.3",
92
- "typescript-eslint": "8.26.0",
94
+ "typescript-eslint": "8.28.0",
93
95
  "vinyl-source-stream": "2.0.0"
94
96
  },
95
97
  "optionalDependencies": {
@@ -106,7 +108,7 @@
106
108
  "posttest:mongodb": "mongodb-runner stop --all",
107
109
  "lint": "eslint --cache src/ integration/",
108
110
  "lint:fix": "eslint --fix --cache src/ integration/",
109
- "test:types": "eslint types/tests.ts -c eslint.config.test.mjs",
111
+ "test:types": "eslint types/tests.ts -c ./types/eslint.config.mjs",
110
112
  "watch": "cross-env PARSE_BUILD=${PARSE_BUILD} gulp watch",
111
113
  "watch:browser": "cross-env PARSE_BUILD=browser npm run watch",
112
114
  "watch:node": "cross-env PARSE_BUILD=node npm run watch",
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Parse.Analytics provides an interface to Parse's logging and analytics
3
+ * backend.
4
+ *
5
+ * @class Parse.Analytics
6
+ * @static
7
+ * @hideconstructor
8
+ */
9
+ /**
10
+ * Tracks the occurrence of a custom event with additional dimensions.
11
+ * Parse will store a data point at the time of invocation with the given
12
+ * event name.
13
+ *
14
+ * Dimensions will allow segmentation of the occurrences of this custom
15
+ * event. Keys and values should be {@code String}s, and will throw
16
+ * otherwise.
17
+ *
18
+ * To track a user signup along with additional metadata, consider the
19
+ * following:
20
+ * <pre>
21
+ * var dimensions = {
22
+ * gender: 'm',
23
+ * source: 'web',
24
+ * dayType: 'weekend'
25
+ * };
26
+ * Parse.Analytics.track('signup', dimensions);
27
+ * </pre>
28
+ *
29
+ * There is a default limit of 8 dimensions per event tracked.
30
+ *
31
+ * @function track
32
+ * @name Parse.Analytics.track
33
+ * @param {string} name The name of the custom event to report to Parse as
34
+ * having happened.
35
+ * @param {object} dimensions The dictionary of information by which to
36
+ * segment this event.
37
+ * @returns {Promise} A promise that is resolved when the round-trip
38
+ * to the server completes.
39
+ */
40
+ export declare function track(name: string, dimensions: Record<string, string>): Promise<void>;
@@ -0,0 +1,84 @@
1
+ import ParseUser from './ParseUser';
2
+ import type { RequestOptions } from './RESTController';
3
+ /**
4
+ * Provides utility functions for working with Anonymously logged-in users. <br />
5
+ * Anonymous users have some unique characteristics:
6
+ * <ul>
7
+ * <li>Anonymous users don't need a user name or password.</li>
8
+ * <ul>
9
+ * <li>Once logged out, an anonymous user cannot be recovered.</li>
10
+ * </ul>
11
+ * <li>signUp converts an anonymous user to a standard user with the given username and password.</li>
12
+ * <ul>
13
+ * <li>Data associated with the anonymous user is retained.</li>
14
+ * </ul>
15
+ * <li>logIn switches users without converting the anonymous user.</li>
16
+ * <ul>
17
+ * <li>Data associated with the anonymous user will be lost.</li>
18
+ * </ul>
19
+ * <li>Service logIn (e.g. Facebook, Twitter) will attempt to convert
20
+ * the anonymous user into a standard user by linking it to the service.</li>
21
+ * <ul>
22
+ * <li>If a user already exists that is linked to the service, it will instead switch to the existing user.</li>
23
+ * </ul>
24
+ * <li>Service linking (e.g. Facebook, Twitter) will convert the anonymous user
25
+ * into a standard user by linking it to the service.</li>
26
+ * </ul>
27
+ *
28
+ * @class Parse.AnonymousUtils
29
+ * @static
30
+ */
31
+ declare const AnonymousUtils: {
32
+ /**
33
+ * Gets whether the user has their account linked to anonymous user.
34
+ *
35
+ * @function isLinked
36
+ * @name Parse.AnonymousUtils.isLinked
37
+ * @param {Parse.User} user User to check for.
38
+ * The user must be logged in on this device.
39
+ * @returns {boolean} <code>true</code> if the user has their account
40
+ * linked to an anonymous user.
41
+ * @static
42
+ */
43
+ isLinked(user: ParseUser): boolean;
44
+ /**
45
+ * Logs in a user Anonymously.
46
+ *
47
+ * @function logIn
48
+ * @name Parse.AnonymousUtils.logIn
49
+ * @param {object} options MasterKey / SessionToken.
50
+ * @returns {Promise} Logged in user
51
+ * @static
52
+ */
53
+ logIn(options?: RequestOptions): Promise<ParseUser>;
54
+ /**
55
+ * Links Anonymous User to an existing PFUser.
56
+ *
57
+ * @function link
58
+ * @name Parse.AnonymousUtils.link
59
+ * @param {Parse.User} user User to link. This must be the current user.
60
+ * @param {object} options MasterKey / SessionToken.
61
+ * @returns {Promise} Linked with User
62
+ * @static
63
+ */
64
+ link(user: ParseUser, options?: RequestOptions): Promise<ParseUser>;
65
+ /**
66
+ * Returns true if Authentication Provider has been registered for use.
67
+ *
68
+ * @function isRegistered
69
+ * @name Parse.AnonymousUtils.isRegistered
70
+ * @returns {boolean}
71
+ * @static
72
+ */
73
+ isRegistered(): boolean;
74
+ _getAuthProvider(): {
75
+ restoreAuthentication(): boolean;
76
+ getAuthType(): string;
77
+ getAuthData(): {
78
+ authData: {
79
+ id: string;
80
+ };
81
+ };
82
+ };
83
+ };
84
+ export default AnonymousUtils;
@@ -0,0 +1,65 @@
1
+ import ParseObject from './ParseObject';
2
+ import type { RequestOptions } from './RESTController';
3
+ /**
4
+ * Contains functions for calling and declaring
5
+ * <a href="/docs/cloud_code_guide#functions">cloud functions</a>.
6
+ * <p><strong><em>
7
+ * Some functions are only available from Cloud Code.
8
+ * </em></strong></p>
9
+ *
10
+ * @class Parse.Cloud
11
+ * @static
12
+ * @hideconstructor
13
+ */
14
+ /**
15
+ * Makes a call to a cloud function.
16
+ *
17
+ * @function run
18
+ * @name Parse.Cloud.run
19
+ * @param {string} name The function name.
20
+ * @param {object} data The parameters to send to the cloud function.
21
+ * @param {object} options
22
+ * Valid options are:<ul>
23
+ * <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
24
+ * be used for this request.
25
+ * <li>sessionToken: A valid session token, used for making a request on
26
+ * behalf of a specific user.
27
+ * <li>installationId: the installationId which made the request
28
+ * <li>context: A dictionary that is accessible in Cloud Code triggers.
29
+ * </ul>
30
+ * @returns {Promise} A promise that will be resolved with the result
31
+ * of the function.
32
+ */
33
+ export declare function run<T extends () => any>(name: string, data?: null, options?: RequestOptions): Promise<ReturnType<T>>;
34
+ export declare function run<T extends (param: {
35
+ [P in keyof Parameters<T>[0]]: Parameters<T>[0][P];
36
+ }) => any>(name: string, data: Parameters<T>[0], options?: RequestOptions): Promise<ReturnType<T>>;
37
+ /**
38
+ * Gets data for the current set of cloud jobs.
39
+ *
40
+ * @function getJobsData
41
+ * @name Parse.Cloud.getJobsData
42
+ * @returns {Promise} A promise that will be resolved with the result
43
+ * of the function.
44
+ */
45
+ export declare function getJobsData(): Promise<any>;
46
+ /**
47
+ * Starts a given cloud job, which will process asynchronously.
48
+ *
49
+ * @function startJob
50
+ * @name Parse.Cloud.startJob
51
+ * @param {string} name The function name.
52
+ * @param {object} data The parameters to send to the cloud function.
53
+ * @returns {Promise} A promise that will be resolved with the jobStatusId
54
+ * of the job.
55
+ */
56
+ export declare function startJob(name: string, data: any): Promise<string>;
57
+ /**
58
+ * Gets job status by Id
59
+ *
60
+ * @function getJobStatus
61
+ * @name Parse.Cloud.getJobStatus
62
+ * @param {string} jobStatusId The Id of Job Status.
63
+ * @returns {Parse.Object} Status of Job.
64
+ */
65
+ export declare function getJobStatus(jobStatusId: string): Promise<ParseObject>;