Problem
Commands with an S.Json() parameter accept native JSON objects at runtime, but the generated SDK type recursively applies key camel-casing to the JSON string index signature. TypeScript reduces that signature to a malformed { "": any }-like union, so ordinary calls such as sdk.command({ payloadJson: { file_upload: "id" } }) fail to compile.
The runtime already preserves arbitrary JSON keys correctly.
Expected
- SDK parameter names continue to camel-case.
- Keys inside
S.Json() and other string-indexed records remain arbitrary and unchanged.
- Native JSON object literals type-check.
Proposed fix
Teach the SDK's type-level Camelize helper to leave string-indexed object types intact, and add a compile check plus runtime key-preservation coverage.
Problem
Commands with an
S.Json()parameter accept native JSON objects at runtime, but the generated SDK type recursively applies key camel-casing to the JSON string index signature. TypeScript reduces that signature to a malformed{ "": any }-like union, so ordinary calls such assdk.command({ payloadJson: { file_upload: "id" } })fail to compile.The runtime already preserves arbitrary JSON keys correctly.
Expected
S.Json()and other string-indexed records remain arbitrary and unchanged.Proposed fix
Teach the SDK's type-level
Camelizehelper to leave string-indexed object types intact, and add a compile check plus runtime key-preservation coverage.