Commit Graph

238 Commits

Author SHA1 Message Date
Kenneth Geisshirt 39fe8c6280 Creating a proper IncompatibleSyncedRealmError class. 2017-09-23 00:05:33 +02:00
Kenneth Geisshirt eeb78d8e1b Merge branch 'master' of github.com:realm/realm-js into 2.0.x 2017-09-18 09:46:36 +02:00
Kenneth Geisshirt b3ff7ada62 Documenting sync.config properties (#1312)
* Documenting sync.config properties
* Updating TypeScript definitions
2017-09-15 15:22:44 +02:00
Kenneth Geisshirt 8606d37141 Fixes to issues reported by eslint (#1313) 2017-09-14 10:35:02 +02:00
astigsen 208aa8ee46 Added support for in-memory realms (#1304)
* Added support for in-memory realms
2017-09-13 20:42:23 +02:00
blagoev 064b487c07 Merge branch 'master' into blagoev/promise3 2017-09-13 14:27:04 +03:00
blagoev f7db865458 Fix typescript definitions
Fixes #1306
2017-09-13 12:37:44 +03:00
Kenneth Geisshirt 6444f3fa6f Adding missing instructions to TypeScript definitions (#1301) 2017-09-13 09:21:26 +02:00
blagoev ba9321834b Fix _authenticate method to use promises only 2017-09-12 23:04:20 +03:00
blagoev eba51066d9 fix AuthError object 2017-09-12 23:02:14 +03:00
blagoev 115a2c9902 add deprecated warnings 2017-09-12 20:38:43 +03:00
blagoev 3fbd1291e1 fix _authenticate call to always pass the json object 2017-09-12 20:26:08 +03:00
Maximilian Alexander 78515e3b48 adding promisified apis 2017-09-12 20:10:52 +03:00
Kenneth Geisshirt eac393571d checkTypes() must only check the shortest array (#1297)
* Allow optional arguments when checking types
2017-09-12 15:17:59 +02:00
Kenneth Geisshirt 12a8cd5398 Adding missing TypeScript declaration of setFeatureToken (#1295)
* Adding missing TypeScript declaration of setFeatureToken
2017-09-12 14:28:16 +02:00
Ashwin Phatak 532f517ded Add Realm.deleteModel API (#573) 2017-09-12 14:45:36 +05:30
blagoev 9d02165db1 update typescript definitions 2017-09-11 15:50:44 +03:00
blagoev 0214dff951 fix possible hang on iOS 2017-09-11 15:50:44 +03:00
blagoev 43d8f2967f Fix typo 2017-09-11 15:50:44 +03:00
blagoev f8bac2d24a Fix Chrome Debugger for RN 2017-09-11 15:50:44 +03:00
blagoev e5ebb75d22 add typescript definitions 2017-09-11 15:50:44 +03:00
blagoev e1cebe073a add progress notifications api 2017-09-11 15:50:44 +03:00
Kenneth Geisshirt 356033a8c4 Merge branch 'tg/update-object-store' of github.com:realm/realm-js into 2.0.x 2017-09-08 14:56:01 +02:00
Kenneth Geisshirt 38bceddfb1 Add missing TypeScript declaration (#1285)
* Adding missing TypeScript declaration
2017-09-08 10:19:13 +02:00
Ashwin Phatak 119cd79e5d Add Realm.deleteFile API (#363) 2017-09-07 10:12:59 +05:30
Kenneth Geisshirt 0c61716c08 Fix accessToken (#1275) 2017-09-01 11:53:52 +02:00
Thomas Goyne 736277084e Fix creating admin token users 2017-08-31 13:49:45 -07:00
Thomas Goyne 26b4cdf33f Report what went wrong when refreshAccessToken fails 2017-08-31 13:49:45 -07:00
Thomas Goyne e75496571f Fix unhandled promise rejection warnings when access token refreshing fails 2017-08-31 13:49:45 -07:00
Kenneth Geisshirt 8d7eac1b65 Fix linter error (#1271) 2017-08-31 10:18:10 +02:00
Kristian Dupont 402bf48f88 Permissions api (#1244)
* Add basic permissions skeleton

* ...

* Update permissions api

* Wait for server to process management realm, add offer api

* Fix test of apply and get permissions, add offer test

* Accept permission offer

* Accept permission offer test

* Invalidate permission offer

* Add basic docs (still need some links etc)

* Refactor tests

* Only run permission tests where sync is enabled

* Use legal syntax for user name generation

* Add changelog entry

* Streamline permission tests

* Fix casing for access level names etc.

* Add basic definitions to index.d.ts

* Use settimeout for resolving promise from listener

* Complete typescript defs

* Improve docs

* Allow 'any' as default recipient in getGrantedPermissions

* Fix getSpecialPurposeRealm on iOS

* Response to PR comments

* Respond to PR comments

* Fix offer description

* Skip permission tests in chrome debugger :-/
2017-08-29 15:23:22 +02:00
Constantin S. Pan a84f1ed75d Allow all log levels in Realm.Sync.setLogLevels() 2017-08-29 10:37:29 +02:00
Kenneth Geisshirt 85fb49b354 Adding methods and property to manually control write transactions (#1216)
* Adding methods and property to manually control write transactions
2017-08-21 17:48:53 +02:00
Kenneth Geisshirt bd28c05936 Add shouldCompactOnLaunch option to configuration (#1209)
* Adding shouldCompactOnLaunch option to configuration
* Adding Realm.compact()
2017-08-18 14:22:29 +02:00
blagoev fad3b369dc fix bad term 2017-08-15 12:36:15 +03:00
blagoev 86999412f0 Depreciate setAccessToken
rename setAccessToken to setFeatureToken
expose both functions while setAccessToken is depreciated
Trim token argument string
2017-08-15 12:36:15 +03:00
Nikola Irinchev bbe62c361b
Don’t execute callback in Realm.open either 2017-07-18 11:28:33 +03:00
Nikola Irinchev bd10a6d8e0
Don’t invoke openAsync callback twice 2017-07-18 00:16:25 +03:00
Yavor Georgiev 5dd9264225
Add `Realm.empty` 2017-07-12 13:02:21 +02:00
Yavor Georgiev b1d23bb782
Realm.open and Realm.openAsync should try/catch opening the realm
and pass the error on to the promise and callback respectively so that it can be handled by the caller
2017-07-11 17:47:10 +02:00
Yavor Georgiev ab29ac4490 Fix linter issues (#1132) 2017-07-10 16:53:00 +02:00
Yavor Georgiev 1ba9b434b4 Add a new optional server parameter to User.adminUser (#1111)
* add a new optional server parameter to User.adminUser

This enables `User.openManagementRealm()` for admin token users.

* changelog

* API docs
2017-07-10 15:04:55 +02:00
blagoev 9ea5dd7f8c address review comments 2017-07-07 16:38:13 +03:00
blagoev 55c7c8f68c add TS definition for retrieveAccount 2017-07-07 10:31:29 +03:00
blagoev e31529397f Add tests for retrieveAccount method
fix admin-user-helper wait for admin to correctly wait
2017-07-07 10:31:29 +03:00
blagoev 73c861dc74 Remove method from list 2017-07-07 10:31:29 +03:00
blagoev 42e03e038d Add support for getting user id
For #1090
2017-07-07 10:31:29 +03:00
Marius Rackwitz 9e0a9a3bd3 Add support for accessing linking objects / backlinks (#1101)
* Add support for linkingObjects

* Test linkingObjects

* Borrow names helper from list tests

* include computed properties when serializing the schema for the RN debugger

* add API docs

* review comments

* Expose admin users to JS (#1100)

The JS binding used to conflate `SyncUser::is_admin()` with the user being created by calling `Realm.Sync.User.adminToken()`, but now that we expose a user’s role on the server under `is_admin()` this supposition is no longer correct.

#1097 attempted to fix one such case, but fixing it only uncovered another: in `UserClass<T>::all_users()`.  I’ve gone through all the callsites of `SyncUser::is_admin()` to make sure they don’t assume an admin token user.

* [1.8.3] Bump version

* add linkingObjects method to Realm.Object

* changelog
2017-06-29 11:59:10 +02:00
Yavor Georgiev 7ab3aff82f Expose admin users to JS (#1100)
The JS binding used to conflate `SyncUser::is_admin()` with the user being created by calling `Realm.Sync.User.adminToken()`, but now that we expose a user’s role on the server under `is_admin()` this supposition is no longer correct.

#1097 attempted to fix one such case, but fixing it only uncovered another: in `UserClass<T>::all_users()`.  I’ve gone through all the callsites of `SyncUser::is_admin()` to make sure they don’t assume an admin token user.
2017-06-27 20:32:34 +02:00
astigsen db4e184524 Added method to find index of object in collections (#1094)
* Added method to find index of object in collections

* rework as the indexOf method
2017-06-26 13:43:49 +02:00