import ParseACL from './ParseACL'; import ParseError from './ParseError'; import ParseObject, { Attributes, SetOptions } from './ParseObject'; import type { AttributeMap } from './ObjectStateMutations'; import type ParseRelation from './ParseRelation'; import type ParseUser from './ParseUser'; /** * 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.
* * @alias Parse.Role * @augments Parse.Object */ declare class ParseRole* A role's name can only contain alphanumeric characters, _, -, and * spaces. *
* *This is equivalent to calling role.set("name", name)
* * @param {string} name The name of the role. * @param {object} options Standard options object with success and error * callbacks. * @returns {Parse.Object} Returns the object, so you can chain this call. */ setName(name: string, options?: SetOptions): this; /** * 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 {Parse.Relation} the relation for the users belonging to this * role. */ getUsers(): ParseRelationThis is equivalent to calling role.relation("roles")
* * @returns {Parse.Relation} the relation for the roles belonging to this * role. */ getRoles(): ParseRelation