跳到导航

5.37.2

(fix): XML (TwiML) child builders keep their legacy names when they collide with the element’s text field: dial.number("+15551234567") and message.body("b") now work instead of raising TypeError: 'NoneType' object is not callable. The text is still passed as the same constructor keyword (Dial(number="+1555")) but is stored under a trailing underscore (dial.number_) so the builder method stays callable; add_number/add_body are no longer generated.

5.37.1

(fix): List-valued XML (TwiML) attributes accept a single space-separated string in addition to a list, matching the legacy call style: response.gather(input="speech dtmf") no longer raises a validation error and serializes as input="speech dtmf".

5.37.0

(feat): Add opt-in user_agent_only config (also accepted as userAgentOnly). When enabled, generated clients send the User-Agent header (including the structured form from include_platform_headers) but omit the X-Fern-Language, X-Fern-SDK-Name, X-Fern-SDK-Version, X-Fern-Runtime, and X-Fern-Platform headers. Disabled by default, so existing generated output is unchanged. omit_fern_headers still takes precedence and drops the User-Agent too.

5.36.1

(fix): With endpoint-security auth, the client now fetches an OAuth or inferred-auth token only when the endpoint’s security requirements reference that scheme. Previously every authenticated call fetched one first, so an endpoint that doesn’t use it (e.g. the token endpoint itself) made an extra token request and failed if that fetch failed.

5.36.0

(feat): The generated WebhooksHelper HMAC verifier now accepts a per-call algorithm override via an optional algorithm parameter on verifySignature, one of sha1, sha256, sha384 or sha512. When omitted, the algorithm configured in webhook-signature is used, so existing callers are unchanged. This lets one endpoint verify both legacy HMAC-SHA1 (auth-token) and HMAC-SHA256 (shared-key) signed webhooks. The verifier also logs a warning distinguishing an early failure (missing signature header) from a failed verification (signature mismatch); it still returns false and never throws.

5.35.0

(feat): XML (TwiML) models keep text segments, typed children and undeclared XmlElement children in one ordered content sequence, so to_xml() writes them in insertion order (say("a"), add_child(...), say("b") renders <Say>a</Say><Custom /><Say>b</Say>) and from_xml() preserves document order, including nested mixed content in undeclared children. Builders gain add_text(text) for mixed content such as Say("Hi ").break_(...).add_text(" world"). Typed child properties and add_child() keep working as before.

5.34.5

(fix): XML-encoded (TwiML) types now include the <?xml version="1.0" encoding="UTF-8"?> declaration by default when serialized to XML; pass the declaration flag as false to omit it. Nested child elements and raw XmlElements are still written without it.

5.34.4

(fix): On Python 3.10 and older, str() on a generated enum member now returns its value (e.g. WALMART_US) instead of ClassName.WALMART_US, matching enum.StrEnum on Python 3.11+. Previously, enum query parameters were sent as ClassName.MEMBER on those versions when enum_type: forward_compatible_python_enums or python_enums was used.