feat(generated)!: regenerate from spec (9 changes)#665
feat(generated)!: regenerate from spec (9 changes)#665workos-sdk-automation[bot] wants to merge 11 commits into
Conversation
…aloneResponseControl enum
Greptile SummaryThis auto-generated PR regenerates the Python SDK from the OpenAPI spec, adding 9 changes across user management, API keys, common event models, connect, authorization, and audit logs.
Confidence Score: 4/5The PR is mostly safe to merge; the breaking changes are intentional and well-reflected in models and fixtures. One functional gap exists in create_api_key_expire where the clear scheduled expiration use case cannot be expressed through the current API. Nearly all changes are straightforward model additions and removals that match the spec. The one concrete defect is in create_api_key_expire: omitting None values from the request body makes it impossible to send the null payload the API requires to clear a scheduled expiration, breaking a documented use case on both the sync and async paths. src/workos/api_keys/_resource.py — both sync and async create_api_key_expire need attention for the null-clearing use case. Important Files Changed
|
| body: Dict[str, Any] = { | ||
| k: v | ||
| for k, v in { | ||
| "expires_at": expires_at, | ||
| }.items() | ||
| if v is not None | ||
| } |
There was a problem hiding this comment.
Cannot send explicit
null to clear scheduled expiration
The docstring for expires_at states: "Use null to clear a scheduled future expiration." However the body-building filter if v is not None silently drops a None value, so calling create_api_key_expire(id, expires_at=None) produces an empty body {} — identical to omitting the argument. There is no way for callers to send {"expires_at": null} to the API, making the "clear scheduled expiration" use case completely unreachable. The same issue is present in AsyncApiKeys.create_api_key_expire at line 415.
Summary
feat(user_management)!: Remove return_to parameter from revoke_session
return_toparameter fromUserManagement.revoke_sessionandAsyncUserManagement.revoke_sessionmethodsRevokeSessionmodel to remove thereturn_tofieldfeat(api_keys): Add create_api_key_expire operation
create_api_key_expiremethod to bothApiKeysandAsyncApiKeysclassesExpireApiKeymodel with optionalexpires_atfieldfeat(common): Remove DsyncDeactivated models and add DsyncToken events
DsyncDeactivated,DsyncDeactivatedData,DsyncDeactivatedDataDomain,DsyncDeactivatedDataState, andDsyncDeactivatedDataTypemodels (breaking change)DsyncTokenCreated,DsyncTokenCreatedData,DsyncTokenRevoked,DsyncTokenRevokedDatadsync.deactivatedevent and addition ofdsync.token.createdanddsync.token.revokedeventsapi_key.updatedeventfeat(common): Add ApiKeyUpdated event models
ApiKeyUpdated,ApiKeyUpdatedData,ApiKeyUpdatedDataOwner,ApiKeyUpdatedDataPreviousAttribute, andUserApiKeyUpdatedDataOwnermodelsapi_key.updatedfeat(common): Make expires_at required in ApiKeyCreatedData and ApiKeyRevokedData
expires_atfield from optional to required inApiKeyCreatedDatamodelexpires_atfield from optional to required inApiKeyRevokedDatamodelexpires_atbeforepermissionsin serializationfeat(user_management)!: Add name field to User, CreateUser, and UpdateUser models
namefield toUsermodel for the user's full namenameparameter tocreate_userandupdate_usermethodsnamefield toCreateUserandUpdateUsermodelsfeat(connect): Add name field to UserObject model
namefield toUserObjectmodel for the user's full namefeat(authorization): Remove DOMAIN_SIGN_UP_RATE_LIMIT from RadarStandaloneResponseControl enum
DOMAIN_SIGN_UP_RATE_LIMITvalue fromRadarStandaloneResponseControlenum (breaking change)feat(audit_logs): Add SNOWFLAKE to AuditLogConfigurationLogStreamType enum
SNOWFLAKEvalue toAuditLogConfigurationLogStreamTypeenumTriggered by workos/openapi-spec@dee95fc
BEGIN_COMMIT_OVERRIDE
feat(user_management)!: Remove return_to parameter from revoke_session (#665)
feat(api_keys): Add create_api_key_expire operation (#665)
feat(common): Remove DsyncDeactivated models and add DsyncToken events (#665)
feat(common): Add ApiKeyUpdated event models (#665)
feat(common): Make expires_at required in ApiKeyCreatedData and ApiKeyRevokedData (#665)
feat(user_management)!: Add name field to User, CreateUser, and UpdateUser models (#665)
feat(connect): Add name field to UserObject model (#665)
feat(authorization): Remove DOMAIN_SIGN_UP_RATE_LIMIT from RadarStandaloneResponseControl enum (#665)
feat(audit_logs): Add SNOWFLAKE to AuditLogConfigurationLogStreamType enum (#665)
END_COMMIT_OVERRIDE