feat(generated)!: regenerate from spec (5 changes)#397
feat(generated)!: regenerate from spec (5 changes)#397workos-sdk-automation[bot] wants to merge 7 commits into
Conversation
…rnTo from revokeSession
Greptile SummaryThis auto-generated PR regenerates the WorkOS PHP SDK from an updated OpenAPI spec, introducing five groups of changes: a new
Confidence Score: 4/5Safe to merge after fixing the The lib/Service/ApiKeys.php — the new Important Files Changed
|
| $body = array_filter([ | ||
| 'expires_at' => $expiresAt, | ||
| ], fn ($v) => $v !== null); |
There was a problem hiding this comment.
DateTimeImmutable serialized as {} in the request body
The HTTP client passes the body to Guzzle's json option (line 227 of HttpClient.php), which calls json_encode internally. DateTimeImmutable does not implement JsonSerializable, so json_encode(new \DateTimeImmutable(...)) returns {}. When a caller passes a future $expiresAt, the API receives {"expires_at":{}} — an invalid value — and will likely return a 400 or silently ignore the field.
Additionally, array_filter removes null entries, so it is impossible to send the explicit "expires_at": null payload that the docblock says clears a scheduled future expiration. Both issues are fixed by formatting the date before serialization and not filtering the field out.
| $body = array_filter([ | |
| 'expires_at' => $expiresAt, | |
| ], fn ($v) => $v !== null); | |
| $body = [ | |
| 'expires_at' => $expiresAt?->format(\DateTimeInterface::RFC3339_EXTENDED), | |
| ]; |
Summary
feat(api_keys): Add expire API key operation and update expires_at requirement
ApiKeys.createApiKeyExpire()method to expire, schedule, or clear expiration of API keysexpires_atfield required inApiKeyCreatedDataandApiKeyRevokedDataApiKeyUpdated,ApiKeyUpdatedData,ApiKeyUpdatedDataOwner,UserApiKeyUpdatedDataOwner,ApiKeyUpdatedDataPreviousAttributeapi_key.updatedwebhook event type supportfeat(user_management)!: Add name field to user models and remove returnTo from revokeSession
namefield (user's full name) toUser,CreateUser,UpdateUser,UserObject,EmailChangeConfirmationUsermodelsnameparameter tocreateUser()andupdateUser()methodsreturnToparameter fromrevokeSession()method (breaking change)feat(directory_sync): Replace dsync deactivated events with token lifecycle events
DsyncDeactivated,DsyncDeactivatedData,DsyncDeactivatedDataDomainmodels (breaking changes)DsyncTokenCreated,DsyncTokenCreatedData,DsyncTokenRevoked,DsyncTokenRevokedDatafeat(radar): Remove DOMAIN_SIGN_UP_RATE_LIMIT control type
DOMAIN_SIGN_UP_RATE_LIMITenum value fromRadarStandaloneResponseControlfeat(audit_logs): Add Snowflake log stream type
SNOWFLAKEenum value toAuditLogConfigurationLogStreamTypeTriggered by workos/openapi-spec@dee95fc
BEGIN_COMMIT_OVERRIDE
feat(api_keys): Add expire API key operation and update expires_at requirement (#397)
feat(user_management)!: Add name field to user models and remove returnTo from revokeSession (#397)
feat(directory_sync): Replace dsync deactivated events with token lifecycle events (#397)
feat(radar): Remove DOMAIN_SIGN_UP_RATE_LIMIT control type (#397)
feat(audit_logs): Add Snowflake log stream type (#397)
END_COMMIT_OVERRIDE