Merge pull request #1367 from realm/getGrantedPermissions-docs-fix

Get granted permissions docs fix
This commit is contained in:
blagoev 2017-10-02 18:20:08 +03:00 committed by GitHub
commit 33c4a886d0
2 changed files with 2 additions and 2 deletions

View File

@ -272,7 +272,7 @@ class User {
* @param {string} recipient the optional recipient of the permission. Can be either
* 'any' which is the default, or 'currentUser' or 'otherUser' if you want only permissions
* belonging to the user or *not* belonging to the user.
* @returns {Results} a queryable collection of permission objects that provides detailed
* @returns {Promise} a Promise with a queryable collection of permission objects that provides detailed
* information regarding the granted access.
* The collection is a live query similar to what you would get by callig Realm.objects,
* so the same features apply - you can listen for notifications or filter it.

2
lib/index.d.ts vendored
View File

@ -309,7 +309,7 @@ declare namespace Realm.Sync {
openManagementRealm(): Realm;
retrieveAccount(provider: string, username: string): Promise<Account>;
getGrantedPermissions(recipient: 'any' | 'currentUser' | 'otherUser'): Results<Permission>;
getGrantedPermissions(recipient: 'any' | 'currentUser' | 'otherUser'): Promise<Results<Permission>>;
applyPermissions(condition: PermissionCondition, realmUrl: string, accessLevel: AccessLevel): Promise<PermissionChange>;
offerPermissions(realmUrl: string, accessLevel: AccessLevel, expiresAt?: Date): Promise<string>;
acceptPermissionOffer(token: string): Promise<string>