diff --git a/CHANGELOG.md b/CHANGELOG.md index 787f1375..4dfb3639 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ X.Y.Z Release notes * Added `Realm.deleteFile` for deleting a Realm (#363). ### Bug fixes -* None +* Adding missing TypeScript declation (#1283). 1.11.1 Release notes (2017-9-1) ============================================================= diff --git a/lib/index.d.ts b/lib/index.d.ts index 614dd52d..f1f2039a 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -279,12 +279,23 @@ declare namespace Realm.Sync { invalidatePermissionOffer(permissionOfferOrToken: PermissionOffer | string): Promise; } - type PermissionCondition = - { [object_type: string]: userId } | - { [object_type: string]: metadataKey, [object_type: string]: metadataValue }; - + type PermissionCondition = { + userId: string | + { metadataKey: string, metadataValue: string } + }; + type AccessLevel = 'none' | 'read' | 'write' | 'admin'; + class Permission { + readonly id: string; + readonly updatedAt: Date; + readonly userId: string; + readonly path: string; + readonly mayRead?: boolean; + readonly mayWrite?: boolean; + readonly mayManage?: boolean; + } + class PermissionChange { id: string; createdAt: Date;