Skip to content

Commit 2b0f5cf

Browse files
authored
Add team_id support for 3 endpoints (#140)
* fix: 🐛 Add team_id support for 3 endpoints * chore: 🤖 Build new SDK with Team ID * chore: 🤖 Update the patch file
1 parent 787c50c commit 2b0f5cf

File tree

6 files changed

+150
-60
lines changed

6 files changed

+150
-60
lines changed

generated/Client.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,6 +2129,7 @@ public function conversationsLeave(array $formParameters = [], array $headerPara
21292129
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
21302130
* @var bool $exclude_archived Set to `true` to exclude archived channels from the list
21312131
* @var int $limit The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.
2132+
* @var string $team_id Encoded team id to list channels in, required if token belongs to org-wide app
21322133
* @var string $token Authentication token. Requires scope: `conversations:read`
21332134
* @var string $types Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`
21342135
* }
@@ -3374,6 +3375,7 @@ public function usergroupsEnable(array $formParameters = [], array $headerParame
33743375
* @var bool $include_count include the number of users in each User Group
33753376
* @var bool $include_disabled include disabled User Groups
33763377
* @var bool $include_users include the list of users for each User Group
3378+
* @var string $team_id Encoded team id to list user groups in, required if org token is used
33773379
* @var string $token Authentication token. Requires scope: `usergroups:read`
33783380
* }
33793381
*
@@ -3557,6 +3559,7 @@ public function usersInfo(array $queryParameters = [], string $fetch = self::FET
35573559
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
35583560
* @var bool $include_locale Set this to `true` to receive the locale for users. Defaults to `false`
35593561
* @var int $limit The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors.
3562+
* @var string $team_id Encoded team id to list users in, required if org token is used
35603563
* @var string $token Authentication token. Requires scope: `users:read`
35613564
* }
35623565
*

generated/Endpoint/ConversationsList.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class ConversationsList extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoint
2525
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
2626
* @var bool $exclude_archived Set to `true` to exclude archived channels from the list
2727
* @var int $limit The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.
28+
* @var string $team_id Encoded team id to list channels in, required if token belongs to org-wide app
2829
* @var string $token Authentication token. Requires scope: `conversations:read`
2930
* @var string $types Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`
3031
* }
@@ -62,12 +63,13 @@ public function getAuthenticationScopes(): array
6263
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
6364
{
6465
$optionsResolver = parent::getQueryOptionsResolver();
65-
$optionsResolver->setDefined(['cursor', 'exclude_archived', 'limit', 'token', 'types']);
66+
$optionsResolver->setDefined(['cursor', 'exclude_archived', 'limit', 'team_id', 'token', 'types']);
6667
$optionsResolver->setRequired([]);
6768
$optionsResolver->setDefaults([]);
6869
$optionsResolver->setAllowedTypes('cursor', ['string']);
6970
$optionsResolver->setAllowedTypes('exclude_archived', ['bool']);
7071
$optionsResolver->setAllowedTypes('limit', ['int']);
72+
$optionsResolver->setAllowedTypes('team_id', ['string']);
7173
$optionsResolver->setAllowedTypes('token', ['string']);
7274
$optionsResolver->setAllowedTypes('types', ['string']);
7375

generated/Endpoint/UsergroupsList.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class UsergroupsList extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoint imp
2525
* @var bool $include_count include the number of users in each User Group
2626
* @var bool $include_disabled include disabled User Groups
2727
* @var bool $include_users include the list of users for each User Group
28+
* @var string $team_id Encoded team id to list user groups in, required if org token is used
2829
* @var string $token Authentication token. Requires scope: `usergroups:read`
2930
* }
3031
*/
@@ -61,12 +62,13 @@ public function getAuthenticationScopes(): array
6162
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
6263
{
6364
$optionsResolver = parent::getQueryOptionsResolver();
64-
$optionsResolver->setDefined(['include_count', 'include_disabled', 'include_users', 'token']);
65+
$optionsResolver->setDefined(['include_count', 'include_disabled', 'include_users', 'team_id', 'token']);
6566
$optionsResolver->setRequired([]);
6667
$optionsResolver->setDefaults([]);
6768
$optionsResolver->setAllowedTypes('include_count', ['bool']);
6869
$optionsResolver->setAllowedTypes('include_disabled', ['bool']);
6970
$optionsResolver->setAllowedTypes('include_users', ['bool']);
71+
$optionsResolver->setAllowedTypes('team_id', ['string']);
7072
$optionsResolver->setAllowedTypes('token', ['string']);
7173

7274
return $optionsResolver;

generated/Endpoint/UsersList.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class UsersList extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoint implemen
2525
* @var string $cursor Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
2626
* @var bool $include_locale Set this to `true` to receive the locale for users. Defaults to `false`
2727
* @var int $limit The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors.
28+
* @var string $team_id Encoded team id to list users in, required if org token is used
2829
* @var string $token Authentication token. Requires scope: `users:read`
2930
* }
3031
*/
@@ -61,12 +62,13 @@ public function getAuthenticationScopes(): array
6162
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
6263
{
6364
$optionsResolver = parent::getQueryOptionsResolver();
64-
$optionsResolver->setDefined(['cursor', 'include_locale', 'limit', 'token']);
65+
$optionsResolver->setDefined(['cursor', 'include_locale', 'limit', 'team_id', 'token']);
6566
$optionsResolver->setRequired([]);
6667
$optionsResolver->setDefaults([]);
6768
$optionsResolver->setAllowedTypes('cursor', ['string']);
6869
$optionsResolver->setAllowedTypes('include_locale', ['bool']);
6970
$optionsResolver->setAllowedTypes('limit', ['int']);
71+
$optionsResolver->setAllowedTypes('team_id', ['string']);
7072
$optionsResolver->setAllowedTypes('token', ['string']);
7173

7274
return $optionsResolver;

resources/slack-openapi-patched.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14241,6 +14241,12 @@
1424114241
"name": "limit",
1424214242
"type": "integer"
1424314243
},
14244+
{
14245+
"description": "Encoded team id to list channels in, required if token belongs to org-wide app",
14246+
"in": "query",
14247+
"name": "team_id",
14248+
"type": "string"
14249+
},
1424414250
{
1424514251
"description": "Authentication token. Requires scope: `conversations:read`",
1424614252
"in": "query",
@@ -23150,6 +23156,12 @@
2315023156
"name": "include_users",
2315123157
"type": "boolean"
2315223158
},
23159+
{
23160+
"description": "Encoded team id to list user groups in, required if org token is used",
23161+
"in": "query",
23162+
"name": "team_id",
23163+
"type": "string"
23164+
},
2315323165
{
2315423166
"description": "Authentication token. Requires scope: `usergroups:read`",
2315523167
"in": "query",
@@ -24816,6 +24828,12 @@
2481624828
"name": "limit",
2481724829
"type": "integer"
2481824830
},
24831+
{
24832+
"description": "Encoded team id to list users in, required if org token is used",
24833+
"in": "query",
24834+
"name": "team_id",
24835+
"type": "string"
24836+
},
2481924837
{
2482024838
"description": "Authentication token. Requires scope: `users:read`",
2482124839
"in": "query",

0 commit comments

Comments
 (0)