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

Conversation

lawrence-forooghian
Copy link
Collaborator

@lawrence-forooghian lawrence-forooghian commented Jun 27, 2023

Note: This PR is based on top of #1351; please review that one first.

This removes the callback-based variant of the public API. See commit messages for more details.

Resolves #1199.

@github-actions github-actions bot temporarily deployed to staging/pull/1358/features June 27, 2023 17:51 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1358/bundle-report June 27, 2023 17:52 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1358/typedoc June 27, 2023 17:52 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1358/features June 27, 2023 17:57 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1358/bundle-report June 27, 2023 17:59 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1358/typedoc June 27, 2023 17:59 Inactive
@lawrence-forooghian lawrence-forooghian changed the base branch from 1345-change-generateRandomKey-to-promise to integration/v2 June 27, 2023 19:11
@github-actions github-actions bot temporarily deployed to staging/pull/1358/features June 27, 2023 19:11 Inactive
@lawrence-forooghian lawrence-forooghian changed the base branch from integration/v2 to 1345-change-generateRandomKey-to-promise June 27, 2023 19:12
@github-actions github-actions bot temporarily deployed to staging/pull/1358/features June 27, 2023 19:13 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1358/features June 27, 2023 19:14 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1358/bundle-report June 27, 2023 19:15 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1358/typedoc June 27, 2023 19:15 Inactive
@lawrence-forooghian lawrence-forooghian changed the title 1199 remove callbacks api Remove public callbacks API Jun 27, 2023
@lawrence-forooghian lawrence-forooghian marked this pull request as ready for review June 28, 2023 12:06
Base automatically changed from 1345-change-generateRandomKey-to-promise to integration/v2 July 3, 2023 12:05
Copy link
Member

@owenpearson owenpearson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🙂 Just one tiny mistake

README.md Outdated Show resolved Hide resolved
I’m not sure what purpose this was serving — Promise can just be
accessed as a global variable.
In version 2.0 of the library we’re assuming Promise is always
available.
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.
No longer needed now that, as of 2a2ed49, the promises API is the only
one we offer.
…lBase

Preparation for merging the *Base and *Promise classes.
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.)
The *Base classes are no longer needed now that we’ve removed the
*Callbacks classes.
@lawrence-forooghian lawrence-forooghian merged commit 404c412 into integration/v2 Jul 3, 2023
@lawrence-forooghian lawrence-forooghian deleted the 1199-remove-callbacks-api branch July 3, 2023 14:13
@hayleynewton hayleynewton changed the title Remove public callbacks API [SDK-3548] Remove public callbacks API Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants