-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
2980
-
SDK FY21-Q2
Users are experiencing duplicate and diverging types across Realm JS and Realm Web.
Besides merging the type definitions, we also have to update the implementation and any tests relying on this:
- [x] Rename the identity property on a User to id.
- [x] Rename the token property on a User to accessToken.
- [x] Expose the refresh token of a User as refreshToken.
- [x] Change the allUsers from an instance method to a getter-property.
- [x] Change the currentUser from an instance method to a getter-property.
- [x] Make the logOut method on the User return a resolved promise (Promise<void>), instead of returning undefined synchronously.
- [x] Rename API to Api for the auth related classes (here, here)
- [x] Rename from UserAPIKeyProviderClient to ApiKeyProvider ApiKeyAuth (loosing User and Client & gaining Auth), in the internal C++ implementation.
- [x] Rename from EmailPasswordProviderClient to EmailPasswordProvider EmailPasswordAuth (loosing Client & gaining Auth), in the internal C++ implementation.
- [x] Rename methods of the ApiKeyProvider (loosing the "APIKey" suffix is fine, since its already called on an ApiKeyProvider which has no other methods that handle anything else than api-keys):
- [x] createAPIKey → create
- [x] fetchAPIKey → fetch
- [x] fetchAPIKeys → fetchAll
- [x] deleteAPIKey → delete
- [x] enableAPIKey → enable
- [x] disableAPIKey → disable
- Rename methods of the EmailPasswordProvider:
- [x] registerEmail → registerUser
- [ ] resendConfirmation → resendConfirmationEmail
- [x] Add the callResetPasswordFunction method to the EmailPasswordProvider.
NOTE: This should probably be implemented as a PR against the kh/v10-merged-types branch to keep the changes together when merged into v10.