parse 8.0.1 → 8.0.2-alpha.2

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.
@@ -1,66 +1,148 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ReadPreferenceOption = void 0;
7
+ /**
8
+ * @typedef Parse.Cloud.FunctionRequest
9
+ * @property {string} installationId If set, the installationId triggering the request.
10
+ * @property {boolean} master If true, means the master key was used.
11
+ * @property {Parse.User} user If set, the user that made the request.
12
+ * @property {object} params The params passed to the cloud function.
13
+ */
14
+ /**
15
+ * @typedef Parse.Cloud.TriggerRequest
16
+ * @property {string} installationId If set, the installationId triggering the request.
17
+ * @property {boolean} master If true, means the master key was used.
18
+ * @property {Parse.User} user If set, the user that made the request.
19
+ * @property {Parse.Object} object The object triggering the hook.
20
+ * @property {string} ip The IP address of the client making the request.
21
+ * @property {object} headers The original HTTP headers for the request.
22
+ * @property {string} triggerName The name of the trigger (`beforeSave`, `afterSave`, ...)
23
+ * @property {object} log The current logger inside Parse Server.
24
+ * @property {Parse.Object} original If set, the object, as currently stored.
25
+ */
26
+ /**
27
+ * @typedef Parse.Cloud.FileTriggerRequest
28
+ * @property {string} installationId If set, the installationId triggering the request.
29
+ * @property {boolean} master If true, means the master key was used.
30
+ * @property {Parse.User} user If set, the user that made the request.
31
+ * @property {Parse.File} file The file triggering the hook.
32
+ * @property {string} ip The IP address of the client making the request.
33
+ * @property {object} headers The original HTTP headers for the request.
34
+ * @property {string} triggerName The name of the trigger (`beforeSaveFile`, `afterSaveFile`, ...)
35
+ * @property {object} log The current logger inside Parse Server.
36
+ */
37
+ /**
38
+ * @typedef Parse.Cloud.ConnectTriggerRequest
39
+ * @property {string} installationId If set, the installationId triggering the request.
40
+ * @property {boolean} useMasterKey If true, means the master key was used.
41
+ * @property {Parse.User} user If set, the user that made the request.
42
+ * @property {number} clients The number of clients connected.
43
+ * @property {number} subscriptions The number of subscriptions connected.
44
+ * @property {string} sessionToken If set, the session of the user that made the request.
45
+ */
46
+ /**
47
+ * @typedef Parse.Cloud.JobRequest
48
+ * @property {object} params The params passed to the background job.
49
+ * @property {Function} message If message is called with a string argument, will update the current message to be stored in the job status.
50
+ */
51
+ /**
52
+ * @typedef Parse.Cloud.HTTPOptions
53
+ * @property {string | object} body The body of the request.
54
+ * @property {boolean} followRedirects Whether to follow redirects caused by HTTP 3xx responses. Defaults to false.
55
+ * @property {object} headers The headers for the request.
56
+ * @property {string} method The method of the request. GET, POST, PUT, DELETE, HEAD, and OPTIONS are supported.
57
+ * @property {string | object} params The query portion of the url.
58
+ * @property {string} url The url to send the request to.
59
+ */
60
+ /**
61
+ * @typedef Parse.Cloud.HTTPResponse
62
+ * @property {Buffer} buffer The raw byte representation of the response body.
63
+ * @property {object} cookies The cookies sent by the server.
64
+ * @property {object} data The parsed response body as a JavaScript object.
65
+ * @property {object} headers The headers sent by the server.
66
+ * @property {number} status The status code.
67
+ * @property {string} text The raw text representation of the response body.
68
+ */
69
+ let ReadPreferenceOption = exports.ReadPreferenceOption = /*#__PURE__*/function (ReadPreferenceOption) {
70
+ ReadPreferenceOption["Primary"] = "PRIMARY";
71
+ ReadPreferenceOption["PrimaryPreferred"] = "PRIMARY_PREFERRED";
72
+ ReadPreferenceOption["Secondary"] = "SECONDARY";
73
+ ReadPreferenceOption["SecondaryPreferred"] = "SECONDARY_PREFERRED";
74
+ ReadPreferenceOption["Nearest"] = "NEAREST";
75
+ return ReadPreferenceOption;
76
+ }({});
1
77
  /**
2
78
  * Defines a Cloud Function.
3
79
  *
4
80
  * **Available in Cloud Code only.**
5
81
  *
6
- * @function define
7
- * @name Parse.Cloud.define
8
- * @param {string} name The name of the Cloud Function
9
- * @param {Function} data The Cloud Function to register. This function should take one parameter {@link Parse.Cloud.FunctionRequest}
82
+ * @param name The name of the Cloud Function
83
+ * @param handler The Cloud Function to register. This function should take one parameter {@link FunctionRequest}
84
+ * @param validator An optional function to validate the request
10
85
  */
