From 047d818d80ba04b0203216104e82ec9bd798eca7 Mon Sep 17 00:00:00 2001 From: mtrezza Date: Thu, 16 May 2024 13:27:20 +0000 Subject: [PATCH] deploy: 6f236b5843aa0619a9fcc50c7a347b000dc87760 --- api/5.1.0/AuthProvider.html | 610 + api/5.1.0/Parse.ACL.html | 2283 +++ api/5.1.0/Parse.Analytics.html | 377 + api/5.1.0/Parse.AnonymousUtils.html | 790 + api/5.1.0/Parse.CLP.html | 3704 ++++ api/5.1.0/Parse.Cloud.html | 4370 +++++ api/5.1.0/Parse.Config.html | 929 + api/5.1.0/Parse.Error.html | 7176 ++++++++ api/5.1.0/Parse.FacebookUtils.html | 1062 ++ api/5.1.0/Parse.File.html | 1898 ++ api/5.1.0/Parse.Installation.html | 2099 +++ api/5.1.0/Parse.LiveQueryClient.html | 966 ++ api/5.1.0/Parse.LocalDatastore.html | 266 + api/5.1.0/Parse.Object.html | 10884 ++++++++++++ api/5.1.0/Parse.Polygon.html | 941 + api/5.1.0/Parse.Push.html | 560 + api/5.1.0/Parse.Query.html | 13385 +++++++++++++++ api/5.1.0/Parse.Relation.html | 759 + api/5.1.0/Parse.Role.html | 8389 +++++++++ api/5.1.0/Parse.Schema.html | 3926 +++++ api/5.1.0/Parse.Session.html | 8205 +++++++++ api/5.1.0/Parse.User.html | 14324 ++++++++++++++++ api/5.1.0/Parse.html | 2218 +++ api/5.1.0/Parse.html#.EventuallyQueue | 1312 ++ api/5.1.0/Parse.html#.LiveQuery | 187 + api/5.1.0/ParseGeoPoint.html | 1348 ++ api/5.1.0/Subscription.html | 332 + api/5.1.0/global.html | 581 + api/5.1.0/index.html | 210 + api/5.1.0/scripts/check_version.js | 36 + api/5.1.0/scripts/linenumber.js | 25 + .../scripts/prettify/Apache-License-2.0.txt | 202 + api/5.1.0/scripts/prettify/lang-css.js | 2 + api/5.1.0/scripts/prettify/prettify.js | 28 + api/5.1.0/styles/jsdoc-default.css | 740 + api/5.1.0/styles/prettify-jsdoc.css | 111 + api/5.1.0/styles/prettify-tomorrow.css | 132 + api/index.html | 2 +- api/release/AuthProvider.html | 4 +- api/release/Parse.ACL.html | 6 +- api/release/Parse.Analytics.html | 6 +- api/release/Parse.AnonymousUtils.html | 6 +- api/release/Parse.CLP.html | 6 +- api/release/Parse.Cloud.html | 6 +- api/release/Parse.Config.html | 6 +- api/release/Parse.Error.html | 6 +- api/release/Parse.FacebookUtils.html | 6 +- api/release/Parse.File.html | 6 +- api/release/Parse.Installation.html | 2099 +++ api/release/Parse.LiveQueryClient.html | 6 +- api/release/Parse.LocalDatastore.html | 6 +- api/release/Parse.Object.html | 6 +- api/release/Parse.Polygon.html | 6 +- api/release/Parse.Push.html | 6 +- api/release/Parse.Query.html | 6 +- api/release/Parse.Relation.html | 6 +- api/release/Parse.Role.html | 6 +- api/release/Parse.Schema.html | 6 +- api/release/Parse.Session.html | 8205 +++++++++ api/release/Parse.User.html | 162 +- api/release/Parse.html | 2218 +++ api/release/Parse.html#.EventuallyQueue | 1312 ++ api/release/Parse.html#.LiveQuery | 187 + api/release/ParseGeoPoint.html | 215 +- api/release/Subscription.html | 4 +- api/release/global.html | 4 +- api/release/index.html | 18 +- 67 files changed, 109846 insertions(+), 59 deletions(-) create mode 100644 api/5.1.0/AuthProvider.html create mode 100644 api/5.1.0/Parse.ACL.html create mode 100644 api/5.1.0/Parse.Analytics.html create mode 100644 api/5.1.0/Parse.AnonymousUtils.html create mode 100644 api/5.1.0/Parse.CLP.html create mode 100644 api/5.1.0/Parse.Cloud.html create mode 100644 api/5.1.0/Parse.Config.html create mode 100644 api/5.1.0/Parse.Error.html create mode 100644 api/5.1.0/Parse.FacebookUtils.html create mode 100644 api/5.1.0/Parse.File.html create mode 100644 api/5.1.0/Parse.Installation.html create mode 100644 api/5.1.0/Parse.LiveQueryClient.html create mode 100644 api/5.1.0/Parse.LocalDatastore.html create mode 100644 api/5.1.0/Parse.Object.html create mode 100644 api/5.1.0/Parse.Polygon.html create mode 100644 api/5.1.0/Parse.Push.html create mode 100644 api/5.1.0/Parse.Query.html create mode 100644 api/5.1.0/Parse.Relation.html create mode 100644 api/5.1.0/Parse.Role.html create mode 100644 api/5.1.0/Parse.Schema.html create mode 100644 api/5.1.0/Parse.Session.html create mode 100644 api/5.1.0/Parse.User.html create mode 100644 api/5.1.0/Parse.html create mode 100644 api/5.1.0/Parse.html#.EventuallyQueue create mode 100644 api/5.1.0/Parse.html#.LiveQuery create mode 100644 api/5.1.0/ParseGeoPoint.html create mode 100644 api/5.1.0/Subscription.html create mode 100644 api/5.1.0/global.html create mode 100644 api/5.1.0/index.html create mode 100644 api/5.1.0/scripts/check_version.js create mode 100644 api/5.1.0/scripts/linenumber.js create mode 100644 api/5.1.0/scripts/prettify/Apache-License-2.0.txt create mode 100644 api/5.1.0/scripts/prettify/lang-css.js create mode 100644 api/5.1.0/scripts/prettify/prettify.js create mode 100644 api/5.1.0/styles/jsdoc-default.css create mode 100644 api/5.1.0/styles/prettify-jsdoc.css create mode 100644 api/5.1.0/styles/prettify-tomorrow.css create mode 100644 api/release/Parse.Installation.html create mode 100644 api/release/Parse.Session.html create mode 100644 api/release/Parse.html create mode 100644 api/release/Parse.html#.EventuallyQueue create mode 100644 api/release/Parse.html#.LiveQuery diff --git a/api/5.1.0/AuthProvider.html b/api/5.1.0/AuthProvider.html new file mode 100644 index 000000000..13aef5ab3 --- /dev/null +++ b/api/5.1.0/AuthProvider.html @@ -0,0 +1,610 @@ + + + + + + AuthProvider - Documentation + + + + + + + + + + + + + + + + + +
+ +

AuthProvider

+ + + + + + + +
+ +
+ +

+ AuthProvider +

+ + +
+ +
+
+ + +

Interface declaration for Authentication Providers

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

authenticate(options)

+ + + + + +
+

Called when _linkWith isn't passed authData. +Handle your own authentication here.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

options.success(provider, authData) or options.error(provider, error) on completion

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

deauthenticate()

+ + + + + +
+

(Optional) Called when service is unlinked. +Handle any cleanup here.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

getAuthType() → {string}

+ + + + + +
+

Unique identifier for this Auth Provider.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+

identifier

+
+ + +
+ + + +
+ + +
+ + + +

restoreAuthentication(authData) → {boolean}

+ + + + + +
+

Called when auth data is syncronized. +Can be used to determine if authData is still valid

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
authData + + +object + + + + +

Data used when register provider

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

Indicate if service should continue to be linked

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.ACL.html b/api/5.1.0/Parse.ACL.html new file mode 100644 index 000000000..4d6648558 --- /dev/null +++ b/api/5.1.0/Parse.ACL.html @@ -0,0 +1,2283 @@ + + + + + + ACL - Documentation + + + + + + + + + + + + + + + + + +
+ +

ACL

+ + + + + + + +
+ +
+ +

+ Parse. + + ACL +

+ +

Creates a new ACL. +If no argument is given, the ACL has no permissions for anyone. +If the argument is a Parse.User, the ACL will have read and write +permission for only that user. +If the argument is any other JSON object, that object will be interpretted +as a serialized ACL created with toJSON().

+

An ACL, or Access Control List can be added to any +Parse.Object to restrict access to only a subset of users +of your application.

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new ACL(arg1)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
arg1 + + +Parse.User +| + +object + + + + +

The user to initialize the ACL for

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

equals(other) → {boolean}

+ + + + + +
+

Returns whether this ACL is equal to another object

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
other + + +ParseACL + + + + +

The other object's ACL to compare to

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getPublicReadAccess() → {boolean}

+ + + + + +
+

Gets whether the public is allowed to read this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getPublicWriteAccess() → {boolean}

+ + + + + +
+

Gets whether the public is allowed to write this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getReadAccess(userId) → {boolean}

+ + + + + +
+

Get whether the given user id is explicitly allowed to read this object. +Even if this returns false, the user may still be able to access it if +getPublicReadAccess returns true or a role that the user belongs to has +write access.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId, or a Parse.Role.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getRoleReadAccess(role) → {boolean}

+ + + + + +
+

Gets whether users belonging to the given role are allowed +to read this object. Even if this returns false, the role may +still be able to write it if a parent role has read access.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

true if the role has read access. false otherwise.

+
+ + +
+ + + +
+ + +
+ + + +

getRoleWriteAccess(role) → {boolean}

+ + + + + +
+

Gets whether users belonging to the given role are allowed +to write this object. Even if this returns false, the role may +still be able to write it if a parent role has write access.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

true if the role has write access. false otherwise.

+
+ + +
+ + + +
+ + +
+ + + +

getWriteAccess(userId) → {boolean}

+ + + + + +
+

Gets whether the given user id is explicitly allowed to write this object. +Even if this returns false, the user may still be able to write it if +getPublicWriteAccess returns true or a role that the user belongs to has +write access.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId, or a Parse.Role.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

setPublicReadAccess(allowed)

+ + + + + +
+

Sets whether the public is allowed to read this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
allowed + + +boolean + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setPublicWriteAccess(allowed)

+ + + + + +
+

Sets whether the public is allowed to write this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
allowed + + +boolean + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setReadAccess(userId, allowed)

+ + + + + +
+

Sets whether the given user is allowed to read this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId.

+ +
allowed + + +boolean + + + + +

Whether that user should have read access.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setRoleReadAccess(role, allowed)

+ + + + + +
+

Sets whether users belonging to the given role are allowed +to read this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
allowed + + +boolean + + + + +

Whether the given role can read this object.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + + + +
+ + +
+ + + +

setRoleWriteAccess(role, allowed)

+ + + + + +
+

Sets whether users belonging to the given role are allowed +to write this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
allowed + + +boolean + + + + +

Whether the given role can write this object.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + + + +
+ + +
+ + + +

setWriteAccess(userId, allowed)

+ + + + + +
+

Sets whether the given user id is allowed to write this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId, or a Parse.Role..

+ +
allowed + + +boolean + + + + +

Whether that user should have write access.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

toJSON() → {object}

+ + + + + +
+

Returns a JSON-encoded version of the ACL.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Analytics.html b/api/5.1.0/Parse.Analytics.html new file mode 100644 index 000000000..37941b300 --- /dev/null +++ b/api/5.1.0/Parse.Analytics.html @@ -0,0 +1,377 @@ + + + + + + Analytics - Documentation + + + + + + + + + + + + + + + + + +
+ +

Analytics

+ + + + + + + +
+ +
+ +

+ Parse. + + Analytics +

+ + +
+ +
+
+ + +
+ + + +

new Analytics()

+ + + + + +
+

Parse.Analytics provides an interface to Parse's logging and analytics +backend.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

(static) track(name, dimensions) → {Promise}

+ + + + + +
+

Tracks the occurrence of a custom event with additional dimensions. +Parse will store a data point at the time of invocation with the given +event name.

+

Dimensions will allow segmentation of the occurrences of this custom +event. Keys and values should be {@code String}s, and will throw +otherwise.

+

To track a user signup along with additional metadata, consider the +following:

+
+var dimensions = {
+ gender: 'm',
+ source: 'web',
+ dayType: 'weekend'
+};
+Parse.Analytics.track('signup', dimensions);
+
+

There is a default limit of 8 dimensions per event tracked.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

The name of the custom event to report to Parse as +having happened.

+ +
dimensions + + +object + + + + +

The dictionary of information by which to +segment this event.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved when the round-trip +to the server completes.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.AnonymousUtils.html b/api/5.1.0/Parse.AnonymousUtils.html new file mode 100644 index 000000000..8b010b434 --- /dev/null +++ b/api/5.1.0/Parse.AnonymousUtils.html @@ -0,0 +1,790 @@ + + + + + + AnonymousUtils - Documentation + + + + + + + + + + + + + + + + + +
+ +

AnonymousUtils

+ + + + + + + +
+ +
+ +

+ Parse. + + AnonymousUtils +

+ + +
+ +
+
+ + +
+ + + +

new AnonymousUtils()

+ + + + + +
+

Provides utility functions for working with Anonymously logged-in users.
+Anonymous users have some unique characteristics:

+
    +
  • Anonymous users don't need a user name or password.
  • +
      +
    • Once logged out, an anonymous user cannot be recovered.
    • +
    +
  • signUp converts an anonymous user to a standard user with the given username and password.
  • +
      +
    • Data associated with the anonymous user is retained.
    • +
    +
  • logIn switches users without converting the anonymous user.
  • +
      +
    • Data associated with the anonymous user will be lost.
    • +
    +
  • Service logIn (e.g. Facebook, Twitter) will attempt to convert + the anonymous user into a standard user by linking it to the service.
  • +
      +
    • If a user already exists that is linked to the service, it will instead switch to the existing user.
    • +
    +
  • Service linking (e.g. Facebook, Twitter) will convert the anonymous user + into a standard user by linking it to the service.
  • +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

(static) isLinked(user) → {boolean}

+ + + + + +
+

Gets whether the user has their account linked to anonymous user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user + + +Parse.User + + + + +

User to check for. +The user must be logged in on this device.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

true if the user has their account +linked to an anonymous user.

+
+ + +
+ + + +
+ + +
+ + + +

(static) isRegistered() → {boolean}

+ + + + + +
+

Returns true if Authentication Provider has been registered for use.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + + + + + + + +
+

Links Anonymous User to an existing PFUser.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user + + +Parse.User + + + + +

User to link. This must be the current user.

+ +
options + + +object + + + + +

MasterKey / SessionToken.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

Linked with User

+
+ + +
+ + + +
+ + +
+ + + +

(static) logIn(options) → {Promise}

+ + + + + +
+

Logs in a user Anonymously.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

MasterKey / SessionToken.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

Logged in user

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.CLP.html b/api/5.1.0/Parse.CLP.html new file mode 100644 index 000000000..6880efec0 --- /dev/null +++ b/api/5.1.0/Parse.CLP.html @@ -0,0 +1,3704 @@ + + + + + + CLP - Documentation + + + + + + + + + + + + + + + + + +
+ +

CLP

+ + + + + + + +
+ +
+ +

+ Parse. + + CLP +

+ +

Creates a new CLP. +If no argument is given, the CLP has no permissions for anyone. +If the argument is a Parse.User or Parse.Role, the CLP will have read and write +permission for only that user or role. +If the argument is any other JSON object, that object will be interpretted +as a serialized CLP created with toJSON().

+

A CLP, or Class Level Permissions can be added to any +Parse.Schema to restrict access to only a subset of users +of your application.

+

+For get/count/find/create/update/delete/addField using the following functions: +

Entity is type Parse.User or Parse.Role or string +Role is type Parse.Role or Name of Parse.Role

+

getGetRequiresAuthentication() +setGetRequiresAuthentication(allowed: boolean) +getGetPointerFields() +setGetPointerFields(pointerFields: string[]) +getGetAccess(entity: Entity) +setGetAccess(entity: Entity, allowed: boolean) +getPublicGetAccess() +setPublicGetAccess(allowed: boolean) +getRoleGetAccess(role: Role) +setRoleGetAccess(role: Role, allowed: boolean) +getFindRequiresAuthentication() +setFindRequiresAuthentication(allowed: boolean) +getFindPointerFields() +setFindPointerFields(pointerFields: string[]) +getFindAccess(entity: Entity) +setFindAccess(entity: Entity, allowed: boolean) +getPublicFindAccess() +setPublicFindAccess(allowed: boolean) +getRoleFindAccess(role: Role) +setRoleFindAccess(role: Role, allowed: boolean) +getCountRequiresAuthentication() +setCountRequiresAuthentication(allowed: boolean) +getCountPointerFields() +setCountPointerFields(pointerFields: string[]) +getCountAccess(entity: Entity) +setCountAccess(entity: Entity, allowed: boolean) +getPublicCountAccess() +setPublicCountAccess(allowed: boolean) +getRoleCountAccess(role: Role) +setRoleCountAccess(role: Role, allowed: boolean) +getCreateRequiresAuthentication() +setCreateRequiresAuthentication(allowed: boolean) +getCreatePointerFields() +setCreatePointerFields(pointerFields: string[]) +getCreateAccess(entity: Entity) +setCreateAccess(entity: Entity, allowed: boolean) +getPublicCreateAccess() +setPublicCreateAccess(allowed: Boolean) +getRoleCreateAccess(role: Role) +setRoleCreateAccess(role: Role, allowed: boolean) +getUpdateRequiresAuthentication() +setUpdateRequiresAuthentication(allowed: boolean) +getUpdatePointerFields() +setUpdatePointerFields(pointerFields: string[]) +getUpdateAccess(entity: Entity) +setUpdateAccess(entity: Entity, allowed: boolean) +getPublicUpdateAccess() +setPublicUpdateAccess(allowed: boolean) +getRoleUpdateAccess(role: Role) +setRoleUpdateAccess(role: Role, allowed: boolean) +getDeleteRequiresAuthentication() +setDeleteRequiresAuthentication(allowed: boolean) +getDeletePointerFields() +setDeletePointerFields(pointerFields: string[]) +getDeleteAccess(entity: Entity) +setDeleteAccess(entity: Entity, allowed: boolean) +getPublicDeleteAccess() +setPublicDeleteAccess(allowed: boolean) +getRoleDeleteAccess(role: Role) +setRoleDeleteAccess(role: Role, allowed: boolean) +getAddFieldRequiresAuthentication() +setAddFieldRequiresAuthentication(allowed: boolean) +getAddFieldPointerFields() +setAddFieldPointerFields(pointerFields: string[]) +getAddFieldAccess(entity: Entity) +setAddFieldAccess(entity: Entity, allowed: boolean) +getPublicAddFieldAccess() +setPublicAddFieldAccess(allowed: boolean) +getRoleAddFieldAccess(role: Role) +setRoleAddFieldAccess(role: Role, allowed: boolean)

+

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new CLP(userId)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +Parse.User +| + +Parse.Role +| + +object + + + + +

The user to initialize the CLP for

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

equals(other) → {boolean}

+ + + + + +
+

Returns whether this CLP is equal to another object

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
other + + +

The other object to compare to

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getProtectedFields(userId) → {Array.<string>}

+ + + + + +
+

Returns array of fields are accessable to this user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId, or a Parse.Role.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getPublicProtectedFields() → {Array.<string>}

+ + + + + +
+

Gets whether the public is allowed to read fields from this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getPublicReadAccess() → {boolean}

+ + + + + +
+

Gets whether the public is allowed to read from this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getPublicWriteAccess() → {boolean}

+ + + + + +
+

Gets whether the public is allowed to write to this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getReadAccess(userId) → {boolean}

+ + + + + +
+

Get whether the given user id is explicitly allowed to read from this class. +Even if this returns false, the user may still be able to access it if +getPublicReadAccess returns true or a role that the user belongs to has +write access.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId, or a Parse.Role.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getReadUserFields() → {Array.<string>}

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + +
+

User pointer fields

+
+ + +
+ + + +
+ + +
+ + + +

getRoleProtectedFields(role) → {Array.<string>}

+ + + + + +
+

Gets whether users belonging to the given role are allowed +to count to this user. Even if this returns false, the role may +still be able to count it if a parent role has count access.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getRoleReadAccess(role) → {boolean}

+ + + + + +
+

Gets whether users belonging to the given role are allowed +to read from this class. Even if this returns false, the role may +still be able to write it if a parent role has read access.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

true if the role has read access. false otherwise.

+
+ + +
+ + + +
+ + +
+ + + +

getRoleWriteAccess(role) → {boolean}

+ + + + + +
+

Gets whether users belonging to the given role are allowed +to write to this user. Even if this returns false, the role may +still be able to write it if a parent role has write access.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

true if the role has write access. false otherwise.

+
+ + +
+ + + +
+ + +
+ + + +

getWriteAccess(userId) → {boolean}

+ + + + + +
+

Gets whether the given user id is explicitly allowed to write to this class. +Even if this returns false, the user may still be able to write it if +getPublicWriteAccess returns true or a role that the user belongs to has +write access.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId, or a Parse.Role.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getWriteUserFields() → {Array.<string>}

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + +
+

User pointer fields

+
+ + +
+ + + +
+ + +
+ + + +

setProtectedFields(userId, fields)

+ + + + + +
+

Sets whether the given user is allowed to retrieve fields from this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId.

+ +
fields + + +Array.<string> + + + + +

fields to be protected

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setPublicProtectedFields(fields)

+ + + + + +
+

Sets whether the public is allowed to protect fields in this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
fields + + +Array.<string> + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setPublicReadAccess(allowed)

+ + + + + +
+

Sets whether the public is allowed to read from this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
allowed + + +boolean + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setPublicWriteAccess(allowed)

+ + + + + +
+

Sets whether the public is allowed to write to this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
allowed + + +boolean + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setReadAccess(userId, allowed)

+ + + + + +
+

Sets whether the given user is allowed to read from this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId.

+ +
allowed + + +boolean + + + + +

whether that user should have read access.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setReadUserFields(pointerFields)

+ + + + + +
+

Sets user pointer fields to allow permission for get/count/find operations.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pointerFields + + +Array.<string> + + + + +

User pointer fields

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setRoleProtectedFields(role, fields)

+ + + + + +
+

Sets whether users belonging to the given role are allowed +to set access field in this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
fields + + +Array.<string> + + + + +

Fields to be protected by Role.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + + + +
+ + +
+ + + +

setRoleReadAccess(role, allowed)

+ + + + + +
+

Sets whether users belonging to the given role are allowed +to read from this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
allowed + + +boolean + + + + +

Whether the given role can read this object.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + + + +
+ + +
+ + + +

setRoleWriteAccess(role, allowed)

+ + + + + +
+

Sets whether users belonging to the given role are allowed +to write to this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
role + + +

The name of the role, or a Parse.Role object.

+ +
allowed + + +boolean + + + + +

Whether the given role can write this object.

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+
+
+

If role is neither a Parse.Role nor a String.

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + +
+ + + + + +
+ + +
+ + + +

setWriteAccess(userId, allowed)

+ + + + + +
+

Sets whether the given user id is allowed to write to this class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +

An instance of Parse.User or its objectId, or a Parse.Role..

+ +
allowed + + +boolean + + + + +

Whether that user should have write access.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setWriteUserFields(pointerFields)

+ + + + + +
+

Sets user pointer fields to allow permission for create/delete/update/addField operations

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pointerFields + + +Array.<string> + + + + +

User pointer fields

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

toJSON() → {object}

+ + + + + +
+

Returns a JSON-encoded version of the CLP.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Cloud.html b/api/5.1.0/Parse.Cloud.html new file mode 100644 index 000000000..706c643a4 --- /dev/null +++ b/api/5.1.0/Parse.Cloud.html @@ -0,0 +1,4370 @@ + + + + + + Cloud - Documentation + + + + + + + + + + + + + + + + + +
+ +

Cloud

+ + + + + + + +
+ +
+ +

+ Parse. + + Cloud +

+ + +
+ +
+
+ + +
+ + + +

new Cloud()

+ + + + + +
+

Contains functions for calling and declaring +cloud functions.

+

+ Some functions are only available from Cloud Code. +

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

(static) afterDelete(arg1, func)

+ + + + + +
+

Registers an after delete function.

+

Available in Cloud Code only.

+

If you want to use afterDelete for a predefined class in the Parse JavaScript SDK (e.g. Parse.User), you should pass the class itself and not the String for arg1.

+
Parse.Cloud.afterDelete('MyCustomClass', (request) => {
+  // code here
+})
+
+Parse.Cloud.afterDelete(Parse.User, (request) => {
+  // code here
+})
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
arg1 + + +string +| + +Parse.Object + + + + +

The Parse.Object subclass to register the after delete function for. This can instead be a String that is the className of the subclass.

+ +
func + + +function + + + + +

The function to run after a delete. This function should take just one parameter, Parse.Cloud.TriggerRequest.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) afterSave(arg1, func)

+ + + + + +
+

Registers an after save function.

+

Available in Cloud Code only.

+

If you want to use afterSave for a predefined class in the Parse JavaScript SDK (e.g. Parse.User), you should pass the class itself and not the String for arg1.

+
Parse.Cloud.afterSave('MyCustomClass', function(request) {
+  // code here
+})
+
+Parse.Cloud.afterSave(Parse.User, function(request) {
+  // code here
+})
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
arg1 + + +string +| + +Parse.Object + + + + +

The Parse.Object subclass to register the after save function for. This can instead be a String that is the className of the subclass.

+ +
func + + +function + + + + +

The function to run after a save. This function should take just one parameter, Parse.Cloud.TriggerRequest.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) afterSaveFile(func)

+ + + + + +
+

Registers an after save file function.

+

Available in Cloud Code only.

+

Example: creating a new object that references this file in a separate collection

+
Parse.Cloud.afterSaveFile(async ({ file, user }) => {
+  const fileObject = new Parse.Object('FileObject');
+  fileObject.set('metadata', file.metadata());
+  fileObject.set('tags', file.tags());
+  fileObject.set('name', file.name());
+  fileObject.set('createdBy', user);
+  await fileObject.save({ sessionToken: user.getSessionToken() });
+});
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
func + + +function + + + + +

The function to run after a file saves. This function should take one parameter, a Parse.Cloud.FileTriggerRequest.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) beforeConnect(func)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
func + + +function + + + + +

The function to before connection is made. This function can be async and should take just one parameter, Parse.Cloud.ConnectTriggerRequest.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) beforeDelete(arg1, func)

+ + + + + +
+

Registers an before delete function.

+

Available in Cloud Code only.

+

If you want to use beforeDelete for a predefined class in the Parse JavaScript SDK (e.g. Parse.User), you should pass the class itself and not the String for arg1.

+
Parse.Cloud.beforeDelete('MyCustomClass', (request) => {
+  // code here
+})
+
+Parse.Cloud.beforeDelete(Parse.User, (request) => {
+  // code here
+})
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
arg1 + + +string +| + +Parse.Object + + + + +

The Parse.Object subclass to register the before delete function for. This can instead be a String that is the className of the subclass.

+ +
func + + +function + + + + +

The function to run before a delete. This function should take just one parameter, Parse.Cloud.TriggerRequest.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) beforeSave(arg1, func)

+ + + + + +
+

Registers an before save function.

+

Available in Cloud Code only.

+

If you want to use beforeSave for a predefined class in the Parse JavaScript SDK (e.g. Parse.User), you should pass the class itself and not the String for arg1.

+
Parse.Cloud.beforeSave('MyCustomClass', (request) => {
+  // code here
+})
+
+Parse.Cloud.beforeSave(Parse.User, (request) => {
+  // code here
+})
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
arg1 + + +string +| + +Parse.Object + + + + +

The Parse.Object subclass to register the after save function for. This can instead be a String that is the className of the subclass.

+ +
func + + +function + + + + +

The function to run before a save. This function should take just one parameter, Parse.Cloud.TriggerRequest.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) beforeSaveFile(func)

+ + + + + +
+

Registers an before save file function. A new Parse.File can be returned to override the file that gets saved. +If you want to replace the rquesting Parse.File with a Parse.File that is already saved, simply return the already saved Parse.File. +You can also add metadata to the file that will be stored via whatever file storage solution you're using.

+

Available in Cloud Code only.

+

Example: Adding metadata and tags

+
Parse.Cloud.beforeSaveFile(({ file, user }) => {
+  file.addMetadata('foo', 'bar');
+  file.addTag('createdBy', user.id);
+});
+
+
+

Example: replacing file with an already saved file

+
Parse.Cloud.beforeSaveFile(({ file, user }) => {
+  return user.get('avatar');
+});
+
+
+

Example: replacing file with a different file

+
Parse.Cloud.beforeSaveFile(({ file, user }) => {
+  const metadata = { foo: 'bar' };
+  const tags = { createdBy: user.id };
+  const newFile = new Parse.File(file.name(), <some other file data>, 'text/plain', metadata, tags);
+  return newFile;
+});
+
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
func + + +function + + + + +

The function to run before a file saves. This function should take one parameter, a Parse.Cloud.FileTriggerRequest.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) beforeSubscribe(arg1, func)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
arg1 + + +string +| + +Parse.Object + + + + +

The Parse.Object subclass to register the before subscription function for. This can instead be a String that is the className of the subclass.

+ +
func + + +function + + + + +

The function to run before a subscription. This function can be async and should take one parameter, a Parse.Cloud.TriggerRequest.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) define(name, data)

+ + + + + +
+

Defines a Cloud Function.

+

Available in Cloud Code only.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

The name of the Cloud Function

+ +
data + + +function + + + + +

The Cloud Function to register. This function should take one parameter Parse.Cloud.FunctionRequest

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) getJobStatus(jobStatusId) → {Parse.Object}

+ + + + + +
+

Gets job status by Id

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
jobStatusId + + +string + + + + +

The Id of Job Status.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + +
+

Status of Job.

+
+ + +
+ + + +
+ + +
+ + + +

(static) getJobsData() → {Promise}

+ + + + + +
+

Gets data for the current set of cloud jobs.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that will be resolved with the result +of the function.

+
+ + +
+ + + +
+ + +
+ + + +

(static) httpRequest(options) → {Promise.<Parse.Cloud.HTTPResponse>}

+ + + + + +
+

Makes an HTTP Request.

+

Available in Cloud Code only.

+

By default, Parse.Cloud.httpRequest does not follow redirects caused by HTTP 3xx response codes. You can use the followRedirects option in the Parse.Cloud.HTTPOptions object to change this behavior.

+

Sample request:

+
Parse.Cloud.httpRequest({
+  url: 'http://www.example.com/'
+}).then(function(httpResponse) {
+  // success
+  console.log(httpResponse.text);
+},function(httpResponse) {
+  // error
+  console.error('Request failed with response code ' + httpResponse.status);
+});
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +Parse.Cloud.HTTPOptions + + + + +

The Parse.Cloud.HTTPOptions object that makes the request.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<Parse.Cloud.HTTPResponse> + + +
+
+ + +
+

A promise that will be resolved with a Parse.Cloud.HTTPResponse object when the request completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) job(name, func)

+ + + + + +
+

Defines a Background Job.

+

Available in Cloud Code only.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

The name of the Background Job

+ +
func + + +function + + + + +

The Background Job to register. This function should take two parameters a Parse.Cloud.JobRequest and a Parse.Cloud.JobStatus

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) run(name, data, options) → {Promise}

+ + + + + +
+

Makes a call to a cloud function.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

The function name.

+ +
data + + +object + + + + +

The parameters to send to the cloud function.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that will be resolved with the result +of the function.

+
+ + +
+ + + +
+ + +
+ + + +

(static) startJob(name, data) → {Promise}

+ + + + + +
+

Starts a given cloud job, which will process asynchronously.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

The function name.

+ +
data + + +object + + + + +

The parameters to send to the cloud function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that will be resolved with the jobStatusId +of the job.

+
+ + +
+ + + +
+ + + + +

Type Definitions

+ + + +
+

ConnectTriggerRequest

+ + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
installationId + + +string + + + +

If set, the installationId triggering the request.

useMasterKey + + +boolean + + + +

If true, means the master key was used.

user + + +Parse.User + + + +

If set, the user that made the request.

clients + + +number + + + +

The number of clients connected.

subscriptions + + +number + + + +

The number of subscriptions connected.

sessionToken + + +string + + + +

If set, the session of the user that made the request.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

FileTriggerRequest

+ + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
installationId + + +string + + + +

If set, the installationId triggering the request.

master + + +boolean + + + +

If true, means the master key was used.

user + + +Parse.User + + + +

If set, the user that made the request.

file + + +Parse.File + + + +

The file triggering the hook.

ip + + +string + + + +

The IP address of the client making the request.

headers + + +object + + + +

The original HTTP headers for the request.

triggerName + + +string + + + +

The name of the trigger (beforeSaveFile, afterSaveFile, ...)

log + + +object + + + +

The current logger inside Parse Server.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

FunctionRequest

+ + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
installationId + + +string + + + +

If set, the installationId triggering the request.

master + + +boolean + + + +

If true, means the master key was used.

user + + +Parse.User + + + +

If set, the user that made the request.

params + + +object + + + +

The params passed to the cloud function.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

HTTPOptions

+ + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
body + + +string +| + +object + + + +

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 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.

error + + +function + + + +

The function that is called when the request fails. It will be passed a Parse.Cloud.HTTPResponse object.

followRedirects + + +boolean + + + +

Whether to follow redirects caused by HTTP 3xx responses. Defaults to false.

headers + + +object + + + +

The headers for the request.

method + + +string + + + +

The method of the request. GET, POST, PUT, DELETE, HEAD, and OPTIONS are supported. Will default to GET if not specified.

params + + +string +| + +object + + + +

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.

success + + +function + + + +

The function that is called when the request successfully completes. It will be passed a Parse.Cloud.HTTPResponse object.

url + + +string + + + +

The url to send the request to.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

HTTPResponse

+ + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
buffer + + +Buffer + + + +

The raw byte representation of the response body. Use this to receive binary data. See Buffer for more details.

cookies + + +object + + + +

The cookies sent by the server. The keys in this object are the names of the cookies. The values are Parse.Cloud.Cookie objects.

data + + +object + + + +

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.

headers + + +object + + + +

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.

status + + +number + + + +

The status code.

text + + +string + + + +

The raw text representation of the response body.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

JobRequest

+ + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
params + + +object + + + +

The params passed to the background job.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

JobStatus

+ + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
error + + +function + + + +

If error is called, will end the job unsuccessfully with an optional completion message to be stored in the job status.

message + + +function + + + +

If message is called with a string argument, will update the current message to be stored in the job status.

success + + +function + + + +

If success is called, will end the job successfullly with the optional completion message to be stored in the job status.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

TriggerRequest

+ + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
installationId + + +string + + + +

If set, the installationId triggering the request.

master + + +boolean + + + +

If true, means the master key was used.

user + + +Parse.User + + + +

If set, the user that made the request.

object + + +Parse.Object + + + +

The object triggering the hook.

ip + + +string + + + +

The IP address of the client making the request.

headers + + +object + + + +

The original HTTP headers for the request.

triggerName + + +string + + + +

The name of the trigger (beforeSave, afterSave, ...)

log + + +object + + + +

The current logger inside Parse Server.

original + + +Parse.Object + + + +

If set, the object, as currently stored.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Config.html b/api/5.1.0/Parse.Config.html new file mode 100644 index 000000000..dc345d99a --- /dev/null +++ b/api/5.1.0/Parse.Config.html @@ -0,0 +1,929 @@ + + + + + + Config - Documentation + + + + + + + + + + + + + + + + + +
+ +

Config

+ + + + + + + +
+ +
+ +

+ Parse. + + Config +

+ +

Parse.Config is a local representation of configuration data that +can be set from the Parse dashboard.

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Config()

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

escape(attr) → {string}

+ + + + + +
+

Gets the HTML-escaped value of an attribute.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

get(attr) → {*}

+ + + + + +
+

Gets the value of an attribute.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +* + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) current() → {Parse.Config}

+ + + + + +
+

Retrieves the most recently-fetched configuration object, either from +memory or from local storage if necessary.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Config + + +
+
+ + +
+

The most recently-fetched Parse.Config if it +exists, else an empty Parse.Config.

+
+ + +
+ + + +
+ + +
+ + + +

(static) get(options) → {Promise}

+ + + + + +
+

Gets a new configuration object from the server.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with a newly-created +configuration object when the get completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) save(attrs, masterKeyOnlyFlags) → {Promise}

+ + + + + +
+

Save value keys to the server.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +object + + + + +

The config parameters and values.

+ +
masterKeyOnlyFlags + + +object + + + + +

The flags that define whether config parameters listed +in attrs should be retrievable only by using the master key. +For example: param1: true makes param1 only retrievable by using the master key. +If a parameter is not provided or set to false, it can be retrieved without +using the master key.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with a newly-created +configuration object or with the current with the update.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Error.html b/api/5.1.0/Parse.Error.html new file mode 100644 index 000000000..8c681c00c --- /dev/null +++ b/api/5.1.0/Parse.Error.html @@ -0,0 +1,7176 @@ + + + + + + Error - Documentation + + + + + + + + + + + + + + + + + +
+ +

Error

+ + + + + + + +
+ +
+ +

+ Parse. + + Error +

+ +

Constructs a new Parse.Error object with the given code and message.

+

Parse.CoreManager.set('PARSE_ERRORS', [{ code, message }]) can be use to override error messages.

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Error(code, message)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

An error code constant from Parse.Error.

+ +
message + + +string + + + + +

A detailed description of the error.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +

Members

+ + + +
+

(static) ACCOUNT_ALREADY_LINKED

+ + + + +
+

Error code indicating that an an account being linked is already linked +to another user.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ACCOUNT_ALREADY_LINKED + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) AGGREGATE_ERROR

+ + + + +
+

Error code indicating that there were multiple errors. Aggregate errors +have an "errors" property, which is an array of error objects with more +detail about each error that occurred.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
AGGREGATE_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) CACHE_MISS

+ + + + +
+

Error code indicating the result was not found in the cache.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
CACHE_MISS + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) COMMAND_UNAVAILABLE

+ + + + +
+

Error code indicating that the feature you tried to access is only +available internally for testing purposes.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
COMMAND_UNAVAILABLE + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) CONNECTION_FAILED

+ + + + +
+

Error code indicating the connection to the Parse servers failed.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
CONNECTION_FAILED + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) DUPLICATE_REQUEST

+ + + + +
+

Error code indicating that the request was a duplicate and has been discarded due to +idempotency rules.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
DUPLICATE_REQUEST + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) DUPLICATE_VALUE

+ + + + +
+

Error code indicating that a unique field was given a value that is +already taken.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
DUPLICATE_VALUE + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) EMAIL_MISSING

+ + + + +
+

Error code indicating that the email is missing, but must be specified.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EMAIL_MISSING + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) EMAIL_NOT_FOUND

+ + + + +
+

Error code indicating that a user with the specified email was not found.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EMAIL_NOT_FOUND + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) EMAIL_TAKEN

+ + + + +
+

Error code indicating that the email has already been taken.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EMAIL_TAKEN + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) EXCEEDED_QUOTA

+ + + + +
+

Error code indicating that an application quota was exceeded. Upgrade to +resolve.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
EXCEEDED_QUOTA + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) FILE_DELETE_ERROR

+ + + + +
+

Error code indicating an error deleting a file.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
FILE_DELETE_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) FILE_DELETE_UNNAMED_ERROR

+ + + + +
+

Error code indicating an error deleting an unnamed file.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
FILE_DELETE_UNNAMED_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) FILE_READ_ERROR

+ + + + +
+

Error code indicating the client was unable to read an input file.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
FILE_READ_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) FILE_SAVE_ERROR

+ + + + +
+

Error code indicating an error saving a file.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
FILE_SAVE_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) FILE_TOO_LARGE

+ + + + +
+

Error code indicating a file that was too large.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
FILE_TOO_LARGE + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INCORRECT_TYPE

+ + + + +
+

Error code indicating that a field was set to an inconsistent type.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INCORRECT_TYPE + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INTERNAL_SERVER_ERROR

+ + + + +
+

Error code indicating that something has gone wrong with the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INTERNAL_SERVER_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_ACL

+ + + + +
+

Error code indicating an invalid ACL was provided.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_ACL + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_CHANNEL_NAME

+ + + + +
+

Error code indicating an invalid channel name. A channel name is either +an empty string (the broadcast channel) or contains only a-zA-Z0-9_ +characters and starts with a letter.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_CHANNEL_NAME + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_CLASS_NAME

+ + + + +
+

Error code indicating a missing or invalid classname. Classnames are +case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the +only valid characters.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_CLASS_NAME + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_CONTENT_LENGTH

+ + + + +
+

Error code indicating an invalid content length.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_CONTENT_LENGTH + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_EMAIL_ADDRESS

+ + + + +
+

Error code indicating that the email address was invalid.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_EMAIL_ADDRESS + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_EVENT_NAME

+ + + + +
+

Error code indicating an invalid event name.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_EVENT_NAME + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_FILE_NAME

+ + + + +
+

Error code indicating that an invalid filename was used for ParseFile. +A valid file name contains only a-zA-Z0-9_. characters and is between 1 +and 128 characters.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_FILE_NAME + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_IMAGE_DATA

+ + + + +
+

Error code indicating that invalid image data was provided.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_IMAGE_DATA + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_JSON

+ + + + +
+

Error code indicating that badly formed JSON was received upstream. This +either indicates you have done something unusual with modifying how +things encode to JSON, or the network is failing badly.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_JSON + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_KEY_NAME

+ + + + +
+

Error code indicating an invalid key name. Keys are case-sensitive. They +must start with a letter, and a-zA-Z0-9_ are the only valid characters.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_KEY_NAME + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_LINKED_SESSION

+ + + + +
+

Error code indicating that a user with a linked (e.g. Facebook) account +has an invalid session.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_LINKED_SESSION + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_NESTED_KEY

+ + + + +
+

Error code indicating that an invalid key was used in a nested +JSONObject.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_NESTED_KEY + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_POINTER

+ + + + +
+

Error code indicating a malformed pointer. You should not see this unless +you have been mucking about changing internal Parse code.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_POINTER + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_PUSH_TIME_ERROR

+ + + + +
+

Error code indicating an invalid push time.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_PUSH_TIME_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_QUERY

+ + + + +
+

Error code indicating you tried to query with a datatype that doesn't +support it, like exact matching an array or object.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_QUERY + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_ROLE_NAME

+ + + + +
+

Error code indicating that a role's name is invalid.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_ROLE_NAME + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_SCHEMA_OPERATION

+ + + + +
+

Error code indicating an invalid operation occured on schema

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_SCHEMA_OPERATION + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_SESSION_TOKEN

+ + + + +
+

Error code indicating that the current session token is invalid.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_SESSION_TOKEN + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) INVALID_VALUE

+ + + + +
+

Error code indicating that a field had an invalid value.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
INVALID_VALUE + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) LINKED_ID_MISSING

+ + + + +
+

Error code indicating that a user cannot be linked to an account because +that account's id could not be found.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
LINKED_ID_MISSING + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) MFA_ERROR

+ + + + +
+

Error code indicating an error enabling or verifying MFA

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
MFA_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) MFA_TOKEN_REQUIRED

+ + + + +
+

Error code indicating that a valid MFA token must be provided

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
MFA_TOKEN_REQUIRED + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) MISSING_CONTENT_LENGTH

+ + + + +
+

Error code indicating a missing content length.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
MISSING_CONTENT_LENGTH + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) MISSING_CONTENT_TYPE

+ + + + +
+

Error code indicating a missing content type.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
MISSING_CONTENT_TYPE + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) MISSING_OBJECT_ID

+ + + + +
+

Error code indicating an unspecified object id.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
MISSING_OBJECT_ID + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) MUST_CREATE_USER_THROUGH_SIGNUP

+ + + + +
+

Error code indicating that a user can only be created through signup.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
MUST_CREATE_USER_THROUGH_SIGNUP + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) NOT_INITIALIZED

+ + + + +
+

You must call Parse.initialize before using the Parse library.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
NOT_INITIALIZED + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) OBJECT_NOT_FOUND

+ + + + +
+

Error code indicating the specified object doesn't exist.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
OBJECT_NOT_FOUND + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) OBJECT_TOO_LARGE

+ + + + +
+

Error code indicating that the object is too large.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
OBJECT_TOO_LARGE + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) OPERATION_FORBIDDEN

+ + + + +
+

Error code indicating that the operation isn't allowed for clients.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
OPERATION_FORBIDDEN + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) OTHER_CAUSE

+ + + + +
+

Error code indicating some error other than those enumerated here.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
OTHER_CAUSE + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) PASSWORD_MISSING

+ + + + +
+

Error code indicating that the password is missing or empty.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
PASSWORD_MISSING + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) PUSH_MISCONFIGURED

+ + + + +
+

Error code indicating that push is misconfigured.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
PUSH_MISCONFIGURED + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) REQUEST_LIMIT_EXCEEDED

+ + + + +
+

Error code indicating that the application has exceeded its request +limit.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
REQUEST_LIMIT_EXCEEDED + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) SCRIPT_FAILED

+ + + + +
+

Error code indicating that a Cloud Code script failed.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
SCRIPT_FAILED + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) SESSION_MISSING

+ + + + +
+

Error code indicating that a user object without a valid session could +not be altered.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
SESSION_MISSING + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) TIMEOUT

+ + + + +
+

Error code indicating that the request timed out on the server. Typically +this indicates that the request is too expensive to run.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
TIMEOUT + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) UNSAVED_FILE_ERROR

+ + + + +
+

Error code indicating an unsaved file.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
UNSAVED_FILE_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) UNSUPPORTED_SERVICE

+ + + + +
+

Error code indicating that a service being linked (e.g. Facebook or +Twitter) is unsupported.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
UNSUPPORTED_SERVICE + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) USERNAME_MISSING

+ + + + +
+

Error code indicating that the username is missing or empty.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
USERNAME_MISSING + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) USERNAME_TAKEN

+ + + + +
+

Error code indicating that the username has already been taken.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
USERNAME_TAKEN + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) VALIDATION_ERROR

+ + + + +
+

Error code indicating that a Cloud Code validation failed.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
VALIDATION_ERROR + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) X_DOMAIN_REQUEST

+ + + + +
+

Error code indicating a real error code is unavailable because +we had to use an XDomainRequest object to allow CORS requests in +Internet Explorer, which strips the body from HTTP responses that have +a non-2XX status code.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
X_DOMAIN_REQUEST + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.FacebookUtils.html b/api/5.1.0/Parse.FacebookUtils.html new file mode 100644 index 000000000..72e5dae84 --- /dev/null +++ b/api/5.1.0/Parse.FacebookUtils.html @@ -0,0 +1,1062 @@ + + + + + + FacebookUtils - Documentation + + + + + + + + + + + + + + + + + +
+ +

FacebookUtils

+ + + + + + + +
+ +
+ +

+ Parse. + + FacebookUtils +

+ + +
+ +
+
+ + +
+ + + +

new FacebookUtils()

+ + + + + +
+

Provides a set of utilities for using Parse with Facebook.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

(static) init(options)

+ + + + + +
+

Initializes Parse Facebook integration. Call this function after you +have loaded the Facebook Javascript SDK with the same parameters +as you would pass to + +FB.init(). Parse.FacebookUtils will invoke FB.init() for you +with these arguments.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Facebook options argument as described here: + +FB.init(). The status flag will be coerced to 'false' because it +interferes with Parse Facebook integration. Call FB.getLoginStatus() +explicitly if this behavior is required by your application.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) isLinked(user) → {boolean}

+ + + + + +
+

Gets whether the user has their account linked to Facebook.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user + + +Parse.User + + + + +

User to check for a facebook link. +The user must be logged in on this device.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

true if the user has their account +linked to Facebook.

+
+ + +
+ + + +
+ + +
+ + + + + + + + + +
+

Links Facebook to an existing PFUser. This method delegates to the +Facebook SDK to authenticate the user, and then automatically links +the account to the Parse.User.

+

Standard API:

+

link(user: Parse.User, permission: string, authData?: Object);

+

Advanced API: Used for handling your own oAuth tokens +https://docs.parseplatform.org/rest/guide/#linking-users

+

link(user: Parse.User, authData: Object, options?: FullOptions);

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user + + +Parse.User + + + + +

User to link to Facebook. This must be the +current user.

+ +
permissions + + +string +| + +object + + + + +

The permissions required for Facebook +log in. This is a comma-separated string of permissions. +Alternatively, supply a Facebook authData object as described in our +REST API docs if you want to handle getting facebook auth tokens +yourself.

+ +
options + + +object + + + + +

MasterKey / SessionToken. Alternatively can be used for authData if permissions is a string

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) logIn(permissions, options) → {Promise}

+ + + + + +
+

Logs in a user using Facebook. This method delegates to the Facebook +SDK to authenticate the user, and then automatically logs in (or +creates, in the case where it is a new user) a Parse.User.

+

Standard API:

+

logIn(permission: string, authData: Object);

+

Advanced API: Used for handling your own oAuth tokens +https://docs.parseplatform.org/rest/guide/#linking-users

+

logIn(authData: Object, options?: Object);

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
permissions + + +string +| + +object + + + + +

The permissions required for Facebook +log in. This is a comma-separated string of permissions. +Alternatively, supply a Facebook authData object as described in our +REST API docs if you want to handle getting facebook auth tokens +yourself.

+ +
options + + +object + + + + +

MasterKey / SessionToken. Alternatively can be used for authData if permissions is a string

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + + + + + + + +
+

Unlinks the Parse.User from a Facebook account.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user + + +Parse.User + + + + +

User to unlink from Facebook. This must be the +current user.

+ +
options + + +object + + + + +

Standard options object with success and error +callbacks.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.File.html b/api/5.1.0/Parse.File.html new file mode 100644 index 000000000..9e3a22bc4 --- /dev/null +++ b/api/5.1.0/Parse.File.html @@ -0,0 +1,1898 @@ + + + + + + File - Documentation + + + + + + + + + + + + + + + + + +
+ +

File

+ + + + + + + +
+ +
+ +

+ Parse. + + File +

+ +

A Parse.File is a local representation of a file that is saved to the Parse +cloud.

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new File(name, data, type, metadata, tags)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +String + + + + +

The file's name. This will be prefixed by a unique +value once the file has finished saving. The file name must begin with +an alphanumeric character, and consist of alphanumeric characters, +periods, spaces, underscores, or dashes.

+ +
data + + +Array + + + + +

The data for the file, as either: +1. an Array of byte value Numbers, or +2. an Object like { base64: "..." } with a base64-encoded String. +3. an Object like { uri: "..." } with a uri String. +4. a File object selected with a file upload control. (3) only works +in Firefox 3.6+, Safari 6.0.2+, Chrome 7+, and IE 10+. +For example:

+
+var fileUploadControl = $("#profilePhotoFileUpload")[0];
+if (fileUploadControl.files.length > 0) {
+  var file = fileUploadControl.files[0];
+  var name = "photo.jpg";
+  var parseFile = new Parse.File(name, file);
+  parseFile.save().then(function() {
+    // The file has been saved to Parse.
+  }, function(error) {
+    // The file either could not be read, or could not be saved to Parse.
+  });
+}
+ +
type + + +String + + + + +

Optional Content-Type header to use for the file. If +this is omitted, the content type will be inferred from the name's +extension.

+ +
metadata + + +Object + + + + +

Optional key value pairs to be stored with file object

+ +
tags + + +Object + + + + +

Optional key value pairs to be stored with file object

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

addMetadata(key, value)

+ + + + + +
+

Sets metadata to be saved with file object. Adds to existing metadata.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

key to store the metadata

+ +
value + + +* + + + + +

metadata

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

addTag(key, value)

+ + + + + +
+

Sets tags to be saved with file object. Adds to existing tags.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

key to store tags

+ +
value + + +* + + + + +

tag

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

cancel()

+ + + + + +
+

Aborts the request if it has already been sent.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

destroy(options) → {Promise}

+ + + + + +
+

Deletes the file from the Parse cloud. +In Cloud Code and Node only with Master Key.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
    +                
    +            
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

Promise that is resolved when the delete finishes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) getData() → {Promise}

+ + + + + +
+

Return the data for the file, downloading it if not already present. +Data is present if initialized with Byte Array, Base64 or Saved with Uri. +Data is cleared if saved with File object selected with a file upload control

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

Promise that is resolve with base64 data

+
+ + +
+ + + +
+ + +
+ + + +

metadata() → {object}

+ + + + + +
+

Gets the metadata of the file.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

name() → {string}

+ + + + + +
+

Gets the name of the file. Before save is called, this is the filename +given by the user. After save is called, that name gets prefixed with a +unique identifier.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

save(options) → {Promise|undefined}

+ + + + + +
+

Saves the file to the Parse cloud.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • progress: In Browser only, callback for upload progress. For example: +
    +let parseFile = new Parse.File(name, file);
    +parseFile.save({
    +  progress: (progressValue, loaded, total, { type }) => {
    +    if (type === "upload" && progressValue !== null) {
    +      // Update the UI using progressValue
    +    }
    +  }
    +});
    +
    +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + +
+

Promise that is resolved when the save finishes.

+
+ + +
+ + + +
+ + +
+ + + +

setMetadata(metadata)

+ + + + + +
+

Sets metadata to be saved with file object. Overwrites existing metadata

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
metadata + + +object + + + + +

Key value pairs to be stored with file object

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setTags(tags)

+ + + + + +
+

Sets tags to be saved with file object. Overwrites existing tags

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tags + + +object + + + + +

Key value pairs to be stored with file object

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

tags() → {object}

+ + + + + +
+

Gets the tags of the file.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

url(options) → {string|undefined}

+ + + + + +
+

Gets the url of the file. It is only available after you save the file or +after you get the file from a Parse.Object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

An object to specify url options

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string +| + +undefined + + +
+
+ + + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Installation.html b/api/5.1.0/Parse.Installation.html new file mode 100644 index 000000000..8986b8fc1 --- /dev/null +++ b/api/5.1.0/Parse.Installation.html @@ -0,0 +1,2099 @@ + + + + + + Installation - Documentation + + + + + + + + + + + + + + + + + +
+ +

Installation

+ + + + + + + +
+ +
+ +

+ Parse. + + Installation +

+ +

Parse.Installation is a local representation of installation data that can be saved and retrieved from the Parse cloud. +This class is a subclass of a Parse.Object, and retains the same functionality of a Parse.Object, but also extends it with installation-specific features.

+

A valid Parse.Installation can only be instantiated via Parse.Installation.currentInstallation() +

Parse.Installation objects which have a valid deviceToken and are saved to the Parse cloud can be used to target push notifications.

+

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Installation(attributes)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attributes + + +object + + + + +

The initial set of data to store in the object.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +

Members

+ + + +
+

(static) DEVICE_TYPES

+ + + + +
+

Returns the device types for used for Push Notifications.

+
+Parse.Installation.DEVICE_TYPES.IOS
+Parse.Installation.DEVICE_TYPES.MACOS
+Parse.Installation.DEVICE_TYPES.TVOS
+Parse.Installation.DEVICE_TYPES.FCM
+Parse.Installation.DEVICE_TYPES.ANDROID
+Parse.Installation.DEVICE_TYPES.WEB
+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
DEVICE_TYPES + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) GCMSenderId

+ + + + +
+

Gets the GCM sender identifier for this installation

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
GCMSenderId + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) appIdentifier

+ + + + +
+

A unique identifier for this installation’s client application. In iOS, this is the Bundle Identifier.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
appIdentifier + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) appName

+ + + + +
+

The display name of the client application to which this installation belongs.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
appName + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) appVersion

+ + + + +
+

The version string of the client application to which this installation belongs.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
appVersion + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) badge

+ + + + +
+

The current value of the icon badge for iOS apps. +Changes to this value on the server will be used +for future badge-increment push notifications.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
badge + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) channels

+ + + + +
+

An array of the channels to which a device is currently subscribed.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
channels + + +Array.<string> + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) deviceToken

+ + + + +
+

Token used to deliver push notifications to the device.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
deviceToken + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) deviceType

+ + + + +
+

The type of device, “ios”, “android”, “web”, etc.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
deviceType + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) installationId

+ + + + +
+

Universally Unique Identifier (UUID) for the device used by Parse. It must be unique across all of an app’s installations.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
installationId + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) localeIdentifier

+ + + + +
+

Gets the local identifier for this installation

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
localeIdentifier + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) parseVersion

+ + + + +
+

Gets the parse server version for this installation

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
parseVersion + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) pushType

+ + + + +
+

This field is reserved for directing Parse to the push delivery network to be used.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pushType + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) timeZone

+ + + + +
+

Gets the time zone for this installation

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
timeZone + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

(async) save(…args) → {Promise}

+ + + + + +
+

