fix(ts-sdk): accept deprecated ids for watchOrderBooks#1292
Conversation
|
Local/CI follow-up from the low-hanging automation:
|
PR Review: PASS (NOT VERIFIED)What This DoesAdds backwards-compatible TypeScript handling for deprecated Blast RadiusTypeScript SDK WebSocket batch subscription argument shaping only ( Consumer VerificationBefore (base branch): await client.watchOrderBooks({ ids: ["outcome-1"] } as any)
// base: TypeError because outcomeIds.map is not a functionAfter (PR branch): await client.watchOrderBooks({ ids: ["outcome-1"] } as any)
// args: [["outcome-1"]]
await client.watchOrderBooks(undefined, undefined, { ids: ["outcome-1"], foo: "bar" } as any)
// args: [["outcome-1"], undefined, { foo: "bar" }]Runtime SDK verification was blocked by missing generated SDK artifacts. Test Results
FindingsNo blocking findings. PMXT Pipeline Check
Semver Impactpatch -- restores deprecated-call compatibility without changing the preferred public API. RiskDeprecated compatibility emits |
|
Hey @realfishsam — great work on the backwards-compatible fix for The PR review is PASS, and the CI failures are all auto-generated file mismatches, not issues with your code changes. Quick Fix for the CI FailuresThe 4 failing checks can be fixed by regenerating the generated files: # 1. Regenerate the TypeScript client
node sdks/typescript/scripts/generate-client-methods.js
# 2. Regenerate the Python client
node sdks/python/scripts/generate-client-methods.js
# 3. Regenerate API reference docs
npm run generate:docs --workspace=pmxt-core
# 4. Regenerate exchange coverage
npm run generate:exchange-coverage --workspace=pmxt-core 2>/dev/null || echo "Script not found" |
Summary
idsinput onwatchOrderBooks, matching Python's backwards-compatible behavior.params.idsbefore forwarding sidecar params so the alias does not leak to the server.Fixes #1283
Test Plan
npm test -- --runTestsByPath tests/watch-order-books-compat.test.ts(blocked: generated TypeScript client artifacts are absent in this checkout;pmxt/client.tscannot resolve../generated/src/index.js)npm run generate:sdk:typescript --workspace=pmxt-core(blocked: environment is missingjava, required by openapi-generator-cli)git diff --check(pass)