11
-
12
86
  /**
13
- * Registers an after delete function.
87
+ * Defines a Background Job.
88
+ *
89
+ * **Available in Cloud Code only.**
90
+ *
91
+ * @param name The name of the Background Job
92
+ * @param handler The Background Job to register. This function should take one parameter {@link JobRequest}
93
+ */
94
+ /**
95
+ * Registers a before save function.
14
96
  *
15
97
  * **Available in Cloud Code only.**
16
98
  *
17
- * If you want to use afterDelete for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User}), you should pass the class itself and not the String for arg1.
99
+ * If you want to use beforeSave for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User}),
100
+ * you should pass the class itself and not the String for arg1.
101
+ *
18
102
  * ```
19
- * Parse.Cloud.afterDelete('MyCustomClass', (request) => {
103
+ * Parse.Cloud.beforeSave('MyCustomClass', (request) => {
20
104
  * // code here
21
105
  * })
22
106
  *
23
- * Parse.Cloud.afterDelete(Parse.User, (request) => {
107
+ * Parse.Cloud.beforeSave(Parse.User, (request) => {
24
108
  * // code here
25
109
  * })
26
- *```
110
+ * ```
27
111
  *
28
- * @function afterDelete
29
- * @name Parse.Cloud.afterDelete
30
- * @param {(string | Parse.Object)} arg1 The Parse.Object subclass to register the after delete function for. This can instead be a String that is the className of the subclass.
31
- * @param {Function} func The function to run after a delete. This function should take just one parameter, {@link Parse.Cloud.TriggerRequest}.
112
+ * @param className The Parse.Object subclass to register the before save function for.
113
+ * @param handler The function to run before a save.
114
+ * @param validator An optional function to validate the request
32
115
  */
33
-
34
116
  /**
35
- *
36
117
  * Registers an after save function.
37
118
  *
38
119
  * **Available in Cloud Code only.**
39
120
  *
40
- * If you want to use afterSave for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User}), you should pass the class itself and not the String for arg1.
121
+ * If you want to use afterSave for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User}),
122
+ * you should pass the class itself and not the String for arg1.
41
123
  *
42
124
  * ```
43
- * Parse.Cloud.afterSave('MyCustomClass', function(request) {
125
+ * Parse.Cloud.afterSave('MyCustomClass', (request) => {
44
126
  * // code here
45
127
  * })
46
128
  *
47
- * Parse.Cloud.afterSave(Parse.User, function(request) {
129
+ * Parse.Cloud.afterSave(Parse.User, (request) => {
48
130
  * // code here
49
131
  * })
50
132
  * ```
51
133
  *
52
- * @function afterSave
53
- * @name Parse.Cloud.afterSave
54
- * @param {(string | Parse.Object)} arg1 The Parse.Object subclass to register the after save function for. This can instead be a String that is the className of the subclass.
55
- * @param {Function} func The function to run after a save. This function should take just one parameter, {@link Parse.Cloud.TriggerRequest}.
134
+ * @param className The Parse.Object subclass to register the after save function for.
135
+ * @param handler The function to run after a save.
136
+ * @param validator An optional function to validate the request
56
137
  */
57
-
58
138
  /**
59
- * Registers an before delete function.
139
+ * Registers a before delete function.
60
140
  *
61
141
  * **Available in Cloud Code only.**
62
142
  *
63
- * If you want to use beforeDelete for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User}), you should pass the class itself and not the String for arg1.
143
+ * If you want to use beforeDelete for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User}),
144
+ * you should pass the class itself and not the String for arg1.
145
+ *
64
146
  * ```
65
147
  * Parse.Cloud.beforeDelete('MyCustomClass', (request) => {
66
148
  * // code here
@@ -69,115 +151,133 @@
69
151
  * Parse.Cloud.beforeDelete(Parse.User, (request) => {
70
152
  * // code here
71
153
  * })
72
- *```
154
+ * ```
73
155
  *
74
- * @function beforeDelete
75
- * @name Parse.Cloud.beforeDelete
76
- * @param {(string | Parse.Object)} arg1 The Parse.Object subclass to register the before delete function for. This can instead be a String that is the className of the subclass.
77
- * @param {Function} func The function to run before a delete. This function should take just one parameter, {@link Parse.Cloud.TriggerRequest}.
156
+ * @param className The Parse.Object subclass to register the before delete function for.
157
+ * @param handler The function to run before a delete.
158
+ * @param validator An optional function to validate the request
78
159
  */
79
-
80
160
  /**
81
- *
82
- * Registers an before save function.
161
+ * Registers an after delete function.
83
162
  *
84
163
  * **Available in Cloud Code only.**
85
164
  *
86
- * If you want to use beforeSave for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User}), you should pass the class itself and not the String for arg1.
165
+ * If you want to use afterDelete for a predefined class in the Parse JavaScript SDK (e.g. {@link Parse.User}),
166
+ * you should pass the class itself and not the String for arg1.
87
167
  *
88
168
  * ```
89
- * Parse.Cloud.beforeSave('MyCustomClass', (request) => {
169
+ * Parse.Cloud.afterDelete('MyCustomClass', (request) => {
90
170
  * // code here
91
171
  * })
92
172
  *
93
- * Parse.Cloud.beforeSave(Parse.User, (request) => {
173
+ * Parse.Cloud.afterDelete(Parse.User, (request) => {
94
174
  * // code here
95
175
  * })
96
176
  * ```
97
177
  *
98
- * @function beforeSave
99
- * @name Parse.Cloud.beforeSave
100
- * @param {(string | Parse.Object)} arg1 The Parse.Object subclass to register the after save function for. This can instead be a String that is the className of the subclass.
101
- * @param {Function} func The function to run before a save. This function should take just one parameter, {@link Parse.Cloud.TriggerRequest}.
178
+ * @param className The Parse.Object subclass to register the after delete function for.
179
+ * @param handler The function to run after a delete.
180
+ * @param validator An optional function to validate the request
102
181
  */
103
-
104
182
  /**
183
+ * Registers a before find function.
105
184
  *
106
- * Registers an before save file function. A new Parse.File can be returned to override the file that gets saved.
107
- * If you want to replace the rquesting Parse.File with a Parse.File that is already saved, simply return the already saved Parse.File.
108
- * You can also add metadata to the file that will be stored via whatever file storage solution you're using.
185
+ * **Available in Cloud Code only.**
186
+ *
187
+ * @param className The Parse.Object subclass to register the before find function for.
188
+ * @param handler The function to run before a find.
189
+ * @param validator An optional function to validate the request
190
+ */
191
+ /**
192
+ * Registers an after find function.
109
193
  *
110
194
  * **Available in Cloud Code only.**
111
195
  *
112
- * Example: Adding metadata and tags
113
- * ```
114
- * Parse.Cloud.beforeSaveFile(({ file, user }) => {
115
- * file.addMetadata('foo', 'bar');
116
- * file.addTag('createdBy', user.id);
117
- * });
196
+ * @param className The Parse.Object subclass to register the after find function for.
197
+ * @param handler The function to run after a find.
198
+ * @param validator An optional function to validate the request
199
+ */
200
+ /**
201
+ * Registers a before login function.
118
202
  *
119
- * ```
203
+ * **Available in Cloud Code only.**
120
204
  *
121
- * Example: replacing file with an already saved file
205
+ * @param handler The function to run before a login.
206
+ * @param validator An optional function to validate the request
207
+ */
208
+ /**
209
+ * Registers an after login function.
122
210
  *
123
- * ```
124
- * Parse.Cloud.beforeSaveFile(({ file, user }) => {
125
- * return user.get('avatar');
126
- * });
211
+ * **Available in Cloud Code only.**
127
212
  *
128
- * ```
213
+ * @param handler The function to run after a login.
214
+ */
215
+ /**
216
+ * Registers an after logout function.
217
+ *
218
+ * **Available in Cloud Code only.**
219
+ *
220
+ * @param handler The function to run after a logout.
221
+ */
222
+ /**
223
+ * Registers a before password reset request function.
224
+ *
225
+ * **Available in Cloud Code only.**
129
226
  *
130
- * Example: replacing file with a different file
227
+ * @param handler The function to run before a password reset request.
228
+ * @param validator An optional function to validate the request
229
+ */
230
+ /**
231
+ * Registers a before save file function.
232
+ *
233
+ * **Available in Cloud Code only.**
234
+ *
235
+ * A new Parse.File can be returned to override the file that gets saved.
131
236
  *
132
237
  * ```
133
238
  * Parse.Cloud.beforeSaveFile(({ file, user }) => {
134
- * const metadata = { foo: 'bar' };
135
- * const tags = { createdBy: user.id };
136
- * const newFile = new Parse.File(file.name(), <some other file data>, 'text/plain', metadata, tags);
137
- * return newFile;
239
+ * file.addMetadata('foo', 'bar');
240
+ * file.addTag('createdBy', user.id);
138
241
  * });
139
- *
140
242
  * ```
141
243
  *
142
- * @function beforeSaveFile
143
- * @name Parse.Cloud.beforeSaveFile
144
- * @param {Function} func The function to run before a file saves. This function should take one parameter, a {@link Parse.Cloud.FileTriggerRequest}.
244
+ * @param handler The function to run before a file saves.
145
245
  */
146
-
147
246
  /**
148
- *
149
247
  * Registers an after save file function.
150
248
  *
151
249
  * **Available in Cloud Code only.**
152
250
  *
153
- * Example: creating a new object that references this file in a separate collection
154
251
  * ```
155
252
  * Parse.Cloud.afterSaveFile(async ({ file, user }) => {
156
253
  * const fileObject = new Parse.Object('FileObject');
157
- * fileObject.set('metadata', file.metadata());
158
- * fileObject.set('tags', file.tags());
159
254
  * fileObject.set('name', file.name());
160
255
  * fileObject.set('createdBy', user);
161
256
  * await fileObject.save({ sessionToken: user.getSessionToken() });
162
257
  * });
258
+ * ```
163
259
  *
164
- * @method afterSaveFile
165
- * @name Parse.Cloud.afterSaveFile
166
- * @param {Function} func The function to run after a file saves. This function should take one parameter, a {@link Parse.Cloud.FileTriggerRequest}.
260
+ * @param handler The function to run after a file saves.
167
261
  */
168
-
169
262
  /**
170
- * @function beforeConnect
171
- * @name Parse.Cloud.beforeConnect
172
- * @param {Function} func The function to before connection is made. This function can be async and should take just one parameter, {@link Parse.Cloud.ConnectTriggerRequest}.
263
+ * Registers a before delete file function.
264
+ *
265
+ * **Available in Cloud Code only.**
266
+ *
267
+ * @param handler The function to run before a file is deleted.
173
268
  */
174
269
  /**
270
+ * Registers an after delete file function.
175
271
  *
176
- * Registers a before connect function.
272
+ * **Available in Cloud Code only.**
273
+ *
274
+ * @param handler The function to run after a file is deleted.
275
+ */
276
+ /**
277
+ * Registers a before connect function for LiveQuery.
177
278
  *
178
279
  * **Available in Cloud Code only.**
179
280
  *
180
- * Example: restrict LiveQueries to logged in users.
181
281
  * ```
182
282
  * Parse.Cloud.beforeConnect((request) => {
183
283
  * if (!request.user) {
@@ -185,142 +285,68 @@
185
285
  * }
186
286
  * });
187
287
  * ```
188
- */
189
-
190
- /**
191
- * @function beforeSubscribe
192
- * @name Parse.Cloud.beforeSubscribe
193
- * @param {(string | Parse.Object)} arg1 The Parse.Object subclass to register the before subscription function for. This can instead be a String that is the className of the subclass.
194
- * @param {Function} func The function to run before a subscription. This function can be async and should take one parameter, a {@link Parse.Cloud.TriggerRequest}.
288
+ *
289
+ * @param handler The function to run before a LiveQuery connection is made.
290
+ * @param validator An optional function to validate the request
195
291
  */
196
292
  /**
197
- *
198
- * Registers a before subscribe function.
293
+ * Registers a before subscribe function for LiveQuery.
199
294
  *
200
295
  * **Available in Cloud Code only.**
201
- * Example: restrict subscriptions to MyObject to Admin accounts only.
296
+ *
202
297
  * ```
203
- * Parse.Cloud.beforeSubscribe('MyObject', (request) => {
298
+ * Parse.Cloud.beforeSubscribe('MyObject', (request) => {
204
299
  * if (!request.user.get('Admin')) {
205
- * throw new Parse.Error(101, 'You are not authorized to subscribe to MyObject.');
300
+ * throw new Parse.Error(101, 'You are not authorized to subscribe to MyObject.');
206
301
  * }
207
- * let query = request.query; // the Parse.Query
208
- * query.select("name","year")
302
+ * let query = request.query;
303
+ * query.select("name", "year");
209
304
  * });
210
305
  * ```
306
+ *
307
+ * @param className The Parse.Object subclass to register the before subscribe function for.
308
+ * @param handler The function to run before a subscription.
309
+ * @param validator An optional function to validate the request
310
+ */
311
+ /**
312
+ * Registers an after live query event function.
313
+ *
314
+ * **Available in Cloud Code only.**
315
+ *
316
+ * @param className The Parse.Object subclass to register the after live query event function for.
317
+ * @param handler The function to run after a live query event.
318
+ * @param validator An optional function to validate the request
319
+ */
320
+ /**
321
+ * Sends an email.
322
+ *
323
+ * **Available in Cloud Code only.**
324
+ *
325
+ * @param data The email data.
326
+ * @param data.from The sender email address.
327
+ * @param data.to The recipient email address.
328
+ * @param data.subject The email subject.
329
+ * @param data.text The plain text content.
330
+ * @param data.html The HTML content.
211
331
  */
212
-
213
332
  /**
214
333
  * Makes an HTTP Request.
215
334
  *
216
335
  * **Available in Cloud Code only.**
217
336
  *
218
- * By default, Parse.Cloud.httpRequest does not follow redirects caused by HTTP 3xx response codes. You can use the followRedirects option in the {@link Parse.Cloud.HTTPOptions} object to change this behavior.
337
+ * By default, Parse.Cloud.httpRequest does not follow redirects caused by HTTP 3xx response codes.
338
+ * You can use the followRedirects option in the {@link HTTPOptions} object to change this behavior.
219
339
  *
220
- * Sample request:
221
340
  * ```
222
341
  * Parse.Cloud.httpRequest({
223
342
  * url: 'http://www.example.com/'
224
343
  * }).then(function(httpResponse) {
225
- * // success
226
344
  * console.log(httpResponse.text);
227
- * },function(httpResponse) {
228
- * // error
345
+ * }, function(httpResponse) {
229
346
  * console.error('Request failed with response code ' + httpResponse.status);
230
347
  * });
231
348
  * ```
232
349
  *
233
- * @function httpRequest
234
- * @name Parse.Cloud.httpRequest
235
- * @param {Parse.Cloud.HTTPOptions} options The Parse.Cloud.HTTPOptions object that makes the request.
236
- * @returns {Promise<Parse.Cloud.HTTPResponse>} A promise that will be resolved with a {@link Parse.Cloud.HTTPResponse} object when the request completes.
237
- */
238
-
239
- /**
240
- * Defines a Background Job.
241
- *
242
- * **Available in Cloud Code only.**
243
- *
244
- * @function job
245
- * @name Parse.Cloud.job
246
- * @param {string} name The name of the Background Job
247
- * @param {Function} func The Background Job to register. This function should take two parameters a {@link Parse.Cloud.JobRequest} and a {@link Parse.Cloud.JobStatus}
248
- */
249
-
250
- /**
251
- * @typedef Parse.Cloud.TriggerRequest
252
- * @property {string} installationId If set, the installationId triggering the request.
253
- * @property {boolean} master If true, means the master key was used.
254
- * @property {Parse.User} user If set, the user that made the request.
255
- * @property {Parse.Object} object The object triggering the hook.
256
- * @property {string} ip The IP address of the client making the request.
257
- * @property {object} headers The original HTTP headers for the request.
258
- * @property {string} triggerName The name of the trigger (`beforeSave`, `afterSave`, ...)
259
- * @property {object} log The current logger inside Parse Server.
260
- * @property {Parse.Object} original If set, the object, as currently stored.
261
- */
262
-
263
- /**
264
- * @typedef Parse.Cloud.FileTriggerRequest
265
- * @property {string} installationId If set, the installationId triggering the request.
266
- * @property {boolean} master If true, means the master key was used.
267
- * @property {Parse.User} user If set, the user that made the request.
268
- * @property {Parse.File} file The file triggering the hook.
269
- * @property {string} ip The IP address of the client making the request.
270
- * @property {object} headers The original HTTP headers for the request.
271
- * @property {string} triggerName The name of the trigger (`beforeSaveFile`, `afterSaveFile`, ...)
272
- * @property {object} log The current logger inside Parse Server.
273
- */
274
-
275
- /**
276
- * @typedef Parse.Cloud.ConnectTriggerRequest
277
- * @property {string} installationId If set, the installationId triggering the request.
278
- * @property {boolean} useMasterKey If true, means the master key was used.
279
- * @property {Parse.User} user If set, the user that made the request.
280
- * @property {number} clients The number of clients connected.
281
- * @property {number} subscriptions The number of subscriptions connected.
282
- * @property {string} sessionToken If set, the session of the user that made the request.
283
- */
284
-
285
- /**
286
- * @typedef Parse.Cloud.FunctionRequest
287
- * @property {string} installationId If set, the installationId triggering the request.
288
- * @property {boolean} master If true, means the master key was used.
289
- * @property {Parse.User} user If set, the user that made the request.
290
- * @property {object} params The params passed to the cloud function.
291
- */
292
-
293
- /**
294
- * @typedef Parse.Cloud.JobRequest
295
- * @property {object} params The params passed to the background job.
296
- */
297
-
298
- /**
299
- * @typedef Parse.Cloud.JobStatus
300
- * @property {Function} error If error is called, will end the job unsuccessfully with an optional completion message to be stored in the job status.
301
- * @property {Function} message If message is called with a string argument, will update the current message to be stored in the job status.
302
- * @property {Function} success If success is called, will end the job successfullly with the optional completion message to be stored in the job status.
303
- */
304
-
305
- /**
306
- * @typedef Parse.Cloud.HTTPOptions
307
- * @property {string | object} body The body of the request. If it is a JSON object, then the Content-Type set in the headers must be application/x-www-form-urlencoded or application/json. You can also set this to a {@link Buffer} object to send raw bytes. If you use a Buffer, you should also set the Content-Type header explicitly to describe what these bytes represent.
308
- * @property {Function} error The function that is called when the request fails. It will be passed a Parse.Cloud.HTTPResponse object.
309
- * @property {boolean} followRedirects Whether to follow redirects caused by HTTP 3xx responses. Defaults to false.
310
- * @property {object} headers The headers for the request.
311
- * @property {string} method The method of the request. GET, POST, PUT, DELETE, HEAD, and OPTIONS are supported. Will default to GET if not specified.
312
- * @property {string | object} params The query portion of the url. You can pass a JSON object of key value pairs like params: {q : 'Sean Plott'} or a raw string like params:q=Sean Plott.
313
- * @property {Function} success The function that is called when the request successfully completes. It will be passed a Parse.Cloud.HTTPResponse object.
314
- * @property {string} url The url to send the request to.
315
- */
316
-
317
- /**
318
- * @typedef Parse.Cloud.HTTPResponse
319
- * @property {Buffer} buffer The raw byte representation of the response body. Use this to receive binary data. See Buffer for more details.
320
- * @property {object} cookies The cookies sent by the server. The keys in this object are the names of the cookies. The values are Parse.Cloud.Cookie objects.
321
- * @property {object} data The parsed response body as a JavaScript object. This is only available when the response Content-Type is application/x-www-form-urlencoded or application/json.
322
- * @property {object} headers The headers sent by the server. The keys in this object are the names of the headers. We do not support multiple response headers with the same name. In the common case of Set-Cookie headers, please use the cookies field instead.
323
- * @property {number} status The status code.
324
- * @property {string} text The raw text representation of the response body.
325
- */
326
- "use strict";
350
+ * @param options The HTTPOptions object that makes the request.
351
+ * @returns A promise that will be resolved with a {@link HTTPResponse} object when the request completes.
352
+ */
@@ -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.1",
17
+ VERSION: 'js' + "8.0.2-alpha.2",
18
18
  APPLICATION_ID: null,
19
19
  JAVASCRIPT_KEY: null,
20
20
  MAINTENANCE_KEY: null,
@@ -0,0 +1,12 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.ReadPreferenceOption = void 0;
5
+ var ReadPreferenceOption = exports.ReadPreferenceOption = function (ReadPreferenceOption) {
6
+ ReadPreferenceOption["Primary"] = "PRIMARY";
7
+ ReadPreferenceOption["PrimaryPreferred"] = "PRIMARY_PREFERRED";
8
+ ReadPreferenceOption["Secondary"] = "SECONDARY";
9
+ ReadPreferenceOption["SecondaryPreferred"] = "SECONDARY_PREFERRED";
10
+ ReadPreferenceOption["Nearest"] = "NEAREST";
11
+ return ReadPreferenceOption;
12
+ }({});
@@ -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.1",
13
+ VERSION: 'js' + "8.0.2-alpha.2",
14
14
  APPLICATION_ID: null,
15
15
  JAVASCRIPT_KEY: null,
16
16
  MAINTENANCE_KEY: null,