Wrap the default save behavior with functionality to save to local storage.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
args + + +any + + + + + + + + + + <repeatable>
+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) currentInstallation() → {Promise}

+ + + + + +
+

Get the current Parse.Installation from disk. If doesn't exists, create an new installation.

+
+const installation = await Parse.Installation.currentInstallation();
+installation.set('deviceToken', '123');
+await installation.save();
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that resolves to the local installation object.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.LiveQueryClient.html b/api/5.1.0/Parse.LiveQueryClient.html new file mode 100644 index 000000000..8b6c1ca59 --- /dev/null +++ b/api/5.1.0/Parse.LiveQueryClient.html @@ -0,0 +1,966 @@ + + + + + + LiveQueryClient - Documentation + + + + + + + + + + + + + + + + + +
+ +

LiveQueryClient

+ + + + + + + +
+ +
+ +

+ Parse. + + LiveQueryClient +

+ +

Creates a new LiveQueryClient. +cloud functions.

+

A wrapper of a standard WebSocket client. We add several useful methods to +help you connect/disconnect to LiveQueryServer, subscribe/unsubscribe a ParseQuery easily.

+

javascriptKey and masterKey are used for verifying the LiveQueryClient when it tries +to connect to the LiveQuery server

+

We expose three events to help you monitor the status of the LiveQueryClient.

+
+let Parse = require('parse/node');
+let LiveQueryClient = Parse.LiveQueryClient;
+let client = new LiveQueryClient({
+  applicationId: '',
+  serverURL: '',
+  javascriptKey: '',
+  masterKey: ''
+ });
+
+

Open - When we establish the WebSocket connection to the LiveQuery server, you'll get this event.

+
+client.on('open', () => {
+
+});
+

Close - When we lose the WebSocket connection to the LiveQuery server, you'll get this event.

+
+client.on('close', () => {
+
+});
+

Error - When some network error or LiveQuery server error happens, you'll get this event.

+
+client.on('error', (error) => {
+
+});
+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new LiveQueryClient(options)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
applicationId + + +string + + + + +

applicationId of your Parse app

+ +
serverURL + + +string + + + + +

the URL of your LiveQuery server

+ +
javascriptKey + + +string + + + + +

(optional)

+ +
masterKey + + +string + + + + +

(optional) Your Parse Master Key. (Node.js only!)

+ +
sessionToken + + +string + + + + +

(optional)

+ +
installationId + + +string + + + + +

(optional)

+ +
+ + +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

close() → {Promise|undefined}

+ + + + + +
+

This method will close the WebSocket connection to this LiveQueryClient, +cancel the auto reconnect and unsubscribe all subscriptions based on it.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + + + +
+ + + +
+ + +
+ + + +

open()

+ + + + + +
+

After open is called, the LiveQueryClient will try to send a connect request +to the LiveQuery server.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

subscribe(query, sessionToken) → {LiveQuerySubscription|undefined}

+ + + + + +
+

Subscribes to a ParseQuery

+

If you provide the sessionToken, when the LiveQuery server gets ParseObject's +updates from parse server, it'll try to check whether the sessionToken fulfills +the ParseObject's ACL. The LiveQuery server will only send updates to clients whose +sessionToken is fit for the ParseObject's ACL. You can check the LiveQuery protocol +here for more details. The subscription you get is the same subscription you get +from our Standard API.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
query + + +object + + + + +

the ParseQuery you want to subscribe to

+ +
sessionToken + + +string + + + + +

(optional)

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +LiveQuerySubscription +| + +undefined + + +
+
+ + + +
+ + + +
+ + +
+ + + +

unsubscribe(subscription) → {Promise|undefined}

+ + + + + +
+

After calling unsubscribe you'll stop receiving events from the subscription object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
subscription + + +object + + + + +

subscription you would like to unsubscribe from.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.LocalDatastore.html b/api/5.1.0/Parse.LocalDatastore.html new file mode 100644 index 000000000..0d1b178c9 --- /dev/null +++ b/api/5.1.0/Parse.LocalDatastore.html @@ -0,0 +1,266 @@ + + + + + + LocalDatastore - Documentation + + + + + + + + + + + + + + + + + +
+ +

LocalDatastore

+ + + + + + + +
+ +
+ +

+ Parse. + + LocalDatastore +

+ + +
+ +
+
+ + +
+ + + +

new LocalDatastore()

+ + + + + +
+

Provides a local datastore which can be used to store and retrieve Parse.Object.
+To enable this functionality, call Parse.enableLocalDatastore().

+

Pin object to add to local datastore

+
await object.pin();
+
await object.pinWithName('pinName');
+

Query pinned objects

+
query.fromLocalDatastore();
+
query.fromPin();
+
query.fromPinWithName();
+
const localObjects = await query.find();
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

(static) updateFromServer()

+ + + + + +
+

Updates Local Datastore from Server

+
+await Parse.LocalDatastore.updateFromServer();
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Object.html b/api/5.1.0/Parse.Object.html new file mode 100644 index 000000000..11303df58 --- /dev/null +++ b/api/5.1.0/Parse.Object.html @@ -0,0 +1,10884 @@ + + + + + + Object - Documentation + + + + + + + + + + + + + + + + + +
+ +

Object

+ + + + + + + +
+ +
+ +

+ Parse. + + Object +

+ +

Creates a new model with defined attributes.

+

You won't normally call this method directly. It is recommended that +you use a subclass of Parse.Object instead, created by calling +extend.

+

However, if you don't want to use a subclass, or aren't sure which +subclass is appropriate, you can use this form:

+    var object = new Parse.Object("ClassName");
+
+That is basically equivalent to:
+    var MyClass = Parse.Object.extend("ClassName");
+    var object = new MyClass();
+

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Object(className, attributes, options)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
className + + +string + + + + +

The class name for the object

+ +
attributes + + +object + + + + +

The initial set of data to store in the object.

+ +
options + + +object + + + + +

The options for this object instance.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +

Members

+ + + +
+

createdAt

+ + + + +
+

The first time this object was saved on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
createdAt + + +Date + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

updatedAt

+ + + + +
+

The last time this object was updated on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
updatedAt + + +Date + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

_clearPendingOps(keysToClearopt)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keysToClear + + +Array.<string> + + + + + + <optional>
+ + + + + +
+

if specified, only ops matching +these fields will be cleared

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

_getId() → {string}

+ + + + + +
+

Returns a local or server Id used uniquely identify this object

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

_getStateIdentifier() → {Parse.Object|object}

+ + + + + +
+

Returns a unique identifier used to pull data from the State Controller.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object +| + +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

add(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The item to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The items to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAllUnique(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The objects to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addUnique(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

clear() → {ParseObject|boolean}

+ + + + + +
+

Clears all attributes on a model

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

clone() → {Parse.Object}

+ + + + + +
+

Creates a new model with identical attributes to this one.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

decrement(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically decrements the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to decrement by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

destroy(options) → {Promise}

+ + + + + +
+

Destroy this model on the server if it was already persisted.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeDelete` and `afterDelete` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroy +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) destroyEventually(optionsopt) → {Promise}

+ + + + + +
+

Deletes this object from the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, +and don't need to know when the delete completes. If there is some problem with the object +such that it can't be deleted, the request will be silently discarded.

+

Delete instructions made with this method will be stored locally in an on-disk cache until they can be transmitted +to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection +is available. Delete requests will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Valid options are:

    +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeDelete` and `afterDelete` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroy +completes.

+
+ + +
+ + + +
+ + +
+ + + +

dirty(attr) → {boolean}

+ + + + + +
+

Returns true if this object has been modified since its last +save/refresh. If an attribute is specified, it returns true only if that +particular attribute has been modified since the last save/refresh.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

An attribute name (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

dirtyKeys() → {Array.<string>}

+ + + + + +
+

Returns an array of keys that have been modified since last save/refresh

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

equals(other) → {boolean}

+ + + + + +
+

Determines whether this ParseObject is equal to another ParseObject

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
other + + +object + + + + +

An other object ot compare

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

escape(attr) → {string}

+ + + + + +
+

Gets the HTML-escaped value of an attribute.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

existed() → {boolean}

+ + + + + +
+

Returns true if this object was created by the Parse server when the +object might have already been there (e.g. in the case of a Facebook +login)

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) exists(options) → {Promise.<boolean>}

+ + + + + +
+

Returns true if this object exists on the Server

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object exists.

+
+ + +
+ + + +
+ + +
+ + + +

fetch(options) → {Promise}

+ + + + + +
+

Fetch the model from the server. If the server's representation of the +model differs from its current attributes, they will be overriden.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • include: The name(s) of the key(s) to include. Can be a string, an array of strings, + or an array of array of strings. +
  • context: A dictionary that is accessible in Cloud Code `beforeFind` trigger. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) fetchFromLocalDatastore() → {Promise}

+ + + + + +
+

Asynchronously loads data from the local datastore into this object.

+
+await object.fetchFromLocalDatastore();
+
+

You can create an unfetched pointer with Parse.Object.createWithoutData() +and then call fetchFromLocalDatastore() on it.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch completes.

+
+ + +
+ + + +
+ + +
+ + + +

fetchWithInclude(keys, options) → {Promise}

+ + + + + +
+

Fetch the model from the server. If the server's representation of the +model differs from its current attributes, they will be overriden.

+

Includes nested Parse.Objects for the provided key. You can use dot +notation to specify which fields in the included object are also fetched.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
keys + + +string +| + +Array.<(string|Array.<string>)> + + + + +

The name(s) of the key(s) to include.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch +completes.

+
+ + +
+ + + +
+ + +
+ + + +

get(attr) → {*}

+ + + + + +
+

Gets the value of an attribute.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +* + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getACL() → {Parse.ACL|null}

+ + + + + +
+

Returns the ACL for this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.ACL +| + +null + + +
+
+ + +
+

An instance of Parse.ACL.

+
+ + +
+ + + +
+ + +
+ + + +

has(attr) → {boolean}

+ + + + + +
+

Returns true if the attribute contains a value that is not +null or undefined.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of the attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

increment(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically increments the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to increment by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isDataAvailable() → {boolean}

+ + + + + +
+

Returns true if the object has been fetched.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isNew() → {boolean}

+ + + + + +
+

Returns true if this object has never been saved to Parse.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) isPinned() → {Promise.<boolean>}

+ + + + + +
+

Asynchronously returns if the object is pinned

+
+const isPinned = await object.isPinned();
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object is pinned.

+
+ + +
+ + + +
+ + +
+ + + +

isValid() → {boolean}

+ + + + + +
+

Checks if the model is currently in a valid state.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

newInstance() → {Parse.Object}

+ + + + + +
+

Creates a new instance of this object. Not to be confused with clone()

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

op(attr) → {Parse.Op|undefined}

+ + + + + +
+

Returns an instance of a subclass of Parse.Op describing what kind of +modification has been performed on this field since the last time it was +saved. For example, after calling object.increment("x"), calling +object.op("x") would return an instance of Parse.Op.Increment.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Op +| + +undefined + + +
+
+ + +
+

The operation, or undefined if none.

+
+ + +
+ + + +
+ + +
+ + + +

pin() → {Promise}

+ + + + + +
+

Asynchronously stores the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pin();
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPin()

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

pinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously stores the objects and every object they point to in the local datastore, recursively.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pinWithName(name);
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPinWithName(name)

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

relation(attr) → {Parse.Relation}

+ + + + + +
+

Gets a relation on the given class for the attribute.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The attribute to get the relation for.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Relation + + +
+
+ + + +
+ + + +
+ + +
+ + + +

remove(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of an object from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

removeAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of the objects from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

revert(…keysopt)

+ + + + + +
+

Clears any (or specific) changes to this object made since the last call to save()

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string + + + + + + <optional>
+ + + + + + <repeatable>
+ +
+

specify which fields to revert

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

save(arg1opt, arg2opt, arg3opt) → {Promise}

+ + + + + +
+

Set a hash of model attributes, and save the model to the server. +updatedAt will be updated when the request returns. +You can either call it as:

+object.save();
+or
+object.save(attrs);
+or
+object.save(null, options);
+or
+object.save(attrs, options);
+or
+object.save(key, value);
+or
+object.save(key, value, options);

+

Example 1:

+gameTurn.save({
+player: "Jake Cutter",
+diceRoll: 2
+}).then(function(gameTurnAgain) {
+// The save was successful.
+}, function(error) {
+// The save failed.  Error is an instance of Parse.Error.
+});

+

Example 2:

+gameTurn.save("player", "Jake Cutter");

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
arg1 + + +string +| + +object +| + +null + + + + + + <optional>
+ + + + + +
+

Valid options are:

    +
  • `Object` - Key/value pairs to update on the object.
  • +
  • `String` Key - Key of attribute to update (requires arg2 to also be string)
  • +
  • `null` - Passing null for arg1 allows you to save the object with options passed in arg2.
  • +
+ +
arg2 + + +string +| + +object + + + + + + <optional>
+ + + + + +
+
    +
  • `String` Value - If arg1 was passed as a key, arg2 is the value that should be set on that key.
  • +
  • `Object` Options - Valid options are: +
      +
    • useMasterKey: In Cloud Code and Node only, causes the Master Key to +be used for this request. +
    • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
    • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
    • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
    +
  • +
+ +
arg3 + + +object + + + + + + <optional>
+ + + + + +
+

Used to pass option parameters to method if arg1 and arg2 were both passed as strings. +Valid options are:

+
    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to +be used for this request. +
  • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
  • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
  • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the save +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) saveEventually(optionsopt) → {Promise}

+ + + + + +
+

Saves this object to the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, and don't need to know when the save completes. +If there is some problem with the object such that it can't be saved, it will be silently discarded.

+

Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. +They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is +available. Objects saved this way will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Used to pass option parameters to method if arg1 and arg2 were both passed as strings. +Valid options are:

+
    +
  • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
  • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
  • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the save +completes.

+
+ + +
+ + + +
+ + +
+ + + +

set(key, value, options) → {ParseObject|boolean}

+ + + + + +
+

Sets a hash of model attributes on the object.

+

You can call it with an object containing keys and values, with one +key and value, or dot notation. For example:

+  gameTurn.set({
+    player: player1,
+    diceRoll: 2
+  }, {
+    error: function(gameTurnAgain, error) {
+      // The set failed validation.
+    }
+  });
+

game.set("currentPlayer", player2, { +error: function(gameTurnAgain, error) { +// The set failed validation. +} +});

+

game.set("finished", true);

+

game.set("player.score", 10);

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string +| + +object + + + + +

The key to set.

+ +
value + + +string +| + +object + + + + +

The value to give it.

+ +
options + + +object + + + + +

A set of options for the set. +The only supported option is error.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

true if the set succeeded.

+
+ + +
+ + + +
+ + +
+ + + +

setACL(acl, options) → {ParseObject|boolean}

+ + + + + +
+

Sets the ACL to be used for this object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
acl + + +Parse.ACL + + + + +

An instance of Parse.ACL.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

Whether the set passed validation.

+
+ + +
+ + + +
+ + +
+ + + +

toJSON(seen, offline) → {object}

+ + + + + +
+

Returns a JSON version of the object suitable for saving to Parse.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
seen + + + + +
offline + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toOfflinePointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toPointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

unPin() → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+
+await object.unPin();
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unPinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, recursively.

+
+await object.unPinWithName(name);
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unset(attr, options) → {ParseObject|boolean}

+ + + + + +
+

Remove an attribute from the model. This is a noop if the attribute doesn't +exist.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
options + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

validate(attrs) → {Parse.Error|boolean}

+ + + + + +
+

You should not call this function directly unless you subclass +Parse.Object, in which case you can override this method +to provide additional validation on set and +save. Your implementation should return

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +object + + + + +

The current data to validate.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Error +| + +boolean + + +
+
+ + +
+

False if the data is valid. An error object otherwise.

+
+ + +
+ + + +
+ + +
+ + + +

(static) createWithoutData(id) → {Parse.Object}

+ + + + + +
+

Creates a reference to a subclass of Parse.Object with the given id. This +does not exist on Parse.Object, only on subclasses.

+

A shortcut for:

+ var Foo = Parse.Object.extend("Foo");
+ var pointerToFoo = new Foo();
+ pointerToFoo.id = "myObjectId";
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +string + + + + +

The ID of the object to create a reference to.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + +
+

A Parse.Object reference.

+
+ + +
+ + + +
+ + +
+ + + +

(static) destroyAll(list, options) → {Promise}

+ + + + + +
+

Destroy the given list of models on the server if it was already persisted.

+

Unlike saveAll, if an error occurs while deleting an individual model, +this method will continue trying to delete the rest of the models if +possible, except in the case of a fatal error like a connection error. +

In particular, the Parse.Error object returned in the case of error may +be one of two types: +

    +
  • A Parse.Error.AGGREGATE_ERROR. This object's "errors" property is an +array of other Parse.Error objects. Each error object in this array +has an "object" property that references the object that could not be +deleted (for instance, because that object could not be found).
  • +
  • A non-aggregate Parse.Error. This indicates a serious error that +caused the delete operation to be aborted partway through (for +instance, a connection failure in the middle of the delete).
  • +
+
+Parse.Object.destroyAll([object1, object2, ...])
+.then((list) => {
+// All the objects were deleted.
+}, (error) => {
+// An error occurred while deleting one or more of the objects.
+// If this is an aggregate error, then we can inspect each error
+// object individually to determine the reason why a particular
+// object was not deleted.
+if (error.code === Parse.Error.AGGREGATE_ERROR) {
+for (var i = 0; i < error.errors.length; i++) {
+console.log("Couldn't delete " + error.errors[i].object.id +
+"due to " + error.errors[i].message);
+}
+} else {
+console.log("Delete aborted because of " + error.message);
+}
+});
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
list + + +Array + + + + +

A list of Parse.Object.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroyAll +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) disableSingleInstance()

+ + + + + +
+

Disable single instance objects, where any local objects with the same Id +share the same attributes, and stay synchronized with each other. +When disabled, you can have two instances of the same object in memory +without them sharing attributes.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) enableSingleInstance()

+ + + + + +
+

Enable single instance objects, where any local objects with the same Id +share the same attributes, and stay synchronized with each other. +This is disabled by default in server environments, since it can lead to +security issues.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) extend(className, protoProps, classProps) → {Parse.Object}

+ + + + + +
+

Creates a new subclass of Parse.Object for the given Parse class name.

+

Every extension of a Parse class will inherit from the most recent +previous extension of that class. When a Parse.Object is automatically +created by parsing JSON, it will use the most recent extension of that +class.

+

You should call either:

+    var MyClass = Parse.Object.extend("MyClass", {
+        Instance methods,
+        initialize: function(attrs, options) {
+            this.someInstanceProperty = [],
+            Other instance properties
+        }
+    }, {
+        Class properties
+    });
+or, for Backbone compatibility:
+    var MyClass = Parse.Object.extend({
+        className: "MyClass",
+        Instance methods,
+        initialize: function(attrs, options) {
+            this.someInstanceProperty = [],
+            Other instance properties
+        }
+    }, {
+        Class properties
+    });

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
className + + +string + + + + +

The name of the Parse class backing this model.

+ +
protoProps + + +object + + + + +

Instance properties to add to instances of the +class returned from this method.

+ +
classProps + + +object + + + + +

Class properties to add the class returned from +this method.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + +
+

A new subclass of Parse.Object.

+
+ + +
+ + + +
+ + +
+ + + +

(static) fetchAll(list, options) → {Array.<Parse.Object>}

+ + + + + +
+

Fetches the given list of Parse.Object. +If any error is encountered, stops and calls the error handler.

+
+  Parse.Object.fetchAll([object1, object2, ...])
+   .then((list) => {
+     // All the objects were fetched.
+   }, (error) => {
+     // An error occurred while fetching one of the objects.
+   });
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
list + + +Array + + + + +

A list of Parse.Object.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • include: The name(s) of the key(s) to include. Can be a string, an array of strings, + or an array of array of strings. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<Parse.Object> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) fetchAllIfNeeded(list, options) → {Array.<Parse.Object>}

+ + + + + +
+

Fetches the given list of Parse.Object if needed. +If any error is encountered, stops and calls the error handler.

+
+  Parse.Object.fetchAllIfNeeded([object1, ...])
+   .then((list) => {
+     // Objects were fetched and updated.
+   }, (error) => {
+     // An error occurred while fetching one of the objects.
+   });
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
list + + +Array + + + + +

A list of Parse.Object.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<Parse.Object> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) fetchAllIfNeededWithInclude(list, keys, options) → {Array.<Parse.Object>}

+ + + + + +
+

Fetches the given list of Parse.Object if needed. +If any error is encountered, stops and calls the error handler.

+

Includes nested Parse.Objects for the provided key. You can use dot +notation to specify which fields in the included object are also fetched.

+

If any error is encountered, stops and calls the error handler.

+
+  Parse.Object.fetchAllIfNeededWithInclude([object1, object2, ...], [pointer1, pointer2, ...])
+   .then((list) => {
+     // All the objects were fetched.
+   }, (error) => {
+     // An error occurred while fetching one of the objects.
+   });
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
list + + +Array + + + + +

A list of Parse.Object.

+ +
keys + + +string +| + +Array.<(string|Array.<string>)> + + + + +

The name(s) of the key(s) to include.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<Parse.Object> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) fetchAllWithInclude(list, keys, options) → {Array.<Parse.Object>}

+ + + + + +
+

Fetches the given list of Parse.Object.

+

Includes nested Parse.Objects for the provided key. You can use dot +notation to specify which fields in the included object are also fetched.

+

If any error is encountered, stops and calls the error handler.

+
+  Parse.Object.fetchAllWithInclude([object1, object2, ...], [pointer1, pointer2, ...])
+   .then((list) => {
+     // All the objects were fetched.
+   }, (error) => {
+     // An error occurred while fetching one of the objects.
+   });
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
list + + +Array + + + + +

A list of Parse.Object.

+ +
keys + + +string +| + +Array.<(string|Array.<string>)> + + + + +

The name(s) of the key(s) to include.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<Parse.Object> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) fromJSON(json, override, dirty) → {Parse.Object}

+ + + + + +
+

Creates a new instance of a Parse Object from a JSON representation.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
json + + +object + + + + +

The JSON map of the Object's data

+ +
override + + +boolean + + + + +

In single instance mode, all old server data +is overwritten if this is set to true

+ +
dirty + + +boolean + + + + +

Whether the Parse.Object should set JSON keys to dirty

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + +
+

A Parse.Object reference

+
+ + +
+ + + +
+ + +
+ + + +

(static) pinAll(objects) → {Promise}

+ + + + + +
+

Asynchronously stores the objects and every object they point to in the local datastore, +recursively, using a default pin name: _default.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await Parse.Object.pinAll([...]);
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPin()

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
objects + + +Array + + + + +

A list of Parse.Object.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) pinAllWithName(name, objects) → {Promise}

+ + + + + +
+

Asynchronously stores the objects and every object they point to in the local datastore, recursively.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await Parse.Object.pinAllWithName(name, [obj1, obj2, ...]);
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPinWithName(name)

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
objects + + +Array + + + + +

A list of Parse.Object.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) registerSubclass(className, constructor)

+ + + + + +
+

Registers a subclass of Parse.Object with a specific class name. +When objects of that class are retrieved from a query, they will be +instantiated with this subclass. +This is only necessary when using ES6 subclassing.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
className + + +string + + + + +

The class name of the subclass

+ +
constructor + + +function + + + + +

The subclass

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) saveAll(list, options) → {Array.<Parse.Object>}

+ + + + + +
+

Saves the given list of Parse.Object. +If any error is encountered, stops and calls the error handler.

+
+Parse.Object.saveAll([object1, object2, ...])
+.then((list) => {
+// All the objects were saved.
+}, (error) => {
+// An error occurred while saving one of the objects.
+});
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
list + + +Array + + + + +

A list of Parse.Object.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<Parse.Object> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) unPinAll(objects) → {Promise}

+ + + + + +
+

Asynchronously removes the objects and every object they point to in the local datastore, +recursively, using a default pin name: _default.

+
+await Parse.Object.unPinAll([...]);
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
objects + + +Array + + + + +

A list of Parse.Object.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) unPinAllObjects() → {Promise}

+ + + + + +
+

Asynchronously removes all objects in the local datastore using a default pin name: _default.

+
+await Parse.Object.unPinAllObjects();
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) unPinAllObjectsWithName(name) → {Promise}

+ + + + + +
+

Asynchronously removes all objects with the specified pin name. +Deletes the pin name also.

+
+await Parse.Object.unPinAllObjectsWithName(name);
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) unPinAllWithName(name, objects) → {Promise}

+ + + + + +
+

Asynchronously removes the objects and every object they point to in the local datastore, recursively.

+
+await Parse.Object.unPinAllWithName(name, [obj1, obj2, ...]);
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
objects + + +Array + + + + +

A list of Parse.Object.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) unregisterSubclass(className)

+ + + + + +
+

Unegisters a subclass of Parse.Object with a specific class name.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
className + + +string + + + + +

The class name of the subclass

+ +
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Polygon.html b/api/5.1.0/Parse.Polygon.html new file mode 100644 index 000000000..685742396 --- /dev/null +++ b/api/5.1.0/Parse.Polygon.html @@ -0,0 +1,941 @@ + + + + + + Polygon - Documentation + + + + + + + + + + + + + + + + + +
+ +

Polygon

+ + + + + + + +
+ +
+ +

+ Parse. + + Polygon +

+ +

Creates a new Polygon with any of the following forms:

+
+  new Polygon([[0,0],[0,1],[1,1],[1,0]])
+  new Polygon([GeoPoint, GeoPoint, GeoPoint])
+  
+

Represents a coordinates that may be associated +with a key in a ParseObject or used as a reference point for geo queries. +This allows proximity-based queries on the key.

+

Example:

+  var polygon = new Parse.Polygon([[0,0],[0,1],[1,1],[1,0]]);
+  var object = new Parse.Object("PlaceObject");
+  object.set("area", polygon);
+  object.save();

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Polygon(coordinates)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
coordinates + + +Array.<Array.<number>> +| + +Array.<Parse.GeoPoint> + + + + +

An Array of coordinate pairs

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +

Members

+ + + +
+

coordinates

+ + + + +
+

Coordinates value for this Polygon. +Throws an exception if not valid type.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
coordinates + + +Array.<Array.<number>> +| + +Array.<Parse.GeoPoint> + + + +

list of coordinates

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

containsPoint(point) → {boolean}

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
point + + +Parse.GeoPoint + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

Returns if the point is contained in the polygon

+
+ + +
+ + + +
+ + +
+ + + +

equals(other) → {boolean}

+ + + + + +
+

Checks if two polygons are equal

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
other + + +Parse.Polygon +| + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toJSON() → {object}

+ + + + + +
+

Returns a JSON representation of the Polygon, suitable for Parse.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) _validate(coords) → {Array.<Array.<number>>}

+ + + + + +
+

Validates that the list of coordinates can form a valid polygon

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
coords + + +Array + + + + +

the list of coordinates to validate as a polygon

+ +
+ + + + + + + + + + + + +
+
Throws:
+ + + +
+ + +TypeError + + + +
+ + + +
+ + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<Array.<number>> + + +
+
+ + +
+

Array of coordinates if validated.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Push.html b/api/5.1.0/Parse.Push.html new file mode 100644 index 000000000..557045185 --- /dev/null +++ b/api/5.1.0/Parse.Push.html @@ -0,0 +1,560 @@ + + + + + + Push - Documentation + + + + + + + + + + + + + + + + + +
+ +

Push

+ + + + + + + +
+ +
+ +

+ Parse. + + Push +

+ + +
+ +
+
+ + +
+ + + +

new Push()

+ + + + + +
+

Contains functions to deal with Push in Parse.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

(static) getPushStatus(pushStatusId, options) → {Parse.Object}

+ + + + + +
+

Gets push status by Id

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pushStatusId + + +string + + + + +

The Id of Push Status.

+ +
options + + +object + + + + +

Valid options +are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + +
+

Status of Push.

+
+ + +
+ + + +
+ + +
+ + + +

(static) send(data, options) → {Promise}

+ + + + + +
+

Sends a push notification. +Available in Cloud Code only.

+

See Push Notification Guide

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + +object + + + + +

The data of the push notification. Valid fields +are:

+
    +
  1. channels - An Array of channels to push to.
  2. +
  3. push_time - A Date object for when to send the push.
  4. +
  5. expiration_time - A Date object for when to expire + the push.
  6. +
  7. expiration_interval - The seconds from now to expire the push.
  8. +
  9. where - A Parse.Query over Parse.Installation that is used to match + a set of installations to push to.
  10. +
  11. data - The data to send as part of the push.
  12. +
      + +
options + + +object + + + + +

Valid options +are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the push request +completes.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Query.html b/api/5.1.0/Parse.Query.html new file mode 100644 index 000000000..6f3a2b13a --- /dev/null +++ b/api/5.1.0/Parse.Query.html @@ -0,0 +1,13385 @@ + + + + + + Query - Documentation + + + + + + + + + + + + + + + + + +
+ +

Query

+ + + + + + + +
+ +
+ +

+ Parse. + + Query +

+ +

Creates a new parse Parse.Query for the given Parse.Object subclass.

+

Parse.Query defines a query that is used to fetch Parse.Objects. The +most common use case is finding all objects that match a query through the +find method. for example, this sample code fetches all objects +of class myclass. it calls a different function depending on +whether the fetch succeeded or not. +

+var query = new Parse.Query(myclass);
+query.find().then((results) => {
+  // results is an array of parse.object.
+}).catch((error) =>  {
+ // error is an instance of parse.error.
+});

+

a Parse.Query can also be used to retrieve a single object whose id is +known, through the get method. for example, this sample code fetches an +object of class myclass and id myid. it calls a +different function depending on whether the fetch succeeded or not. +

+var query = new Parse.Query(myclass);
+query.get(myid).then((object) => {
+    // object is an instance of parse.object.
+}).catch((error) =>  {
+ // error is an instance of parse.error.
+});

+

a Parse.Query can also be used to count the number of objects that match +the query without retrieving all of those objects. for example, this +sample code counts the number of objects of the class myclass +

+var query = new Parse.Query(myclass);
+query.count().then((number) => {
+    // there are number instances of myclass.
+}).catch((error) => {
+    // error is an instance of Parse.Error.
+});

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Query(objectClass)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
objectClass + + +string +| + +Parse.Object + + + + +

An instance of a subclass of Parse.Object, or a Parse className string.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

_addCondition(key, condition, value) → {Parse.Query}

+ + + + + +
+

Helper for condition queries

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + + + +
condition + + + + +
value + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + + +
+ + + +
+ + +
+ + + +

_andQuery(queries) → {Parse.Query}

+ + + + + +
+

Adds constraint that all of the passed in queries match.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
queries + + +Array + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

_norQuery(queries) → {Parse.Query}

+ + + + + +
+

Adds constraint that none of the passed in queries match.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
queries + + +Array + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

_orQuery(queries) → {Parse.Query}

+ + + + + +
+

Adds constraint that at least one of the passed in queries matches.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
queries + + +Array + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

_regexStartWith(string) → {string}

+ + + + + +
+

Converts string for regular expression at the beginning

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
string + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAscending(…keys) → {Parse.Query}

+ + + + + +
+

Sorts the results in ascending order by the given key, +but can also add secondary sort descriptors without overwriting _order.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string +| + +Array.<string> + + + + + + + + + + <repeatable>
+ +
+

The key to order by, which is a +string of comma separated values, or an Array of keys, or multiple keys.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addDescending(…keys) → {Parse.Query}

+ + + + + +
+

Sorts the results in descending order by the given key, +but can also add secondary sort descriptors without overwriting _order.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string +| + +Array.<string> + + + + + + + + + + <repeatable>
+ +
+

The key to order by, which is a +string of comma separated values, or an Array of keys, or multiple keys.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

aggregate(pipeline, options) → {Promise}

+ + + + + +
+

Executes an aggregate query and returns aggregate results

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pipeline + + +Array +| + +object + + + + +

Array or Object of stages to process query

+ +
options + + +object + + + + +

Valid options are:

    +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

ascending(…keys) → {Parse.Query}

+ + + + + +
+

Sorts the results in ascending order by the given key.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string +| + +Array.<string> + + + + + + + + + + <repeatable>
+ +
+

The key to order by, which is a +string of comma separated values, or an Array of keys, or multiple keys.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

cancel() → {Parse.Query}

+ + + + + +
+

Cancels the current network request (if any is running).

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

comment(value) → {Parse.Query}

+ + + + + +
+

Sets a comment to the query so that the query +can be identified when using a the profiler for MongoDB.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +string + + + + +

a comment can make your profile data easier to interpret and trace.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

containedBy(key, values) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +be contained by the provided list of values. Get objects where all array elements match.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check.

+ +
values + + +Array + + + + +

The values that will match.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

containedIn(key, value) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +be contained in the provided list of values.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check.

+ +
value + + +Array.<*> + + + + +

The values that will match.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

contains(key, substring) → {Parse.Query}

+ + + + + +
+

Adds a constraint for finding string values that contain a provided +string. This may be slow for large datasets.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the string to match is stored in.

+ +
substring + + +string + + + + +

The substring that the value must contain.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

containsAll(key, values) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +contain each one of the provided list of values.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check. This key's value must be an array.

+ +
values + + +Array + + + + +

The values that will match.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

containsAllStartingWith(key, values) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +contain each one of the provided list of values starting with given strings.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check. This key's value must be an array.

+ +
values + + +Array.<string> + + + + +

The string values that will match as starting string.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

count(options) → {Promise}

+ + + + + +
+

Counts the number of objects that match this query.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the count when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

descending(…keys) → {Parse.Query}

+ + + + + +
+

Sorts the results in descending order by the given key.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string +| + +Array.<string> + + + + + + + + + + <repeatable>
+ +
+

The key to order by, which is a +string of comma separated values, or an Array of keys, or multiple keys.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

distinct(key, options) → {Promise}

+ + + + + +
+

Executes a distinct query and returns unique values

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

A field to find distinct values

+ +
options + + +object + + + + +

Valid options are:

    +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

doesNotExist(key) → {Parse.Query}

+ + + + + +
+

Adds a constraint for finding objects that do not contain a given key.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that should not exist

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

doesNotMatchKeyInQuery(key, queryKey, query) → {Parse.Query}

+ + + + + +
+

Adds a constraint that requires that a key's value not match a value in +an object returned by a different Parse.Query.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that contains the value that is being +excluded.

+ +
queryKey + + +string + + + + +

The key in the objects returned by the query to +match against.

+ +
query + + +Parse.Query + + + + +

The query to run.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

doesNotMatchQuery(key, query) → {Parse.Query}

+ + + + + +
+

Adds a constraint that requires that a key's value not matches a +Parse.Query constraint.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the contains the object to match the +query.

+ +
query + + +Parse.Query + + + + +

The query that should not match.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

each(callback, options) → {Promise}

+ + + + + +
+

Iterates over each result of a query, calling a callback for each one. If +the callback returns a promise, the iteration will not continue until +that promise has been fulfilled. If the callback returns a rejected +promise, then iteration will stop with that error. The items are +processed in an unspecified order. The query may not have any sort order, +and may not use limit or skip.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
callback + + +function + + + + +

Callback that will be called with each result +of the query.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • json: Return raw json without converting to Parse.Object +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that will be fulfilled once the +iteration has completed.

+
+ + +
+ + + +
+ + +
+ + + +

eachBatch(callback, options) → {Promise}

+ + + + + +
+

Iterates over objects matching a query, calling a callback for each batch. +If the callback returns a promise, the iteration will not continue until +that promise has been fulfilled. If the callback returns a rejected +promise, then iteration will stop with that error. The items are processed +in an unspecified order. The query may not have any sort order, and may +not use limit or skip.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
callback + + +function + + + + +

Callback that will be called with each result +of the query.

+ +
options + + +object + + + + +

Valid options are:

    +
  • batchSize: How many objects to yield in each batch (default: 100) +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeFind` trigger. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that will be fulfilled once the +iteration has completed.

+
+ + +
+ + + +
+ + +
+ + + +

endsWith(key, suffix, modifiers) → {Parse.Query}

+ + + + + +
+

Adds a constraint for finding string values that end with a provided +string. This will be slow for large datasets.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the string to match is stored in.

+ +
suffix + + +string + + + + +

The substring that the value must end with.

+ +
modifiers + + +string + + + + +

The regular expression mode.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

equalTo(key, value) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +be equal to the provided value.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check.

+ +
value + + +

The value that the Parse.Object must contain.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

exclude(…keys) → {Parse.Query}

+ + + + + +
+

Restricts the fields of the returned Parse.Objects to all keys except the +provided keys. Exclude takes precedence over select and include.

+

Requires Parse Server 3.6.0+

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string +| + +Array.<string> + + + + + + + + + + <repeatable>
+ +
+

The name(s) of the key(s) to exclude.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

exists(key) → {Parse.Query}

+ + + + + +
+

Adds a constraint for finding objects that contain the given key.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that should exist.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

explain(explain) → {Parse.Query}

+ + + + + +
+

Investigates the query execution plan. Useful for optimizing queries. (https://docs.mongodb.com/manual/reference/operator/meta/explain/)

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
explain + + +boolean + + + + + + true + + +

Used to toggle the information on the query plan.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

(async) filter(callback, options) → {Promise}

+ + + + + +
+

Iterates over each result of a query, calling a callback for each one. If +the callback returns a promise, the iteration will not continue until +that promise has been fulfilled. If the callback returns a rejected +promise, then iteration will stop with that error. The items are +processed in an unspecified order. The query may not have any sort order, +and may not use limit or skip.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
callback + + +function + + + + +

Callback

    +
  • currentObject: The current Parse.Object being processed in the array.
  • +
  • index: The index of the current Parse.Object being processed in the array.
  • +
  • query: The query filter was called upon.
  • +
+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that will be fulfilled once the +iteration has completed.

+
+ + +
+ + + +
+ + +
+ + + +

find(options) → {Promise}

+ + + + + +
+

Retrieves a list of ParseObjects that satisfy this query.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options +are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeFind` trigger. +
  • json: Return raw json without converting to Parse.Object +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the results when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) findAll(options) → {Promise}

+ + + + + +
+

Retrieves a complete list of ParseObjects that satisfy this query. +Using eachBatch under the hood to fetch all the valid objects.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • batchSize: How many objects to yield in each batch (default: 100) +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the results when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

first(options) → {Promise}

+ + + + + +
+

Retrieves at most one Parse.Object that satisfies this query.

+

Returns the object if there is one, otherwise undefined.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeFind` trigger. +
  • json: Return raw json without converting to Parse.Object +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the object when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

fromLocalDatastore() → {Parse.Query}

+ + + + + +
+

Changes the source of this query to all pinned objects.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

fromNetwork() → {Parse.Query}

+ + + + + +
+

Change the source of this query to the server.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

fromPin() → {Parse.Query}

+ + + + + +
+

Changes the source of this query to the default group of pinned objects.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

fromPinWithName(name) → {Parse.Query}

+ + + + + +
+

Changes the source of this query to a specific group of pinned objects.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

The name of query source.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

fullText(key, value, options) → {Parse.Query}

+ + + + + +
+

Adds a constraint for finding string values that contain a provided +string. This may be slow for large datasets. Requires Parse-Server > 2.5.0

+

In order to sort you must use select and ascending ($score is required)

+
+  query.fullText('field', 'term');
+  query.ascending('$score');
+  query.select('$score');
+ 
+

To retrieve the weight / rank

+
+  object->get('score');
+ 
+

You can define optionals by providing an object as a third parameter

+
+  query.fullText('field', 'term', { language: 'es', diacriticSensitive: true });
+ 
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the string to match is stored in.

+ +
value + + +string + + + + +

The string to search

+ +
options + + +object + + + + +

(Optional)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
language + + +string + + + + +

The language that determines the list of stop words for the search and the rules for the stemmer and tokenizer.

+ +
caseSensitive + + +boolean + + + + +

A boolean flag to enable or disable case sensitive search.

+ +
diacriticSensitive + + +boolean + + + + +

A boolean flag to enable or disable diacritic sensitive search.

+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

get(objectId, options) → {Promise}

+ + + + + +
+

Constructs a Parse.Object whose id is already known by fetching data from +the server. Unlike the first method, it never returns undefined.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
objectId + + +string + + + + +

The id of the object to be fetched.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeFind` trigger. +
  • json: Return raw json without converting to Parse.Object +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the result when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

greaterThan(key, value) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +be greater than the provided value.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check.

+ +
value + + +

The value that provides an lower bound.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

greaterThanOrEqualTo(key, value) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +be greater than or equal to the provided value.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check.

+ +
value + + +* + + + + +

The value that provides an lower bound.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

hint(value) → {Parse.Query}

+ + + + + +
+

