SDK Drift Report
Category: Model / type drift
TypeScript location: sdks/typescript/pmxt/models.ts lines 944–957 — MatchedMarketClusterEdge and MatchedEventClusterEdge interfaces
Python location: sdks/python/pmxt/models.py — raw_matches field typed as Optional[List[Dict[str, Any]]]
What the drift is
TypeScript defines fully-typed interfaces for the edge objects within a matched cluster:
// sdks/typescript/pmxt/models.ts lines 944-957
export interface MatchedMarketClusterEdge {
marketAId: string;
marketBId: string;
score: number;
// ... other typed fields
}
export interface MatchedEventClusterEdge extends MatchedMarketClusterEdge {
eventAId: string;
eventBId: string;
}
Python represents the same data as a completely untyped list of dicts:
# sdks/python/pmxt/models.py
@dataclass
class MatchedMarketCluster:
...
raw_matches: Optional[List[Dict[str, Any]]] = None # untyped
There are no MatchedMarketClusterEdge or MatchedEventClusterEdge dataclasses in the Python SDK.
Why it matters
- Python callers lose all static type-checking on edge fields; typos and missing-field bugs are not caught by type checkers (mypy, pyright).
- IDE autocompletion does not work for edge object fields in Python.
- The field is also named differently:
raw_matches in Python vs the typed collection of MatchedMarketClusterEdge objects in TypeScript — meaning the field name carries an implicit "this is unstructured data" warning that is absent in TypeScript.
Expected behaviour
Python should define MatchedMarketClusterEdge and MatchedEventClusterEdge dataclasses (or TypedDicts) mirroring the TypeScript interfaces, and the raw_matches field should be typed accordingly (e.g. Optional[List[MatchedMarketClusterEdge]]).
SDK Drift Report
Category: Model / type drift
TypeScript location:
sdks/typescript/pmxt/models.tslines 944–957 —MatchedMarketClusterEdgeandMatchedEventClusterEdgeinterfacesPython location:
sdks/python/pmxt/models.py—raw_matchesfield typed asOptional[List[Dict[str, Any]]]What the drift is
TypeScript defines fully-typed interfaces for the edge objects within a matched cluster:
Python represents the same data as a completely untyped list of dicts:
There are no
MatchedMarketClusterEdgeorMatchedEventClusterEdgedataclasses in the Python SDK.Why it matters
raw_matchesin Python vs the typed collection ofMatchedMarketClusterEdgeobjects in TypeScript — meaning the field name carries an implicit "this is unstructured data" warning that is absent in TypeScript.Expected behaviour
Python should define
MatchedMarketClusterEdgeandMatchedEventClusterEdgedataclasses (or TypedDicts) mirroring the TypeScript interfaces, and theraw_matchesfield should be typed accordingly (e.g.Optional[List[MatchedMarketClusterEdge]]).