Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK-3548] Remove public callbacks API #1358

Merged
merged 9 commits into from
Jul 3, 2023

Commits on Jul 3, 2023

  1. Remove Platform.Config.Promise

    I’m not sure what purpose this was serving — Promise can just be
    accessed as a global variable.
    lawrence-forooghian committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    3dddbda View commit details
    Browse the repository at this point in the history
  2. Remove all checks for Promise availability

    In version 2.0 of the library we’re assuming Promise is always
    available.
    lawrence-forooghian committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    9f1c38b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    471f112 View commit details
    Browse the repository at this point in the history
  4. Remove the callbacks public API

    We’ve decided that in version 2 of the SDK, we’ll only offer a
    promise-based API.
    
    Note that this doesn’t change the use of callbacks internally in the
    SDK; that’s a separate thing we might wish to do in the future.
    
    Resolves #1199.
    lawrence-forooghian committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    2a2ed49 View commit details
    Browse the repository at this point in the history
  5. Remove the Promise static property

    No longer needed now that, as of 2a2ed49, the promises API is the only
    one we offer.
    lawrence-forooghian committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    693804c View commit details
    Browse the repository at this point in the history
  6. Remove promises.js / .d.ts

    Motivation as in 693804c.
    lawrence-forooghian committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    6cf248f View commit details
    Browse the repository at this point in the history
  7. Move RealtimeChannelPromise declaration directly below RealtimeChanne…

    …lBase
    
    Preparation for merging the *Base and *Promise classes.
    lawrence-forooghian committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    8c3afa4 View commit details
    Browse the repository at this point in the history
  8. Remove Realtime < Rest inheritance in public API

    I want to merge the following classes together:
    
    - RestBase and RestPromise into a class named Rest
    - RealtimeBase and RealtimePromise into a class named Realtime
    
    However, I need to decide what to do about the inheritance of
    RealtimeBase from RestBase. The obvious thing to do would be to make
    Realtime inherit from Rest, but this won’t work because
    RealtimeChannel’s type declaration does not include a `status()`
    function and hence Realtime.channels cannot satisfy the type of
    Rest.channels.
    
    So, since the IDL does not mention any inheritance relation between the
    REST and Realtime classes, I’m going to sever this connection in the
    type declarations. (We can consider the fact that _internally_ there is
    inheritance to be an implementation detail.)
    lawrence-forooghian committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    69c35f1 View commit details
    Browse the repository at this point in the history
  9. Merge *Base and *Promise classes

    The *Base classes are no longer needed now that we’ve removed the
    *Callbacks classes.
    lawrence-forooghian committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    6cb7179 View commit details
    Browse the repository at this point in the history