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

adding subscriptions to web5-js #228

Closed

Conversation

andorsk
Copy link

@andorsk andorsk commented Sep 28, 2023

initial subscriptions PR. Do NOT merge, but used for transparency to show some of the API's and interfaces design for users when using the subscriptions interface. Open for feedback and discussion. Will have some updates in the near future.

See the documentation here: https://github.com/getZION/web5-js/tree/ask/subscription/packages/api#web5dwnsubscriptioncreaterequest for intended use.

@codesandbox
Copy link

codesandbox bot commented Sep 28, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@andorsk
Copy link
Author

andorsk commented Sep 28, 2023

fixing history here. Give me a sec.

@andorsk
Copy link
Author

andorsk commented Oct 2, 2023

@finn-tbd trying to test this locally, and running into some issues due to all the updates to authorization in dwn-sdk-js at the latest. Do we have an idea of when the rest of web5-js will be up to date with the latest dwn-sdk-js? It's hard to test this PR until things have gotten more up to date with the latest.

One of many errors thrown just for additional context:

tests/record.spec.ts:466:100 - error TS2322: Type '{ recordId: string; }' is not assignable to type 'Omit<RecordsReadOptions, "authorizationSignatureInput">'.
  Object literal may only specify known properties, and 'recordId' does not exist in type 'Omit<RecordsReadOptions, "authorizationSignatureInput">'.

466       const { record: readRecord, status: readRecordStatus } = await dwn.records.read({ message: { recordId: record!.id }});
                                                                                                       ~~~~~~~~```
                                                                                                       
                                                                                                       
```sh
Found 32 errors in 4 files.

Seems like the signer updates is more or less straightforward. There are some other broken pieces though a lot more involved.

@finn-block
Copy link
Contributor

Looks like @thehenrytsai made these changes to dwn-sdk-js. Maybe he knows the answer?

update web5 subscription filter
@frankhinek
Copy link
Contributor

Still in Draft state. @andorsk any update on timing for this?

@andorsk
Copy link
Author

andorsk commented Nov 8, 2023

@frankhinek haven't tested this in a while, but this was blocked by two things:

  1. My notes adding subscriptions to web5-js #228 (comment). Guessing they moved since then, but I haven't checked.
  2. subscription interface and event streaming for low latency push events dwn-sdk-js#508, which was kinda on hold for a bit for a number of reasons. 1) deprioritized on my end, but still want to get it done 2) it was relying on a lot of the permissions/authorization work, which was moving around a lot. Assuming that's stabilized a little more now. On a call with Liran today to discuss how to move this forward quicker. Otherwise, I can just get to this on the weekends.

@frankhinek
Copy link
Contributor

@LiranCohen requested keeping open for now as a reminder to circle back and continue work

@LiranCohen
Copy link
Member

Closing in favor of: #433

@LiranCohen LiranCohen closed this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants