Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-638

Merge Realm JS and Realm Web TypeScript declarations

      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] createAPIKeycreate
        • [x] fetchAPIKeyfetch
        • [x] fetchAPIKeysfetchAll
        • [x] deleteAPIKeydelete
        • [x] enableAPIKeyenable
        • [x] disableAPIKeydisable
      • Rename methods of the EmailPasswordProvider:
        • [x] registerEmailregisterUser
        • [ ] resendConfirmationresendConfirmationEmail
      • [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.

            Assignee:
            kenneth.geisshirt@mongodb.com Kenneth Geisshirt
            Reporter:
            kraen.hansen@mongodb.com Kræn Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: