parse 8.0.2-alpha.2 → 8.0.3-alpha.1

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.
@@ -17,7 +17,7 @@ const config = {
17
17
  SERVER_URL: 'https://api.parse.com/1',
18
18
  LIVEQUERY_SERVER_URL: null,
19
19
  ENCRYPTED_KEY: null,
20
- VERSION: 'js' + "8.0.2-alpha.2",
20
+ VERSION: 'js' + "8.0.3-alpha.1",
21
21
  APPLICATION_ID: null,
22
22
  JAVASCRIPT_KEY: null,
23
23
  MAINTENANCE_KEY: null,
@@ -9,8 +9,8 @@ _Object$defineProperty(exports, "__esModule", {
9
9
  });
10
10
  exports.default = void 0;
11
11
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
12
- var _decode = _interopRequireDefault(require("./decode"));
13
- var _encode = _interopRequireDefault(require("./encode"));
12
+ var _decode2 = _interopRequireDefault(require("./decode"));
13
+ var _encode2 = _interopRequireDefault(require("./encode"));
14
14
  var _CryptoController = _interopRequireDefault(require("./CryptoController"));
15
15
  var _EventuallyQueue = _interopRequireDefault(require("./EventuallyQueue"));
16
16
  var _IndexedDBStorageController = _interopRequireDefault(require("./IndexedDBStorageController"));
@@ -67,6 +67,12 @@ function _interopRequireWildcard(e, t) {
67
67
  return f;
68
68
  })(e, t);
69
69
  }
70
+ /**
71
+ * The interface for the Parse SDK.
72
+ * This interface can be augmented in build-specific type definitions (e.g., node.d.ts)
73
+ * to provide environment-specific type signatures.
74
+ */
75
+
70
76
  const Parse = {
71
77
  ACL: _ParseACL.default,
72
78
  Analytics,
@@ -104,24 +110,12 @@ const Parse = {
104
110
  IndexedDB: undefined,
105
111
  Hooks: undefined,
106
112
  Parse: undefined,
107
- /**
108
- * @property {EventuallyQueue} Parse.EventuallyQueue
109
- * @static
110
- */
111
113
  set EventuallyQueue(queue) {
112
114
  _CoreManager.default.setEventuallyQueue(queue);
113
115
  },
114
116
  get EventuallyQueue() {
115
117
  return _CoreManager.default.getEventuallyQueue();
116
118
  },
117
- /**
118
- * Call this method first to set up your authentication tokens for Parse.
119
- *
120
- * @param {string} applicationId Your Parse Application ID.
121
- * @param {string} [javaScriptKey] Your Parse JavaScript Key (Not needed for parse-server)
122
- * @param {string} [masterKey] Your Parse Master Key. (Node.js only!)
123
- * @static
124
- */
125
119
  initialize(applicationId, javaScriptKey) {
126
120
  if ("browser" === 'browser' && _CoreManager.default.get('IS_NODE') && !process.env.SERVER_RENDERING) {
127
121
  console.log("It looks like you're using the browser version of the SDK in a " + "node.js environment. You should require('parse/node') instead.");
@@ -144,161 +138,81 @@ const Parse = {
144
138
  _CoreManager.default.setIfNeeded('WebSocketController', _WebSocketController.default);
145
139
  Parse.IndexedDB = _CoreManager.default.setIfNeeded('IndexedDBStorageController', _IndexedDBStorageController.default);
146
140
  },
147
- /**
148
- * Call this method to set your AsyncStorage engine
149
- * Starting Parse@1.11, the ParseSDK do not provide a React AsyncStorage as the ReactNative module
150
- * is not provided at a stable path and changes over versions.
151
- *
152
- * @param {AsyncStorage} storage a react native async storage.
153
- * @static
154
- */
155
141
  setAsyncStorage(storage) {
156
142
  _CoreManager.default.setAsyncStorage(storage);
157
143
  },
158
- /**
159
- * Call this method to set your LocalDatastoreStorage engine
160
- * If using React-Native use {@link Parse.setAsyncStorage Parse.setAsyncStorage()}
161
- *
162
- * @param {LocalDatastoreController} controller a data storage.
163
- * @static
164
- */
165
144
  setLocalDatastoreController(controller) {
166
145
  _CoreManager.default.setLocalDatastoreController(controller);
167
146
  },
168
- /**
169
- * Returns information regarding the current server's health
170
- *
171
- * @returns {Promise}
172
- * @static
173
- */
174
147
  getServerHealth() {
175
148
  return _CoreManager.default.getRESTController().request('GET', 'health');
176
149
  },
177
- /**
178
- * @property {string} Parse.applicationId
179
- * @static
180
- */
181
150
  set applicationId(value) {
182
151
  _CoreManager.default.set('APPLICATION_ID', value);
183
152
  },
184
153
  get applicationId() {
185
154
  return _CoreManager.default.get('APPLICATION_ID');
186
155
  },
187
- /**
188
- * @property {string} Parse.javaScriptKey
189
- * @static
190
- */
191
156
  set javaScriptKey(value) {
192
157
  _CoreManager.default.set('JAVASCRIPT_KEY', value);
193
158
  },
194
159
  get javaScriptKey() {
195
160
  return _CoreManager.default.get('JAVASCRIPT_KEY');
196
161
  },
197
- /**
198
- * @property {string} Parse.masterKey
199
- * @static
200
- */
201
162
  set masterKey(value) {
202
163
  _CoreManager.default.set('MASTER_KEY', value);
203
164
  },
204
165
  get masterKey() {
205
166
  return _CoreManager.default.get('MASTER_KEY');
206
167
  },
207
- /**
208
- * @property {string} Parse.maintenanceKey
209
- * @static
210
- */
211
168
  set maintenanceKey(value) {
212
169
  _CoreManager.default.set('MAINTENANCE_KEY', value);
213
170
  },
214
171
  get maintenanceKey() {
215
172
  return _CoreManager.default.get('MAINTENANCE_KEY');
216
173
  },
217
- /**
218
- * @property {string} Parse.serverURL
219
- * @static
220
- */
221
174
  set serverURL(value) {
222
175
  _CoreManager.default.set('SERVER_URL', value);
223
176
  },
224
177
  get serverURL() {
225
178
  return _CoreManager.default.get('SERVER_URL');
226
179
  },
227
- /**
228
- * @property {ParseLiveQuery} Parse.LiveQuery
229
- * @static
230
- */
231
180
  set LiveQuery(liveQuery) {
232
181
  _CoreManager.default.setLiveQuery(liveQuery);
233
182
  },
234
183
  get LiveQuery() {
235
184
  return _CoreManager.default.getLiveQuery();
236
185
  },
237
- /**
238
- * @property {string} Parse.liveQueryServerURL
239
- * @static
240
- */
241
186
  set liveQueryServerURL(value) {
242
187
  _CoreManager.default.set('LIVEQUERY_SERVER_URL', value);
243
188
  },
244
189
  get liveQueryServerURL() {
245
190
  return _CoreManager.default.get('LIVEQUERY_SERVER_URL');
246
191
  },
247
- /**
248
- * @property {boolean} Parse.encryptedUser
249
- * @static
250
- */
251
192
  set encryptedUser(value) {
252
193
  _CoreManager.default.set('ENCRYPTED_USER', value);
253
194
  },
254
195
  get encryptedUser() {
255
196
  return _CoreManager.default.get('ENCRYPTED_USER');
256
197
  },
257
- /**
258
- * @property {string} Parse.secret
259
- * @static
260
- */
261
198
  set secret(value) {
262
199
  _CoreManager.default.set('ENCRYPTED_KEY', value);
263
200
  },
264
201
  get secret() {
265
202
  return _CoreManager.default.get('ENCRYPTED_KEY');
266
203
  },
267
- /**
268
- * @property {boolean} Parse.idempotency
269
- * @static
270
- */
271
204
  set idempotency(value) {
272
205
  _CoreManager.default.set('IDEMPOTENCY', value);
273
206
  },
274
207
  get idempotency() {
275
208
  return _CoreManager.default.get('IDEMPOTENCY');
276
209
  },
277
- /**
278
- * @property {boolean} Parse.allowCustomObjectId
279
- * @static
280
- */
281
210
  set allowCustomObjectId(value) {
282
211
  _CoreManager.default.set('ALLOW_CUSTOM_OBJECT_ID', value);
283
212
  },
284
213
  get allowCustomObjectId() {
285
214
  return _CoreManager.default.get('ALLOW_CUSTOM_OBJECT_ID');
286
215
  },
287
- /**
288
- * Setting this property to `true` enables enhanced logging for `Parse.Object`
289
- * in Node.js environments. Specifically, it will log:
290
- *
291
- * ```
292
- * ParseObject: className: <CLASS_NAME>, id: <OBJECT_ID>
293
- * Attributes: <OBJECT_ATTRIBUTES>
294
- * ```
295
- *
296
- * @warning This should not be enabled in production environments as this may
297
- * expose sensitive information in server logs.
298
- *
299
- * @property {boolean} Parse.nodeLogging
300
- * @static
301
- */
302
216
  set nodeLogging(value) {
303
217
  _CoreManager.default.set('NODE_LOGGING', value);
304
218
  },
@@ -319,25 +233,17 @@ const Parse = {
319
233
  },
320
234
  // We attempt to match the signatures of the legacy versions of these methods
321
235
  _decode(_, value) {
322
- return (0, _decode.default)(value);
236
+ return (0, _decode2.default)(value);
323
237
  },
324
238
  _encode(value, _, disallowObjects) {
325
- return (0, _encode.default)(value, disallowObjects);
239
+ return (0, _encode2.default)(value, disallowObjects);
326
240
  },
327
241
  _getInstallationId() {
328
242
  return _CoreManager.default.getInstallationController().currentInstallationId();
329
243
  },
330
- /**
331
- * Enable pinning in your application.
332
- * This must be called after `Parse.initialize` in your application.
333
- *
334
- * @param [polling] Allow pinging the server /health endpoint. Default true
335
- * @param [ms] Milliseconds to ping the server. Default 2000ms
336
- * @static
337
- */
338
244
  enableLocalDatastore(polling, ms) {
339
245
  if (!this.applicationId) {
340
- console.log("'enableLocalDataStore' must be called after 'initialize'");
246
+ console.log("'enableLocalDatastore' must be called after 'initialize'");
341
247
  return;
342
248
  }
343
249
  if (!this.LocalDatastore.isEnabled) {
@@ -347,25 +253,9 @@ const Parse = {
347
253
  }
348
254
  }
349
255
  },
350
- /**
351
- * Flag that indicates whether Local Datastore is enabled.
352
- *
353
- * @static
354
- * @returns {boolean}
355
- */
356
256
  isLocalDatastoreEnabled() {
357
257
  return this.LocalDatastore.isEnabled;
358
258
  },
359
- /**
360
- * Gets all contents from Local Datastore
361
- *
362
- * <pre>
363
- * await Parse.dumpLocalDatastore();
364
- * </pre>
365
- *
366
- * @static
367
- * @returns {object}
368
- */
369
259
  dumpLocalDatastore() {
370
260
  if (!this.LocalDatastore.isEnabled) {
371
261
  console.log('Parse.enableLocalDatastore() must be called first');
@@ -374,21 +264,9 @@ const Parse = {
374
264
  return Parse.LocalDatastore._getAllContents();
375
265
  }
376
266
  },
377
- /**
378
- * Enable the current user encryption.
379
- * This must be called before login any user.
380
- *
381
- * @static
382
- */
383
267
  enableEncryptedUser() {
384
268
  this.encryptedUser = true;
385
269
  },
386
- /**
387
- * Flag that indicates whether Encrypted User is enabled.
388
- *
389
- * @static
390
- * @returns {boolean}
391
- */
392
270
  isEncryptedUserEnabled() {
393
271
  return this.encryptedUser;
394
272
  }
@@ -14,7 +14,7 @@ const config = {
14
14
  SERVER_URL: 'https://api.parse.com/1',
15
15
  LIVEQUERY_SERVER_URL: null,
16
16
  ENCRYPTED_KEY: null,
17
- VERSION: 'js' + "8.0.2-alpha.2",
17
+ VERSION: 'js' + "8.0.3-alpha.1",
18
18
  APPLICATION_ID: null,
19
19
  JAVASCRIPT_KEY: null,
20
20
  MAINTENANCE_KEY: null,
package/lib/node/Parse.js CHANGED
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _decode = _interopRequireDefault(require("./decode"));
8
- var _encode = _interopRequireDefault(require("./encode"));
7
+ var _decode2 = _interopRequireDefault(require("./decode"));
8
+ var _encode2 = _interopRequireDefault(require("./encode"));
9
9
  var _CryptoController = _interopRequireDefault(require("./CryptoController"));
10
10
  var _EventuallyQueue = _interopRequireDefault(require("./EventuallyQueue"));
11
11
  var _IndexedDBStorageController = _interopRequireDefault(require("./IndexedDBStorageController"));
@@ -67,6 +67,12 @@ function _interopRequireDefault(e) {
67
67
  default: e
68
68
  };
69
69
  }
70
+ /**
71
+ * The interface for the Parse SDK.
72
+ * This interface can be augmented in build-specific type definitions (e.g., node.d.ts)
73
+ * to provide environment-specific type signatures.
74
+ */
75
+
70
76
  const Parse = {
71
77
  ACL: _ParseACL.default,
72
78
  Analytics,
@@ -104,24 +110,12 @@ const Parse = {
104
110
  IndexedDB: undefined,
105
111
  Hooks: undefined,
106
112
  Parse: undefined,
107
- /**
108
- * @property {EventuallyQueue} Parse.EventuallyQueue
109
- * @static
110
- */
111
113
  set EventuallyQueue(queue) {
112
114
  _CoreManager.default.setEventuallyQueue(queue);
113
115
  },
114
116
  get EventuallyQueue() {
115
117
  return _CoreManager.default.getEventuallyQueue();
116
118
  },
117
- /**
118
- * Call this method first to set up your authentication tokens for Parse.
119
- *
120
- * @param {string} applicationId Your Parse Application ID.
121
- * @param {string} [javaScriptKey] Your Parse JavaScript Key (Not needed for parse-server)
122
- * @param {string} [masterKey] Your Parse Master Key. (Node.js only!)
123
- * @static
124
- */
125
119
  initialize(applicationId, javaScriptKey) {
126
120
  Parse._initialize(applicationId, javaScriptKey);
127
121
  },
@@ -140,161 +134,81 @@ const Parse = {
140
134
  _CoreManager.default.setIfNeeded('StorageController', _StorageController.default);
141
135
  _CoreManager.default.setIfNeeded('WebSocketController', _WebSocketController.default);
142
136
  },
143
- /**
144
- * Call this method to set your AsyncStorage engine
145
- * Starting Parse@1.11, the ParseSDK do not provide a React AsyncStorage as the ReactNative module
146
- * is not provided at a stable path and changes over versions.
147
- *
148
- * @param {AsyncStorage} storage a react native async storage.
149
- * @static
150
- */
151
137
  setAsyncStorage(storage) {
152
138
  _CoreManager.default.setAsyncStorage(storage);
153
139
  },
154
- /**
155
- * Call this method to set your LocalDatastoreStorage engine
156
- * If using React-Native use {@link Parse.setAsyncStorage Parse.setAsyncStorage()}
157
- *
158
- * @param {LocalDatastoreController} controller a data storage.
159
- * @static
160
- */
161
140
  setLocalDatastoreController(controller) {
162
141
  _CoreManager.default.setLocalDatastoreController(controller);
163
142
  },
164
- /**
165
- * Returns information regarding the current server's health
166
- *
167
- * @returns {Promise}
168
- * @static
169
- */
170
143
  getServerHealth() {
171
144
  return _CoreManager.default.getRESTController().request('GET', 'health');
172
145
  },
173
- /**
174
- * @property {string} Parse.applicationId
175
- * @static
176
- */
177
146
  set applicationId(value) {
178
147
  _CoreManager.default.set('APPLICATION_ID', value);
179
148
  },
180
149
  get applicationId() {
181
150
  return _CoreManager.default.get('APPLICATION_ID');
182
151
  },
183
- /**
184
- * @property {string} Parse.javaScriptKey
185
- * @static
186
- */
187
152
  set javaScriptKey(value) {
188
153
  _CoreManager.default.set('JAVASCRIPT_KEY', value);
189
154
  },
190
155
  get javaScriptKey() {
191
156
  return _CoreManager.default.get('JAVASCRIPT_KEY');
192
157
  },
193
- /**
194
- * @property {string} Parse.masterKey
195
- * @static
196
- */
197
158
  set masterKey(value) {
198
159
  _CoreManager.default.set('MASTER_KEY', value);
199
160
  },
200
161
  get masterKey() {
201
162
  return _CoreManager.default.get('MASTER_KEY');
202
163
  },
203
- /**
204
- * @property {string} Parse.maintenanceKey
205
- * @static
206
- */
207
164
  set maintenanceKey(value) {
208
165
  _CoreManager.default.set('MAINTENANCE_KEY', value);
209
166
  },
210
167
  get maintenanceKey() {
211
168
  return _CoreManager.default.get('MAINTENANCE_KEY');
212
169
  },
213
- /**
214
- * @property {string} Parse.serverURL
215
- * @static
216
- */
217
170
  set serverURL(value) {
218
171
  _CoreManager.default.set('SERVER_URL', value);
219
172
  },
220
173
  get serverURL() {
221
174
  return _CoreManager.default.get('SERVER_URL');
222
175
  },
223
- /**
224
- * @property {ParseLiveQuery} Parse.LiveQuery
225
- * @static
226
- */
227
176
  set LiveQuery(liveQuery) {
228
177
  _CoreManager.default.setLiveQuery(liveQuery);
229
178
  },
230
179
  get LiveQuery() {
231
180
  return _CoreManager.default.getLiveQuery();
232
181
  },
233
- /**
234
- * @property {string} Parse.liveQueryServerURL
235
- * @static
236
- */
237
182
  set liveQueryServerURL(value) {
238
183
  _CoreManager.default.set('LIVEQUERY_SERVER_URL', value);
239
184
  },
240
185
  get liveQueryServerURL() {
241
186
  return _CoreManager.default.get('LIVEQUERY_SERVER_URL');
242
187
  },
243
- /**
244
- * @property {boolean} Parse.encryptedUser
245
- * @static
246
- */
247
188
  set encryptedUser(value) {
248
189
  _CoreManager.default.set('ENCRYPTED_USER', value);
249
190
  },
250
191
  get encryptedUser() {
251
192
  return _CoreManager.default.get('ENCRYPTED_USER');
252
193
  },
253
- /**
254
- * @property {string} Parse.secret
255
- * @static
256
- */
257
194
  set secret(value) {
258
195
  _CoreManager.default.set('ENCRYPTED_KEY', value);
259
196
  },
260
197
  get secret() {
261
198
  return _CoreManager.default.get('ENCRYPTED_KEY');
262
199
  },
263
- /**
264
- * @property {boolean} Parse.idempotency
265
- * @static
266
- */
267
200
  set idempotency(value) {
268
201
  _CoreManager.default.set('IDEMPOTENCY', value);
269
202
  },
270
203
  get idempotency() {
271
204
  return _CoreManager.default.get('IDEMPOTENCY');
272
205
  },
273
- /**
274
- * @property {boolean} Parse.allowCustomObjectId
275
- * @static
276
- */
277
206
  set allowCustomObjectId(value) {
278
207
  _CoreManager.default.set('ALLOW_CUSTOM_OBJECT_ID', value);
279
208
  },
280
209
  get allowCustomObjectId() {
281
210
  return _CoreManager.default.get('ALLOW_CUSTOM_OBJECT_ID');
282
211
  },
283
- /**
284
- * Setting this property to `true` enables enhanced logging for `Parse.Object`
285
- * in Node.js environments. Specifically, it will log:
286
- *
287
- * ```
288
- * ParseObject: className: <CLASS_NAME>, id: <OBJECT_ID>
289
- * Attributes: <OBJECT_ATTRIBUTES>
290
- * ```
291
- *
292
- * @warning This should not be enabled in production environments as this may
293
- * expose sensitive information in server logs.
294
- *
295
- * @property {boolean} Parse.nodeLogging
296
- * @static
297
- */
298
212
  set nodeLogging(value) {
299
213
  _CoreManager.default.set('NODE_LOGGING', value);
300
214
  },
@@ -309,25 +223,17 @@ const Parse = {
309
223
  },
310
224
  // We attempt to match the signatures of the legacy versions of these methods
311
225
  _decode(_, value) {
312
- return (0, _decode.default)(value);
226
+ return (0, _decode2.default)(value);
313
227
  },
314
228
  _encode(value, _, disallowObjects) {
315
- return (0, _encode.default)(value, disallowObjects);
229
+ return (0, _encode2.default)(value, disallowObjects);
316
230
  },
317
231
  _getInstallationId() {
318
232
  return _CoreManager.default.getInstallationController().currentInstallationId();
319
233
  },
320
- /**
321
- * Enable pinning in your application.
322
- * This must be called after `Parse.initialize` in your application.
323
- *
324
- * @param [polling] Allow pinging the server /health endpoint. Default true
325
- * @param [ms] Milliseconds to ping the server. Default 2000ms
326
- * @static
327
- */
328
234
  enableLocalDatastore(polling, ms) {
329
235
  if (!this.applicationId) {
330
- console.log("'enableLocalDataStore' must be called after 'initialize'");
236
+ console.log("'enableLocalDatastore' must be called after 'initialize'");
331
237
  return;
332
238
  }
333
239
  if (!this.LocalDatastore.isEnabled) {
@@ -337,25 +243,9 @@ const Parse = {
337
243
  }
338
244
  }
339
245
  },
340
- /**
341
- * Flag that indicates whether Local Datastore is enabled.
342
- *
343
- * @static
344
- * @returns {boolean}
345
- */
346
246
  isLocalDatastoreEnabled() {
347
247
  return this.LocalDatastore.isEnabled;
348
248
  },
349
- /**
350
- * Gets all contents from Local Datastore
351
- *
352
- * <pre>
353
- * await Parse.dumpLocalDatastore();
354
- * </pre>
355
- *
356
- * @static
357
- * @returns {object}
358
- */
359
249
  dumpLocalDatastore() {
360
250
  if (!this.LocalDatastore.isEnabled) {
361
251
  console.log('Parse.enableLocalDatastore() must be called first');
@@ -364,21 +254,9 @@ const Parse = {
364
254
  return Parse.LocalDatastore._getAllContents();
365
255
  }
366
256
  },
367
- /**
368
- * Enable the current user encryption.
369
- * This must be called before login any user.
370
- *
371
- * @static
372
- */
373
257
  enableEncryptedUser() {
374
258
  this.encryptedUser = true;
375
259
  },
376
- /**
377
- * Flag that indicates whether Encrypted User is enabled.
378
- *
379
- * @static
380
- * @returns {boolean}
381
- */
382
260
  isEncryptedUserEnabled() {
383
261
  return this.encryptedUser;
384
262
  }
@@ -10,7 +10,7 @@ var config = {
10
10
  SERVER_URL: 'https://api.parse.com/1',
11
11
  LIVEQUERY_SERVER_URL: null,
12
12
  ENCRYPTED_KEY: null,
13
- VERSION: 'js' + "8.0.2-alpha.2",
13
+ VERSION: 'js' + "8.0.3-alpha.1",
14
14
  APPLICATION_ID: null,
15
15
  JAVASCRIPT_KEY: null,
16
16
  MAINTENANCE_KEY: null,
@@ -226,7 +226,7 @@ var Parse = {
226
226
  },
227
227
  enableLocalDatastore: function (polling, ms) {
228
228
  if (!this.applicationId) {
229
- console.log("'enableLocalDataStore' must be called after 'initialize'");
229
+ console.log("'enableLocalDatastore' must be called after 'initialize'");
230
230
  return;
231
231
  }
232
232
  if (!this.LocalDatastore.isEnabled) {
@@ -17,7 +17,7 @@ const config = {
17
17
  SERVER_URL: 'https://api.parse.com/1',
18
18
  LIVEQUERY_SERVER_URL: null,
19
19
  ENCRYPTED_KEY: null,
20
- VERSION: 'js' + "8.0.2-alpha.2",
20
+ VERSION: 'js' + "8.0.3-alpha.1",
21
21
  APPLICATION_ID: null,
22
22
  JAVASCRIPT_KEY: null,
23
23
  MAINTENANCE_KEY: null,