Drift
The total field on PaginatedMarketsResult is optional in TypeScript but required (non-nullable) in Python.
TypeScript SDK
sdks/typescript/pmxt/models.ts, lines 216–225:
export interface PaginatedMarketsResult {
data: UnifiedMarket[];
total?: number; // ← optional
nextCursor?: string;
}
Python SDK
sdks/python/pmxt/models.py, lines 334–345:
@dataclass
class PaginatedMarketsResult:
data: "List[UnifiedMarket]"
total: int # ← required, no default
next_cursor: Optional[str] = None
Expected
Both SDKs should agree on nullability. If the server does not always return a total count, total should be Optional[int] = None in Python. If it is always present, TypeScript should remove the ?.
Impact
Python code will raise a TypeError at construction time if the server omits total, while TypeScript code handles the absence gracefully. Users who test with TypeScript and deploy Python (or vice versa) will encounter unexpected runtime failures.
Found by automated SDK cross-language drift audit
Drift
The
totalfield onPaginatedMarketsResultis optional in TypeScript but required (non-nullable) in Python.TypeScript SDK
sdks/typescript/pmxt/models.ts, lines 216–225:Python SDK
sdks/python/pmxt/models.py, lines 334–345:Expected
Both SDKs should agree on nullability. If the server does not always return a total count,
totalshould beOptional[int] = Nonein Python. If it is always present, TypeScript should remove the?.Impact
Python code will raise a
TypeErrorat construction time if the server omitstotal, while TypeScript code handles the absence gracefully. Users who test with TypeScript and deploy Python (or vice versa) will encounter unexpected runtime failures.Found by automated SDK cross-language drift audit