fix(generated): Changes to multi_factor_auth - #556
Conversation
…s/{id}/challenge`
…iKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, OrganizationsDataProviders, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets
|
| # This file is auto-generated by oagen. Do not edit. | ||
|
|
||
| module WorkOS | ||
| class DataIntegrationsListResponseData < WorkOS::Types::BaseModel |
There was a problem hiding this comment.
This directory defines the same top-level models already defined under the collapsed pipes directory. Zeitwerk can register only one source file for each constant, so the other generated implementation is shadowed. This creates two conflicting sources of truth and can silently omit future schema changes made only to the shadowed copy. Keep these shared models in one canonical location.
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/workos/organizations_data_providers/data_integrations_list_response_data.rb
Line: 6
Comment:
**Duplicate model constants**
This directory defines the same top-level models already defined under the collapsed `pipes` directory. Zeitwerk can register only one source file for each constant, so the other generated implementation is shadowed. This creates two conflicting sources of truth and can silently omit future schema changes made only to the shadowed copy. Keep these shared models in one canonical location.
---
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!
| PIPES_ACCOUNT_CONNECTION_ADD_FAILED = "pipes.account_connection.add_failed" | ||
| PIPES_ACCOUNT_CONNECTION_CONNECTED = "pipes.account_connection.connected" | ||
| PIPES_ACCOUNT_CONNECTION_CONNECTION_FAILED = "pipes.account_connection.connection_failed" | ||
| PIPES_ACCOUNT_CONNECTION_DISCONNECTED = "pipes.account_connection.disconnected" | ||
| PIPES_ACCOUNT_CONNECTION_REAUTHORIZATION_NEEDED = "pipes.account_connection.reauthorization_needed" |
There was a problem hiding this comment.
These new pipes.account_connection.* events are not registered in WebhookEvent::EVENT_DATA_MODELS. As a result, construct_event returns their data as a raw Hash even though this PR adds typed models for the payloads. Consumers therefore cannot use those model accessors through the normal webhook parsing path. Register each event with its corresponding data model and cover this dispatch path in a test.
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/workos/types/create_webhook_endpoint_events.rb
Line: 99-103
Comment:
**Events bypass typed parsing**
These new `pipes.account_connection.*` events are not registered in `WebhookEvent::EVENT_DATA_MODELS`. As a result, `construct_event` returns their data as a raw `Hash` even though this PR adds typed models for the payloads. Consumers therefore cannot use those model accessors through the normal webhook parsing path. Register each event with its corresponding data model and cover this dispatch path in a test.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
fix(multi_factor_auth): Change errors for endpoint
POST /auth/factors/{id}/challengePOST /auth/factors/{id}/challenge.Triggered by workos/openapi-spec@949c30c
BEGIN_COMMIT_OVERRIDE
fix(multi_factor_auth): Change errors for endpoint
POST /auth/factors/{id}/challenge(#556)END_COMMIT_OVERRIDE