You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generate TypedDict types for input-side models #666
In PR #663 (Accept Pydantic models as alternatives to dicts in resource client methods), we introduced union types like dict | WebhookCreate so that users can pass Pydantic model instances instead of plain dicts. However, the dict part of the union is still untyped — users passing dicts get no type safety or autocompletion.
As discussed in this comment, we could replace the generic dict with generated TypedDict types for an additional layer of type safety. For example, instead of dict | WebhookCreate, the signature could be WebhookCreateDict | WebhookCreate, where WebhookCreateDict is a TypedDict with the same fields.
Proposal
Investigate generating TypedDict equivalents from the Pydantic models (or directly from the OpenAPI spec) for models that are used as input parameters.
Integrate the generation into the existing model generation pipeline (uv run poe generate-models).
Replace dict with the corresponding TypedDict in resource client method signatures.
Activity
feat: generate TypedDict types for input-side models
feat: generate TypedDict types for input-side models
feat: generate TypedDict types for input-side models
feat: generate TypedDict types for input-side models
feat: generate TypedDict types for input-side models
feat: generate TypedDict types for input-side models (#738)