From 0570550999e68ed6d7d5dc321dcb9f83a6ea892e Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Thu, 24 Sep 2026 14:13:40 +0000 Subject: [PATCH 1/2] chore(generated): regenerate shared files for Authorization --- .last-synced-sha | 2 +- .oagen-manifest.json | 2 ++ lib/Resource/UserRoleAssignmentSource.php | 4 +++ .../UserRoleAssignmentSourceGroup.php | 36 +++++++++++++++++++ tests/Fixtures/list_user_role_assignment.json | 3 +- tests/Fixtures/user_role_assignment.json | 3 +- .../Fixtures/user_role_assignment_source.json | 3 +- .../user_role_assignment_source_group.json | 4 +++ 8 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 lib/Resource/UserRoleAssignmentSourceGroup.php create mode 100644 tests/Fixtures/user_role_assignment_source_group.json diff --git a/.last-synced-sha b/.last-synced-sha index b7efc9db..89fbe35a 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -13ba15b32754d2d635b7799ab779867df2b611d6 +6f037208ce812063908f97744b4aaf4fdf570351 diff --git a/.oagen-manifest.json b/.oagen-manifest.json index d73f28ef..07a40923 100644 --- a/.oagen-manifest.json +++ b/.oagen-manifest.json @@ -642,6 +642,7 @@ "lib/Resource/UserRoleAssignment.php", "lib/Resource/UserRoleAssignmentResource.php", "lib/Resource/UserRoleAssignmentSource.php", + "lib/Resource/UserRoleAssignmentSourceGroup.php", "lib/Resource/UserRoleAssignmentSourceType.php", "lib/Resource/UserSessionsAuthMethod.php", "lib/Resource/UserSessionsImpersonator.php", @@ -1336,6 +1337,7 @@ "tests/Fixtures/user_role_assignment.json", "tests/Fixtures/user_role_assignment_resource.json", "tests/Fixtures/user_role_assignment_source.json", + "tests/Fixtures/user_role_assignment_source_group.json", "tests/Fixtures/user_sessions_impersonator.json", "tests/Fixtures/user_sessions_list_item.json", "tests/Fixtures/user_updated.json", diff --git a/lib/Resource/UserRoleAssignmentSource.php b/lib/Resource/UserRoleAssignmentSource.php index d8dcd5d5..4b059c93 100644 --- a/lib/Resource/UserRoleAssignmentSource.php +++ b/lib/Resource/UserRoleAssignmentSource.php @@ -16,6 +16,8 @@ public function __construct( public UserRoleAssignmentSourceType $type, /** The ID of the group role assignment the role was derived from, or null if direct. */ public ?string $groupRoleAssignmentId, + /** The group the role was derived from, or null if direct. */ + public ?UserRoleAssignmentSourceGroup $group, ) { } @@ -24,6 +26,7 @@ public static function fromArray(array $data): self return new self( type: UserRoleAssignmentSourceType::from($data['type']), groupRoleAssignmentId: $data['group_role_assignment_id'] ?? null, + group: isset($data['group']) ? UserRoleAssignmentSourceGroup::fromArray($data['group']) : null, ); } @@ -32,6 +35,7 @@ public function toArray(): array return [ 'type' => $this->type->value, 'group_role_assignment_id' => $this->groupRoleAssignmentId, + 'group' => $this->group?->toArray(), ]; } } diff --git a/lib/Resource/UserRoleAssignmentSourceGroup.php b/lib/Resource/UserRoleAssignmentSourceGroup.php new file mode 100644 index 00000000..613396c6 --- /dev/null +++ b/lib/Resource/UserRoleAssignmentSourceGroup.php @@ -0,0 +1,36 @@ + $this->id, + 'name' => $this->name, + ]; + } +} diff --git a/tests/Fixtures/list_user_role_assignment.json b/tests/Fixtures/list_user_role_assignment.json index ac0737ac..a4339b6e 100644 --- a/tests/Fixtures/list_user_role_assignment.json +++ b/tests/Fixtures/list_user_role_assignment.json @@ -14,7 +14,8 @@ }, "source": { "type": "direct", - "group_role_assignment_id": null + "group_role_assignment_id": null, + "group": null }, "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" diff --git a/tests/Fixtures/user_role_assignment.json b/tests/Fixtures/user_role_assignment.json index ae717059..ae7557b5 100644 --- a/tests/Fixtures/user_role_assignment.json +++ b/tests/Fixtures/user_role_assignment.json @@ -12,7 +12,8 @@ }, "source": { "type": "direct", - "group_role_assignment_id": null + "group_role_assignment_id": null, + "group": null }, "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" diff --git a/tests/Fixtures/user_role_assignment_source.json b/tests/Fixtures/user_role_assignment_source.json index 2cdf69f3..047cbccc 100644 --- a/tests/Fixtures/user_role_assignment_source.json +++ b/tests/Fixtures/user_role_assignment_source.json @@ -1,4 +1,5 @@ { "type": "direct", - "group_role_assignment_id": null + "group_role_assignment_id": null, + "group": null } diff --git a/tests/Fixtures/user_role_assignment_source_group.json b/tests/Fixtures/user_role_assignment_source_group.json new file mode 100644 index 00000000..ab425e71 --- /dev/null +++ b/tests/Fixtures/user_role_assignment_source_group.json @@ -0,0 +1,4 @@ +{ + "id": "group_01HXYZ123456789ABCDEFGHIJ", + "name": "Marketing team" +} From 4213d0d8e07045ab8c09342e615a97450debfb59 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Thu, 24 Sep 2026 14:13:55 +0000 Subject: [PATCH 2/2] chore(generated): add release notes fragment --- ...-24T14-13-55-e2873c2f2c846fa33dcbdadaba761c23faaf2cbd.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changelog-pending/2026-09-24T14-13-55-e2873c2f2c846fa33dcbdadaba761c23faaf2cbd.md diff --git a/.changelog-pending/2026-09-24T14-13-55-e2873c2f2c846fa33dcbdadaba761c23faaf2cbd.md b/.changelog-pending/2026-09-24T14-13-55-e2873c2f2c846fa33dcbdadaba761c23faaf2cbd.md new file mode 100644 index 00000000..bd7c55aa --- /dev/null +++ b/.changelog-pending/2026-09-24T14-13-55-e2873c2f2c846fa33dcbdadaba761c23faaf2cbd.md @@ -0,0 +1,6 @@ +* [#447](https://github.com/workos/workos-php/pull/447) feat(generated): regenerate from spec + + **Features** + * **[user_management](https://workos.com/docs/reference/authkit/user)**: + * Added model `UserRoleAssignmentSourceGroup` + * Added `group` to `UserRoleAssignmentSource`