docs: streaming client methods [AMB-3018] - #47
Draft
bufo24 wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents
transactions.watch(id)andwallets.watchEvents(id)(added in #46 / AMB-3016, not yet merged) across the three places this repo's "keep in sync" rule (AGENTS.md's "Docs to keep in sync") requires:AGENTS.md— addedwatch(id)/watchEvents(id)to the resource table'sTransactions/Walletsrows.packages/payments/README.md— new "Streaming" section under API resources: minimalfor awaitsample for each method, what a yieldedPaymentEventlooks like, and the differing end-of-stream behavior (transaction stream closes on terminal status; wallet stream stays open until the 30-minute max lifetime or disconnect).docs/INTEGRATION.md— added streaming as "Step 6", framed as a live third option alongside webhooks and polling (per the parent Linear project's framing: webhooks need a public endpoint, SSE doesn't).All behavioral claims (60s token TTL gating only the handshake, 30-minute max stream lifetime, terminal-status close for transactions, no-terminal-state for wallets, reconnect-by-recalling) are drawn directly from AMB-3016's implementation (
streaming.ts,transactions.ts,wallets.tsdoc comments) and the SSE design doc (amboss-rails-api#564), not invented.Base branch note: this PR is based on
jesseva/amb-3016-sdk-streaming-client-methods-types(#46), which is itself unmerged, so the methods being documented exist on this branch. Once #46 merges tomain, this PR should be retargeted tomainbefore merging.Test plan
Docs-only change — no build/lint/test to run.
mainand resolve any diff drift.