parse 6.1.0-alpha.2 → 6.1.0-alpha.3
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 +27 -47
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +27 -47
- 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/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 +0 -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/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 +0 -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/OfflineQuery.js +0 -1
- package/lib/react-native/ParseInstallation.js +0 -1
- 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/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 +0 -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 +11 -9
- package/types/Analytics.d.ts +42 -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 +325 -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 +28 -0
- package/types/OfflineQuery.d.ts +20 -0
- package/types/Parse.d.ts +633 -0
- package/types/ParseACL.d.ts +141 -0
- package/types/ParseCLP.d.ts +293 -0
- package/types/ParseConfig.d.ts +77 -0
- package/types/ParseError.d.ts +476 -0
- package/types/ParseFile.d.ts +192 -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 +1072 -0
- package/types/ParseOp.d.ts +78 -0
- package/types/ParsePolygon.d.ts +69 -0
- package/types/ParseQuery.d.ts +961 -0
- package/types/ParseRelation.d.ts +56 -0
- package/types/ParseRole.d.ts +79 -0
- package/types/ParseSchema.d.ts +286 -0
- package/types/ParseSession.d.ts +45 -0
- package/types/ParseUser.d.ts +517 -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/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,5 +9,4 @@ var _StorageController3 = _interopRequireDefault(require("./StorageController.we
|
|
|
9
9
|
var _StorageController4 = _interopRequireDefault(require("./StorageController.default"));
|
|
10
10
|
var StorageController = _StorageController4.default;
|
|
11
11
|
StorageController = _StorageController.default;
|
|
12
|
-
module.exports = StorageController;
|
|
13
12
|
var _default = exports.default = StorageController;
|
package/lib/react-native/uuid.js
CHANGED
package/lib/weapp/CoreManager.js
CHANGED
|
@@ -19,7 +19,7 @@ const config = {
|
|
|
19
19
|
SERVER_AUTH_TOKEN: null,
|
|
20
20
|
LIVEQUERY_SERVER_URL: null,
|
|
21
21
|
ENCRYPTED_KEY: null,
|
|
22
|
-
VERSION: 'js' + "6.1.0-alpha.
|
|
22
|
+
VERSION: 'js' + "6.1.0-alpha.3",
|
|
23
23
|
APPLICATION_ID: null,
|
|
24
24
|
JAVASCRIPT_KEY: null,
|
|
25
25
|
MAINTENANCE_KEY: null,
|
|
@@ -255,5 +255,4 @@ const CoreManager = {
|
|
|
255
255
|
return config['ParseUser'];
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
module.exports = CoreManager;
|
|
259
258
|
var _default = exports.default = CoreManager;
|
|
@@ -380,7 +380,6 @@ const LocalDatastore = {
|
|
|
380
380
|
return this.isEnabled;
|
|
381
381
|
}
|
|
382
382
|
};
|
|
383
|
-
module.exports = LocalDatastore;
|
|
384
383
|
var _default = exports.default = LocalDatastore;
|
|
385
384
|
_CoreManager.default.setLocalDatastoreController(_LocalDatastoreController.default);
|
|
386
385
|
_CoreManager.default.setLocalDatastore(LocalDatastore);
|
|
@@ -9,5 +9,4 @@ exports.default = void 0;
|
|
|
9
9
|
var _LocalDatastoreController = _interopRequireDefault(require("./LocalDatastoreController.react-native"));
|
|
10
10
|
var _LocalDatastoreController2 = _interopRequireDefault(require("./LocalDatastoreController.default"));
|
|
11
11
|
let LocalDatastoreController = _LocalDatastoreController2.default;
|
|
12
|
-
module.exports = LocalDatastoreController;
|
|
13
12
|
var _default = exports.default = LocalDatastoreController;
|
|
@@ -83,5 +83,4 @@ const LocalDatastoreController = {
|
|
|
83
83
|
await _StorageController.default.multiRemove(batch).catch(error => console.error('Error clearing local datastore: ', error));
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
module.exports = LocalDatastoreController;
|
|
87
86
|
var _default = exports.default = LocalDatastoreController;
|
package/lib/weapp/ParseQuery.js
CHANGED
|
@@ -20,6 +20,7 @@ var _sort = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stabl
|
|
|
20
20
|
var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/splice"));
|
|
21
21
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
22
22
|
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
23
|
+
var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
|
|
23
24
|
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
24
25
|
var _entries = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/entries"));
|
|
25
26
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
@@ -598,11 +599,12 @@ class ParseQuery {
|
|
|
598
599
|
return this._handleOfflineQuery(this.toJSON());
|
|
599
600
|
}
|
|
600
601
|
return (0, _find.default)(controller).call(controller, this.className, this.toJSON(), findOptions).then(response => {
|
|
602
|
+
var _context4, _context5;
|
|
601
603
|
// Return generic object when explain is used
|
|
602
604
|
if (this._explain) {
|
|
603
605
|
return response.results;
|
|
604
606
|
}
|
|
605
|
-
const results = response.results?.
|
|
607
|
+
const results = ((_context4 = response.results) == null ? void 0 : (0, _bind.default)(_context5 = Function.call).call(_context5, (0, _map.default)(_context4), _context4))?.(data => {
|
|
606
608
|
// In cases of relations, the server may send back a className
|
|
607
609
|
// on the top level of the payload
|
|
608
610
|
const override = response.className || this.className;
|
|
@@ -1050,8 +1052,8 @@ class ParseQuery {
|
|
|
1050
1052
|
*/
|
|
1051
1053
|
equalTo(key, value) {
|
|
1052
1054
|
if (key && typeof key === 'object') {
|
|
1053
|
-
var
|
|
1054
|
-
(0, _forEach.default)(
|
|
1055
|
+
var _context6;
|
|
1056
|
+
(0, _forEach.default)(_context6 = (0, _entries.default)(key)).call(_context6, _ref => {
|
|
1055
1057
|
let [k, val] = _ref;
|
|
1056
1058
|
return this.equalTo(k, val);
|
|
1057
1059
|
});
|
|
@@ -1074,8 +1076,8 @@ class ParseQuery {
|
|
|
1074
1076
|
*/
|
|
1075
1077
|
notEqualTo(key, value) {
|
|
1076
1078
|
if (key && typeof key === 'object') {
|
|
1077
|
-
var
|
|
1078
|
-
(0, _forEach.default)(
|
|
1079
|
+
var _context7;
|
|
1080
|
+
(0, _forEach.default)(_context7 = (0, _entries.default)(key)).call(_context7, _ref2 => {
|
|
1079
1081
|
let [k, val] = _ref2;
|
|
1080
1082
|
return this.notEqualTo(k, val);
|
|
1081
1083
|
});
|
|
@@ -1602,11 +1604,11 @@ class ParseQuery {
|
|
|
1602
1604
|
keys[_key2] = arguments[_key2];
|
|
1603
1605
|
}
|
|
1604
1606
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
1605
|
-
var
|
|
1607
|
+
var _context8;
|
|
1606
1608
|
if ((0, _isArray.default)(key)) {
|
|
1607
1609
|
key = key.join();
|
|
1608
1610
|
}
|
|
1609
|
-
this._order = (0, _concat.default)(
|
|
1611
|
+
this._order = (0, _concat.default)(_context8 = this._order).call(_context8, key.replace(/\s/g, '').split(','));
|
|
1610
1612
|
});
|
|
1611
1613
|
return this;
|
|
1612
1614
|
}
|
|
@@ -1642,11 +1644,11 @@ class ParseQuery {
|
|
|
1642
1644
|
keys[_key4] = arguments[_key4];
|
|
1643
1645
|
}
|
|
1644
1646
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
1645
|
-
var
|
|
1647
|
+
var _context9, _context10;
|
|
1646
1648
|
if ((0, _isArray.default)(key)) {
|
|
1647
1649
|
key = key.join();
|
|
1648
1650
|
}
|
|
1649
|
-
this._order = (0, _concat.default)(
|
|
1651
|
+
this._order = (0, _concat.default)(_context9 = this._order).call(_context9, (0, _map.default)(_context10 = key.replace(/\s/g, '').split(',')).call(_context10, k => {
|
|
1650
1652
|
return '-' + k;
|
|
1651
1653
|
}));
|
|
1652
1654
|
});
|
|
@@ -1719,8 +1721,8 @@ class ParseQuery {
|
|
|
1719
1721
|
}
|
|
1720
1722
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
1721
1723
|
if ((0, _isArray.default)(key)) {
|
|
1722
|
-
var
|
|
1723
|
-
this._include = (0, _concat.default)(
|
|
1724
|
+
var _context11;
|
|
1725
|
+
this._include = (0, _concat.default)(_context11 = this._include).call(_context11, key);
|
|
1724
1726
|
} else {
|
|
1725
1727
|
this._include.push(key);
|
|
1726
1728
|
}
|
|
@@ -1756,8 +1758,8 @@ class ParseQuery {
|
|
|
1756
1758
|
}
|
|
1757
1759
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
1758
1760
|
if ((0, _isArray.default)(key)) {
|
|
1759
|
-
var
|
|
1760
|
-
this._select = (0, _concat.default)(
|
|
1761
|
+
var _context12;
|
|
1762
|
+
this._select = (0, _concat.default)(_context12 = this._select).call(_context12, key);
|
|
1761
1763
|
} else {
|
|
1762
1764
|
this._select.push(key);
|
|
1763
1765
|
}
|
|
@@ -1780,8 +1782,8 @@ class ParseQuery {
|
|
|
1780
1782
|
}
|
|
1781
1783
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
1782
1784
|
if ((0, _isArray.default)(key)) {
|
|
1783
|
-
var
|
|
1784
|
-
this._exclude = (0, _concat.default)(
|
|
1785
|
+
var _context13;
|
|
1786
|
+
this._exclude = (0, _concat.default)(_context13 = this._exclude).call(_context13, key);
|
|
1785
1787
|
} else {
|
|
1786
1788
|
this._exclude.push(key);
|
|
1787
1789
|
}
|
|
@@ -1803,8 +1805,8 @@ class ParseQuery {
|
|
|
1803
1805
|
}
|
|
1804
1806
|
(0, _forEach.default)(keys).call(keys, key => {
|
|
1805
1807
|
if ((0, _isArray.default)(key)) {
|
|
1806
|
-
var
|
|
1807
|
-
this._watch = (0, _concat.default)(
|
|
1808
|
+
var _context14;
|
|
1809
|
+
this._watch = (0, _concat.default)(_context14 = this._watch).call(_context14, key);
|
|
1808
1810
|
} else {
|
|
1809
1811
|
this._watch.push(key);
|
|
1810
1812
|
}
|
|
@@ -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
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.3",
|
|
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.
|
|
34
|
+
"@babel/runtime-corejs3": "7.26.10",
|
|
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
47
|
"@babel/preset-typescript": "7.26.0",
|
|
46
|
-
"@eslint/js": "9.
|
|
48
|
+
"@eslint/js": "9.22.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.22.0",
|
|
65
67
|
"eslint-plugin-expect-type": "0.6.2",
|
|
66
|
-
"eslint-plugin-jsdoc": "50.6.
|
|
68
|
+
"eslint-plugin-jsdoc": "50.6.6",
|
|
67
69
|
"express": "4.21.2",
|
|
68
70
|
"gulp": "5.0.0",
|
|
69
71
|
"gulp-babel": "8.0.0",
|
|
@@ -80,13 +82,13 @@
|
|
|
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
94
|
"typescript-eslint": "8.26.0",
|
|
@@ -0,0 +1,42 @@
|
|
|
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: {
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
}): 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>;
|