feat(generated)!: regenerate from spec (6 changes)#489
feat(generated)!: regenerate from spec (6 changes)#489workos-sdk-automation[bot] wants to merge 8 commits into
Conversation
…s to dedicated service
Greptile SummaryThis auto-generated PR consolidates audit log and webhook models (dropping
Confidence Score: 4/5Safe to merge with one fix: the wrong schema class reference in AuditLogAction must be corrected before this reaches production. The org-membership extraction and model consolidations are clean. The one concrete defect is in AuditLogAction#initialize: after AuditLogSchema was renamed to AuditLogSchemaDto, the generator wired the schema field to AuditLogSchemaJson, a different unrelated class, so every AuditLogAction instance returned from list_actions will expose a schema object of the wrong type. lib/workos/audit_logs/audit_log_action.rb — the schema field instantiates the wrong class. Important Files Changed
|
| require "json" | ||
| require "openssl" | ||
|
|
||
| module WorkOS | ||
| class Webhooks |
There was a problem hiding this comment.
The auto-generator added
require "openssl" at the top of the file, but the hand-maintained @oagen-ignore-start block at line 133 already contains an identical require "openssl". Ruby's require is idempotent so this is harmless, but the top-level declaration is redundant and could be removed to keep the generated/manual boundary clean.
| require "json" | |
| require "openssl" | |
| module WorkOS | |
| class Webhooks | |
| require "json" | |
| module WorkOS | |
| class Webhooks |
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!
| @object = hash[:object] | ||
| @name = hash[:name] | ||
| @schema = hash[:schema] ? WorkOS::AuditLogSchema.new(hash[:schema]) : nil | ||
| @schema = hash[:schema] ? WorkOS::AuditLogSchemaJson.new(hash[:schema]) : nil |
There was a problem hiding this comment.
Wrong schema class after rename
The old code referenced WorkOS::AuditLogSchema, which was renamed to WorkOS::AuditLogSchemaDto in this PR. The updated code should use WorkOS::AuditLogSchemaDto, but instead it now references WorkOS::AuditLogSchemaJson — a separate, pre-existing class with a different field set (object, version, actor, targets, metadata, created_at) vs. what AuditLogSchemaDto exposes (actor, targets, metadata). Any caller reading AuditLogAction#schema will receive the wrong object type, and typed code relying on the .rbi annotation will break at runtime.
| @schema = hash[:schema] ? WorkOS::AuditLogSchemaJson.new(hash[:schema]) : nil | |
| @schema = hash[:schema] ? WorkOS::AuditLogSchemaDto.new(hash[:schema]) : nil |
Summary
feat(authorization)!: Remove search param from listResources operation
searchparameter fromlist_resourcesmethodfeat(authorization): Add filtering parameters to role assignment operations
resource_id,resource_external_id,resource_type_slugoptional parameters tolist_role_assignmentsrole_slugoptional parameter tolist_role_assignments_for_resource_by_external_idrole_slugoptional parameter tolist_role_assignments_for_resourcefeat(organization_membership): Extract organization membership methods to dedicated service
OrganizationMembershipServicewith all organization membership operationslist_organization_memberships,create_organization_membership,get_organization_membership,update_organization_membership,delete_organization_membership,deactivate_organization_membership,reactivate_organization_membershipfromUserManagementtoOrganizationMembershipServicelist_organization_membership_groupsfromUserManagementOrganizationMembershipGroupstoOrganizationMembershipServiceorganization_membershipmethod instead ofuser_management_organization_membership_groupschore(audit_logs): Consolidate audit log action and export models
AuditLogActionJsontoAuditLogActionand updated base classAuditLogExportJsontoAuditLogExportand updated base classAuditLogSchematoAuditLogSchemaDtoAuditLogsservice_Jsonsuffix variants from type definitionschore(webhooks): Consolidate webhook endpoint models
WebhookEndpointJsontoWebhookEndpointBaseModel.normalize_Jsonsuffix variantchore(generated): Regenerate manifest and types with model consolidation
.oagen-manifest.jsonwith consolidated model references and new service mappings_Jsonsuffixed type filesorganization_membership_serviceto manifestTriggered by workos/openapi-spec@146a9a6
BEGIN_COMMIT_OVERRIDE
feat(authorization)!: Remove search param from listResources operation (#489)
feat(authorization): Add filtering parameters to role assignment operations (#489)
feat(organization_membership): Extract organization membership methods to dedicated service (#489)
chore(audit_logs): Consolidate audit log action and export models (#489)
chore(webhooks): Consolidate webhook endpoint models (#489)
chore(generated): Regenerate manifest and types with model consolidation (#489)
END_COMMIT_OVERRIDE