Adds a hint to force index selection. (https://docs.mongodb.com/manual/reference/operator/meta/hint/)

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +string +| + +object + + + + +

String or Object of index that should be used when executing query

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

include(…keys) → {Parse.Query}

+ + + + + +
+

Includes nested Parse.Objects for the provided key. You can use dot +notation to specify which fields in the included object are also fetched.

+

You can include all nested Parse.Objects by passing in '*'. +Requires Parse Server 3.0.0+

+
query.include('*');
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string +| + +Array.<string> + + + + + + + + + + <repeatable>
+ +
+

The name(s) of the key(s) to include.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

includeAll() → {Parse.Query}

+ + + + + +
+

Includes all nested Parse.Objects one level deep.

+

Requires Parse Server 3.0.0+

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

lessThan(key, value) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +be less than the provided value.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check.

+ +
value + + +

The value that provides an upper bound.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

lessThanOrEqualTo(key, value) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +be less than or equal to the provided value.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check.

+ +
value + + +

The value that provides an upper bound.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

limit(n) → {Parse.Query}

+ + + + + +
+

Sets the limit of the number of results to return. The default limit is 100.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
n + + +number + + + + +

the number of results to limit to.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

(async) map(callback, options) → {Promise}

+ + + + + +
+

Iterates over each result of a query, calling a callback for each one. If +the callback returns a promise, the iteration will not continue until +that promise has been fulfilled. If the callback returns a rejected +promise, then iteration will stop with that error. The items are +processed in an unspecified order. The query may not have any sort order, +and may not use limit or skip.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
callback + + +function + + + + +

Callback

    +
  • currentObject: The current Parse.Object being processed in the array.
  • +
  • index: The index of the current Parse.Object being processed in the array.
  • +
  • query: The query map was called upon.
  • +
+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that will be fulfilled once the +iteration has completed.

+
+ + +
+ + + +
+ + +
+ + + +

matches(key, regex, modifiers) → {Parse.Query}

+ + + + + +
+

Adds a regular expression constraint for finding string values that match +the provided regular expression. +This may be slow for large datasets.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the string to match is stored in.

+ +
regex + + +RegExp + + + + +

The regular expression pattern to match.

+ +
modifiers + + +string + + + + +

The regular expression mode.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

matchesKeyInQuery(key, queryKey, query) → {Parse.Query}

+ + + + + +
+

Adds a constraint that requires that a key's value matches a value in +an object returned by a different Parse.Query.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that contains the value that is being +matched.

+ +
queryKey + + +string + + + + +

The key in the objects returned by the query to +match against.

+ +
query + + +Parse.Query + + + + +

The query to run.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

matchesQuery(key, query) → {Parse.Query}

+ + + + + +
+

Adds a constraint that requires that a key's value matches a Parse.Query +constraint.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the contains the object to match the +query.

+ +
query + + +Parse.Query + + + + +

The query that should match.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

near(key, point) → {Parse.Query}

+ + + + + +
+

Adds a proximity based constraint for finding objects with key point +values near the point given.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the Parse.GeoPoint is stored in.

+ +
point + + +Parse.GeoPoint + + + + +

The reference Parse.GeoPoint that is used.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

notContainedIn(key, value) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +not be contained in the provided list of values.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check.

+ +
value + + +Array.<*> + + + + +

The values that will not match.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

notEqualTo(key, value) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's value to +be not equal to the provided value.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to check.

+ +
value + + +

The value that must not be equalled.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

polygonContains(key, point) → {Parse.Query}

+ + + + + +
+

Add a constraint to the query that requires a particular key's +coordinates that contains a ParseGeoPoint

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to be constrained.

+ +
point + + +Parse.GeoPoint + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

readPreference(readPreference, includeReadPreference, subqueryReadPreference) → {Parse.Query}

+ + + + + +
+

Changes the read preference that the backend will use when performing the query to the database.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
readPreference + + +string + + + + +

The read preference for the main query.

+ +
includeReadPreference + + +string + + + + +

The read preference for the queries to include pointers.

+ +
subqueryReadPreference + + +string + + + + +

The read preference for the sub queries.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

(async) reduce(callback, initialValue, options) → {Promise}

+ + + + + +
+

Iterates over each result of a query, calling a callback for each one. If +the callback returns a promise, the iteration will not continue until +that promise has been fulfilled. If the callback returns a rejected +promise, then iteration will stop with that error. The items are +processed in an unspecified order. The query may not have any sort order, +and may not use limit or skip.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
callback + + +function + + + + +

Callback

    +
  • accumulator: The accumulator accumulates the callback's return values. It is the accumulated value previously returned in the last invocation of the callback.
  • +
  • currentObject: The current Parse.Object being processed in the array.
  • +
  • index: The index of the current Parse.Object being processed in the array.
  • +
+ +
initialValue + + +* + + + + +

A value to use as the first argument to the first call of the callback. If no initialValue is supplied, the first object in the query will be used and skipped.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that will be fulfilled once the +iteration has completed.

+
+ + +
+ + + +
+ + +
+ + + +

select(…keys) → {Parse.Query}

+ + + + + +
+

Restricts the fields of the returned Parse.Objects to include only the +provided keys. If this is called multiple times, then all of the keys +specified in each of the calls will be included.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string +| + +Array.<string> + + + + + + + + + + <repeatable>
+ +
+

The name(s) of the key(s) to include.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

skip(n) → {Parse.Query}

+ + + + + +
+

Sets the number of results to skip before returning any results. +This is useful for pagination. +Default is to skip zero results.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
n + + +number + + + + +

the number of results to skip.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

sortByTextScore() → {Parse.Query}

+ + + + + +
+

Method to sort the full text search by text score

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

startsWith(key, prefix, modifiers) → {Parse.Query}

+ + + + + +
+

Adds a constraint for finding string values that start with a provided +string. This query will use the backend index, so it will be fast even +for large datasets.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the string to match is stored in.

+ +
prefix + + +string + + + + +

The substring that the value must start with.

+ +
modifiers + + +string + + + + +

The regular expression mode.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

(async) subscribe(sessionToken) → {Promise.<LiveQuerySubscription>}

+ + + + + +
+

Subscribe this query to get liveQuery updates

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
sessionToken + + +string + + + + +

(optional) Defaults to the currentUser

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<LiveQuerySubscription> + + +
+
+ + +
+

Returns the liveQuerySubscription, it's an event emitter +which can be used to get liveQuery updates.

+
+ + +
+ + + +
+ + +
+ + + +

toJSON() → {object}

+ + + + + +
+

Returns a JSON representation of this query.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + +
+

The JSON representation of the query.

+
+ + +
+ + + +
+ + +
+ + + +

watch(…keys) → {Parse.Query}

+ + + + + +
+

Restricts live query to trigger only for watched fields.

+

Requires Parse Server 6.0.0+

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string +| + +Array.<string> + + + + + + + + + + <repeatable>
+ +
+

The name(s) of the key(s) to watch.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

withCount(includeCount) → {Parse.Query}

+ + + + + +
+

Sets the flag to include with response the total number of objects satisfying this query, +despite limits/skip. Might be useful for pagination. +Note that result of this query will be wrapped as an object with +results: holding {ParseObject} array and count: integer holding total number

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
includeCount + + +boolean + + + + + + true + + +

false - disable, true - enable.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

withJSON(json) → {Parse.Query}

+ + + + + +
+

Return a query with conditions from json, can be useful to send query from server side to client +Not static, all query conditions was set before calling this method will be deleted. +For example on the server side we have +var query = new Parse.Query("className"); +query.equalTo(key: value); +query.limit(100); +... (others queries) +Create JSON representation of Query Object +var jsonFromServer = query.fromJSON();

+

On client side getting query: +var query = new Parse.Query("className"); +query.fromJSON(jsonFromServer);

+

and continue to query... +query.skip(100).find().then(...);

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
json + + +QueryJSON + + + + +

from Parse.Query.toJSON() method

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

withinGeoBox(key, southwest, northeast) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's +coordinates be contained within a given rectangular geographic bounding +box.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to be constrained.

+ +
southwest + + +Parse.GeoPoint + + + + +

The lower-left inclusive corner of the box.

+ +
northeast + + +Parse.GeoPoint + + + + +

The upper-right inclusive corner of the box.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

withinKilometers(key, point, maxDistance, sorted) → {Parse.Query}

+ + + + + +
+

Adds a proximity based constraint for finding objects with key point +values near the point given and within the maximum distance given. +Radius of earth used is 6371.0 kilometers.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the Parse.GeoPoint is stored in.

+ +
point + + +Parse.GeoPoint + + + + +

The reference Parse.GeoPoint that is used.

+ +
maxDistance + + +number + + + + +

Maximum distance (in kilometers) of results to return.

+ +
sorted + + +boolean + + + + +

A Bool value that is true if results should be +sorted by distance ascending, false is no sorting is required, +defaults to true.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

withinMiles(key, point, maxDistance, sorted) → {Parse.Query}

+ + + + + +
+

Adds a proximity based constraint for finding objects with key point +values near the point given and within the maximum distance given. +Radius of earth used is 3958.8 miles.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the Parse.GeoPoint is stored in.

+ +
point + + +Parse.GeoPoint + + + + +

The reference Parse.GeoPoint that is used.

+ +
maxDistance + + +number + + + + +

Maximum distance (in miles) of results to return.

+ +
sorted + + +boolean + + + + +

A Bool value that is true if results should be +sorted by distance ascending, false is no sorting is required, +defaults to true.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

withinPolygon(key, points) → {Parse.Query}

+ + + + + +
+

Adds a constraint to the query that requires a particular key's +coordinates be contained within and on the bounds of a given polygon. +Supports closed and open (last point is connected to first) paths

+

Polygon must have at least 3 points

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key to be constrained.

+ +
points + + +Array + + + + +

Array of Coordinates / GeoPoints

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

withinRadians(key, point, maxDistance, sorted) → {Parse.Query}

+ + + + + +
+

Adds a proximity based constraint for finding objects with key point +values near the point given and within the maximum distance given.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + +

The key that the Parse.GeoPoint is stored in.

+ +
point + + +Parse.GeoPoint + + + + +

The reference Parse.GeoPoint that is used.

+ +
maxDistance + + +number + + + + +

Maximum distance (in radians) of results to return.

+ +
sorted + + +boolean + + + + +

A Bool value that is true if results should be +sorted by distance ascending, false is no sorting is required, +defaults to true.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Returns the query, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

(static) and(…queries) → {Parse.Query}

+ + + + + +
+

Constructs a Parse.Query that is the AND of the passed in queries. For +example:

+
var compoundQuery = Parse.Query.and(query1, query2, query3);
+

will create a compoundQuery that is an and of the query1, query2, and +query3.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
queries + + +Parse.Query + + + + + + + + + + <repeatable>
+ +
+

The list of queries to AND.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

The query that is the AND of the passed in queries.

+
+ + +
+ + + +
+ + +
+ + + +

(static) fromJSON(className, json) → {Parse.Query}

+ + + + + +
+

Static method to restore Parse.Query by json representation +Internally calling Parse.Query.withJSON

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
className + + +string + + + + + + +
json + + +QueryJSON + + + + +

from Parse.Query.toJSON() method

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

new created query

+
+ + +
+ + + +
+ + +
+ + + +

(static) nor(…queries) → {Parse.Query}

+ + + + + +
+

Constructs a Parse.Query that is the NOR of the passed in queries. For +example:

+
const compoundQuery = Parse.Query.nor(query1, query2, query3);
+

will create a compoundQuery that is a nor of the query1, query2, and +query3.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
queries + + +Parse.Query + + + + + + + + + + <repeatable>
+ +
+

The list of queries to NOR.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

The query that is the NOR of the passed in queries.

+
+ + +
+ + + +
+ + +
+ + + +

(static) or(…queries) → {Parse.Query}

+ + + + + +
+

Constructs a Parse.Query that is the OR of the passed in queries. For +example:

+
var compoundQuery = Parse.Query.or(query1, query2, query3);
+

will create a compoundQuery that is an or of the query1, query2, and +query3.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
queries + + +Parse.Query + + + + + + + + + + <repeatable>
+ +
+

The list of queries to OR.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

The query that is the OR of the passed in queries.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Relation.html b/api/5.1.0/Parse.Relation.html new file mode 100644 index 000000000..43eae7b66 --- /dev/null +++ b/api/5.1.0/Parse.Relation.html @@ -0,0 +1,759 @@ + + + + + + Relation - Documentation + + + + + + + + + + + + + + + + + +
+ +

Relation

+ + + + + + + +
+ +
+ +

+ Parse. + + Relation +

+ +

Creates a new Relation for the given parent object and key. This +constructor should rarely be used directly, but rather created by +Parse.Object.relation.

+

+A class that is used to access all of the children of a many-to-many +relationship. Each instance of Parse.Relation is associated with a +particular parent object and key. +

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Relation(parent, key)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
parent + + +Parse.Object + + + + +

The parent of this relation.

+ +
key + + +string + + + + +

The key for this relation on the parent.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

add(objects) → {Parse.Object}

+ + + + + +
+

Adds a Parse.Object or an array of Parse.Objects to the relation.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
objects + + +Parse.Object +| + +Array + + + + +

The item or items to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + +
+

The parent of the relation.

+
+ + +
+ + + +
+ + +
+ + + +

query() → {Parse.Query}

+ + + + + +
+

Returns a Parse.Query that is limited to objects in this +relation.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Query + + +
+
+ + +
+

Relation Query

+
+ + +
+ + + +
+ + +
+ + + +

remove(objects)

+ + + + + +
+

Removes a Parse.Object or an array of Parse.Objects from this relation.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
objects + + +Parse.Object +| + +Array + + + + +

The item or items to remove.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

toJSON() → {object}

+ + + + + +
+

Returns a JSON version of the object suitable for saving to disk.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + +
+

JSON representation of Relation

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Role.html b/api/5.1.0/Parse.Role.html new file mode 100644 index 000000000..9f120ff35 --- /dev/null +++ b/api/5.1.0/Parse.Role.html @@ -0,0 +1,8389 @@ + + + + + + Role - Documentation + + + + + + + + + + + + + + + + + +
+ +

Role

+ + + + + + + +
+ +
+ +

+ Parse. + + Role +

+ +

Represents a Role on the Parse server. Roles represent groupings of +Users for the purposes of granting permissions (e.g. specifying an ACL +for an Object). Roles are specified by their sets of child users and +child roles, all of which are granted any permissions that the parent +role has.

+

Roles must have a name (which cannot be changed after creation of the +role), and must specify an ACL.

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Role(name, acl)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

The name of the Role to create.

+ +
acl + + +Parse.ACL + + + + +

The ACL for this role. Roles must have an ACL. +A Parse.Role is a local representation of a role persisted to the Parse +cloud.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + +

Members

+ + + +
+

createdAt

+ + + + +
+

The first time this object was saved on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
createdAt + + +Date + + + +
+ + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

updatedAt

+ + + + +
+

The last time this object was updated on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
updatedAt + + +Date + + + +
+ + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

_clearPendingOps(keysToClearopt)

+ + + + + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keysToClear + + +Array.<string> + + + + + + <optional>
+ + + + + +
+

if specified, only ops matching +these fields will be cleared

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

_getId() → {string}

+ + + + + +
+

Returns a local or server Id used uniquely identify this object

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

_getStateIdentifier() → {Parse.Object|object}

+ + + + + +
+

Returns a unique identifier used to pull data from the State Controller.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object +| + +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

add(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The item to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The items to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAllUnique(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The objects to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addUnique(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

clear() → {ParseObject|boolean}

+ + + + + +
+

Clears all attributes on a model

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

clone() → {Parse.Object}

+ + + + + +
+

Creates a new model with identical attributes to this one.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

decrement(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically decrements the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to decrement by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

destroy(options) → {Promise}

+ + + + + +
+

Destroy this model on the server if it was already persisted.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeDelete` and `afterDelete` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroy +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) destroyEventually(optionsopt) → {Promise}

+ + + + + +
+

Deletes this object from the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, +and don't need to know when the delete completes. If there is some problem with the object +such that it can't be deleted, the request will be silently discarded.

+

Delete instructions made with this method will be stored locally in an on-disk cache until they can be transmitted +to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection +is available. Delete requests will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Valid options are:

    +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeDelete` and `afterDelete` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroy +completes.

+
+ + +
+ + + +
+ + +
+ + + +

dirty(attr) → {boolean}

+ + + + + +
+

Returns true if this object has been modified since its last +save/refresh. If an attribute is specified, it returns true only if that +particular attribute has been modified since the last save/refresh.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

An attribute name (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

dirtyKeys() → {Array.<string>}

+ + + + + +
+

Returns an array of keys that have been modified since last save/refresh

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

equals(other) → {boolean}

+ + + + + +
+

Determines whether this ParseObject is equal to another ParseObject

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
other + + +object + + + + +

An other object ot compare

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

escape(attr) → {string}

+ + + + + +
+

Gets the HTML-escaped value of an attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

existed() → {boolean}

+ + + + + +
+

Returns true if this object was created by the Parse server when the +object might have already been there (e.g. in the case of a Facebook +login)

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) exists(options) → {Promise.<boolean>}

+ + + + + +
+

Returns true if this object exists on the Server

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object exists.

+
+ + +
+ + + +
+ + +
+ + + +

fetch(options) → {Promise}

+ + + + + +
+

Fetch the model from the server. If the server's representation of the +model differs from its current attributes, they will be overriden.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • include: The name(s) of the key(s) to include. Can be a string, an array of strings, + or an array of array of strings. +
  • context: A dictionary that is accessible in Cloud Code `beforeFind` trigger. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) fetchFromLocalDatastore() → {Promise}

+ + + + + +
+

Asynchronously loads data from the local datastore into this object.

+
+await object.fetchFromLocalDatastore();
+
+

You can create an unfetched pointer with Parse.Object.createWithoutData() +and then call fetchFromLocalDatastore() on it.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch completes.

+
+ + +
+ + + +
+ + +
+ + + +

fetchWithInclude(keys, options) → {Promise}

+ + + + + +
+

Fetch the model from the server. If the server's representation of the +model differs from its current attributes, they will be overriden.

+

Includes nested Parse.Objects for the provided key. You can use dot +notation to specify which fields in the included object are also fetched.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
keys + + +string +| + +Array.<(string|Array.<string>)> + + + + +

The name(s) of the key(s) to include.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch +completes.

+
+ + +
+ + + +
+ + +
+ + + +

get(attr) → {*}

+ + + + + +
+

Gets the value of an attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +* + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getACL() → {Parse.ACL|null}

+ + + + + +
+

Returns the ACL for this object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.ACL +| + +null + + +
+
+ + +
+

An instance of Parse.ACL.

+
+ + +
+ + + +
+ + +
+ + + +

getName() → {string}

+ + + + + +
+

Gets the name of the role. You can alternatively call role.get("name")

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+

the name of the role.

+
+ + +
+ + + +
+ + +
+ + + +

getRoles() → {Parse.Relation}

+ + + + + +
+

Gets the Parse.Relation for the Parse.Roles that are direct +children of this role. These roles' users are granted any privileges that +this role has been granted (e.g. read or write access through ACLs). You +can add or remove child roles from this role through this relation.

+

This is equivalent to calling role.relation("roles")

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Relation + + +
+
+ + +
+

the relation for the roles belonging to this +role.

+
+ + +
+ + + +
+ + +
+ + + +

getUsers() → {Parse.Relation}

+ + + + + +
+

Gets the Parse.Relation for the Parse.Users that are direct +children of this role. These users are granted any privileges that this +role has been granted (e.g. read or write access through ACLs). You can +add or remove users from the role through this relation.

+

This is equivalent to calling role.relation("users")

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Relation + + +
+
+ + +
+

the relation for the users belonging to this +role.

+
+ + +
+ + + +
+ + +
+ + + +

has(attr) → {boolean}

+ + + + + +
+

Returns true if the attribute contains a value that is not +null or undefined.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of the attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

increment(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically increments the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to increment by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isDataAvailable() → {boolean}

+ + + + + +
+

Returns true if the object has been fetched.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isNew() → {boolean}

+ + + + + +
+

Returns true if this object has never been saved to Parse.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) isPinned() → {Promise.<boolean>}

+ + + + + +
+

Asynchronously returns if the object is pinned

+
+const isPinned = await object.isPinned();
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object is pinned.

+
+ + +
+ + + +
+ + +
+ + + +

isValid() → {boolean}

+ + + + + +
+

Checks if the model is currently in a valid state.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

newInstance() → {Parse.Object}

+ + + + + +
+

Creates a new instance of this object. Not to be confused with clone()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

op(attr) → {Parse.Op|undefined}

+ + + + + +
+

Returns an instance of a subclass of Parse.Op describing what kind of +modification has been performed on this field since the last time it was +saved. For example, after calling object.increment("x"), calling +object.op("x") would return an instance of Parse.Op.Increment.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Op +| + +undefined + + +
+
+ + +
+

The operation, or undefined if none.

+
+ + +
+ + + +
+ + +
+ + + +

pin() → {Promise}

+ + + + + +
+

Asynchronously stores the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pin();
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPin()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

pinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously stores the objects and every object they point to in the local datastore, recursively.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pinWithName(name);
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPinWithName(name)

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

relation(attr) → {Parse.Relation}

+ + + + + +
+

Gets a relation on the given class for the attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The attribute to get the relation for.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Relation + + +
+
+ + + +
+ + + +
+ + +
+ + + +

remove(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of an object from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

removeAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of the objects from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

revert(…keysopt)

+ + + + + +
+

Clears any (or specific) changes to this object made since the last call to save()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string + + + + + + <optional>
+ + + + + + <repeatable>
+ +
+

specify which fields to revert

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

save(arg1opt, arg2opt, arg3opt) → {Promise}

+ + + + + +
+

Set a hash of model attributes, and save the model to the server. +updatedAt will be updated when the request returns. +You can either call it as:

+object.save();
+or
+object.save(attrs);
+or
+object.save(null, options);
+or
+object.save(attrs, options);
+or
+object.save(key, value);
+or
+object.save(key, value, options);

+

Example 1:

+gameTurn.save({
+player: "Jake Cutter",
+diceRoll: 2
+}).then(function(gameTurnAgain) {
+// The save was successful.
+}, function(error) {
+// The save failed.  Error is an instance of Parse.Error.
+});

+

Example 2:

+gameTurn.save("player", "Jake Cutter");

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
arg1 + + +string +| + +object +| + +null + + + + + + <optional>
+ + + + + +
+

Valid options are:

    +
  • `Object` - Key/value pairs to update on the object.
  • +
  • `String` Key - Key of attribute to update (requires arg2 to also be string)
  • +
  • `null` - Passing null for arg1 allows you to save the object with options passed in arg2.
  • +
+ +
arg2 + + +string +| + +object + + + + + + <optional>
+ + + + + +
+
    +
  • `String` Value - If arg1 was passed as a key, arg2 is the value that should be set on that key.
  • +
  • `Object` Options - Valid options are: +
      +
    • useMasterKey: In Cloud Code and Node only, causes the Master Key to +be used for this request. +
    • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
    • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
    • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
    +
  • +
+ +
arg3 + + +object + + + + + + <optional>
+ + + + + +
+

Used to pass option parameters to method if arg1 and arg2 were both passed as strings. +Valid options are:

+
    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to +be used for this request. +
  • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
  • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
  • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the save +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) saveEventually(optionsopt) → {Promise}

+ + + + + +
+

Saves this object to the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, and don't need to know when the save completes. +If there is some problem with the object such that it can't be saved, it will be silently discarded.

+

Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. +They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is +available. Objects saved this way will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Used to pass option parameters to method if arg1 and arg2 were both passed as strings. +Valid options are:

+
    +
  • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
  • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
  • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the save +completes.

+
+ + +
+ + + +
+ + +
+ + + +

set(key, value, options) → {ParseObject|boolean}

+ + + + + +
+

Sets a hash of model attributes on the object.

+

You can call it with an object containing keys and values, with one +key and value, or dot notation. For example:

+  gameTurn.set({
+    player: player1,
+    diceRoll: 2
+  }, {
+    error: function(gameTurnAgain, error) {
+      // The set failed validation.
+    }
+  });
+

game.set("currentPlayer", player2, { +error: function(gameTurnAgain, error) { +// The set failed validation. +} +});

+

game.set("finished", true);

+

game.set("player.score", 10);

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string +| + +object + + + + +

The key to set.

+ +
value + + +string +| + +object + + + + +

The value to give it.

+ +
options + + +object + + + + +

A set of options for the set. +The only supported option is error.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

true if the set succeeded.

+
+ + +
+ + + +
+ + +
+ + + +

setACL(acl, options) → {ParseObject|boolean}

+ + + + + +
+

Sets the ACL to be used for this object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
acl + + +Parse.ACL + + + + +

An instance of Parse.ACL.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

Whether the set passed validation.

+
+ + +
+ + + +
+ + +
+ + + +

setName(name, options) → {ParseObject|boolean}

+ + + + + +
+

Sets the name for a role. This value must be set before the role has +been saved to the server, and cannot be set once the role has been +saved.

+

+ A role's name can only contain alphanumeric characters, _, -, and + spaces. +

+

This is equivalent to calling role.set("name", name)

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

The name of the role.

+ +
options + + +object + + + + +

Standard options object with success and error +callbacks.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

true if the set succeeded.

+
+ + +
+ + + +
+ + +
+ + + +

toJSON(seen, offline) → {object}

+ + + + + +
+

Returns a JSON version of the object suitable for saving to Parse.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
seen + + + + +
offline + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toOfflinePointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toPointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

unPin() → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+
+await object.unPin();
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unPinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, recursively.

+
+await object.unPinWithName(name);
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unset(attr, options) → {ParseObject|boolean}

+ + + + + +
+

Remove an attribute from the model. This is a noop if the attribute doesn't +exist.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
options + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

validate(attrs) → {Parse.Error|boolean}

+ + + + + +
+

You should not call this function directly unless you subclass +Parse.Object, in which case you can override this method +to provide additional validation on set and +save. Your implementation should return

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +object + + + + +

The current data to validate.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Error +| + +boolean + + +
+
+ + +
+

False if the data is valid. An error object otherwise.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Schema.html b/api/5.1.0/Parse.Schema.html new file mode 100644 index 000000000..a676eca58 --- /dev/null +++ b/api/5.1.0/Parse.Schema.html @@ -0,0 +1,3926 @@ + + + + + + Schema - Documentation + + + + + + + + + + + + + + + + + +
+ +

Schema

+ + + + + + + +
+ +
+ +

+ Parse. + + Schema +

+ +

A Parse.Schema object is for handling schema data from Parse.

+

All the schemas methods require MasterKey. +

When adding fields, you may set required and default values. (Requires Parse Server 3.7.0+)

+
+const options = { required: true, defaultValue: 'hello world' };
+const schema = new Parse.Schema('MyClass');
+schema.addString('field', options);
+schema.addIndex('index_name', { 'field': 1 });
+schema.save();
+
+

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Schema(className)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
className + + +string + + + + +

Parse Class string.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

addArray(name, options) → {Parse.Schema}

+ + + + + +
+

Adding Array Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addBoolean(name, options) → {Parse.Schema}

+ + + + + +
+

Adding Boolean Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addBytes(name, options) → {Parse.Schema}

+ + + + + +
+

Adding Bytes Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addDate(name, options) → {Parse.Schema}

+ + + + + +
+

Adding Date Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addField(name, type, options) → {Parse.Schema}

+ + + + + +
+

Adding a Field to Create / Update a Schema

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
type + + +string + + + + +

Can be a (String|Number|Boolean|Date|Parse.File|Parse.GeoPoint|Array|Object|Pointer|Parse.Relation)

+ +
options + + +object + + + + +

Valid options are:

    +
  • required: If field is not set, save operation fails (Requires Parse Server 3.7.0+) +
  • defaultValue: If field is not set, a default value is selected (Requires Parse Server 3.7.0+) +
  • targetClass: Required if type is Pointer or Parse.Relation +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addFile(name, options) → {Parse.Schema}

+ + + + + +
+

Adding File Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addGeoPoint(name, options) → {Parse.Schema}

+ + + + + +
+

Adding GeoPoint Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addIndex(name, index) → {Parse.Schema}

+ + + + + +
+

Adding an Index to Create / Update a Schema

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the index

+ +
index + + +object + + + + +

{ field: value }

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+schema.addIndex('index_name', { 'field': 1 });
+
+
+ + +
+ + + +
+ + +
+ + + +

addNumber(name, options) → {Parse.Schema}

+ + + + + +
+

Adding Number Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addObject(name, options) → {Parse.Schema}

+ + + + + +
+

Adding Object Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addPointer(name, targetClass, options) → {Parse.Schema}

+ + + + + +
+

Adding Pointer Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
targetClass + + +string + + + + +

Name of the target Pointer Class

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addPolygon(name, options) → {Parse.Schema}

+ + + + + +
+

Adding Polygon Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addRelation(name, targetClass) → {Parse.Schema}

+ + + + + +
+

Adding Relation Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
targetClass + + +string + + + + +

Name of the target Pointer Class

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

addString(name, options) → {Parse.Schema}

+ + + + + +
+

Adding String Field

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field that will be created on Parse

+ +
options + + +object + + + + +

See addField

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

delete() → {Promise}

+ + + + + +
+

Removing a Schema from Parse +Can only be used on Schema without objects

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the result when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

deleteField(name) → {Parse.Schema}

+ + + + + +
+

Deleting a Field to Update on a Schema

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

deleteIndex(name) → {Parse.Schema}

+ + + + + +
+

Deleting an Index to Update on a Schema

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of the field

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

get() → {Promise}

+ + + + + +
+

Get the Schema from Parse

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the result when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

purge() → {Promise}

+ + + + + +
+

Removes all objects from a Schema (class) in Parse. +EXERCISE CAUTION, running this will delete all objects for this schema and cannot be reversed

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the result when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

save() → {Promise}

+ + + + + +
+

Create a new Schema on Parse

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the result when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

setCLP(clp) → {Parse.Schema}

+ + + + + +
+

Sets Class Level Permissions when creating / updating a Schema. +EXERCISE CAUTION, running this may override CLP for this schema and cannot be reversed

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
clp + + +object +| + +Parse.CLP + + + + +

Class Level Permissions

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Schema + + +
+
+ + +
+

Returns the schema, so you can chain this call.

+
+ + +
+ + + +
+ + +
+ + + +

update() → {Promise}

+ + + + + +
+

Update a Schema on Parse

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the result when +the query completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) all() → {Promise}

+ + + + + +
+

Static method to get all schemas

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the result when +the query completes.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.Session.html b/api/5.1.0/Parse.Session.html new file mode 100644 index 000000000..ea5ced1dc --- /dev/null +++ b/api/5.1.0/Parse.Session.html @@ -0,0 +1,8205 @@ + + + + + + Session - Documentation + + + + + + + + + + + + + + + + + +
+ +

Session

+ + + + + + + +
+ +
+ +

+ Parse. + + Session +

+ +

A Parse.Session object is a local representation of a revocable session. +This class is a subclass of a Parse.Object, and retains the same +functionality of a Parse.Object.

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Session(attributes)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attributes + + +object + + + + +

The initial set of data to store in the user.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + +

Members

+ + + +
+

createdAt

+ + + + +
+

The first time this object was saved on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
createdAt + + +Date + + + +
+ + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

updatedAt

+ + + + +
+

The last time this object was updated on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
updatedAt + + +Date + + + +
+ + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

_clearPendingOps(keysToClearopt)

+ + + + + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keysToClear + + +Array.<string> + + + + + + <optional>
+ + + + + +
+

if specified, only ops matching +these fields will be cleared

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

_getId() → {string}

+ + + + + +
+

Returns a local or server Id used uniquely identify this object

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

_getStateIdentifier() → {Parse.Object|object}

+ + + + + +
+

Returns a unique identifier used to pull data from the State Controller.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object +| + +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

add(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The item to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The items to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAllUnique(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The objects to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addUnique(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

clear() → {ParseObject|boolean}

+ + + + + +
+

Clears all attributes on a model

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

clone() → {Parse.Object}

+ + + + + +
+

Creates a new model with identical attributes to this one.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

decrement(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically decrements the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to decrement by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

destroy(options) → {Promise}

+ + + + + +
+

Destroy this model on the server if it was already persisted.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeDelete` and `afterDelete` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroy +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) destroyEventually(optionsopt) → {Promise}

+ + + + + +
+

Deletes this object from the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, +and don't need to know when the delete completes. If there is some problem with the object +such that it can't be deleted, the request will be silently discarded.

+

Delete instructions made with this method will be stored locally in an on-disk cache until they can be transmitted +to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection +is available. Delete requests will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Valid options are:

    +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeDelete` and `afterDelete` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroy +completes.

+
+ + +
+ + + +
+ + +
+ + + +

dirty(attr) → {boolean}

+ + + + + +
+

Returns true if this object has been modified since its last +save/refresh. If an attribute is specified, it returns true only if that +particular attribute has been modified since the last save/refresh.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

An attribute name (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

dirtyKeys() → {Array.<string>}

+ + + + + +
+

Returns an array of keys that have been modified since last save/refresh

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

equals(other) → {boolean}

+ + + + + +
+

Determines whether this ParseObject is equal to another ParseObject

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
other + + +object + + + + +

An other object ot compare

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

escape(attr) → {string}

+ + + + + +
+

Gets the HTML-escaped value of an attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

existed() → {boolean}

+ + + + + +
+

Returns true if this object was created by the Parse server when the +object might have already been there (e.g. in the case of a Facebook +login)

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) exists(options) → {Promise.<boolean>}

+ + + + + +
+

Returns true if this object exists on the Server

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object exists.

+
+ + +
+ + + +
+ + +
+ + + +

fetch(options) → {Promise}

+ + + + + +
+

Fetch the model from the server. If the server's representation of the +model differs from its current attributes, they will be overriden.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • include: The name(s) of the key(s) to include. Can be a string, an array of strings, + or an array of array of strings. +
  • context: A dictionary that is accessible in Cloud Code `beforeFind` trigger. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) fetchFromLocalDatastore() → {Promise}

+ + + + + +
+

Asynchronously loads data from the local datastore into this object.

+
+await object.fetchFromLocalDatastore();
+
+

You can create an unfetched pointer with Parse.Object.createWithoutData() +and then call fetchFromLocalDatastore() on it.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch completes.

+
+ + +
+ + + +
+ + +
+ + + +

fetchWithInclude(keys, options) → {Promise}

+ + + + + +
+

Fetch the model from the server. If the server's representation of the +model differs from its current attributes, they will be overriden.

+

Includes nested Parse.Objects for the provided key. You can use dot +notation to specify which fields in the included object are also fetched.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
keys + + +string +| + +Array.<(string|Array.<string>)> + + + + +

The name(s) of the key(s) to include.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch +completes.

+
+ + +
+ + + +
+ + +
+ + + +

get(attr) → {*}

+ + + + + +
+

Gets the value of an attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +* + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getACL() → {Parse.ACL|null}

+ + + + + +
+

Returns the ACL for this object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.ACL +| + +null + + +
+
+ + +
+

An instance of Parse.ACL.

+
+ + +
+ + + +
+ + +
+ + + +

getSessionToken() → {string}

+ + + + + +
+

Returns the session token string.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

has(attr) → {boolean}

+ + + + + +
+

Returns true if the attribute contains a value that is not +null or undefined.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of the attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

increment(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically increments the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to increment by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isDataAvailable() → {boolean}

+ + + + + +
+

Returns true if the object has been fetched.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isNew() → {boolean}

+ + + + + +
+

Returns true if this object has never been saved to Parse.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) isPinned() → {Promise.<boolean>}

+ + + + + +
+

Asynchronously returns if the object is pinned

+
+const isPinned = await object.isPinned();
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object is pinned.

+
+ + +
+ + + +
+ + +
+ + + +

isValid() → {boolean}

+ + + + + +
+

Checks if the model is currently in a valid state.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

newInstance() → {Parse.Object}

+ + + + + +
+

Creates a new instance of this object. Not to be confused with clone()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

op(attr) → {Parse.Op|undefined}

+ + + + + +
+

Returns an instance of a subclass of Parse.Op describing what kind of +modification has been performed on this field since the last time it was +saved. For example, after calling object.increment("x"), calling +object.op("x") would return an instance of Parse.Op.Increment.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Op +| + +undefined + + +
+
+ + +
+

The operation, or undefined if none.

+
+ + +
+ + + +
+ + +
+ + + +

pin() → {Promise}

+ + + + + +
+

Asynchronously stores the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pin();
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPin()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

pinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously stores the objects and every object they point to in the local datastore, recursively.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pinWithName(name);
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPinWithName(name)

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

relation(attr) → {Parse.Relation}

+ + + + + +
+

Gets a relation on the given class for the attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The attribute to get the relation for.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Relation + + +
+
+ + + +
+ + + +
+ + +
+ + + +

remove(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of an object from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

removeAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of the objects from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

revert(…keysopt)

+ + + + + +
+

Clears any (or specific) changes to this object made since the last call to save()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string + + + + + + <optional>
+ + + + + + <repeatable>
+ +
+

specify which fields to revert

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

save(arg1opt, arg2opt, arg3opt) → {Promise}

+ + + + + +
+

Set a hash of model attributes, and save the model to the server. +updatedAt will be updated when the request returns. +You can either call it as:

+object.save();
+or
+object.save(attrs);
+or
+object.save(null, options);
+or
+object.save(attrs, options);
+or
+object.save(key, value);
+or
+object.save(key, value, options);

+

Example 1:

+gameTurn.save({
+player: "Jake Cutter",
+diceRoll: 2
+}).then(function(gameTurnAgain) {
+// The save was successful.
+}, function(error) {
+// The save failed.  Error is an instance of Parse.Error.
+});

+

Example 2:

+gameTurn.save("player", "Jake Cutter");

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
arg1 + + +string +| + +object +| + +null + + + + + + <optional>
+ + + + + +
+

Valid options are:

    +
  • `Object` - Key/value pairs to update on the object.
  • +
  • `String` Key - Key of attribute to update (requires arg2 to also be string)
  • +
  • `null` - Passing null for arg1 allows you to save the object with options passed in arg2.
  • +
+ +
arg2 + + +string +| + +object + + + + + + <optional>
+ + + + + +
+
    +
  • `String` Value - If arg1 was passed as a key, arg2 is the value that should be set on that key.
  • +
  • `Object` Options - Valid options are: +
      +
    • useMasterKey: In Cloud Code and Node only, causes the Master Key to +be used for this request. +
    • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
    • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
    • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
    +
  • +
+ +
arg3 + + +object + + + + + + <optional>
+ + + + + +
+

Used to pass option parameters to method if arg1 and arg2 were both passed as strings. +Valid options are:

+
    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to +be used for this request. +
  • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
  • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
  • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the save +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) saveEventually(optionsopt) → {Promise}

+ + + + + +
+

Saves this object to the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, and don't need to know when the save completes. +If there is some problem with the object such that it can't be saved, it will be silently discarded.

+

Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. +They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is +available. Objects saved this way will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Used to pass option parameters to method if arg1 and arg2 were both passed as strings. +Valid options are:

+
    +
  • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
  • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
  • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the save +completes.

+
+ + +
+ + + +
+ + +
+ + + +

set(key, value, options) → {ParseObject|boolean}

+ + + + + +
+

Sets a hash of model attributes on the object.

+

You can call it with an object containing keys and values, with one +key and value, or dot notation. For example:

+  gameTurn.set({
+    player: player1,
+    diceRoll: 2
+  }, {
+    error: function(gameTurnAgain, error) {
+      // The set failed validation.
+    }
+  });
+

game.set("currentPlayer", player2, { +error: function(gameTurnAgain, error) { +// The set failed validation. +} +});

+

game.set("finished", true);

+

game.set("player.score", 10);

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string +| + +object + + + + +

The key to set.

+ +
value + + +string +| + +object + + + + +

The value to give it.

+ +
options + + +object + + + + +

A set of options for the set. +The only supported option is error.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

true if the set succeeded.

+
+ + +
+ + + +
+ + +
+ + + +

setACL(acl, options) → {ParseObject|boolean}

+ + + + + +
+

Sets the ACL to be used for this object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
acl + + +Parse.ACL + + + + +

An instance of Parse.ACL.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

Whether the set passed validation.

+
+ + +
+ + + +
+ + +
+ + + +

toJSON(seen, offline) → {object}

+ + + + + +
+

Returns a JSON version of the object suitable for saving to Parse.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
seen + + + + +
offline + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toOfflinePointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toPointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

unPin() → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+
+await object.unPin();
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unPinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, recursively.

+
+await object.unPinWithName(name);
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unset(attr, options) → {ParseObject|boolean}

+ + + + + +
+

Remove an attribute from the model. This is a noop if the attribute doesn't +exist.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
options + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

validate(attrs) → {Parse.Error|boolean}

+ + + + + +
+

You should not call this function directly unless you subclass +Parse.Object, in which case you can override this method +to provide additional validation on set and +save. Your implementation should return

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +object + + + + +

The current data to validate.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Error +| + +boolean + + +
+
+ + +
+

False if the data is valid. An error object otherwise.

+
+ + +
+ + + +
+ + +
+ + + +

(static) current(options) → {Promise}

+ + + + + +
+

Retrieves the Session object for the currently logged in session.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

useMasterKey

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the Parse.Session +object after it has been fetched. If there is no current user, the +promise will be rejected.

+
+ + +
+ + + +
+ + +
+ + + +

(static) isCurrentSessionRevocable() → {boolean}

+ + + + + +
+

Determines whether the current session token is revocable. +This method is useful for migrating Express.js or Node.js web apps to +use revocable sessions. If you are migrating an app that uses the Parse +SDK in the browser only, please use Parse.User.enableRevocableSession() +instead, so that sessions can be automatically upgraded.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.User.html b/api/5.1.0/Parse.User.html new file mode 100644 index 000000000..d0eeee6f5 --- /dev/null +++ b/api/5.1.0/Parse.User.html @@ -0,0 +1,14324 @@ + + + + + + User - Documentation + + + + + + + + + + + + + + + + + +
+ +

User

+ + + + + + + +
+ +
+ +

+ Parse. + + User +

+ +

A Parse.User object is a local representation of a user persisted to the +Parse cloud. This class is a subclass of a Parse.Object, and retains the +same functionality of a Parse.Object, but also extends it with various +user specific methods, like authentication, signing up, and validation of +uniqueness.

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new User(attributes)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attributes + + +object + + + + +

The initial set of data to store in the user.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + +

Members

+ + + +
+

createdAt

+ + + + +
+

The first time this object was saved on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
createdAt + + +Date + + + +
+ + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

updatedAt

+ + + + +
+

The last time this object was updated on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
updatedAt + + +Date + + + +
+ + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

_cleanupAuthData()

+ + + + + +
+

Removes null values from authData (which exist temporarily for unlinking)

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

_clearPendingOps(keysToClearopt)

+ + + + + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keysToClear + + +Array.<string> + + + + + + <optional>
+ + + + + +
+

if specified, only ops matching +these fields will be cleared

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

_getId() → {string}

+ + + + + +
+

Returns a local or server Id used uniquely identify this object

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

_getStateIdentifier() → {Parse.Object|object}

+ + + + + +
+

Returns a unique identifier used to pull data from the State Controller.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object +| + +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

_isLinked(provider) → {boolean}

+ + + + + +
+

Checks whether a user is linked to a service.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
provider + + +object + + + + +

service to link to

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

true if link was successful

+
+ + +
+ + + +
+ + +
+ + + +

_linkWith(provider, options, saveOpts) → {Promise}

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + +
Deprecated:
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
provider + + + + +
options + + + + +
saveOpts + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

_logOutWith(provider)

+ + + + + +
+

Deauthenticates a single provider (e.g. removing access tokens from the +Facebook SDK).

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
provider + + +object + + + + +

service to logout of

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

_logOutWithAll()

+ + + + + +
+

Deauthenticates all providers.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

_preserveFieldsOnFetch() → {object}

+ + + + + +
+

Class instance method used to maintain specific keys when a fetch occurs. +Used to ensure that the session token is not lost.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + +
+

sessionToken

+
+ + +
+ + + +
+ + +
+ + + +

_synchronizeAllAuthData()

+ + + + + +
+

Synchronizes authData for all providers.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

_synchronizeAuthData(provider)

+ + + + + +
+

Synchronizes auth data for a provider (e.g. puts the access token in the +right place to be used by the Facebook SDK).

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
provider + + + + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

_unlinkFrom(provider, options) → {Promise}

+ + + + + +
+

Unlinks a user from a service.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
provider + + +string +| + +AuthProvider + + + + +

Name of auth provider or AuthProvider

+ +
options + + +object + + + + +

MasterKey / SessionToken

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unlinking +finishes.

+
+ + +
+ + + +
+ + +
+ + + +

_upgradeToRevocableSession(options) → {Promise}

+ + + + + +
+

Request a revocable session token to replace the older style of token.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved when the replacement +token has been fetched.

+
+ + +
+ + + +
+ + +
+ + + +

add(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The item to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The items to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAllUnique(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The objects to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addUnique(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

authenticated() → {boolean}

+ + + + + +
+

Checks whether this user is the current user and has been authenticated.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

whether this user is the current user and is logged in.

+
+ + +
+ + + +
+ + +
+ + + +

clear() → {ParseObject|boolean}

+ + + + + +
+

Clears all attributes on a model

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

clone() → {Parse.Object}

+ + + + + +
+

Creates a new model with identical attributes to this one.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

decrement(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically decrements the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to decrement by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) destroy(…args) → {Parse.User}

+ + + + + +
+

Wrap the default destroy behavior with functionality that logs out +the current user when it is destroyed

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
args + + +any + + + + + + + + + + <repeatable>
+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.User + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) destroyEventually(optionsopt) → {Promise}

+ + + + + +
+

Deletes this object from the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, +and don't need to know when the delete completes. If there is some problem with the object +such that it can't be deleted, the request will be silently discarded.

+

Delete instructions made with this method will be stored locally in an on-disk cache until they can be transmitted +to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection +is available. Delete requests will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Valid options are:

    +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeDelete` and `afterDelete` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroy +completes.

+
+ + +
+ + + +
+ + +
+ + + +

dirty(attr) → {boolean}

+ + + + + +
+

Returns true if this object has been modified since its last +save/refresh. If an attribute is specified, it returns true only if that +particular attribute has been modified since the last save/refresh.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

An attribute name (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

dirtyKeys() → {Array.<string>}

+ + + + + +
+

Returns an array of keys that have been modified since last save/refresh

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

equals(other) → {boolean}

+ + + + + +
+

Determines whether this ParseObject is equal to another ParseObject

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
other + + +object + + + + +

An other object ot compare

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

escape(attr) → {string}

+ + + + + +
+

Gets the HTML-escaped value of an attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

existed() → {boolean}

+ + + + + +
+

Returns true if this object was created by the Parse server when the +object might have already been there (e.g. in the case of a Facebook +login)

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) exists(options) → {Promise.<boolean>}

+ + + + + +
+

Returns true if this object exists on the Server

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object exists.

+
+ + +
+ + + +
+ + +
+ + + +

(async) fetch(…args) → {Parse.User}

+ + + + + +
+

Wrap the default fetch behavior with functionality to save to local +storage if this is current user.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
args + + +any + + + + + + + + + + <repeatable>
+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.User + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) fetchFromLocalDatastore() → {Promise}

+ + + + + +
+

Asynchronously loads data from the local datastore into this object.

+
+await object.fetchFromLocalDatastore();
+
+

You can create an unfetched pointer with Parse.Object.createWithoutData() +and then call fetchFromLocalDatastore() on it.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) fetchWithInclude(…args) → {Parse.User}

+ + + + + +
+

Wrap the default fetchWithInclude behavior with functionality to save to local +storage if this is current user.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
args + + +any + + + + + + + + + + <repeatable>
+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.User + + +
+
+ + + +
+ + + +
+ + +
+ + + +

get(attr) → {*}

+ + + + + +
+

Gets the value of an attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +* + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getACL() → {Parse.ACL|null}

+ + + + + +
+

Returns the ACL for this object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.ACL +| + +null + + +
+
+ + +
+

An instance of Parse.ACL.

+
+ + +
+ + + +
+ + +
+ + + +

getEmail() → {string}

+ + + + + +
+

Returns get("email").

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+

User's Email

+
+ + +
+ + + +
+ + +
+ + + +

getSessionToken() → {string}

+ + + + + +
+

Returns the session token for this user, if the user has been logged in, +or if it is the result of a query with the master key. Otherwise, returns +undefined.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + +
+

the session token, or undefined

+
+ + +
+ + + +
+ + +
+ + + +

getUsername() → {string}

+ + + + + +
+

Returns get("username").

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

has(attr) → {boolean}

+ + + + + +
+

Returns true if the attribute contains a value that is not +null or undefined.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of the attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

increment(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically increments the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to increment by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isCurrent() → {boolean}

+ + + + + +
+

Returns true if current would return this user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + +
+

true if user is cached on disk

+
+ + +
+ + + +
+ + +
+ + + +

(async) isCurrentAsync() → {Promise.<boolean>}

+ + + + + +
+

Returns true if current would return this user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

true if user is cached on disk

+
+ + +
+ + + +
+ + +
+ + + +

isDataAvailable() → {boolean}

+ + + + + +
+

Returns true if the object has been fetched.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isNew() → {boolean}

+ + + + + +
+

Returns true if this object has never been saved to Parse.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) isPinned() → {Promise.<boolean>}

+ + + + + +
+

Asynchronously returns if the object is pinned

+
+const isPinned = await object.isPinned();
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object is pinned.

+
+ + +
+ + + +
+ + +
+ + + +

isValid() → {boolean}

+ + + + + +
+

Checks if the model is currently in a valid state.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

linkWith(provider, options, saveOpts) → {Promise}

+ + + + + +
+

Parse allows you to link your users with 3rd party authentication, enabling +your users to sign up or log into your application using their existing identities. +Since 2.9.0

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
provider + + +string +| + +AuthProvider + + + + +

Name of auth provider or AuthProvider

+ +
options + + +object + + + + +
    +
  • If provider is string, options is authData +
  • If provider is AuthProvider, options is saveOpts +
+ +
saveOpts + + +object + + + + +

useMasterKey / sessionToken

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with the user is linked

+
+ + +
+ + + +
+ + +
+ + + +

logIn(options) → {Promise}

+ + + + + +
+

Logs in a Parse.User. On success, this saves the session to disk, +so you can retrieve the currently logged in user using +current.

+

A username and password must be set before calling logIn.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with the user when +the login is complete.

+
+ + +
+ + + +
+ + +
+ + + +

newInstance() → {Parse.Object}

+ + + + + +
+

Creates a new instance of this object. Not to be confused with clone()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

op(attr) → {Parse.Op|undefined}

+ + + + + +
+

Returns an instance of a subclass of Parse.Op describing what kind of +modification has been performed on this field since the last time it was +saved. For example, after calling object.increment("x"), calling +object.op("x") would return an instance of Parse.Op.Increment.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Op +| + +undefined + + +
+
+ + +
+

The operation, or undefined if none.

+
+ + +
+ + + +
+ + +
+ + + +

pin() → {Promise}

+ + + + + +
+

Asynchronously stores the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pin();
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPin()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

pinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously stores the objects and every object they point to in the local datastore, recursively.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pinWithName(name);
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPinWithName(name)

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

relation(attr) → {Parse.Relation}

+ + + + + +
+

Gets a relation on the given class for the attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The attribute to get the relation for.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Relation + + +
+
+ + + +
+ + + +
+ + +
+ + + +

remove(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of an object from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

removeAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of the objects from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

revert(…keysopt)

+ + + + + +
+

Clears any (or specific) changes to this object made since the last call to save()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string + + + + + + <optional>
+ + + + + + <repeatable>
+ +
+

specify which fields to revert

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(async) save(…args) → {Promise}

+ + + + + +
+

Wrap the default save behavior with functionality to save to local +storage if this is current user.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
args + + +any + + + + + + + + + + <repeatable>
+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) saveEventually(optionsopt) → {Promise}

+ + + + + +
+

Saves this object to the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, and don't need to know when the save completes. +If there is some problem with the object such that it can't be saved, it will be silently discarded.

+

Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. +They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is +available. Objects saved this way will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Used to pass option parameters to method if arg1 and arg2 were both passed as strings. +Valid options are:

+
    +
  • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
  • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
  • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the save +completes.

+
+ + +
+ + + +
+ + +
+ + + +

set(key, value, options) → {ParseObject|boolean}

+ + + + + +
+

Sets a hash of model attributes on the object.

+

You can call it with an object containing keys and values, with one +key and value, or dot notation. For example:

+  gameTurn.set({
+    player: player1,
+    diceRoll: 2
+  }, {
+    error: function(gameTurnAgain, error) {
+      // The set failed validation.
+    }
+  });
+

game.set("currentPlayer", player2, { +error: function(gameTurnAgain, error) { +// The set failed validation. +} +});

+

game.set("finished", true);

+

game.set("player.score", 10);

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string +| + +object + + + + +

The key to set.

+ +
value + + +string +| + +object + + + + +

The value to give it.

+ +
options + + +object + + + + +

A set of options for the set. +The only supported option is error.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

true if the set succeeded.

+
+ + +
+ + + +
+ + +
+ + + +

setACL(acl, options) → {ParseObject|boolean}

+ + + + + +
+

Sets the ACL to be used for this object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
acl + + +Parse.ACL + + + + +

An instance of Parse.ACL.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

Whether the set passed validation.

+
+ + +
+ + + +
+ + +
+ + + +

setEmail(email) → {boolean}

+ + + + + +
+

Calls set("email", email) and returns the result.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
email + + +string + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

setPassword(password)

+ + + + + +
+

Calls set("password", password, options) and returns the result.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
password + + +string + + + + +

User's Password

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

setUsername(username)

+ + + + + +
+

Calls set("username", username, options) and returns the result.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
username + + +string + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

signUp(attrs, options) → {Promise}

+ + + + + +
+

Signs up a new user. You should call this instead of save for +new Parse.Users. This will create a new Parse.User on the server, and +also persist the session on disk so that you can access the user using +current.

+

A username and password must be set before calling signUp.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +object + + + + +

Extra fields to set on the new user, or null.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the signup +finishes.

+
+ + +
+ + + +
+ + +
+ + + +

toJSON(seen, offline) → {object}

+ + + + + +
+

Returns a JSON version of the object suitable for saving to Parse.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
seen + + + + +
offline + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toOfflinePointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toPointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

unPin() → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+
+await object.unPin();
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unPinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, recursively.

+
+await object.unPinWithName(name);
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unset(attr, options) → {ParseObject|boolean}

+ + + + + +
+

Remove an attribute from the model. This is a noop if the attribute doesn't +exist.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
options + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

validate(attrs) → {Parse.Error|boolean}

+ + + + + +
+

You should not call this function directly unless you subclass +Parse.Object, in which case you can override this method +to provide additional validation on set and +save. Your implementation should return

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +object + + + + +

The current data to validate.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Error +| + +boolean + + +
+
+ + +
+

False if the data is valid. An error object otherwise.

+
+ + +
+ + + +
+ + +
+ + + +

verifyPassword(password, options) → {Promise}

+ + + + + +
+

Verify whether a given password is the password of the current user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
password + + +string + + + + +

The password to be verified.

+ +
options + + +object + + + + +

The options.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
ignoreEmailVerification + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + +

Set to true to bypass email verification and verify +the password regardless of whether the email has been verified. This requires the master key.

+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with a user when the password is correct.

+
+ + +
+ + + +
+ + +
+ + + +

(static) _logInWith(provider, options, saveOpts) → {Promise}

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + +
Deprecated:
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
provider + + + + +
options + + + + +
saveOpts + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) _registerAuthenticationProvider(provider)

+ + + + + +
+

When registering users with linkWith a basic auth provider +is automatically created for you.

+

For advanced authentication, you can register an Auth provider to +implement custom authentication, deauthentication.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
provider + + + + +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) allowCustomUserClass(isAllowed)

+ + + + + +
+

Allow someone to define a custom User class without className +being rewritten to _User. The default behavior is to rewrite +User to _User for legacy reasons. This allows developers to +override that behavior.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
isAllowed + + +boolean + + + + +

Whether or not to allow custom User class

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) become(sessionToken, options) → {Promise}

+ + + + + +
+

Logs in a user with a session token. On success, this saves the session +to disk, so you can retrieve the currently logged in user using +current.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
sessionToken + + +string + + + + +

The sessionToken to log in with.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with the user when +the login completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) current() → {Parse.Object}

+ + + + + +
+

Retrieves the currently logged in ParseUser with a valid session, +either from memory or localStorage, if necessary.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + +
+

The currently logged in Parse.User.

+
+ + +
+ + + +
+ + +
+ + + +

(static) currentAsync() → {Promise}

+ + + + + +
+

Retrieves the currently logged in ParseUser from asynchronous Storage.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A Promise that is resolved with the currently +logged in Parse User

+
+ + +
+ + + +
+ + +
+ + + +

(static) disableUnsafeCurrentUser()

+ + + + + +
+

Disables the use of become or the current user in any environment. +These features are disabled on servers by default, since they depend on +global objects that are not memory-safe for most servers.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) enableRevocableSession(options) → {Promise}

+ + + + + +
+

Allows a legacy application to start using revocable sessions. If the +current session token is not revocable, a request will be made for a new, +revocable session. +It is not necessary to call this method from cloud code unless you are +handling user signup or login from the server side. In a cloud code call, +this function will not attempt to upgrade the current token.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved when the process has +completed. If a replacement session token is requested, the promise +will be resolved after a new token has been fetched.

+
+ + +
+ + + +
+ + +
+ + + +

(static) enableUnsafeCurrentUser()

+ + + + + +
+

Enables the use of become or the current user in a server +environment. These features are disabled by default, since they depend on +global objects that are not memory-safe for most servers.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) extend(protoProps, classProps) → {Parse.User}

+ + + + + +
+

Adds functionality to the existing Parse.User class.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
protoProps + + +object + + + + +

A set of properties to add to the prototype

+ +
classProps + + +object + + + + +

A set of static properties to add to the class

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.User + + +
+
+ + +
+

The newly extended Parse.User class

+
+ + +
+ + + +
+ + +
+ + + +

(static) hydrate(userJSON) → {Promise}

+ + + + + +
+

Logs in a user with a session token. On success, this saves the session +to disk, so you can retrieve the currently logged in user using +current. If there is no session token the user will not logged in.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userJSON + + +object + + + + +

The JSON map of the User's data

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with the user when +the login completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) logIn(username, password, options) → {Promise}

+ + + + + +
+

Logs in a user with a username (or email) and password. On success, this +saves the session to disk, so you can retrieve the currently logged in +user using current.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
username + + +string + + + + +

The username (or email) to log in with.

+ +
password + + +string + + + + +

The password to log in with.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with the user when +the login completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) logInWith(provider, options, saveOpts) → {Promise}

+ + + + + +
+

Static version of linkWith

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
provider + + + + +
options + + + + +
saveOpts + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) logInWithAdditionalAuth(username, password, authData, options) → {Promise}

+ + + + + +
+

Logs in a user with a username (or email) and password, and authData. On success, this +saves the session to disk, so you can retrieve the currently logged in +user using current.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
username + + +string + + + + +

The username (or email) to log in with.

+ +
password + + +string + + + + +

The password to log in with.

+ +
authData + + +object + + + + +

The authData to log in with.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with the user when +the login completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) logOut(options) → {Promise}

+ + + + + +
+

Logs out the currently logged in user session. This will remove the +session from disk, log out of linked services, and future calls to +current will return null.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved when the session is +destroyed on the server.

+
+ + +
+ + + +
+ + +
+ + + +

(static) loginAs(userId) → {Promise}

+ + + + + +
+

Logs in a user with an objectId. On success, this saves the session +to disk, so you can retrieve the currently logged in user using +current.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
userId + + +string + + + + +

The objectId for the user.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with the user when +the login completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) me(sessionToken, options) → {Promise}

+ + + + + +
+

Retrieves a user with a session token.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
sessionToken + + +string + + + + +

The sessionToken to get user with.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with the user is fetched.

+
+ + +
+ + + +
+ + +
+ + + +

(static) requestEmailVerification(email, options) → {Promise}

+ + + + + +
+

Request an email verification.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
email + + +string + + + + +

The email address associated with the user that +needs to verify their email.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) requestPasswordReset(email, options) → {Promise}

+ + + + + +
+

Requests a password reset email to be sent to the specified email address +associated with the user account. This email allows the user to securely +reset their password on the Parse site.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
email + + +string + + + + +

The email address associated with the user that +forgot their password.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) signUp(username, password, attrs, options) → {Promise}

+ + + + + +
+

Signs up a new user with a username (or email) and password. +This will create a new Parse.User on the server, and also persist the +session in localStorage so that you can access the user using +#current.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
username + + +string + + + + +

The username (or email) to sign up with.

+ +
password + + +string + + + + +

The password to sign up with.

+ +
attrs + + +object + + + + +

Extra fields to set on the new user.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with the user when +the signup completes.

+
+ + +
+ + + +
+ + +
+ + + +

(static) verifyPassword(username, password, options) → {Promise}

+ + + + + +
+

Verify whether a given password is the password of the current user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
username + + +string + + + + +

The username of the user whose password should be verified.

+ +
password + + +string + + + + +

The password to be verified.

+ +
options + + +object + + + + +

The options.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
ignoreEmailVerification + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + +

Set to true to bypass email verification and verify +the password regardless of whether the email has been verified. This requires the master key.

+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled with a user when the password is correct.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.html b/api/5.1.0/Parse.html new file mode 100644 index 000000000..aecb73d4f --- /dev/null +++ b/api/5.1.0/Parse.html @@ -0,0 +1,2218 @@ + + + + + + Parse - Documentation + + + + + + + + + + + + + + + + + +
+ +

Parse

+ + + + + + + +
+ +
+ +

+ Parse +

+ + +
+ +
+
+ + +
+ + + +

new Parse()

+ + + + + +
+

Contains all Parse API classes and functions.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +

Classes

+ +
+
ACL
+
+ +
Analytics
+
+ +
AnonymousUtils
+
+ +
CLP
+
+ +
Cloud
+
+ +
Config
+
+ +
Error
+
+ +
EventuallyQueue
+
+ +
FacebookUtils
+
+ +
File
+
+ +
Installation
+
+ +
LiveQuery
+
+ +
LiveQueryClient
+
+ +
LocalDatastore
+
+ +
Object
+
+ +
Polygon
+
+ +
Push
+
+ +
Query
+
+ +
Relation
+
+ +
Role
+
+ +
Schema
+
+ +
Session
+
+ +
User
+
+
+ + + + + + + +

Members

+ + + +
+

(static) EventuallyQueue :EventuallyQueue

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +EventuallyQueue + + +
  • +
+ + + + + +
+ + + +
+

(static) LiveQuery :ParseLiveQuery

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +ParseLiveQuery + + +
  • +
+ + + + + +
+ + + +
+

(static) allowCustomObjectId :boolean

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + +
+

(static) applicationId :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) encryptedUser :boolean

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + +
+

(static) idempotency :boolean

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + +
+

(static) javaScriptKey :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) liveQueryServerURL :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) masterKey :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) secret :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) serverAuthToken :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) serverAuthType :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) serverURL :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

(static) dumpLocalDatastore() → {object}

+ + + + + +
+

Gets all contents from Local Datastore

+
+await Parse.dumpLocalDatastore();
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) enableEncryptedUser()

+ + + + + +
+

Enable the current user encryption. +This must be called before login any user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) enableLocalDatastore(pollingopt, msopt)

+ + + + + +
+

Enable pinning in your application. +This must be called after Parse.initialize in your application.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
polling + + + + <optional>
+ + + + + +
+

Allow pinging the server /health endpoint. Default true

+ +
ms + + + + <optional>
+ + + + + +
+

Milliseconds to ping the server. Default 2000ms

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) getServerHealth() → {Promise}

+ + + + + +
+

Returns information regarding the current server's health

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) initialize(applicationId, javaScriptKeyopt, masterKeyopt)

+ + + + + +
+

Call this method first to set up your authentication tokens for Parse.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
applicationId + + +string + + + + + + + + + + +

Your Parse Application ID.

+ +
javaScriptKey + + +string + + + + + + <optional>
+ + + + + +
+

Your Parse JavaScript Key (Not needed for parse-server)

+ +
masterKey + + +string + + + + + + <optional>
+ + + + + +
+

Your Parse Master Key. (Node.js only!)

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) isEncryptedUserEnabled() → {boolean}

+ + + + + +
+

Flag that indicates whether Encrypted User is enabled.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) isLocalDatastoreEnabled() → {boolean}

+ + + + + +
+

Flag that indicates whether Local Datastore is enabled.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) setAsyncStorage(storage)

+ + + + + +
+

Call this method to set your AsyncStorage engine +Starting Parse@1.11, the ParseSDK do not provide a React AsyncStorage as the ReactNative module +is not provided at a stable path and changes over versions.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
storage + + +AsyncStorage + + + + +

a react native async storage.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) setLocalDatastoreController(controller)

+ + + + + +
+

Call this method to set your LocalDatastoreStorage engine +If using React-Native use Parse.setAsyncStorage()

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
controller + + +LocalDatastoreController + + + + +

a data storage.

+ +
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.html#.EventuallyQueue b/api/5.1.0/Parse.html#.EventuallyQueue new file mode 100644 index 000000000..cfe044517 --- /dev/null +++ b/api/5.1.0/Parse.html#.EventuallyQueue @@ -0,0 +1,1312 @@ + + + + + + EventuallyQueue - Documentation + + + + + + + + + + + + + + + + + +
+ +

EventuallyQueue

+ + + + + + + +
+ +
+ +

+ Parse. + + EventuallyQueue +

+ + +
+ +
+
+ + +
+ + + +

new EventuallyQueue()

+ + + + + +
+

Provides utility functions to queue objects that will be +saved to the server at a later date.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

(static) clear() → {Promise}

+ + + + + +
+

Removes all objects from queue.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when queue is cleared.

+
+ + +
+ + + +
+ + +
+ + + +

(static) destroy(object, serverOptionsopt) → {Promise}

+ + + + + +
+

Add object to queue with save operation.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
object + + +ParseObject + + + + + + + + + + +

Parse.Object to be destroyed eventually

+ +
serverOptions + + +object + + + + + + <optional>
+ + + + + +
+

See Parse.Object.destroy options

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled if object is added to queue.

+
+ + +
+ + + +
+ + +
+ + + +

(static) getQueue() → {Promise.<Array>}

+ + + + + +
+

Sets the in-memory queue from local storage and returns.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<Array> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) isPolling() → {boolean}

+ + + + + +
+

Return true if pinging the server.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) length() → {number}

+ + + + + +
+

Return the number of objects in the queue.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +number + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) poll(msopt)

+ + + + + +
+

Start polling server for network connection. +Will send queue if connection is established.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
ms + + + + <optional>
+ + + + + +
+

Milliseconds to ping the server. Default 2000ms

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) save(object, serverOptionsopt) → {Promise}

+ + + + + +
+

Add object to queue with save operation.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
object + + +ParseObject + + + + + + + + + + +

Parse.Object to be saved eventually

+ +
serverOptions + + +object + + + + + + <optional>
+ + + + + +
+

See Parse.Object.save options.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled if object is added to queue.

+
+ + +
+ + + +
+ + +
+ + + +

(static) sendQueue() → {Promise.<boolean>}

+ + + + + +
+

Sends the queue to the server.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

Returns true if queue was sent successfully.

+
+ + +
+ + + +
+ + +
+ + + +

(static) stopPoll()

+ + + + + +
+

Turns off polling.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Parse.html#.LiveQuery b/api/5.1.0/Parse.html#.LiveQuery new file mode 100644 index 000000000..ca2f073e8 --- /dev/null +++ b/api/5.1.0/Parse.html#.LiveQuery @@ -0,0 +1,187 @@ + + + + + + LiveQuery - Documentation + + + + + + + + + + + + + + + + + +
+ +

LiveQuery

+ + + + + + + +
+ +
+ +

+ Parse. + + LiveQuery +

+ + +
+ +
+
+ + +
+ + + +

new LiveQuery()

+ + + + + +
+

We expose three events to help you monitor the status of the WebSocket connection:

+

Open - When we establish the WebSocket connection to the LiveQuery server, you'll get this event. +

+Parse.LiveQuery.on('open', () => {
+
+});

+

Close - When we lose the WebSocket connection to the LiveQuery server, you'll get this event. +

+Parse.LiveQuery.on('close', () => {
+
+});

+

Error - When some network error or LiveQuery server error happens, you'll get this event. +

+Parse.LiveQuery.on('error', (error) => {
+
+});

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/ParseGeoPoint.html b/api/5.1.0/ParseGeoPoint.html new file mode 100644 index 000000000..d684a9e54 --- /dev/null +++ b/api/5.1.0/ParseGeoPoint.html @@ -0,0 +1,1348 @@ + + + + + + ParseGeoPoint - Documentation + + + + + + + + + + + + + + + + + +
+ +

ParseGeoPoint

+ + + + + + + +
+ +
+ +

+ ParseGeoPoint +

+ + +
+ +
+
+ + +
+ + + +

new ParseGeoPoint(arg1, arg2)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
arg1 + + +Array.<number> +| + +object +| + +number + + + + +

Either a list of coordinate pairs, an object with latitude, longitude, or the latitude or the point.

+ +
arg2 + + +number + + + + +

The longitude of the GeoPoint

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +

Members

+ + + +
+

latitude

+ + + + +
+

North-south portion of the coordinate, in range [-90, 90]. +Throws an exception if set out of range in a modern browser.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
latitude + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

longitude

+ + + + +
+

East-west portion of the coordinate, in range [-180, 180]. +Throws if set out of range in a modern browser.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
longitude + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

kilometersTo(point) → {number}

+ + + + + +
+

Returns the distance from this GeoPoint to another in kilometers.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
point + + +Parse.GeoPoint + + + + +

the other Parse.GeoPoint.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +number + + +
+
+ + + +
+ + + +
+ + +
+ + + +

milesTo(point) → {number}

+ + + + + +
+

Returns the distance from this GeoPoint to another in miles.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
point + + +Parse.GeoPoint + + + + +

the other Parse.GeoPoint.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +number + + +
+
+ + + +
+ + + +
+ + +
+ + + +

radiansTo(point) → {number}

+ + + + + +
+

Returns the distance from this GeoPoint to another in radians.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
point + + +Parse.GeoPoint + + + + +

the other Parse.GeoPoint.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +number + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toJSON() → {object}

+ + + + + +
+

Returns a JSON representation of the GeoPoint, suitable for Parse.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) current(options) → {Promise.<Parse.GeoPoint>}

+ + + + + +
+

Creates a GeoPoint with the user's current location, if available.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

The options.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
enableHighAccuracy + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + +

A boolean value that indicates the application would like to receive the best possible results. If true and if the device is able to provide a more accurate position, it will do so. Note that this can result in slower response times or increased power consumption (with a GPS chip on a mobile device for example). On the other hand, if false, the device can take the liberty to save resources by responding more quickly and/or using less power. Default: false.

+ +
timeout + + +number + + + + + + <optional>
+ + + + + +
+ + Infinity + + +

A positive long value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. The default value is Infinity, meaning that getCurrentPosition() won't return until the position is available.

+ +
maximumAge + + +number + + + + + + <optional>
+ + + + + +
+ + 0 + + +

A positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device must return a cached position regardless of its age. Default: 0.

+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<Parse.GeoPoint> + + +
+
+ + +
+

User's current location

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/Subscription.html b/api/5.1.0/Subscription.html new file mode 100644 index 000000000..09fe10d69 --- /dev/null +++ b/api/5.1.0/Subscription.html @@ -0,0 +1,332 @@ + + + + + + Subscription - Documentation + + + + + + + + + + + + + + + + + +
+ +

Subscription

+ + + + + + + +
+ +
+ +

+ Subscription +

+ +

Creates a new LiveQuery Subscription. +cloud functions.

+

Response Object - Contains data from the client that made the request +

    +
  • clientId
  • +
  • installationId - requires Parse Server 4.0.0+
  • +
+

+

Open Event - When you call query.subscribe(), we send a subscribe request to +the LiveQuery server, when we get the confirmation from the LiveQuery server, +this event will be emitted. When the client loses WebSocket connection to the +LiveQuery server, we will try to auto reconnect the LiveQuery server. If we +reconnect the LiveQuery server and successfully resubscribe the ParseQuery, +you'll also get this event. +

+subscription.on('open', (response) => {
+
+});

+

Create Event - When a new ParseObject is created and it fulfills the ParseQuery you subscribe, +you'll get this event. The object is the ParseObject which is created. +

+subscription.on('create', (object, response) => {
+
+});

+

Update Event - When an existing ParseObject (original) which fulfills the ParseQuery you subscribe +is updated (The ParseObject fulfills the ParseQuery before and after changes), +you'll get this event. The object is the ParseObject which is updated. +Its content is the latest value of the ParseObject. +

Parse-Server 3.1.3+ Required for original object parameter

+
+subscription.on('update', (object, original, response) => {
+
+});

+

Enter Event - When an existing ParseObject's (original) old value doesn't fulfill the ParseQuery +but its new value fulfills the ParseQuery, you'll get this event. The object is the +ParseObject which enters the ParseQuery. Its content is the latest value of the ParseObject. +

Parse-Server 3.1.3+ Required for original object parameter

+
+subscription.on('enter', (object, original, response) => {
+
+});

+

Update Event - When an existing ParseObject's old value fulfills the ParseQuery but its new value +doesn't fulfill the ParseQuery, you'll get this event. The object is the ParseObject +which leaves the ParseQuery. Its content is the latest value of the ParseObject. +

+subscription.on('leave', (object, response) => {
+
+});

+

Delete Event - When an existing ParseObject which fulfills the ParseQuery is deleted, you'll +get this event. The object is the ParseObject which is deleted. +

+subscription.on('delete', (object, response) => {
+
+});

+

Close Event - When the client loses the WebSocket connection to the LiveQuery +server and we stop receiving events, you'll get this event. +

+subscription.on('close', () => {
+
+});

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Subscription()

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

unsubscribe() → {Promise}

+ + + + + +
+

Close the subscription

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/global.html b/api/5.1.0/global.html new file mode 100644 index 000000000..2f9de41b1 --- /dev/null +++ b/api/5.1.0/global.html @@ -0,0 +1,581 @@ + + + + + + Global - Documentation + + + + + + + + + + + + + + + + + +
+ +

Global

+ + + + + + + +
+ +
+ +

+ +

+ + +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + +

Members

+ + + +
+

EventEmitter

+ + + + +
+

This is a simple wrapper to unify EventEmitter implementations across platforms.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

relativeTimeToDate(text, nowopt) → {RelativeTimeToDateResult}

+ + + + + +
+

Converts human readable relative date string, for example, 'in 10 days' to a date +relative to now.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
text + + +string + + + + + + + + + + + + +

The text to convert.

+ +
now + + +Date + + + + + + <optional>
+ + + + + +
+ + new Date() + + +

The date from which add or subtract. Default is now.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +RelativeTimeToDateResult + + +
+
+ + + +
+ + + +
+ + + + +

Type Definitions

+ + + +
+

RelativeTimeToDateResult

+ + + + + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
status + + +string + + + +

The conversion status, error if conversion failed or +success if conversion succeeded.

info + + +string + + + +

The error message if conversion failed, or the relative +time indication (past, present, future) if conversion succeeded.

result + + +Date +| + +undefined + + + +

The converted date, or undefined if conversion +failed.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/index.html b/api/5.1.0/index.html new file mode 100644 index 000000000..b77fa1f24 --- /dev/null +++ b/api/5.1.0/index.html @@ -0,0 +1,210 @@ + + + + + + Home - Documentation + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+

parse-repository-header-sdk-js

+
+

Build Status CI alpha +Build Status CI beta +Build Status CI release +Snyk Badge +Coverage

+

Node Version +auto-release

+

npm latest version +npm beta version +npm alpha version

+

Backers on Open Collective +Sponsors on Open Collective +Forum +Twitter

+
+

A library that gives you access to the powerful Parse Server backend from your JavaScript app. For more information on Parse and its features, see the website, the JavaScript guide, the Cloud Code guide or API Reference.

+
+ +

Getting Started

+

The easiest way to integrate the Parse SDK into your JavaScript project is through the npm module. +However, if you want to use a pre-compiled file, you can fetch it from unpkg. The development version is available at https://unpkg.com/parse/dist/parse.js, and the minified production version is at https://unpkg.com/parse/dist/parse.min.js.

+

Using Parse on Different Platforms

+

The JavaScript ecosystem is wide and incorporates a large number of platforms and execution environments. To handle this, the Parse npm module contains special versions of the SDK tailored to use in Node.js and React Native environments. Not all features make sense in all environments, so using the appropriate package will ensure that items like local storage, user sessions, and HTTP requests use appropriate dependencies. For server side rendered applications, you may set the SERVER_RENDERING variable to prevent warnings at runtime.

+

To use the npm modules for a browser based application, include it as you normally would:

+
const Parse = require('parse');
+// ES6 Minimized
+import Parse from 'parse/dist/parse.min.js';
+
+

For web worker or browser applications, indexedDB storage is available:

+
Parse.CoreManager.setStorageController(Parse.IndexedDB);
+
+

For server-side applications or Node.js command line tools, include 'parse/node':

+
// In a node.js environment
+const Parse = require('parse/node');
+
+

For React Native applications, include 'parse/react-native.js':

+
// In a React Native application
+const Parse = require('parse/react-native.js');
+
+// On React Native >= 0.50 and Parse >= 1.11.0, set the Async
+const AsyncStorage = require('@react-native-async-storage/async-storage');
+Parse.setAsyncStorage(AsyncStorage);
+
+

For WeChat miniprogram, include 'parse/weapp':

+
// In a WeChat miniprogram
+const Parse = require('parse/weapp');
+
+

If you want to use a pre-compiled file, you can fetch it from unpkg. The development version is available at https://unpkg.com/parse/dist/parse.weapp.js, and the minified production version is at https://unpkg.com/parse/dist/parse.weapp.min.js.

+

For TypeScript applications, install '@types/parse':

+
$ npm install @types/parse
+
+

Types are updated manually after every release. If a definition doesn't exist, please submit a pull request to @types/parse

+

Core Manager

+

The SDK has a Core Manager that handles all configurations and controllers. These modules can be swapped out for customization before you initialize the SDK. For full list of all available modules take a look at the Core Manager Documentation.

+
// Configuration example
+Parse.CoreManager.set('REQUEST_ATTEMPT_LIMIT', 1)
+
+// Controller example
+Parse.CoreManager.setRESTController(MyRESTController);
+
+

Compatibility

+

Parse Server

+

Parse JS SDK is compatible with the following versions of Parse Server.

+ + + + + + + + + + + + + + + + + +
Parse JS SDKParse Server
4.x.x<= 6.x.x
5.x.x>= 7.x.x
+

Node.js

+

Parse JS SDK is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the Node.js Long Term Support plan and only test against versions that are officially supported and have not reached their end-of-life date.

+ + + + + + + + + + + + + + + + + + + + + + + +
VersionLatest VersionEnd-of-LifeCompatible
Node.js 1818.19.0April 2025✅ Yes
Node.js 2020.10.0April 2026✅ Yes
+

3rd Party Authentications

+

Parse Server supports many 3rd Party Authenications. It is possible to linkWith any 3rd Party Authentication by creating a custom authentication module.

+

Experimenting

+

You can also use your own forks, and work in progress branches by specifying them:

+
npm install github:myUsername/Parse-SDK-JS#my-awesome-feature
+
+

And don't forget, if you plan to deploy it remotely, you should run npm install with the --save option.

+

Contributing

+

We really want Parse to be yours, to see it grow and thrive in the open source community. Please see the Contributing to Parse Javascript SDK guide.

+
+ + + + + + +
+ +
+ + + + + + + + \ No newline at end of file diff --git a/api/5.1.0/scripts/check_version.js b/api/5.1.0/scripts/check_version.js new file mode 100644 index 000000000..562812b33 --- /dev/null +++ b/api/5.1.0/scripts/check_version.js @@ -0,0 +1,36 @@ +/*global document */ +(async function () { + if (!window.location.href.includes('parseplatform.org')) { + return; + } + const sdk = window.location.href.split('parseplatform.org/')[1].split('/')[0]; + if (sdk !== 'Parse-SDK-JS' && sdk !== 'parse-server') { + return; + } + const location = window.location.href.split('api/'); + if (location.length === 1 || !location[1]) { + return; + } + const apiVersion = location[1].split('/')[0]; + const { url } = await fetch( + `https://unpkg.com/browse/parse${ + sdk === 'parse-server' ? '-server' : '' + }/package.json` + ); + const latest = url.split('@')[1].split('/')[0]; + if (apiVersion !== latest) { + const main = document.getElementById('main'); + const alertDiv = document.createElement('div'); + alertDiv.style.width = '100%'; + alertDiv.style.paddingTop = '20px'; + alertDiv.style.textAlign = 'center'; + alertDiv.style.color = 'red'; + alertDiv.innerHTML = 'This version of the SDK is outdated.'; + const link = document.createElement('a'); + link.style.marginLeft = '10px'; + link.setAttribute('href', window.location.href.split(apiVersion)[0]); + link.innerHTML = `Go to ${latest}`; + alertDiv.appendChild(link); + main.insertBefore(alertDiv, main.firstChild); + } +})(); diff --git a/api/5.1.0/scripts/linenumber.js b/api/5.1.0/scripts/linenumber.js new file mode 100644 index 000000000..8d52f7eaf --- /dev/null +++ b/api/5.1.0/scripts/linenumber.js @@ -0,0 +1,25 @@ +/*global document */ +(function() { + var source = document.getElementsByClassName('prettyprint source linenums'); + var i = 0; + var lineNumber = 0; + var lineId; + var lines; + var totalLines; + var anchorHash; + + if (source && source[0]) { + anchorHash = document.location.hash.substring(1); + lines = source[0].getElementsByTagName('li'); + totalLines = lines.length; + + for (; i < totalLines; i++) { + lineNumber++; + lineId = 'line' + lineNumber; + lines[i].id = lineId; + if (lineId === anchorHash) { + lines[i].className += ' selected'; + } + } + } +})(); diff --git a/api/5.1.0/scripts/prettify/Apache-License-2.0.txt b/api/5.1.0/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/api/5.1.0/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/api/5.1.0/scripts/prettify/lang-css.js b/api/5.1.0/scripts/prettify/lang-css.js new file mode 100644 index 000000000..041e1f590 --- /dev/null +++ b/api/5.1.0/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/api/5.1.0/scripts/prettify/prettify.js b/api/5.1.0/scripts/prettify/prettify.js new file mode 100644 index 000000000..eef5ad7e6 --- /dev/null +++ b/api/5.1.0/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p code { + font-size: 0.85em; +} + +.readme table { + margin-bottom: 1em; + border-collapse: collapse; + border-spacing: 0; +} + +.readme table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +.readme table th, +.readme table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +.readme table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +/** Nav **/ +nav { + float: left; + display: block; + width: 280px; + background: #fff; + overflow: auto; + position: fixed; + height: 100%; + padding: 10px; + border-right: 1px solid #eee; + /* box-shadow: 0 0 3px rgba(0,0,0,0.1); */ +} + +nav li { + list-style: none; + padding: 0; + margin: 0; +} + +.nav-heading { + margin-top: 10px; + font-weight: bold; +} + +.nav-heading a { + color: #888; + font-size: 14px; + display: inline-block; +} + +.nav-item-type { + /* margin-left: 5px; */ + width: 18px; + height: 18px; + display: inline-block; + text-align: center; + border-radius: 0.2em; + margin-right: 5px; + font-weight: bold; + line-height: 20px; + font-size: 13px; +} + +.type-function { + background: #B3E5FC; + color: #0288D1; +} + +.type-class { + background: #D1C4E9; + color: #4527A0; +} + +.type-member { + background: #C8E6C9; + color: #388E3C; +} + +.type-module { + background: #E1BEE7; + color: #7B1FA2; +} + + +/** Footer **/ +footer { + color: hsl(0, 0%, 28%); + margin-left: 250px; + display: block; + padding: 30px; + font-style: italic; + font-size: 90%; + border-top: 1px solid #eee; +} + +.ancestors { + color: #999 +} + +.ancestors a { + color: #999 !important; + text-decoration: none; +} + +.clear { + clear: both +} + +.important { + font-weight: bold; + color: #950B02; +} + +.yes-def { + text-indent: -1000px +} + +.type-signature { + color: #aaa +} + +.name, .signature { + font-family: 'webfont_input', Consolas, Monaco, 'Andale Mono', monospace +} + +.details { + margin-top: 14px; + border-left: 2px solid #DDD; + line-height: 30px; +} + +.details dt { + width: 120px; + float: left; + padding-left: 10px; +} + +.details dd { + margin-left: 70px +} + +.details ul { + margin: 0 +} + +.details ul { + list-style-type: none +} + +.details li { + margin-left: 30px +} + +.details pre.prettyprint { + margin: 0 +} + +.details .object-value { + padding-top: 0 +} + +.description { + margin-bottom: 1em; + margin-top: 1em; +} + +.code-caption { + font-style: italic; + font-size: 107%; + margin: 0; +} + +.prettyprint { + font-size: 13px; + border: 1px solid #ddd; + border-radius: 3px; + box-shadow: 0 1px 3px hsla(0, 0%, 0%, 0.05); + overflow: auto; +} + +.prettyprint.source { + width: inherit +} + +.prettyprint code { + font-size: 12px; + line-height: 18px; + display: block; + background-color: #fff; + color: #4D4E53; +} + +.prettyprint code:empty:before { + content: ''; +} + +.prettyprint > code { + padding: 15px +} + +.prettyprint .linenums code { + padding: 0 15px +} + +.prettyprint .linenums li:first-of-type code { + padding-top: 15px +} + +.prettyprint code span.line { + display: inline-block +} + +.prettyprint.linenums { + padding-left: 70px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.prettyprint.linenums ol { + padding-left: 0 +} + +.prettyprint.linenums li { + border-left: 3px #ddd solid +} + +.prettyprint.linenums li.selected, .prettyprint.linenums li.selected * { + background-color: lightyellow +} + +.prettyprint.linenums li * { + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; +} + +.params, .props { + border-spacing: 0; + border: 1px solid #ddd; + border-collapse: collapse; + border-radius: 3px; + box-shadow: 0 1px 3px rgba(0,0,0,0.1); + width: 100%; + font-size: 14px; + /* margin-left: 15px; */ +} + +.params .name, .props .name, .name code { + color: #4D4E53; + font-family: 'webfont_input', Consolas, Monaco, 'Andale Mono', monospace; + font-size: 100%; +} + +.params td, .params th, .props td, .props th { + margin: 0px; + text-align: left; + vertical-align: top; + padding: 10px; + display: table-cell; +} + +.params td { + border-top: 1px solid #eee +} + +.params thead tr, .props thead tr { + background-color: #fff; + font-weight: bold; +} + +.params .params thead tr, .props .props thead tr { + background-color: #fff; + font-weight: bold; +} + +.params td.description > p:first-child, .props td.description > p:first-child { + margin-top: 0; + padding-top: 0; +} + +.params td.description > p:last-child, .props td.description > p:last-child { + margin-bottom: 0; + padding-bottom: 0; +} + +dl.param-type { + /* border-bottom: 1px solid hsl(0, 0%, 87%); */ + margin: 0; + padding: 0; + font-size: 16px; +} + +.param-type dt, .param-type dd { + display: inline-block +} + +.param-type dd { + font-family: 'webfont_input'; + display: inline-block; + padding: 0; + margin: 0; + font-size: 14px; +} + +.disabled { + color: #454545 +} + +/* navicon button */ +.navicon-button { + display: none; + position: relative; + padding: 2.0625rem 1.5rem; + transition: 0.25s; + cursor: pointer; + user-select: none; + opacity: .8; +} +.navicon-button .navicon:before, .navicon-button .navicon:after { + transition: 0.25s; +} +.navicon-button:hover { + transition: 0.5s; + opacity: 1; +} +.navicon-button:hover .navicon:before, .navicon-button:hover .navicon:after { + transition: 0.25s; +} +.navicon-button:hover .navicon:before { + top: .825rem; +} +.navicon-button:hover .navicon:after { + top: -.825rem; +} + +/* navicon */ +.navicon { + position: relative; + width: 2.5em; + height: .3125rem; + background: #000; + transition: 0.3s; + border-radius: 2.5rem; +} +.navicon:before, .navicon:after { + display: block; + content: ""; + height: .3125rem; + width: 2.5rem; + background: #000; + position: absolute; + z-index: -1; + transition: 0.3s 0.25s; + border-radius: 1rem; +} +.navicon:before { + top: .625rem; +} +.navicon:after { + top: -.625rem; +} + +/* open */ +.nav-trigger:checked + label:not(.steps) .navicon:before, +.nav-trigger:checked + label:not(.steps) .navicon:after { + top: 0 !important; +} + +.nav-trigger:checked + label .navicon:before, +.nav-trigger:checked + label .navicon:after { + transition: 0.5s; +} + +/* Minus */ +.nav-trigger:checked + label { + transform: scale(0.75); +} + +/* × and + */ +.nav-trigger:checked + label.plus .navicon, +.nav-trigger:checked + label.x .navicon { + background: transparent; +} + +.nav-trigger:checked + label.plus .navicon:before, +.nav-trigger:checked + label.x .navicon:before { + transform: rotate(-45deg); + background: #FFF; +} + +.nav-trigger:checked + label.plus .navicon:after, +.nav-trigger:checked + label.x .navicon:after { + transform: rotate(45deg); + background: #FFF; +} + +.nav-trigger:checked + label.plus { + transform: scale(0.75) rotate(45deg); +} + +.nav-trigger:checked ~ nav { + left: 0 !important; +} + +.nav-trigger:checked ~ .overlay { + display: block; +} + +.nav-trigger { + position: fixed; + top: 0; + clip: rect(0, 0, 0, 0); +} + +.overlay { + display: none; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + width: 100%; + height: 100%; + background: hsla(0, 0%, 0%, 0.5); + z-index: 1; +} + +.section-method { + margin-bottom: 30px; + padding-bottom: 30px; + border-bottom: 1px solid #eee; +} + +@media only screen and (min-width: 320px) and (max-width: 680px) { + body { + overflow-x: hidden; + } + + nav { + background: #FFF; + width: 250px; + height: 100%; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: -250px; + z-index: 3; + padding: 0 10px; + transition: left 0.2s; + } + + .navicon-button { + display: inline-block; + position: fixed; + top: 1.5em; + right: 0; + z-index: 2; + } + + #main { + width: 100%; + min-width: 360px; + } + + #main h1.page-title { + margin: 1em 0; + } + + #main section { + padding: 0; + } + + footer { + margin-left: 0; + } +} + +@media only print { + nav { + display: none; + } + + #main { + float: none; + width: 100%; + } +} diff --git a/api/5.1.0/styles/prettify-jsdoc.css b/api/5.1.0/styles/prettify-jsdoc.css new file mode 100644 index 000000000..834a866d4 --- /dev/null +++ b/api/5.1.0/styles/prettify-jsdoc.css @@ -0,0 +1,111 @@ +/* JSDoc prettify.js theme */ + +/* plain text */ +.pln { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* string content */ +.str { + color: hsl(104, 100%, 24%); + font-weight: normal; + font-style: normal; +} + +/* a keyword */ +.kwd { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a comment */ +.com { + font-weight: normal; + font-style: italic; +} + +/* a type name */ +.typ { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a literal value */ +.lit { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* punctuation */ +.pun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp open bracket */ +.opn { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp close bracket */ +.clo { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a markup tag name */ +.tag { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute name */ +.atn { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute value */ +.atv { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a declaration */ +.dec { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a variable name */ +.var { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a function name */ +.fun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} diff --git a/api/5.1.0/styles/prettify-tomorrow.css b/api/5.1.0/styles/prettify-tomorrow.css new file mode 100644 index 000000000..81e74d135 --- /dev/null +++ b/api/5.1.0/styles/prettify-tomorrow.css @@ -0,0 +1,132 @@ +/* Tomorrow Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +/* plain text */ +.pln { + color: #4d4d4c; } + +@media screen { + /* string content */ + .str { + color: hsl(104, 100%, 24%); } + + /* a keyword */ + .kwd { + color: hsl(240, 100%, 50%); } + + /* a comment */ + .com { + color: hsl(0, 0%, 60%); } + + /* a type name */ + .typ { + color: hsl(240, 100%, 32%); } + + /* a literal value */ + .lit { + color: hsl(240, 100%, 40%); } + + /* punctuation */ + .pun { + color: #000000; } + + /* lisp open bracket */ + .opn { + color: #000000; } + + /* lisp close bracket */ + .clo { + color: #000000; } + + /* a markup tag name */ + .tag { + color: #c82829; } + + /* a markup attribute name */ + .atn { + color: #f5871f; } + + /* a markup attribute value */ + .atv { + color: #3e999f; } + + /* a declaration */ + .dec { + color: #f5871f; } + + /* a variable name */ + .var { + color: #c82829; } + + /* a function name */ + .fun { + color: #4271ae; } } +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; } + + .kwd { + color: #006; + font-weight: bold; } + + .com { + color: #600; + font-style: italic; } + + .typ { + color: #404; + font-weight: bold; } + + .lit { + color: #044; } + + .pun, .opn, .clo { + color: #440; } + + .tag { + color: #006; + font-weight: bold; } + + .atn { + color: #404; } + + .atv { + color: #060; } } +/* Style */ +/* +pre.prettyprint { + background: white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 12px; + line-height: 1.5; + border: 1px solid #ccc; + padding: 10px; } +*/ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; } + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ } + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ } diff --git a/api/index.html b/api/index.html index 48b0b87e6..5d5fd43ed 100644 --- a/api/index.html +++ b/api/index.html @@ -1 +1 @@ - + diff --git a/api/release/AuthProvider.html b/api/release/AuthProvider.html index 538501f2e..13aef5ab3 100644 --- a/api/release/AuthProvider.html +++ b/api/release/AuthProvider.html @@ -24,7 +24,7 @@
@@ -600,7 +600,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.286Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.845Z.
diff --git a/api/release/Parse.ACL.html b/api/release/Parse.ACL.html index 926f14ba7..4d6648558 100644 --- a/api/release/Parse.ACL.html +++ b/api/release/Parse.ACL.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

ACL

+ Parse. + ACL

@@ -2271,7 +2273,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.290Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.854Z.
diff --git a/api/release/Parse.Analytics.html b/api/release/Parse.Analytics.html index 3af5d7bb7..37941b300 100644 --- a/api/release/Parse.Analytics.html +++ b/api/release/Parse.Analytics.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Analytics

+ Parse. + Analytics

@@ -365,7 +367,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.294Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.858Z.
diff --git a/api/release/Parse.AnonymousUtils.html b/api/release/Parse.AnonymousUtils.html index 184e97962..8b010b434 100644 --- a/api/release/Parse.AnonymousUtils.html +++ b/api/release/Parse.AnonymousUtils.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

AnonymousUtils

+ Parse. + AnonymousUtils

@@ -778,7 +780,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.296Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.859Z.
diff --git a/api/release/Parse.CLP.html b/api/release/Parse.CLP.html index b4d5b17d1..6880efec0 100644 --- a/api/release/Parse.CLP.html +++ b/api/release/Parse.CLP.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

CLP

+ Parse. + CLP

@@ -3692,7 +3694,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.299Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.863Z.
diff --git a/api/release/Parse.Cloud.html b/api/release/Parse.Cloud.html index 4ed87004b..706c643a4 100644 --- a/api/release/Parse.Cloud.html +++ b/api/release/Parse.Cloud.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Cloud

+ Parse. + Cloud

@@ -4358,7 +4360,7 @@
Properties:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.307Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.870Z.
diff --git a/api/release/Parse.Config.html b/api/release/Parse.Config.html index 86693a00b..dc345d99a 100644 --- a/api/release/Parse.Config.html +++ b/api/release/Parse.Config.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Config

+ Parse. + Config

@@ -917,7 +919,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.317Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.881Z.
diff --git a/api/release/Parse.Error.html b/api/release/Parse.Error.html index b35a529d1..8c681c00c 100644 --- a/api/release/Parse.Error.html +++ b/api/release/Parse.Error.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Error

+ Parse. + Error

@@ -7164,7 +7166,7 @@
Properties:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.321Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.887Z.
diff --git a/api/release/Parse.FacebookUtils.html b/api/release/Parse.FacebookUtils.html index 829c1cb2e..72e5dae84 100644 --- a/api/release/Parse.FacebookUtils.html +++ b/api/release/Parse.FacebookUtils.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

FacebookUtils

+ Parse. + FacebookUtils

@@ -1050,7 +1052,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.338Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.903Z.
diff --git a/api/release/Parse.File.html b/api/release/Parse.File.html index 94a92727e..9e3a22bc4 100644 --- a/api/release/Parse.File.html +++ b/api/release/Parse.File.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

File

+ Parse. + File

@@ -1886,7 +1888,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.344Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.906Z.
diff --git a/api/release/Parse.Installation.html b/api/release/Parse.Installation.html new file mode 100644 index 000000000..8986b8fc1 --- /dev/null +++ b/api/release/Parse.Installation.html @@ -0,0 +1,2099 @@ + + + + + + Installation - Documentation + + + + + + + + + + + + + + + + + +
+ +

Installation

+ + + + + + + +
+ +
+ +

+ Parse. + + Installation +

+ +

Parse.Installation is a local representation of installation data that can be saved and retrieved from the Parse cloud. +This class is a subclass of a Parse.Object, and retains the same functionality of a Parse.Object, but also extends it with installation-specific features.

+

A valid Parse.Installation can only be instantiated via Parse.Installation.currentInstallation() +

Parse.Installation objects which have a valid deviceToken and are saved to the Parse cloud can be used to target push notifications.

+

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Installation(attributes)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attributes + + +object + + + + +

The initial set of data to store in the object.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +

Members

+ + + +
+

(static) DEVICE_TYPES

+ + + + +
+

Returns the device types for used for Push Notifications.

+
+Parse.Installation.DEVICE_TYPES.IOS
+Parse.Installation.DEVICE_TYPES.MACOS
+Parse.Installation.DEVICE_TYPES.TVOS
+Parse.Installation.DEVICE_TYPES.FCM
+Parse.Installation.DEVICE_TYPES.ANDROID
+Parse.Installation.DEVICE_TYPES.WEB
+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
DEVICE_TYPES + + +object + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) GCMSenderId

+ + + + +
+

Gets the GCM sender identifier for this installation

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
GCMSenderId + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) appIdentifier

+ + + + +
+

A unique identifier for this installation’s client application. In iOS, this is the Bundle Identifier.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
appIdentifier + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) appName

+ + + + +
+

The display name of the client application to which this installation belongs.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
appName + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) appVersion

+ + + + +
+

The version string of the client application to which this installation belongs.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
appVersion + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) badge

+ + + + +
+

The current value of the icon badge for iOS apps. +Changes to this value on the server will be used +for future badge-increment push notifications.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
badge + + +number + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) channels

+ + + + +
+

An array of the channels to which a device is currently subscribed.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
channels + + +Array.<string> + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) deviceToken

+ + + + +
+

Token used to deliver push notifications to the device.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
deviceToken + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) deviceType

+ + + + +
+

The type of device, “ios”, “android”, “web”, etc.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
deviceType + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) installationId

+ + + + +
+

Universally Unique Identifier (UUID) for the device used by Parse. It must be unique across all of an app’s installations.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
installationId + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) localeIdentifier

+ + + + +
+

Gets the local identifier for this installation

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
localeIdentifier + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) parseVersion

+ + + + +
+

Gets the parse server version for this installation

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
parseVersion + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) pushType

+ + + + +
+

This field is reserved for directing Parse to the push delivery network to be used.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pushType + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

(static) timeZone

+ + + + +
+

Gets the time zone for this installation

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
timeZone + + +string + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

(async) save(…args) → {Promise}

+ + + + + +
+

Wrap the default save behavior with functionality to save to local storage.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
args + + +any + + + + + + + + + + <repeatable>
+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) currentInstallation() → {Promise}

+ + + + + +
+

Get the current Parse.Installation from disk. If doesn't exists, create an new installation.

+
+const installation = await Parse.Installation.currentInstallation();
+installation.set('deviceToken', '123');
+await installation.save();
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that resolves to the local installation object.

+
+ + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ +
+ Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.909Z. +
+ + + + + + \ No newline at end of file diff --git a/api/release/Parse.LiveQueryClient.html b/api/release/Parse.LiveQueryClient.html index 20506b1cc..8b6c1ca59 100644 --- a/api/release/Parse.LiveQueryClient.html +++ b/api/release/Parse.LiveQueryClient.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

LiveQueryClient

+ Parse. + LiveQueryClient

@@ -954,7 +956,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.349Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.915Z.
diff --git a/api/release/Parse.LocalDatastore.html b/api/release/Parse.LocalDatastore.html index a601e678d..0d1b178c9 100644 --- a/api/release/Parse.LocalDatastore.html +++ b/api/release/Parse.LocalDatastore.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

LocalDatastore

+ Parse. + LocalDatastore

@@ -254,7 +256,7 @@

(static)
- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.351Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.918Z.
diff --git a/api/release/Parse.Object.html b/api/release/Parse.Object.html index bf782b5f9..11303df58 100644 --- a/api/release/Parse.Object.html +++ b/api/release/Parse.Object.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Object

+ Parse. + Object

@@ -10872,7 +10874,7 @@
Parameters:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.359Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.928Z.
diff --git a/api/release/Parse.Polygon.html b/api/release/Parse.Polygon.html index a8fe3e627..685742396 100644 --- a/api/release/Parse.Polygon.html +++ b/api/release/Parse.Polygon.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Polygon

+ Parse. + Polygon

@@ -929,7 +931,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.371Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.939Z.
diff --git a/api/release/Parse.Push.html b/api/release/Parse.Push.html index be36d42b8..557045185 100644 --- a/api/release/Parse.Push.html +++ b/api/release/Parse.Push.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Push

+ Parse. + Push

@@ -548,7 +550,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.376Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.941Z.
diff --git a/api/release/Parse.Query.html b/api/release/Parse.Query.html index 7ee2019ea..6f3a2b13a 100644 --- a/api/release/Parse.Query.html +++ b/api/release/Parse.Query.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Query

+ Parse. + Query

@@ -13373,7 +13375,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.384Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.948Z.
diff --git a/api/release/Parse.Relation.html b/api/release/Parse.Relation.html index c5e2b85f5..43eae7b66 100644 --- a/api/release/Parse.Relation.html +++ b/api/release/Parse.Relation.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Relation

+ Parse. + Relation

@@ -747,7 +749,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.395Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.961Z.
diff --git a/api/release/Parse.Role.html b/api/release/Parse.Role.html index cec688aec..9f120ff35 100644 --- a/api/release/Parse.Role.html +++ b/api/release/Parse.Role.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Role

+ Parse. + Role

@@ -8377,7 +8379,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.399Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.966Z.
diff --git a/api/release/Parse.Schema.html b/api/release/Parse.Schema.html index a73964e13..a676eca58 100644 --- a/api/release/Parse.Schema.html +++ b/api/release/Parse.Schema.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

Schema

+ Parse. + Schema

@@ -3914,7 +3916,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.410Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.981Z.
diff --git a/api/release/Parse.Session.html b/api/release/Parse.Session.html new file mode 100644 index 000000000..ea5ced1dc --- /dev/null +++ b/api/release/Parse.Session.html @@ -0,0 +1,8205 @@ + + + + + + Session - Documentation + + + + + + + + + + + + + + + + + +
+ +

Session

+ + + + + + + +
+ +
+ +

+ Parse. + + Session +

+ +

A Parse.Session object is a local representation of a revocable session. +This class is a subclass of a Parse.Object, and retains the same +functionality of a Parse.Object.

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new Session(attributes)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attributes + + +object + + + + +

The initial set of data to store in the user.

+ +
+ + + + + + + + + + + + + + + + +
+ +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + +

Members

+ + + +
+

createdAt

+ + + + +
+

The first time this object was saved on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
createdAt + + +Date + + + +
+ + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+

updatedAt

+ + + + +
+

The last time this object was updated on the server.

+
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
updatedAt + + +Date + + + +
+ + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

_clearPendingOps(keysToClearopt)

+ + + + + + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keysToClear + + +Array.<string> + + + + + + <optional>
+ + + + + +
+

if specified, only ops matching +these fields will be cleared

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

_getId() → {string}

+ + + + + +
+

Returns a local or server Id used uniquely identify this object

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

_getStateIdentifier() → {Parse.Object|object}

+ + + + + +
+

Returns a unique identifier used to pull data from the State Controller.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object +| + +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

add(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The item to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the end of the array associated with a given +key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The items to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addAllUnique(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically add the objects to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The objects to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

addUnique(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically add an object to the array associated with a given key, only +if it is not already present in the array. The position of the insert is +not guaranteed.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to add.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

clear() → {ParseObject|boolean}

+ + + + + +
+

Clears all attributes on a model

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

clone() → {Parse.Object}

+ + + + + +
+

Creates a new model with identical attributes to this one.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

decrement(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically decrements the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to decrement by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

destroy(options) → {Promise}

+ + + + + +
+

Destroy this model on the server if it was already persisted.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeDelete` and `afterDelete` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroy +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) destroyEventually(optionsopt) → {Promise}

+ + + + + +
+

Deletes this object from the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, +and don't need to know when the delete completes. If there is some problem with the object +such that it can't be deleted, the request will be silently discarded.

+

Delete instructions made with this method will be stored locally in an on-disk cache until they can be transmitted +to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection +is available. Delete requests will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Valid options are:

    +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • context: A dictionary that is accessible in Cloud Code `beforeDelete` and `afterDelete` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the destroy +completes.

+
+ + +
+ + + +
+ + +
+ + + +

dirty(attr) → {boolean}

+ + + + + +
+

Returns true if this object has been modified since its last +save/refresh. If an attribute is specified, it returns true only if that +particular attribute has been modified since the last save/refresh.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

An attribute name (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

dirtyKeys() → {Array.<string>}

+ + + + + +
+

Returns an array of keys that have been modified since last save/refresh

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Array.<string> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

equals(other) → {boolean}

+ + + + + +
+

Determines whether this ParseObject is equal to another ParseObject

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
other + + +object + + + + +

An other object ot compare

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

escape(attr) → {string}

+ + + + + +
+

Gets the HTML-escaped value of an attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

existed() → {boolean}

+ + + + + +
+

Returns true if this object was created by the Parse server when the +object might have already been there (e.g. in the case of a Facebook +login)

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) exists(options) → {Promise.<boolean>}

+ + + + + +
+

Returns true if this object exists on the Server

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object exists.

+
+ + +
+ + + +
+ + +
+ + + +

fetch(options) → {Promise}

+ + + + + +
+

Fetch the model from the server. If the server's representation of the +model differs from its current attributes, they will be overriden.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
  • include: The name(s) of the key(s) to include. Can be a string, an array of strings, + or an array of array of strings. +
  • context: A dictionary that is accessible in Cloud Code `beforeFind` trigger. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) fetchFromLocalDatastore() → {Promise}

+ + + + + +
+

Asynchronously loads data from the local datastore into this object.

+
+await object.fetchFromLocalDatastore();
+
+

You can create an unfetched pointer with Parse.Object.createWithoutData() +and then call fetchFromLocalDatastore() on it.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch completes.

+
+ + +
+ + + +
+ + +
+ + + +

fetchWithInclude(keys, options) → {Promise}

+ + + + + +
+

Fetch the model from the server. If the server's representation of the +model differs from its current attributes, they will be overriden.

+

Includes nested Parse.Objects for the provided key. You can use dot +notation to specify which fields in the included object are also fetched.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
keys + + +string +| + +Array.<(string|Array.<string>)> + + + + +

The name(s) of the key(s) to include.

+ +
options + + +object + + + + +

Valid options are:

    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to + be used for this request. +
  • sessionToken: A valid session token, used for making a request on + behalf of a specific user. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the fetch +completes.

+
+ + +
+ + + +
+ + +
+ + + +

get(attr) → {*}

+ + + + + +
+

Gets the value of an attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +* + + +
+
+ + + +
+ + + +
+ + +
+ + + +

getACL() → {Parse.ACL|null}

+ + + + + +
+

Returns the ACL for this object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.ACL +| + +null + + +
+
+ + +
+

An instance of Parse.ACL.

+
+ + +
+ + + +
+ + +
+ + + +

getSessionToken() → {string}

+ + + + + +
+

Returns the session token string.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +string + + +
+
+ + + +
+ + + +
+ + +
+ + + +

has(attr) → {boolean}

+ + + + + +
+

Returns true if the attribute contains a value that is not +null or undefined.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of the attribute.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

increment(attr, amount) → {ParseObject|boolean}

+ + + + + +
+

Atomically increments the value of the given attribute the next time the +object is saved. If no amount is specified, 1 is used by default.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
amount + + +Number + + + + +

The amount to increment by (optional).

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isDataAvailable() → {boolean}

+ + + + + +
+

Returns true if the object has been fetched.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

isNew() → {boolean}

+ + + + + +
+

Returns true if this object has never been saved to Parse.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(async) isPinned() → {Promise.<boolean>}

+ + + + + +
+

Asynchronously returns if the object is pinned

+
+const isPinned = await object.isPinned();
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

A boolean promise that is fulfilled if object is pinned.

+
+ + +
+ + + +
+ + +
+ + + +

isValid() → {boolean}

+ + + + + +
+

Checks if the model is currently in a valid state.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

newInstance() → {Parse.Object}

+ + + + + +
+

Creates a new instance of this object. Not to be confused with clone()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

op(attr) → {Parse.Op|undefined}

+ + + + + +
+

Returns an instance of a subclass of Parse.Op describing what kind of +modification has been performed on this field since the last time it was +saved. For example, after calling object.increment("x"), calling +object.op("x") would return an instance of Parse.Op.Increment.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Op +| + +undefined + + +
+
+ + +
+

The operation, or undefined if none.

+
+ + +
+ + + +
+ + +
+ + + +

pin() → {Promise}

+ + + + + +
+

Asynchronously stores the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pin();
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPin()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

pinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously stores the objects and every object they point to in the local datastore, recursively.

+

If those other objects have not been fetched from Parse, they will not be stored. +However, if they have changed data, all the changes will be retained.

+
+await object.pinWithName(name);
+
+

To retrieve object: +query.fromLocalDatastore() or query.fromPinWithName(name)

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the pin completes.

+
+ + +
+ + + +
+ + +
+ + + +

relation(attr) → {Parse.Relation}

+ + + + + +
+

Gets a relation on the given class for the attribute.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The attribute to get the relation for.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Relation + + +
+
+ + + +
+ + + +
+ + +
+ + + +

remove(attr, item) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of an object from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
item + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

removeAll(attr, items) → {ParseObject|boolean}

+ + + + + +
+

Atomically remove all instances of the objects from the array associated +with a given key.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +String + + + + +

The key.

+ +
items + + +Array.<Object> + + + + +

The object to remove.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

revert(…keysopt)

+ + + + + +
+

Clears any (or specific) changes to this object made since the last call to save()

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
keys + + +string + + + + + + <optional>
+ + + + + + <repeatable>
+ +
+

specify which fields to revert

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

save(arg1opt, arg2opt, arg3opt) → {Promise}

+ + + + + +
+

Set a hash of model attributes, and save the model to the server. +updatedAt will be updated when the request returns. +You can either call it as:

+object.save();
+or
+object.save(attrs);
+or
+object.save(null, options);
+or
+object.save(attrs, options);
+or
+object.save(key, value);
+or
+object.save(key, value, options);

+

Example 1:

+gameTurn.save({
+player: "Jake Cutter",
+diceRoll: 2
+}).then(function(gameTurnAgain) {
+// The save was successful.
+}, function(error) {
+// The save failed.  Error is an instance of Parse.Error.
+});

+

Example 2:

+gameTurn.save("player", "Jake Cutter");

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
arg1 + + +string +| + +object +| + +null + + + + + + <optional>
+ + + + + +
+

Valid options are:

    +
  • `Object` - Key/value pairs to update on the object.
  • +
  • `String` Key - Key of attribute to update (requires arg2 to also be string)
  • +
  • `null` - Passing null for arg1 allows you to save the object with options passed in arg2.
  • +
+ +
arg2 + + +string +| + +object + + + + + + <optional>
+ + + + + +
+
    +
  • `String` Value - If arg1 was passed as a key, arg2 is the value that should be set on that key.
  • +
  • `Object` Options - Valid options are: +
      +
    • useMasterKey: In Cloud Code and Node only, causes the Master Key to +be used for this request. +
    • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
    • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
    • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
    +
  • +
+ +
arg3 + + +object + + + + + + <optional>
+ + + + + +
+

Used to pass option parameters to method if arg1 and arg2 were both passed as strings. +Valid options are:

+
    +
  • useMasterKey: In Cloud Code and Node only, causes the Master Key to +be used for this request. +
  • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
  • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
  • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the save +completes.

+
+ + +
+ + + +
+ + +
+ + + +

(async) saveEventually(optionsopt) → {Promise}

+ + + + + +
+

Saves this object to the server at some unspecified time in the future, +even if Parse is currently inaccessible.

+

Use this when you may not have a solid network connection, and don't need to know when the save completes. +If there is some problem with the object such that it can't be saved, it will be silently discarded.

+

Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. +They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is +available. Objects saved this way will persist even after the app is closed, in which case they will be sent the +next time the app is opened.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
options + + +object + + + + + + <optional>
+ + + + + +
+

Used to pass option parameters to method if arg1 and arg2 were both passed as strings. +Valid options are:

+
    +
  • sessionToken: A valid session token, used for making a request on +behalf of a specific user. +
  • cascadeSave: If `false`, nested objects will not be saved (default is `true`). +
  • context: A dictionary that is accessible in Cloud Code `beforeSave` and `afterSave` triggers. +
+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the save +completes.

+
+ + +
+ + + +
+ + +
+ + + +

set(key, value, options) → {ParseObject|boolean}

+ + + + + +
+

Sets a hash of model attributes on the object.

+

You can call it with an object containing keys and values, with one +key and value, or dot notation. For example:

+  gameTurn.set({
+    player: player1,
+    diceRoll: 2
+  }, {
+    error: function(gameTurnAgain, error) {
+      // The set failed validation.
+    }
+  });
+

game.set("currentPlayer", player2, { +error: function(gameTurnAgain, error) { +// The set failed validation. +} +});

+

game.set("finished", true);

+

game.set("player.score", 10);

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string +| + +object + + + + +

The key to set.

+ +
value + + +string +| + +object + + + + +

The value to give it.

+ +
options + + +object + + + + +

A set of options for the set. +The only supported option is error.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

true if the set succeeded.

+
+ + +
+ + + +
+ + +
+ + + +

setACL(acl, options) → {ParseObject|boolean}

+ + + + + +
+

Sets the ACL to be used for this object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
acl + + +Parse.ACL + + + + +

An instance of Parse.ACL.

+ +
options + + +object + + + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + +
+

Whether the set passed validation.

+
+ + +
+ + + +
+ + +
+ + + +

toJSON(seen, offline) → {object}

+ + + + + +
+

Returns a JSON version of the object suitable for saving to Parse.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
seen + + + + +
offline + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toOfflinePointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

toPointer() → {Pointer}

+ + + + + +
+

Gets a Pointer referencing this Object.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Pointer + + +
+
+ + + +
+ + + +
+ + +
+ + + +

unPin() → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, +recursively, using a default pin name: _default.

+
+await object.unPin();
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unPinWithName(name) → {Promise}

+ + + + + +
+

Asynchronously removes the object and every object it points to in the local datastore, recursively.

+
+await object.unPinWithName(name);
+
+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +string + + + + +

Name of Pin.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when the unPin completes.

+
+ + +
+ + + +
+ + +
+ + + +

unset(attr, options) → {ParseObject|boolean}

+ + + + + +
+

Remove an attribute from the model. This is a noop if the attribute doesn't +exist.

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attr + + +string + + + + +

The string name of an attribute.

+ +
options + + + + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +ParseObject +| + +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

validate(attrs) → {Parse.Error|boolean}

+ + + + + +
+

You should not call this function directly unless you subclass +Parse.Object, in which case you can override this method +to provide additional validation on set and +save. Your implementation should return

+
+ + + + + +
+ + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
attrs + + +object + + + + +

The current data to validate.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Parse.Error +| + +boolean + + +
+
+ + +
+

False if the data is valid. An error object otherwise.

+
+ + +
+ + + +
+ + +
+ + + +

(static) current(options) → {Promise}

+ + + + + +
+

Retrieves the Session object for the currently logged in session.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

useMasterKey

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is resolved with the Parse.Session +object after it has been fetched. If there is no current user, the +promise will be rejected.

+
+ + +
+ + + +
+ + +
+ + + +

(static) isCurrentSessionRevocable() → {boolean}

+ + + + + +
+

Determines whether the current session token is revocable. +This method is useful for migrating Express.js or Node.js web apps to +use revocable sessions. If you are migrating an app that uses the Parse +SDK in the browser only, please use Parse.User.enableRevocableSession() +instead, so that sessions can be automatically upgraded.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ +
+ Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.995Z. +
+ + + + + + \ No newline at end of file diff --git a/api/release/Parse.User.html b/api/release/Parse.User.html index 4bfca85c7..d0eeee6f5 100644 --- a/api/release/Parse.User.html +++ b/api/release/Parse.User.html @@ -24,7 +24,7 @@
@@ -42,6 +42,8 @@

User

+ Parse. + User

@@ -10632,7 +10634,7 @@
Parameters:
-

A password to be verified

+

The password to be verified.

@@ -10658,7 +10660,79 @@
Parameters:
+

The options.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
ignoreEmailVerification + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + +

Set to true to bypass email verification and verify +the password regardless of whether the email has been verified. This requires the master key.

+ +
+ @@ -10699,8 +10773,7 @@
Returns:
-

A promise that is fulfilled with a user -when the password is correct.

+

A promise that is fulfilled with a user when the password is correct.

@@ -14049,7 +14122,7 @@
Parameters:
-

A username to be used for identificaiton

+

The username of the user whose password should be verified.

@@ -14075,7 +14148,7 @@
Parameters:
-

A password to be verified

+

The password to be verified.

@@ -14101,7 +14174,79 @@
Parameters:
+

The options.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
ignoreEmailVerification + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + +

Set to true to bypass email verification and verify +the password regardless of whether the email has been verified. This requires the master key.

+ +
+ @@ -14142,8 +14287,7 @@
Returns:
-

A promise that is fulfilled with a user -when the password is correct.

+

A promise that is fulfilled with a user when the password is correct.

@@ -14170,7 +14314,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.425Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:18.013Z.
diff --git a/api/release/Parse.html b/api/release/Parse.html new file mode 100644 index 000000000..aecb73d4f --- /dev/null +++ b/api/release/Parse.html @@ -0,0 +1,2218 @@ + + + + + + Parse - Documentation + + + + + + + + + + + + + + + + + +
+ +

Parse

+ + + + + + + +
+ +
+ +

+ Parse +

+ + +
+ +
+
+ + +
+ + + +

new Parse()

+ + + + + +
+

Contains all Parse API classes and functions.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +

Classes

+ +
+
ACL
+
+ +
Analytics
+
+ +
AnonymousUtils
+
+ +
CLP
+
+ +
Cloud
+
+ +
Config
+
+ +
Error
+
+ +
EventuallyQueue
+
+ +
FacebookUtils
+
+ +
File
+
+ +
Installation
+
+ +
LiveQuery
+
+ +
LiveQueryClient
+
+ +
LocalDatastore
+
+ +
Object
+
+ +
Polygon
+
+ +
Push
+
+ +
Query
+
+ +
Relation
+
+ +
Role
+
+ +
Schema
+
+ +
Session
+
+ +
User
+
+
+ + + + + + + +

Members

+ + + +
+

(static) EventuallyQueue :EventuallyQueue

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +EventuallyQueue + + +
  • +
+ + + + + +
+ + + +
+

(static) LiveQuery :ParseLiveQuery

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +ParseLiveQuery + + +
  • +
+ + + + + +
+ + + +
+

(static) allowCustomObjectId :boolean

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + +
+

(static) applicationId :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) encryptedUser :boolean

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + +
+

(static) idempotency :boolean

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +boolean + + +
  • +
+ + + + + +
+ + + +
+

(static) javaScriptKey :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) liveQueryServerURL :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) masterKey :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) secret :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) serverAuthToken :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) serverAuthType :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + +
+

(static) serverURL :string

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
Type:
+
    +
  • + +string + + +
  • +
+ + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

(static) dumpLocalDatastore() → {object}

+ + + + + +
+

Gets all contents from Local Datastore

+
+await Parse.dumpLocalDatastore();
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +object + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) enableEncryptedUser()

+ + + + + +
+

Enable the current user encryption. +This must be called before login any user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) enableLocalDatastore(pollingopt, msopt)

+ + + + + +
+

Enable pinning in your application. +This must be called after Parse.initialize in your application.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
polling + + + + <optional>
+ + + + + +
+

Allow pinging the server /health endpoint. Default true

+ +
ms + + + + <optional>
+ + + + + +
+

Milliseconds to ping the server. Default 2000ms

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) getServerHealth() → {Promise}

+ + + + + +
+

Returns information regarding the current server's health

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) initialize(applicationId, javaScriptKeyopt, masterKeyopt)

+ + + + + +
+

Call this method first to set up your authentication tokens for Parse.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
applicationId + + +string + + + + + + + + + + +

Your Parse Application ID.

+ +
javaScriptKey + + +string + + + + + + <optional>
+ + + + + +
+

Your Parse JavaScript Key (Not needed for parse-server)

+ +
masterKey + + +string + + + + + + <optional>
+ + + + + +
+

Your Parse Master Key. (Node.js only!)

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) isEncryptedUserEnabled() → {boolean}

+ + + + + +
+

Flag that indicates whether Encrypted User is enabled.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) isLocalDatastoreEnabled() → {boolean}

+ + + + + +
+

Flag that indicates whether Local Datastore is enabled.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) setAsyncStorage(storage)

+ + + + + +
+

Call this method to set your AsyncStorage engine +Starting Parse@1.11, the ParseSDK do not provide a React AsyncStorage as the ReactNative module +is not provided at a stable path and changes over versions.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
storage + + +AsyncStorage + + + + +

a react native async storage.

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) setLocalDatastoreController(controller)

+ + + + + +
+

Call this method to set your LocalDatastoreStorage engine +If using React-Native use Parse.setAsyncStorage()

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
controller + + +LocalDatastoreController + + + + +

a data storage.

+ +
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ +
+ Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.849Z. +
+ + + + + + \ No newline at end of file diff --git a/api/release/Parse.html#.EventuallyQueue b/api/release/Parse.html#.EventuallyQueue new file mode 100644 index 000000000..cfe044517 --- /dev/null +++ b/api/release/Parse.html#.EventuallyQueue @@ -0,0 +1,1312 @@ + + + + + + EventuallyQueue - Documentation + + + + + + + + + + + + + + + + + +
+ +

EventuallyQueue

+ + + + + + + +
+ +
+ +

+ Parse. + + EventuallyQueue +

+ + +
+ +
+
+ + +
+ + + +

new EventuallyQueue()

+ + + + + +
+

Provides utility functions to queue objects that will be +saved to the server at a later date.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +

Methods

+ + + +
+ + + +

(static) clear() → {Promise}

+ + + + + +
+

Removes all objects from queue.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled when queue is cleared.

+
+ + +
+ + + +
+ + +
+ + + +

(static) destroy(object, serverOptionsopt) → {Promise}

+ + + + + +
+

Add object to queue with save operation.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
object + + +ParseObject + + + + + + + + + + +

Parse.Object to be destroyed eventually

+ +
serverOptions + + +object + + + + + + <optional>
+ + + + + +
+

See Parse.Object.destroy options

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled if object is added to queue.

+
+ + +
+ + + +
+ + +
+ + + +

(static) getQueue() → {Promise.<Array>}

+ + + + + +
+

Sets the in-memory queue from local storage and returns.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<Array> + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) isPolling() → {boolean}

+ + + + + +
+

Return true if pinging the server.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +boolean + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) length() → {number}

+ + + + + +
+

Return the number of objects in the queue.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +number + + +
+
+ + + +
+ + + +
+ + +
+ + + +

(static) poll(msopt)

+ + + + + +
+

Start polling server for network connection. +Will send queue if connection is established.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
ms + + + + <optional>
+ + + + + +
+

Milliseconds to ping the server. Default 2000ms

+ +
+ + + + + + + + + + + + + + + + +
+ + +
+ + + +

(static) save(object, serverOptionsopt) → {Promise}

+ + + + + +
+

Add object to queue with save operation.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
object + + +ParseObject + + + + + + + + + + +

Parse.Object to be saved eventually

+ +
serverOptions + + +object + + + + + + <optional>
+ + + + + +
+

See Parse.Object.save options.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise + + +
+
+ + +
+

A promise that is fulfilled if object is added to queue.

+
+ + +
+ + + +
+ + +
+ + + +

(static) sendQueue() → {Promise.<boolean>}

+ + + + + +
+

Sends the queue to the server.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise.<boolean> + + +
+
+ + +
+

Returns true if queue was sent successfully.

+
+ + +
+ + + +
+ + +
+ + + +

(static) stopPoll()

+ + + + + +
+

Turns off polling.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ +
+ + + + +
+ +
+ +
+ Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.899Z. +
+ + + + + + \ No newline at end of file diff --git a/api/release/Parse.html#.LiveQuery b/api/release/Parse.html#.LiveQuery new file mode 100644 index 000000000..ca2f073e8 --- /dev/null +++ b/api/release/Parse.html#.LiveQuery @@ -0,0 +1,187 @@ + + + + + + LiveQuery - Documentation + + + + + + + + + + + + + + + + + +
+ +

LiveQuery

+ + + + + + + +
+ +
+ +

+ Parse. + + LiveQuery +

+ + +
+ +
+
+ + +
+ + + +

new LiveQuery()

+ + + + + +
+

We expose three events to help you monitor the status of the WebSocket connection:

+

Open - When we establish the WebSocket connection to the LiveQuery server, you'll get this event. +

+Parse.LiveQuery.on('open', () => {
+
+});

+

Close - When we lose the WebSocket connection to the LiveQuery server, you'll get this event. +

+Parse.LiveQuery.on('close', () => {
+
+});

+

Error - When some network error or LiveQuery server error happens, you'll get this event. +

+Parse.LiveQuery.on('error', (error) => {
+
+});

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ +
+ Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.914Z. +
+ + + + + + \ No newline at end of file diff --git a/api/release/ParseGeoPoint.html b/api/release/ParseGeoPoint.html index 7b6d9af14..d684a9e54 100644 --- a/api/release/ParseGeoPoint.html +++ b/api/release/ParseGeoPoint.html @@ -24,7 +24,7 @@
@@ -1016,7 +1016,7 @@
Returns:
-

(static) current() → {Parse.GeoPoint}

+

(static) current(options) → {Promise.<Parse.GeoPoint>}

@@ -1073,6 +1073,213 @@

(static) curr +

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + + +

The options.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
enableHighAccuracy + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + + +

A boolean value that indicates the application would like to receive the best possible results. If true and if the device is able to provide a more accurate position, it will do so. Note that this can result in slower response times or increased power consumption (with a GPS chip on a mobile device for example). On the other hand, if false, the device can take the liberty to save resources by responding more quickly and/or using less power. Default: false.

+ +
timeout + + +number + + + + + + <optional>
+ + + + + +
+ + Infinity + + +

A positive long value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. The default value is Infinity, meaning that getCurrentPosition() won't return until the position is available.

+ +
maximumAge + + +number + + + + + + <optional>
+ + + + + +
+ + 0 + + +

A positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device must return a cached position regardless of its age. Default: 0.

+ +
+ + +
+ + @@ -1096,7 +1303,7 @@
Returns:
-Parse.GeoPoint +Promise.<Parse.GeoPoint>
@@ -1131,7 +1338,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.451Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:18.042Z.
diff --git a/api/release/Subscription.html b/api/release/Subscription.html index 11c8b9026..09fe10d69 100644 --- a/api/release/Subscription.html +++ b/api/release/Subscription.html @@ -24,7 +24,7 @@
@@ -322,7 +322,7 @@
Returns:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.454Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:18.045Z.
diff --git a/api/release/global.html b/api/release/global.html index db03cdc0d..2f9de41b1 100644 --- a/api/release/global.html +++ b/api/release/global.html @@ -24,7 +24,7 @@
@@ -571,7 +571,7 @@
Properties:

- Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.278Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.834Z.
diff --git a/api/release/index.html b/api/release/index.html index f14d3f2f4..b77fa1f24 100644 --- a/api/release/index.html +++ b/api/release/index.html @@ -24,7 +24,7 @@
@@ -70,7 +70,11 @@
  • Getting Started
  • Compatibility @@ -120,6 +124,14 @@

    Using Parse on Different Platforms

    $ npm install @types/parse
     

    Types are updated manually after every release. If a definition doesn't exist, please submit a pull request to @types/parse

    +

    Core Manager

    +

    The SDK has a Core Manager that handles all configurations and controllers. These modules can be swapped out for customization before you initialize the SDK. For full list of all available modules take a look at the Core Manager Documentation.

    +
    // Configuration example
    +Parse.CoreManager.set('REQUEST_ATTEMPT_LIMIT', 1)
    +
    +// Controller example
    +Parse.CoreManager.setRESTController(MyRESTController);
    +

    Compatibility

    Parse Server

    Parse JS SDK is compatible with the following versions of Parse Server.

    @@ -188,7 +200,7 @@

    Contributing


    - Generated by JSDoc 4.0.2 on 2024-03-17T02:57:53.281Z. + Generated by JSDoc 4.0.2 on 2024-05-16T13:27:17.837Z.