Skip to content

fix(ts-sdk): forward router match browse options#1152

Open
realfishsam wants to merge 1 commit into
mainfrom
fix/issue-1149-router-fetch-market-matches-params
Open

fix(ts-sdk): forward router match browse options#1152
realfishsam wants to merge 1 commit into
mainfrom
fix/issue-1149-router-fetch-market-matches-params

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Add the missing TypeScript SDK Router.fetchMarketMatches option fields for minDifference and sort.
  • Forward both fields through to the sidecar query so browse-mode filtering/sorting reaches core.

Closes #1149

Test Plan

  • node - <<'NODE' ... typescript.transpileModule(sdks/typescript/pmxt/router.ts) ... NODE — router.ts transpile diagnostics clean
  • git diff --check
  • npm run build --workspace=pmxtjs attempted after npm install; blocked by missing generated sdks/typescript/generated/src/index.js in this checkout
  • npm run generate:sdk:typescript --workspace=pmxt-core attempted to restore generated SDK; blocked by environment missing java

@realfishsam

Copy link
Copy Markdown
Contributor Author

Verification note from low-fruit automation:

  • Local focused validation passed: typescript.transpileModule(sdks/typescript/pmxt/router.ts) produced no diagnostics, and git diff --check passed.
  • Full npm run build --workspace=pmxtjs is blocked in this clean worktree because sdks/typescript/generated/src/index.js is absent; regenerating it via npm run generate:sdk:typescript --workspace=pmxt-core is blocked by missing java in this environment.
  • The current red generated-sync checks appear unrelated to this focused Router change: API docs want removal of question from sdks/typescript/API_REFERENCE.md, TS client generation wants fetchMatchedMarkets(params?: any), and Python client generation wants fetch_order_book(... params: Optional[dict]).

Keeping this PR scoped to #1149 rather than folding broad generated drift into it.

@realfishsam

Copy link
Copy Markdown
Contributor Author

PR Review: PASS (NOT VERIFIED)

What This Does

Adds the missing TypeScript SDK Router.fetchMarketMatches options for minDifference and sort, then forwards them into the sidecar query. This matters to SDK consumers because browse-mode matching can now request price-difference filtering/sorting instead of silently dropping those options client-side.

Blast Radius

TypeScript SDK router wrapper only: sdks/typescript/pmxt/router.ts. No core exchange, OpenAPI schema, generated SDK, Python SDK, or server routing changes.

Consumer Verification

Before (base branch):
The TypeScript SDK overload/params did not include minDifference or sort, and the outgoing query builder only forwarded minConfidence, limit, and includePrices.

await router.fetchMarketMatches({ minDifference: 0.1, sort: 'priceDifference' })
// base source: no minDifference/sort option types; no query.minDifference/query.sort forwarding

After (PR branch):
Static consumer-path check against sdks/typescript/pmxt/router.ts confirmed all four required pieces are present:

minDifference option type: true
sort option type: true
query.minDifference forwarding: true
query.sort forwarding: true

The actual SDK build/E2E run was not completed because this review checkout lacks generated TypeScript OpenAPI artifacts (../generated/src/index.js).

Test Results

  • Build: core build PASS (npm run build --workspace=pmxt-core)
  • Unit tests: NOT RUN (no focused test was added for this SDK wrapper change)
  • Server starts: NOT VERIFIED (SDK-only change)
  • E2E smoke: NOT VERIFIED (blocked by missing generated TypeScript SDK artifacts in this checkout)

Findings

No blocking findings.

PMXT Pipeline Check

  • Field propagation (3-layer): N/A
  • OpenAPI sync: N/A
  • Financial precision: N/A
  • Type safety: OK (new options are typed as number and the allowed sort literals)
  • Auth safety: N/A

Semver Impact

patch -- fixes an SDK wrapper omission without changing the server contract.

Risk

There is no regression test covering the new query forwarding, and full TypeScript SDK build was blocked by missing generated artifacts in this review environment, so I verified the forwarding statically rather than through a compiled SDK call.

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.

TypeScript SDK Router.fetchMarketMatches missing minDifference and sort parameters

1 participant