Repository navigation
feat(generated): Changes to events, pipes, user_management, and 2 more services - #768
Conversation
…iKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets
[High impact] The PR changes public SDK contracts across several WorkOS workflows. The PR appears safe to merge, with non-blocking fixes for a public type alias, create-method consistency, and PATCH test coverage. FindingsFix with agent prompt### Issue 1
src/workos/pipes/models/add_data_integrations_get_data_integration_authorize_url_request_connection_owner_literal.py:7
`AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwnerLiteral` points to the enum class, not `Literal["user", "organization"]`. Callers using this exported name in an annotation get type errors for valid plain strings. Alias `CreateDataIntegrationOwnershipLiteral` instead, in both the type-checking import and the lazy return.
### Issue 2
tests/test_authorization.py:107-114
The new tests for `patch_group_role_assignments` and `update_group_organization_memberships` send no `add` or `remove` entries, although both methods require at least one entry. They only check the method and URL, so dropping either list or breaking entry serialization would still pass. Add valid nonempty bodies and assert the outgoing JSON for both sync and async methods.
### Issue 3
src/workos/connect/models/create_oauth_application.py:29-30
`cors_origins` is added to `CreateOAuthApplication`, but neither `create_oauth_application` convenience method accepts it. Callers using those methods cannot set the new option at creation time without switching to `create_application` or making another request. Add and forward the keyword in both convenience methods.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryRegenerates SDK methods and models across several services.
Intentional changes acknowledged by
|
|
|
||
| if TYPE_CHECKING: | ||
| from workos.common.models.create_data_integration_ownership import ( | ||
| CreateDataIntegrationOwnership as AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwnerLiteral, |
There was a problem hiding this comment.
AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwnerLiteral points to the enum class, not Literal["user", "organization"]. Callers using this exported name in an annotation get type errors for valid plain strings. Alias CreateDataIntegrationOwnershipLiteral instead, in both the type-checking import and the lazy return.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/pipes/models/add_data_integrations_get_data_integration_authorize_url_request_connection_owner_literal.py
Line: 7
Comment:
**Literal alias points to enum**
`AddDataIntegrationsGetDataIntegrationAuthorizeUrlRequestConnectionOwnerLiteral` points to the enum class, not `Literal["user", "organization"]`. Callers using this exported name in an annotation get type errors for valid plain strings. Alias `CreateDataIntegrationOwnershipLiteral` instead, in both the type-checking import and the lazy return.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| def test_patch_group_role_assignments(self, workos, httpx_mock): | ||
| httpx_mock.add_response(json={}) | ||
| workos.authorization.patch_group_role_assignments("test_group_id") | ||
| request = httpx_mock.get_request() | ||
| assert request.method == "PATCH" | ||
| assert request.url.path.endswith( | ||
| "/authorization/groups/test_group_id/role_assignments" | ||
| ) |
There was a problem hiding this comment.
The new tests for patch_group_role_assignments and update_group_organization_memberships send no add or remove entries, although both methods require at least one entry. They only check the method and URL, so dropping either list or breaking entry serialization would still pass. Add valid nonempty bodies and assert the outgoing JSON for both sync and async methods.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_authorization.py
Line: 107-114
Comment:
**PATCH tests send no updates**
The new tests for `patch_group_role_assignments` and `update_group_organization_memberships` send no `add` or `remove` entries, although both methods require at least one entry. They only check the method and URL, so dropping either list or breaking entry serialization would still pass. Add valid nonempty bodies and assert the outgoing JSON for both sync and async methods.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| cors_origins: list[str] | None = None | ||
| """Origins allowed to call the OAuth token endpoint for this application from a browser.""" |
There was a problem hiding this comment.
Create methods lack CORS option
cors_origins is added to CreateOAuthApplication, but neither create_oauth_application convenience method accepts it. Callers using those methods cannot set the new option at creation time without switching to create_application or making another request. Add and forward the keyword in both convenience methods.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/connect/models/create_oauth_application.py
Line: 29-30
Comment:
**Create methods lack CORS option**
`cors_origins` is added to `CreateOAuthApplication`, but neither `create_oauth_application` convenience method accepts it. Callers using those methods cannot set the new option at creation time without switching to `create_application` or making another request. Add and forward the keyword in both convenience methods.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
feat(events)!: SDK surface change: Parameter type changed for "order" on "Events.list_events"
feat(pipes)!: Change Pipes API surface
feat(user_management)!: Change user management API surface
feat(feature_flags): Add feature flag API surface
FlagRule.FlagTarget.FlagTargetWithRuleId.FlagTargetWithValueType.FeatureFlagsFlagCreated.FeatureFlagsFlagCreatedData.FeatureFlagsFlagCreatedDataOwner.FeatureFlagsFlagCreatedContext.FeatureFlagsFlagCreatedContextActor.FeatureFlagsFlagDeleted.FeatureFlagsFlagDeletedData.FeatureFlagsFlagDeletedDataOwner.FeatureFlagsFlagDeletedContext.FeatureFlagsFlagDeletedContextActor.FeatureFlagsFlagRuleCreated.FeatureFlagsFlagRuleCreatedContext.FeatureFlagsFlagRuleCreatedContextActor.FeatureFlagsFlagRuleDeleted.FeatureFlagsFlagRuleDeletedContext.FeatureFlagsFlagRuleDeletedContextActor.FeatureFlagsFlagRuleUpdated.FeatureFlagsFlagRuleUpdatedContext.FeatureFlagsFlagRuleUpdatedContextActor.FeatureFlagsFlagRuleUpdatedContextPreviousAttribute.FeatureFlagsFlagRuleUpdatedContextPreviousAttributeData.FeatureFlagsFlagUpdated.FeatureFlagsFlagUpdatedData.FeatureFlagsFlagUpdatedDataOwner.FeatureFlagsFlagUpdatedContext.FeatureFlagsFlagUpdatedContextActor.FeatureFlagsFlagUpdatedContextPreviousAttribute.FeatureFlagsFlagUpdatedContextPreviousAttributeData.FeatureFlagsFlagUpdatedContextPreviousAttributeDataOwner.FeatureFlagsFlagTargetCreated.FeatureFlagsFlagTargetCreatedContext.FeatureFlagsFlagTargetCreatedContextActor.FeatureFlagsFlagTargetDeleted.FeatureFlagsFlagTargetDeletedContext.FeatureFlagsFlagTargetDeletedContextActor.FeatureFlagsFlagCreatedContextActorSource.FeatureFlagsFlagDeletedContextActorSource.FeatureFlagsFlagRuleCreatedContextActorSource.FeatureFlagsFlagRuleDeletedContextActorSource.FeatureFlagsFlagRuleUpdatedContextActorSource.FeatureFlagsFlagUpdatedContextActorSource.FeatureFlagsFlagTargetCreatedContextActorSource.FeatureFlagsFlagTargetDeletedContextActorSource.feat(webhooks): Add webhook API surface
feature_flags.flag.createdtoCreateWebhookEndpointEvents.feature_flags.flag.updatedtoCreateWebhookEndpointEvents.feature_flags.flag.deletedtoCreateWebhookEndpointEvents.feature_flags.flag_rule.createdtoCreateWebhookEndpointEvents.feature_flags.flag_rule.updatedtoCreateWebhookEndpointEvents.feature_flags.flag_target.createdtoCreateWebhookEndpointEvents.feature_flags.flag_rule.deletedtoCreateWebhookEndpointEvents.feature_flags.flag_target.deletedtoCreateWebhookEndpointEvents.feature_flags.flag.createdtoUpdateWebhookEndpointEvents.feature_flags.flag.updatedtoUpdateWebhookEndpointEvents.feature_flags.flag.deletedtoUpdateWebhookEndpointEvents.feature_flags.flag_rule.createdtoUpdateWebhookEndpointEvents.feature_flags.flag_rule.updatedtoUpdateWebhookEndpointEvents.feature_flags.flag_target.createdtoUpdateWebhookEndpointEvents.feature_flags.flag_rule.deletedtoUpdateWebhookEndpointEvents.feature_flags.flag_target.deletedtoUpdateWebhookEndpointEvents.fix(events): Updated model
EventSchemaEventSchema.Triggered by workos/openapi-spec@c593dbf
BEGIN_COMMIT_OVERRIDE
feat(events): SDK surface change: Parameter type changed for "order" on "Events.list_events" (#768)
feat(pipes): Change Pipes API surface (#768)
feat(user_management): Change user management API surface (#768)
feat(feature_flags): Add feature flag API surface (#768)
feat(webhooks): Add webhook API surface (#768)
fix(events): Updated model
EventSchema(#768)END_COMMIT_OVERRIDE