Skip to content

fix(typescript): export public SDK option types#1453

Merged
realfishsam merged 1 commit into
mainfrom
fix/ts-public-option-exports-1445-1380
Jul 3, 2026
Merged

fix(typescript): export public SDK option types#1453
realfishsam merged 1 commit into
mainfrom
fix/ts-public-option-exports-1445-1380

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Re-export SuiBetsOptions from the TypeScript package root so consumers can import the public SuiBets constructor options type directly.
  • Re-export RouterOptions from the TypeScript package root to match the existing Python package-root export.

Fixes #1445
Fixes #1380

Test Plan

  • git diff --check
  • Node static assertion that sdks/typescript/index.ts contains both public type exports
  • tsc could not be run locally because this checkout has no node_modules/.bin/tsc; this PR only changes package-root type export statements and GitHub generated-sync checks will validate committed generated surfaces.

@realfishsam

Copy link
Copy Markdown
Contributor Author

PR Review: FAIL

What This Does

This re-exports two existing TypeScript SDK option interfaces from the package root: SuiBetsOptions from ./pmxt/client.js and RouterOptions from ./pmxt/router.js. For SDK consumers, this removes the need to import those public constructor-option types from internal module paths.

Blast Radius

TypeScript SDK package-root surface only (sdks/typescript/index.ts). No core exchange logic, sidecar routes, OpenAPI schemas, generated SDK files, Python SDK, auth, router runtime behavior, or venue normalizers are changed.

Consumer Verification

Before (base branch):
A consumer type import from the TypeScript package root fails because the root module does not export either type:

import type { SuiBetsOptions, RouterOptions } from './sdks/typescript/index';

npx tsc --noEmit --skipLibCheck --moduleResolution node --target ES2022 --module ESNext check-pmxt-types.ts on origin/main reported:

check-pmxt-types.ts(1,15): error TS2614: Module '"./sdks/typescript/index"' has no exported member 'SuiBetsOptions'.
check-pmxt-types.ts(1,31): error TS2614: Module '"./sdks/typescript/index"' has no exported member 'RouterOptions'.

The same base run also reported missing generated artifacts (../generated/src/index.js), which is an existing checkout/build-artifact blocker and not caused by this PR.

After (PR branch):
The same consumer type import no longer reports missing-root-export errors. The PR branch tsc run only reported the pre-existing missing generated artifacts:

sdks/typescript/pmxt/client.ts(15,8): error TS2307: Cannot find module '../generated/src/index.js' or its corresponding type declarations.
sdks/typescript/pmxt/server-manager.ts(7,43): error TS2307: Cannot find module '../generated/src/index.js' or its corresponding type declarations.

Static source checks also confirmed the target interfaces exist at their re-export sources:

  • sdks/typescript/pmxt/client.ts:3443export interface SuiBetsOptions extends ExchangeOptions
  • sdks/typescript/pmxt/router.ts:191export interface RouterOptions

Test Results

  • Build: PARTIAL PASS — npm run build --workspace=pmxt-core passed and copied server assets. npm run build --workspace=pmxtjs could not complete because sdks/typescript/generated/src/index.js is absent in this checkout.
  • Unit tests: PARTIAL PASS / FAIL overall — core Jest suites passed (46 passed, 1 skipped; 809 passed, 3 skipped), but top-level npm test exited nonzero because the Python SDK integration step used /opt/data/home/pmxt-nda/.venv/bin/python3 and failed with No module named pytest.
  • Server starts: PASS — after the core build, npm run server --workspace=pmxt-core served GET /health as {"status":"ok",...}.
  • E2E smoke: N/A — this is a package-root type-export-only change with no sidecar runtime behavior. The relevant consumer smoke was the TypeScript type import above.

Findings

  1. No blocking code findings in the PR diff itself. The added exports are type-only (export type) and point at interfaces that are already exported by their source modules.
  2. Verification blocker: the repository-level verification command currently fails in this environment because the Python integration test runner lacks pytest; additionally, the TypeScript SDK package build is blocked by absent generated artifacts. Because the automation's verdict rules treat failed tests as a failure, I am marking the review FAIL even though the specific package-root export behavior is improved by this PR.

PMXT Pipeline Check

  • Field propagation (3-layer): N/A — no unified response fields or venue normalizers changed.
  • OpenAPI sync: N/A — no sidecar API schema/method changed.
  • Financial precision: N/A — no financial arithmetic changed.
  • Type safety: OK — the root exports are type-only and reference existing exported interfaces.
  • Auth safety: N/A — no auth or credential handling changed.

Semver Impact

patch -- fixes missing public TypeScript type exports without changing runtime behavior or response shapes.

Risk

The actual root-export behavior is statically verified, but full repository verification remains blocked by environment/artifact issues (pytest missing for Python integration tests and generated TypeScript client artifacts absent for the SDK package build).

@realfishsam realfishsam merged commit 803dcbc into main Jul 3, 2026
11 checks passed
@realfishsam realfishsam deleted the fix/ts-public-option-exports-1445-1380 branch July 3, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant