From 74f38e970f411fc557d788f97940a55991ca7900 Mon Sep 17 00:00:00 2001 From: Maarten Paauw Date: Sun, 30 Aug 2026 21:01:42 +0200 Subject: [PATCH] feat(usergroups): Add missing team_id argument to usergroups.users.list The `team_id` query parameter is documented by Slack as an optional argument for `usergroups.users.list` ("The user group's encoded team ID. Required if org token is used."), but it was absent from the patched OpenAPI spec, so the generated endpoint rejected it with an UndefinedOptionsException. Add it to resources/slack-openapi-patched.json (matching the existing team_id override on usergroups.list), refresh the community patch file, and regenerate the affected endpoint code. Ref: https://docs.slack.dev/reference/methods/usergroups.users.list Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01CXAVNUu5y3nHkfzq2TdNfX --- CHANGELOG.md | 1 + generated/Client.php | 1 + generated/Endpoint/UsergroupsUsersList.php | 4 +- resources/slack-openapi-patched.json | 6 +++ resources/slack-openapi-sorted.patch | 44 ++++++++++++---------- 5 files changed, 36 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb64c108..b0d2591b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Upgrade JanePHP generated code +* **Specification override** Add the missing `team_id` argument to the `usergroups.users.list` endpoint ## 4.9.0 (2026-03-10) diff --git a/generated/Client.php b/generated/Client.php index 1ff1b96c..97f46325 100644 --- a/generated/Client.php +++ b/generated/Client.php @@ -3475,6 +3475,7 @@ public function usergroupsUpdate(array $formParameters = [], array $headerParame * @param array $queryParameters { * * @var bool $include_disabled allow results that involve disabled User Groups + * @var string $team_id The user group's encoded team ID. Required if org token is used. * @var string $token Authentication token. Requires scope: `usergroups:read` * @var string $usergroup The encoded ID of the User Group to read. * } diff --git a/generated/Endpoint/UsergroupsUsersList.php b/generated/Endpoint/UsergroupsUsersList.php index 5271c950..ab375f6d 100644 --- a/generated/Endpoint/UsergroupsUsersList.php +++ b/generated/Endpoint/UsergroupsUsersList.php @@ -23,6 +23,7 @@ class UsergroupsUsersList extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoin * @param array $queryParameters { * * @var bool $include_disabled allow results that involve disabled User Groups + * @var string $team_id The user group's encoded team ID. Required if org token is used. * @var string $token Authentication token. Requires scope: `usergroups:read` * @var string $usergroup The encoded ID of the User Group to read. * } @@ -60,10 +61,11 @@ public function getAuthenticationScopes(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['include_disabled', 'token', 'usergroup']); + $optionsResolver->setDefined(['include_disabled', 'team_id', 'token', 'usergroup']); $optionsResolver->setRequired(['usergroup']); $optionsResolver->setDefaults([]); $optionsResolver->addAllowedTypes('include_disabled', ['bool']); + $optionsResolver->addAllowedTypes('team_id', ['string']); $optionsResolver->addAllowedTypes('token', ['string']); $optionsResolver->addAllowedTypes('usergroup', ['string']); diff --git a/resources/slack-openapi-patched.json b/resources/slack-openapi-patched.json index bf681888..e67098e3 100644 --- a/resources/slack-openapi-patched.json +++ b/resources/slack-openapi-patched.json @@ -23908,6 +23908,12 @@ "name": "include_disabled", "type": "boolean" }, + { + "description": "The user group's encoded team ID. Required if org token is used.", + "in": "query", + "name": "team_id", + "type": "string" + }, { "description": "Authentication token. Requires scope: `usergroups:read`", "in": "query", diff --git a/resources/slack-openapi-sorted.patch b/resources/slack-openapi-sorted.patch index 266a307e..d6ef3852 100644 --- a/resources/slack-openapi-sorted.patch +++ b/resources/slack-openapi-sorted.patch @@ -4658,13 +4658,19 @@ "type": "string" } ], -@@ -23504,25 +23905,24 @@ +@@ -23504,25 +23905,30 @@ { "description": "Allow results that involve disabled User Groups.", "in": "query", "name": "include_disabled", "type": "boolean" }, ++ { ++ "description": "The user group's encoded team ID. Required if org token is used.", ++ "in": "query", ++ "name": "team_id", ++ "type": "string" ++ }, { "description": "Authentication token. Requires scope: `usergroups:read`", "in": "query", @@ -4685,7 +4691,7 @@ "application/json" ], "responses": { -@@ -23644,21 +24044,20 @@ +@@ -23644,21 +24050,20 @@ { "description": "Include the number of users in the User Group.", "in": "formData", @@ -4707,7 +4713,7 @@ "type": "string" }, { -@@ -24036,21 +24435,20 @@ +@@ -24036,21 +24441,20 @@ "externalDocs": { "description": "API method documentation", "url": "https://api.slack.com/methods/users.deletePhoto" @@ -4729,7 +4735,7 @@ "200": { "description": "Typical success response", "examples": { -@@ -24147,21 +24545,20 @@ +@@ -24147,21 +24551,20 @@ "externalDocs": { "description": "API method documentation", "url": "https://api.slack.com/methods/users.getPresence" @@ -4751,7 +4757,7 @@ } ], "produces": [ -@@ -24630,21 +25027,20 @@ +@@ -24630,21 +25033,20 @@ { "description": "Set this to `true` to receive the locale for this user. Defaults to `false`", "in": "query", @@ -4773,7 +4779,7 @@ } ], "produces": [ -@@ -24782,38 +25178,44 @@ +@@ -24782,38 +25184,44 @@ "application/x-www-form-urlencoded" ], "description": "Lists all users in a Slack team.", @@ -4824,7 +4830,7 @@ "application/json" ], "responses": { -@@ -25011,28 +25413,26 @@ +@@ -25011,28 +25419,26 @@ "externalDocs": { "description": "API method documentation", "url": "https://api.slack.com/methods/users.lookupByEmail" @@ -4853,7 +4859,7 @@ "200": { "description": "Typical success response", "examples": { -@@ -25175,21 +25575,20 @@ +@@ -25175,21 +25581,20 @@ { "description": "Include labels for each ID in custom profile fields", "in": "query", @@ -4875,7 +4881,7 @@ } ], "produces": [ -@@ -25330,21 +25729,20 @@ +@@ -25330,21 +25735,20 @@ { "description": "Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.", "in": "formData", @@ -4897,7 +4903,7 @@ }, { "description": "Value to set a single key to. Usable only if `profile` is not passed.", -@@ -25491,21 +25889,20 @@ +@@ -25491,21 +25895,20 @@ "externalDocs": { "description": "API method documentation", "url": "https://api.slack.com/methods/users.setActive" @@ -4919,7 +4925,7 @@ "200": { "description": "Typical success response", "examples": { -@@ -25625,21 +26022,20 @@ +@@ -25625,21 +26028,20 @@ { "description": "File contents via `multipart/form-data`.", "in": "formData", @@ -4941,7 +4947,7 @@ "200": { "description": "Typical success response", "examples": { -@@ -25814,21 +26210,20 @@ +@@ -25814,21 +26216,20 @@ "description": "Either `auto` or `away`", "in": "formData", "name": "presence", @@ -4963,7 +4969,7 @@ "200": { "description": "Typical success response", "examples": { -@@ -25910,49 +26305,48 @@ +@@ -25910,49 +26311,48 @@ "users:write" ] } @@ -5016,7 +5022,7 @@ ], "responses": { "200": { -@@ -26053,55 +26447,54 @@ +@@ -26053,55 +26453,54 @@ "none" ] } @@ -5076,7 +5082,7 @@ ], "responses": { "200": { -@@ -26192,49 +26585,48 @@ +@@ -26192,49 +26591,48 @@ "none" ] } @@ -5129,7 +5135,7 @@ ], "responses": { "200": { -@@ -26341,60 +26733,59 @@ +@@ -26341,60 +26739,59 @@ "none" ] } @@ -5195,7 +5201,7 @@ "responses": { "200": { "description": "Typical success response includes the updated view payload.", -@@ -26496,48 +26887,47 @@ +@@ -26496,48 +26893,47 @@ "none" ] } @@ -5247,7 +5253,7 @@ ], "responses": { "200": { -@@ -26592,49 +26982,48 @@ +@@ -26592,49 +26988,48 @@ "workflow.steps:execute" ] } @@ -5300,7 +5306,7 @@ ], "responses": { "200": { -@@ -26689,66 +27078,65 @@ +@@ -26689,66 +27084,65 @@ "workflow.steps:execute" ] }