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.
- package/README.md +0 -8
- package/dist/parse.js +31 -49
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +31 -49
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -2
- package/lib/browser/CryptoController.js +0 -1
- package/lib/browser/EventEmitter.js +0 -1
- package/lib/browser/EventuallyQueue.js +0 -1
- package/lib/browser/IndexedDBStorageController.js +0 -1
- package/lib/browser/InstallationController.js +0 -1
- package/lib/browser/LocalDatastore.js +0 -1
- package/lib/browser/LocalDatastoreController.default.js +0 -1
- package/lib/browser/LocalDatastoreController.js +0 -1
- package/lib/browser/LocalDatastoreController.react-native.js +0 -1
- package/lib/browser/OfflineQuery.js +0 -1
- package/lib/browser/ParseInstallation.js +0 -1
- package/lib/browser/ParseObject.js +2 -1
- package/lib/browser/ParseOp.js +1 -1
- package/lib/browser/ParseQuery.js +19 -17
- package/lib/browser/RESTController.js +4 -3
- package/lib/browser/Socket.weapp.js +0 -1
- package/lib/browser/Storage.js +0 -1
- package/lib/browser/StorageController.browser.js +0 -1
- package/lib/browser/StorageController.default.js +0 -1
- package/lib/browser/StorageController.js +0 -1
- package/lib/browser/StorageController.react-native.js +0 -1
- package/lib/browser/StorageController.weapp.js +0 -1
- package/lib/browser/TaskQueue.js +1 -1
- package/lib/browser/WebSocketController.js +0 -1
- package/lib/browser/Xhr.weapp.js +0 -1
- package/lib/browser/uuid.js +0 -1
- package/lib/node/CoreManager.js +1 -2
- package/lib/node/CryptoController.js +0 -1
- package/lib/node/EventEmitter.js +0 -1
- package/lib/node/EventuallyQueue.js +0 -1
- package/lib/node/IndexedDBStorageController.js +0 -1
- package/lib/node/InstallationController.js +0 -1
- package/lib/node/LocalDatastore.js +0 -1
- package/lib/node/LocalDatastoreController.default.js +0 -1
- package/lib/node/LocalDatastoreController.js +0 -1
- package/lib/node/LocalDatastoreController.react-native.js +0 -1
- package/lib/node/OfflineQuery.js +0 -1
- package/lib/node/ParseInstallation.js +0 -1
- package/lib/node/ParseObject.js +2 -1
- package/lib/node/ParseOp.js +1 -1
- package/lib/node/RESTController.js +0 -1
- package/lib/node/Socket.weapp.js +0 -1
- package/lib/node/Storage.js +0 -1
- package/lib/node/StorageController.browser.js +0 -1
- package/lib/node/StorageController.default.js +0 -1
- package/lib/node/StorageController.js +0 -1
- package/lib/node/StorageController.react-native.js +0 -1
- package/lib/node/StorageController.weapp.js +0 -1
- package/lib/node/TaskQueue.js +1 -1
- package/lib/node/WebSocketController.js +0 -1
- package/lib/node/Xhr.weapp.js +0 -1
- package/lib/node/uuid.js +0 -1
- package/lib/react-native/CoreManager.js +1 -2
- package/lib/react-native/CryptoController.js +0 -1
- package/lib/react-native/EventEmitter.js +0 -1
- package/lib/react-native/EventuallyQueue.js +0 -1
- package/lib/react-native/IndexedDBStorageController.js +0 -1
- package/lib/react-native/InstallationController.js +0 -1
- package/lib/react-native/LocalDatastore.js +0 -1
- package/lib/react-native/LocalDatastoreController.default.js +0 -1
- package/lib/react-native/LocalDatastoreController.js +0 -1
- package/lib/react-native/LocalDatastoreController.react-native.js +0 -1
- package/lib/react-native/ObjectStateMutations.js +13 -13
- package/lib/react-native/OfflineQuery.js +0 -1
- package/lib/react-native/ParseACL.js +7 -7
- package/lib/react-native/ParseCLP.js +15 -15
- package/lib/react-native/ParseInstallation.js +0 -1
- package/lib/react-native/ParseObject.js +9 -9
- package/lib/react-native/ParseUser.js +15 -15
- package/lib/react-native/RESTController.js +0 -1
- package/lib/react-native/Socket.weapp.js +0 -1
- package/lib/react-native/Storage.js +0 -1
- package/lib/react-native/StorageController.browser.js +0 -1
- package/lib/react-native/StorageController.default.js +0 -1
- package/lib/react-native/StorageController.js +0 -1
- package/lib/react-native/StorageController.react-native.js +0 -1
- package/lib/react-native/StorageController.weapp.js +0 -1
- package/lib/react-native/TaskQueue.js +0 -1
- package/lib/react-native/WebSocketController.js +0 -1
- package/lib/react-native/Xhr.weapp.js +0 -1
- package/lib/react-native/uuid.js +0 -1
- package/lib/weapp/CoreManager.js +1 -2
- package/lib/weapp/CryptoController.js +0 -1
- package/lib/weapp/EventEmitter.js +0 -1
- package/lib/weapp/EventuallyQueue.js +0 -1
- package/lib/weapp/IndexedDBStorageController.js +0 -1
- package/lib/weapp/InstallationController.js +0 -1
- package/lib/weapp/LocalDatastore.js +0 -1
- package/lib/weapp/LocalDatastoreController.default.js +0 -1
- package/lib/weapp/LocalDatastoreController.js +0 -1
- package/lib/weapp/LocalDatastoreController.react-native.js +0 -1
- package/lib/weapp/OfflineQuery.js +0 -1
- package/lib/weapp/ParseInstallation.js +0 -1
- package/lib/weapp/ParseObject.js +2 -1
- package/lib/weapp/ParseOp.js +1 -1
- package/lib/weapp/ParseQuery.js +19 -17
- package/lib/weapp/RESTController.js +4 -3
- package/lib/weapp/Socket.weapp.js +0 -1
- package/lib/weapp/Storage.js +0 -1
- package/lib/weapp/StorageController.browser.js +0 -1
- package/lib/weapp/StorageController.default.js +0 -1
- package/lib/weapp/StorageController.js +0 -1
- package/lib/weapp/StorageController.react-native.js +0 -1
- package/lib/weapp/StorageController.weapp.js +0 -1
- package/lib/weapp/TaskQueue.js +1 -1
- package/lib/weapp/WebSocketController.js +0 -1
- package/lib/weapp/Xhr.weapp.js +0 -1
- package/lib/weapp/uuid.js +0 -1
- package/package.json +14 -12
- package/types/Analytics.d.ts +40 -0
- package/types/AnonymousUtils.d.ts +84 -0
- package/types/Cloud.d.ts +65 -0
- package/types/CloudCode.d.ts +307 -0
- package/types/CoreManager.d.ts +319 -0
- package/types/CryptoController.d.ts +5 -0
- package/types/EventEmitter.d.ts +5 -0
- package/types/EventuallyQueue.d.ts +168 -0
- package/types/FacebookUtils.d.ts +107 -0
- package/types/IndexedDBStorageController.d.ts +2 -0
- package/types/InstallationController.d.ts +10 -0
- package/types/LiveQueryClient.d.ts +128 -0
- package/types/LiveQuerySubscription.d.ts +103 -0
- package/types/LocalDatastore.d.ts +56 -0
- package/types/LocalDatastoreController.d.ts +2 -0
- package/types/LocalDatastoreController.default.d.ts +9 -0
- package/types/LocalDatastoreController.react-native.d.ts +9 -0
- package/types/LocalDatastoreUtils.d.ts +5 -0
- package/types/ObjectStateMutations.d.ts +22 -0
- package/types/OfflineQuery.d.ts +20 -0
- package/types/Parse.d.ts +372 -0
- package/types/ParseACL.d.ts +137 -0
- package/types/ParseCLP.d.ts +289 -0
- package/types/ParseConfig.d.ts +69 -0
- package/types/ParseError.d.ts +476 -0
- package/types/ParseFile.d.ts +188 -0
- package/types/ParseGeoPoint.d.ts +104 -0
- package/types/ParseHooks.d.ts +27 -0
- package/types/ParseInstallation.d.ts +179 -0
- package/types/ParseLiveQuery.d.ts +48 -0
- package/types/ParseObject.d.ts +1070 -0
- package/types/ParseOp.d.ts +76 -0
- package/types/ParsePolygon.d.ts +69 -0
- package/types/ParseQuery.d.ts +953 -0
- package/types/ParseRelation.d.ts +56 -0
- package/types/ParseRole.d.ts +79 -0
- package/types/ParseSchema.d.ts +270 -0
- package/types/ParseSession.d.ts +45 -0
- package/types/ParseUser.d.ts +511 -0
- package/types/Push.d.ts +62 -0
- package/types/RESTController.d.ts +35 -0
- package/types/SingleInstanceStateController.d.ts +24 -0
- package/types/Socket.weapp.d.ts +10 -0
- package/types/Storage.d.ts +14 -0
- package/types/StorageController.browser.d.ts +9 -0
- package/types/StorageController.d.ts +2 -0
- package/types/StorageController.default.d.ts +9 -0
- package/types/StorageController.react-native.d.ts +11 -0
- package/types/StorageController.weapp.d.ts +9 -0
- package/types/TaskQueue.d.ts +11 -0
- package/types/UniqueInstanceStateController.d.ts +20 -0
- package/types/WebSocketController.d.ts +2 -0
- package/types/Xhr.weapp.d.ts +29 -0
- package/types/arrayContainsObject.d.ts +2 -0
- package/types/canBeSerialized.d.ts +2 -0
- package/types/decode.d.ts +1 -0
- package/types/encode.d.ts +1 -0
- package/types/equals.d.ts +1 -0
- package/types/escape.d.ts +1 -0
- package/types/eslint.config.mjs +30 -0
- package/types/index.d.ts +66 -0
- package/types/isRevocableSession.d.ts +1 -0
- package/types/node.d.ts +3 -0
- package/types/parseDate.d.ts +1 -0
- package/types/promiseUtils.d.ts +9 -0
- package/types/react-native.d.ts +3 -0
- package/types/tests.ts +2256 -0
- package/types/tsconfig.json +25 -0
- package/types/unique.d.ts +1 -0
- package/types/unsavedChildren.d.ts +11 -0
- 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?.
|
|
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;
|
package/lib/weapp/Storage.js
CHANGED
|
@@ -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;
|
package/lib/weapp/TaskQueue.js
CHANGED
|
@@ -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;
|
package/lib/weapp/Xhr.weapp.js
CHANGED
package/lib/weapp/uuid.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parse",
|
|
3
|
-
"version": "6.1.0-alpha.
|
|
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.
|
|
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.
|
|
42
|
+
"@babel/core": "7.26.10",
|
|
41
43
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
42
|
-
"@babel/plugin-transform-runtime": "7.26.
|
|
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.
|
|
46
|
-
"@eslint/js": "9.
|
|
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.
|
|
66
|
+
"eslint": "9.23.0",
|
|
65
67
|
"eslint-plugin-expect-type": "0.6.2",
|
|
66
|
-
"eslint-plugin-jsdoc": "50.6.
|
|
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.
|
|
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.
|
|
91
|
+
"puppeteer": "24.4.0",
|
|
90
92
|
"regenerator-runtime": "0.14.1",
|
|
91
93
|
"semantic-release": "24.2.3",
|
|
92
|
-
"typescript-eslint": "8.
|
|
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.
|
|
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;
|
package/types/Cloud.d.ts
ADDED
|
@@ -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>;
|