Clarifying PermissionCondition. (#1637)

This commit is contained in:
Kenneth Geisshirt 2018-01-25 15:44:47 +01:00 committed by GitHub
parent ae8e50fc36
commit f9e8161017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -8,6 +8,7 @@ X.Y.Z Release notes
### Bug fixes
* [Object Server] Fixed a typing error leading to `_getExistingUser` wasn't defined in the Chrome debugging support library (#1625).
* Fixed a bug in the TypeScript definition of `PermissionCondition` (#1574).
* [Electron] Fixed a `dlopen` error related to OpenSSL that prevented using realm-js on Linux (#1636).
### Internal

13
lib/index.d.ts vendored
View File

@ -303,9 +303,16 @@ declare namespace Realm.Sync {
invalidatePermissionOffer(permissionOfferOrToken: PermissionOffer | string): Promise<void>;
}
type PermissionCondition = {
userId: string | { metadataKey: string, metadataValue: string }
};
interface _PermissionConditionUserId {
userId: string
}
interface _PermissionConditionMetadata {
metadataKey: string
metadataValue: string
}
type PermissionCondition = _PermissionConditionUserId | _PermissionConditionMetadata
type AccessLevel = 'none' | 'read' | 'write' | 'admin';