parse 8.0.2 → 8.0.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/dist/parse.js +2 -130
- package/dist/parse.min.js +1 -1
- package/dist/parse.weapp.js +2 -130
- package/dist/parse.weapp.min.js +1 -1
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/Parse.js +11 -133
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/Parse.js +11 -133
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/Parse.js +1 -1
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/Parse.js +11 -133
- package/package.json +1 -1
- package/types/Parse.d.ts +34 -184
- package/types/node.d.ts +23 -0
- package/types/tests.ts +21 -0
package/dist/parse.js
CHANGED
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
SERVER_URL: "https://api.parse.com/1",
|
|
192
192
|
LIVEQUERY_SERVER_URL: null,
|
|
193
193
|
ENCRYPTED_KEY: null,
|
|
194
|
-
VERSION: "js8.0.
|
|
194
|
+
VERSION: "js8.0.3",
|
|
195
195
|
APPLICATION_ID: null,
|
|
196
196
|
JAVASCRIPT_KEY: null,
|
|
197
197
|
MAINTENANCE_KEY: null,
|
|
@@ -59004,24 +59004,12 @@ Attributes: ${JSON.stringify(this.attributes, null, 2)}`;
|
|
|
59004
59004
|
IndexedDB: void 0,
|
|
59005
59005
|
Hooks: void 0,
|
|
59006
59006
|
Parse: void 0,
|
|
59007
|
-
/**
|
|
59008
|
-
* @property {EventuallyQueue} Parse.EventuallyQueue
|
|
59009
|
-
* @static
|
|
59010
|
-
*/
|
|
59011
59007
|
set EventuallyQueue(queue2) {
|
|
59012
59008
|
CoreManager.setEventuallyQueue(queue2);
|
|
59013
59009
|
},
|
|
59014
59010
|
get EventuallyQueue() {
|
|
59015
59011
|
return CoreManager.getEventuallyQueue();
|
|
59016
59012
|
},
|
|
59017
|
-
/**
|
|
59018
|
-
* Call this method first to set up your authentication tokens for Parse.
|
|
59019
|
-
*
|
|
59020
|
-
* @param {string} applicationId Your Parse Application ID.
|
|
59021
|
-
* @param {string} [javaScriptKey] Your Parse JavaScript Key (Not needed for parse-server)
|
|
59022
|
-
* @param {string} [masterKey] Your Parse Master Key. (Node.js only!)
|
|
59023
|
-
* @static
|
|
59024
|
-
*/
|
|
59025
59013
|
initialize(applicationId, javaScriptKey) {
|
|
59026
59014
|
if (CoreManager.get("IS_NODE") && !define_process_env_default.SERVER_RENDERING) {
|
|
59027
59015
|
console.log(
|
|
@@ -59051,161 +59039,81 @@ Attributes: ${JSON.stringify(this.attributes, null, 2)}`;
|
|
|
59051
59039
|
);
|
|
59052
59040
|
}
|
|
59053
59041
|
},
|
|
59054
|
-
/**
|
|
59055
|
-
* Call this method to set your AsyncStorage engine
|
|
59056
|
-
* Starting Parse@1.11, the ParseSDK do not provide a React AsyncStorage as the ReactNative module
|
|
59057
|
-
* is not provided at a stable path and changes over versions.
|
|
59058
|
-
*
|
|
59059
|
-
* @param {AsyncStorage} storage a react native async storage.
|
|
59060
|
-
* @static
|
|
59061
|
-
*/
|
|
59062
59042
|
setAsyncStorage(storage) {
|
|
59063
59043
|
CoreManager.setAsyncStorage(storage);
|
|
59064
59044
|
},
|
|
59065
|
-
/**
|
|
59066
|
-
* Call this method to set your LocalDatastoreStorage engine
|
|
59067
|
-
* If using React-Native use {@link Parse.setAsyncStorage Parse.setAsyncStorage()}
|
|
59068
|
-
*
|
|
59069
|
-
* @param {LocalDatastoreController} controller a data storage.
|
|
59070
|
-
* @static
|
|
59071
|
-
*/
|
|
59072
59045
|
setLocalDatastoreController(controller) {
|
|
59073
59046
|
CoreManager.setLocalDatastoreController(controller);
|
|
59074
59047
|
},
|
|
59075
|
-
/**
|
|
59076
|
-
* Returns information regarding the current server's health
|
|
59077
|
-
*
|
|
59078
|
-
* @returns {Promise}
|
|
59079
|
-
* @static
|
|
59080
|
-
*/
|
|
59081
59048
|
getServerHealth() {
|
|
59082
59049
|
return CoreManager.getRESTController().request("GET", "health");
|
|
59083
59050
|
},
|
|
59084
|
-
/**
|
|
59085
|
-
* @property {string} Parse.applicationId
|
|
59086
|
-
* @static
|
|
59087
|
-
*/
|
|
59088
59051
|
set applicationId(value) {
|
|
59089
59052
|
CoreManager.set("APPLICATION_ID", value);
|
|
59090
59053
|
},
|
|
59091
59054
|
get applicationId() {
|
|
59092
59055
|
return CoreManager.get("APPLICATION_ID");
|
|
59093
59056
|
},
|
|
59094
|
-
/**
|
|
59095
|
-
* @property {string} Parse.javaScriptKey
|
|
59096
|
-
* @static
|
|
59097
|
-
*/
|
|
59098
59057
|
set javaScriptKey(value) {
|
|
59099
59058
|
CoreManager.set("JAVASCRIPT_KEY", value);
|
|
59100
59059
|
},
|
|
59101
59060
|
get javaScriptKey() {
|
|
59102
59061
|
return CoreManager.get("JAVASCRIPT_KEY");
|
|
59103
59062
|
},
|
|
59104
|
-
/**
|
|
59105
|
-
* @property {string} Parse.masterKey
|
|
59106
|
-
* @static
|
|
59107
|
-
*/
|
|
59108
59063
|
set masterKey(value) {
|
|
59109
59064
|
CoreManager.set("MASTER_KEY", value);
|
|
59110
59065
|
},
|
|
59111
59066
|
get masterKey() {
|
|
59112
59067
|
return CoreManager.get("MASTER_KEY");
|
|
59113
59068
|
},
|
|
59114
|
-
/**
|
|
59115
|
-
* @property {string} Parse.maintenanceKey
|
|
59116
|
-
* @static
|
|
59117
|
-
*/
|
|
59118
59069
|
set maintenanceKey(value) {
|
|
59119
59070
|
CoreManager.set("MAINTENANCE_KEY", value);
|
|
59120
59071
|
},
|
|
59121
59072
|
get maintenanceKey() {
|
|
59122
59073
|
return CoreManager.get("MAINTENANCE_KEY");
|
|
59123
59074
|
},
|
|
59124
|
-
/**
|
|
59125
|
-
* @property {string} Parse.serverURL
|
|
59126
|
-
* @static
|
|
59127
|
-
*/
|
|
59128
59075
|
set serverURL(value) {
|
|
59129
59076
|
CoreManager.set("SERVER_URL", value);
|
|
59130
59077
|
},
|
|
59131
59078
|
get serverURL() {
|
|
59132
59079
|
return CoreManager.get("SERVER_URL");
|
|
59133
59080
|
},
|
|
59134
|
-
/**
|
|
59135
|
-
* @property {ParseLiveQuery} Parse.LiveQuery
|
|
59136
|
-
* @static
|
|
59137
|
-
*/
|
|
59138
59081
|
set LiveQuery(liveQuery) {
|
|
59139
59082
|
CoreManager.setLiveQuery(liveQuery);
|
|
59140
59083
|
},
|
|
59141
59084
|
get LiveQuery() {
|
|
59142
59085
|
return CoreManager.getLiveQuery();
|
|
59143
59086
|
},
|
|
59144
|
-
/**
|
|
59145
|
-
* @property {string} Parse.liveQueryServerURL
|
|
59146
|
-
* @static
|
|
59147
|
-
*/
|
|
59148
59087
|
set liveQueryServerURL(value) {
|
|
59149
59088
|
CoreManager.set("LIVEQUERY_SERVER_URL", value);
|
|
59150
59089
|
},
|
|
59151
59090
|
get liveQueryServerURL() {
|
|
59152
59091
|
return CoreManager.get("LIVEQUERY_SERVER_URL");
|
|
59153
59092
|
},
|
|
59154
|
-
/**
|
|
59155
|
-
* @property {boolean} Parse.encryptedUser
|
|
59156
|
-
* @static
|
|
59157
|
-
*/
|
|
59158
59093
|
set encryptedUser(value) {
|
|
59159
59094
|
CoreManager.set("ENCRYPTED_USER", value);
|
|
59160
59095
|
},
|
|
59161
59096
|
get encryptedUser() {
|
|
59162
59097
|
return CoreManager.get("ENCRYPTED_USER");
|
|
59163
59098
|
},
|
|
59164
|
-
/**
|
|
59165
|
-
* @property {string} Parse.secret
|
|
59166
|
-
* @static
|
|
59167
|
-
*/
|
|
59168
59099
|
set secret(value) {
|
|
59169
59100
|
CoreManager.set("ENCRYPTED_KEY", value);
|
|
59170
59101
|
},
|
|
59171
59102
|
get secret() {
|
|
59172
59103
|
return CoreManager.get("ENCRYPTED_KEY");
|
|
59173
59104
|
},
|
|
59174
|
-
/**
|
|
59175
|
-
* @property {boolean} Parse.idempotency
|
|
59176
|
-
* @static
|
|
59177
|
-
*/
|
|
59178
59105
|
set idempotency(value) {
|
|
59179
59106
|
CoreManager.set("IDEMPOTENCY", value);
|
|
59180
59107
|
},
|
|
59181
59108
|
get idempotency() {
|
|
59182
59109
|
return CoreManager.get("IDEMPOTENCY");
|
|
59183
59110
|
},
|
|
59184
|
-
/**
|
|
59185
|
-
* @property {boolean} Parse.allowCustomObjectId
|
|
59186
|
-
* @static
|
|
59187
|
-
*/
|
|
59188
59111
|
set allowCustomObjectId(value) {
|
|
59189
59112
|
CoreManager.set("ALLOW_CUSTOM_OBJECT_ID", value);
|
|
59190
59113
|
},
|
|
59191
59114
|
get allowCustomObjectId() {
|
|
59192
59115
|
return CoreManager.get("ALLOW_CUSTOM_OBJECT_ID");
|
|
59193
59116
|
},
|
|
59194
|
-
/**
|
|
59195
|
-
* Setting this property to `true` enables enhanced logging for `Parse.Object`
|
|
59196
|
-
* in Node.js environments. Specifically, it will log:
|
|
59197
|
-
*
|
|
59198
|
-
* ```
|
|
59199
|
-
* ParseObject: className: <CLASS_NAME>, id: <OBJECT_ID>
|
|
59200
|
-
* Attributes: <OBJECT_ATTRIBUTES>
|
|
59201
|
-
* ```
|
|
59202
|
-
*
|
|
59203
|
-
* @warning This should not be enabled in production environments as this may
|
|
59204
|
-
* expose sensitive information in server logs.
|
|
59205
|
-
*
|
|
59206
|
-
* @property {boolean} Parse.nodeLogging
|
|
59207
|
-
* @static
|
|
59208
|
-
*/
|
|
59209
59117
|
set nodeLogging(value) {
|
|
59210
59118
|
CoreManager.set("NODE_LOGGING", value);
|
|
59211
59119
|
},
|
|
@@ -59228,17 +59136,9 @@ Attributes: ${JSON.stringify(this.attributes, null, 2)}`;
|
|
|
59228
59136
|
_getInstallationId() {
|
|
59229
59137
|
return CoreManager.getInstallationController().currentInstallationId();
|
|
59230
59138
|
},
|
|
59231
|
-
/**
|
|
59232
|
-
* Enable pinning in your application.
|
|
59233
|
-
* This must be called after `Parse.initialize` in your application.
|
|
59234
|
-
*
|
|
59235
|
-
* @param [polling] Allow pinging the server /health endpoint. Default true
|
|
59236
|
-
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
59237
|
-
* @static
|
|
59238
|
-
*/
|
|
59239
59139
|
enableLocalDatastore(polling2, ms) {
|
|
59240
59140
|
if (!this.applicationId) {
|
|
59241
|
-
console.log("'
|
|
59141
|
+
console.log("'enableLocalDatastore' must be called after 'initialize'");
|
|
59242
59142
|
return;
|
|
59243
59143
|
}
|
|
59244
59144
|
if (!this.LocalDatastore.isEnabled) {
|
|
@@ -59248,25 +59148,9 @@ Attributes: ${JSON.stringify(this.attributes, null, 2)}`;
|
|
|
59248
59148
|
}
|
|
59249
59149
|
}
|
|
59250
59150
|
},
|
|
59251
|
-
/**
|
|
59252
|
-
* Flag that indicates whether Local Datastore is enabled.
|
|
59253
|
-
*
|
|
59254
|
-
* @static
|
|
59255
|
-
* @returns {boolean}
|
|
59256
|
-
*/
|
|
59257
59151
|
isLocalDatastoreEnabled() {
|
|
59258
59152
|
return this.LocalDatastore.isEnabled;
|
|
59259
59153
|
},
|
|
59260
|
-
/**
|
|
59261
|
-
* Gets all contents from Local Datastore
|
|
59262
|
-
*
|
|
59263
|
-
* <pre>
|
|
59264
|
-
* await Parse.dumpLocalDatastore();
|
|
59265
|
-
* </pre>
|
|
59266
|
-
*
|
|
59267
|
-
* @static
|
|
59268
|
-
* @returns {object}
|
|
59269
|
-
*/
|
|
59270
59154
|
dumpLocalDatastore() {
|
|
59271
59155
|
if (!this.LocalDatastore.isEnabled) {
|
|
59272
59156
|
console.log("Parse.enableLocalDatastore() must be called first");
|
|
@@ -59275,21 +59159,9 @@ Attributes: ${JSON.stringify(this.attributes, null, 2)}`;
|
|
|
59275
59159
|
return Parse.LocalDatastore._getAllContents();
|
|
59276
59160
|
}
|
|
59277
59161
|
},
|
|
59278
|
-
/**
|
|
59279
|
-
* Enable the current user encryption.
|
|
59280
|
-
* This must be called before login any user.
|
|
59281
|
-
*
|
|
59282
|
-
* @static
|
|
59283
|
-
*/
|
|
59284
59162
|
enableEncryptedUser() {
|
|
59285
59163
|
this.encryptedUser = true;
|
|
59286
59164
|
},
|
|
59287
|
-
/**
|
|
59288
|
-
* Flag that indicates whether Encrypted User is enabled.
|
|
59289
|
-
*
|
|
59290
|
-
* @static
|
|
59291
|
-
* @returns {boolean}
|
|
59292
|
-
*/
|
|
59293
59165
|
isEncryptedUserEnabled() {
|
|
59294
59166
|
return this.encryptedUser;
|
|
59295
59167
|
}
|