diff --git a/.changelog-pending/2026-06-25T20-30-52-053f61e91f935b7602605a97e69c6db058ecabed.md b/.changelog-pending/2026-06-25T20-30-52-053f61e91f935b7602605a97e69c6db058ecabed.md new file mode 100644 index 00000000..c8073866 --- /dev/null +++ b/.changelog-pending/2026-06-25T20-30-52-053f61e91f935b7602605a97e69c6db058ecabed.md @@ -0,0 +1,5 @@ +* [#114](https://github.com/workos/workos-rust/pull/114) fix(generated): regenerate from spec + + **Fixes** + * **[organization_membership](https://workos.com/docs/reference/authkit/organization-membership)**: + * Added `roles` to organization membership models diff --git a/.last-synced-sha b/.last-synced-sha index 409f7391..d5b98283 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -b6a68da8bd60c1478e0a86ca97c75448677e8871 +1a2f47b20f63f2c8f0eb56bbd2adb3b5947d693a diff --git a/src/models/organization_membership.rs b/src/models/organization_membership.rs index 2dc7f7bc..390b30a0 100644 --- a/src/models/organization_membership.rs +++ b/src/models/organization_membership.rs @@ -31,6 +31,8 @@ pub struct OrganizationMembership { pub updated_at: String, /// The primary role assigned to the user within the organization. pub role: SlimRole, + /// The list of roles assigned to the user within the organization. + pub roles: Vec, /// The user that belongs to the organization through this membership. pub user: User, } diff --git a/src/models/user_organization_membership.rs b/src/models/user_organization_membership.rs index b6527876..6bf0495c 100644 --- a/src/models/user_organization_membership.rs +++ b/src/models/user_organization_membership.rs @@ -31,6 +31,8 @@ pub struct UserOrganizationMembership { pub updated_at: String, /// The primary role assigned to the user within the organization. pub role: SlimRole, + /// The list of roles assigned to the user within the organization. + pub roles: Vec, /// The user that belongs to the organization through this membership. pub user: User, } diff --git a/tests/fixtures/organization_membership.json b/tests/fixtures/organization_membership.json index b6e2d198..456d4794 100644 --- a/tests/fixtures/organization_membership.json +++ b/tests/fixtures/organization_membership.json @@ -22,5 +22,10 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" - } + }, + "roles": [ + { + "slug": "admin" + } + ] } diff --git a/tests/fixtures/user_organization_membership.json b/tests/fixtures/user_organization_membership.json index ba20f549..c4e3c34a 100644 --- a/tests/fixtures/user_organization_membership.json +++ b/tests/fixtures/user_organization_membership.json @@ -22,5 +22,10 @@ "last_sign_in_at": "2025-06-25T19:07:33.155Z", "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" - } + }, + "roles": [ + { + "slug": "admin" + } + ] } diff --git a/tests/fixtures/user_organization_membership_list.json b/tests/fixtures/user_organization_membership_list.json index f8d23bea..75b94837 100644 --- a/tests/fixtures/user_organization_membership_list.json +++ b/tests/fixtures/user_organization_membership_list.json @@ -13,6 +13,11 @@ "role": { "slug": "admin" }, + "roles": [ + { + "slug": "admin" + } + ], "user": { "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5",