Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add team_id support for 3 endpoints #140

Merged
merged 3 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions generated/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,7 @@ public function conversationsLeave(array $formParameters = [], array $headerPara
* @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.
* @var bool $exclude_archived Set to `true` to exclude archived channels from the list
* @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.
* @var string $team_id Encoded team id to list channels in, required if token belongs to org-wide app
* @var string $token Authentication token. Requires scope: `conversations:read`
* @var string $types Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`
* }
Expand Down Expand Up @@ -3374,6 +3375,7 @@ public function usergroupsEnable(array $formParameters = [], array $headerParame
* @var bool $include_count include the number of users in each User Group
* @var bool $include_disabled include disabled User Groups
* @var bool $include_users include the list of users for each User Group
* @var string $team_id Encoded team id to list user groups in, required if org token is used
* @var string $token Authentication token. Requires scope: `usergroups:read`
* }
*
Expand Down Expand Up @@ -3557,6 +3559,7 @@ public function usersInfo(array $queryParameters = [], string $fetch = self::FET
* @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.
* @var bool $include_locale Set this to `true` to receive the locale for users. Defaults to `false`
* @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.
* @var string $team_id Encoded team id to list users in, required if org token is used
* @var string $token Authentication token. Requires scope: `users:read`
* }
*
Expand Down
4 changes: 3 additions & 1 deletion generated/Endpoint/ConversationsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ConversationsList extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoint
* @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.
* @var bool $exclude_archived Set to `true` to exclude archived channels from the list
* @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.
* @var string $team_id Encoded team id to list channels in, required if token belongs to org-wide app
* @var string $token Authentication token. Requires scope: `conversations:read`
* @var string $types Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`
* }
Expand Down Expand Up @@ -62,12 +63,13 @@ public function getAuthenticationScopes(): array
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
{
$optionsResolver = parent::getQueryOptionsResolver();
$optionsResolver->setDefined(['cursor', 'exclude_archived', 'limit', 'token', 'types']);
$optionsResolver->setDefined(['cursor', 'exclude_archived', 'limit', 'team_id', 'token', 'types']);
$optionsResolver->setRequired([]);
$optionsResolver->setDefaults([]);
$optionsResolver->setAllowedTypes('cursor', ['string']);
$optionsResolver->setAllowedTypes('exclude_archived', ['bool']);
$optionsResolver->setAllowedTypes('limit', ['int']);
$optionsResolver->setAllowedTypes('team_id', ['string']);
$optionsResolver->setAllowedTypes('token', ['string']);
$optionsResolver->setAllowedTypes('types', ['string']);

Expand Down
4 changes: 3 additions & 1 deletion generated/Endpoint/UsergroupsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class UsergroupsList extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoint imp
* @var bool $include_count include the number of users in each User Group
* @var bool $include_disabled include disabled User Groups
* @var bool $include_users include the list of users for each User Group
* @var string $team_id Encoded team id to list user groups in, required if org token is used
* @var string $token Authentication token. Requires scope: `usergroups:read`
* }
*/
Expand Down Expand Up @@ -61,12 +62,13 @@ public function getAuthenticationScopes(): array
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
{
$optionsResolver = parent::getQueryOptionsResolver();
$optionsResolver->setDefined(['include_count', 'include_disabled', 'include_users', 'token']);
$optionsResolver->setDefined(['include_count', 'include_disabled', 'include_users', 'team_id', 'token']);
$optionsResolver->setRequired([]);
$optionsResolver->setDefaults([]);
$optionsResolver->setAllowedTypes('include_count', ['bool']);
$optionsResolver->setAllowedTypes('include_disabled', ['bool']);
$optionsResolver->setAllowedTypes('include_users', ['bool']);
$optionsResolver->setAllowedTypes('team_id', ['string']);
$optionsResolver->setAllowedTypes('token', ['string']);

return $optionsResolver;
Expand Down
4 changes: 3 additions & 1 deletion generated/Endpoint/UsersList.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class UsersList extends \JoliCode\Slack\Api\Runtime\Client\BaseEndpoint implemen
* @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.
* @var bool $include_locale Set this to `true` to receive the locale for users. Defaults to `false`
* @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.
* @var string $team_id Encoded team id to list users in, required if org token is used
* @var string $token Authentication token. Requires scope: `users:read`
* }
*/
Expand Down Expand Up @@ -61,12 +62,13 @@ public function getAuthenticationScopes(): array
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
{
$optionsResolver = parent::getQueryOptionsResolver();
$optionsResolver->setDefined(['cursor', 'include_locale', 'limit', 'token']);
$optionsResolver->setDefined(['cursor', 'include_locale', 'limit', 'team_id', 'token']);
$optionsResolver->setRequired([]);
$optionsResolver->setDefaults([]);
$optionsResolver->setAllowedTypes('cursor', ['string']);
$optionsResolver->setAllowedTypes('include_locale', ['bool']);
$optionsResolver->setAllowedTypes('limit', ['int']);
$optionsResolver->setAllowedTypes('team_id', ['string']);
$optionsResolver->setAllowedTypes('token', ['string']);

return $optionsResolver;
Expand Down
18 changes: 18 additions & 0 deletions resources/slack-openapi-patched.json
Original file line number Diff line number Diff line change
Expand Up @@ -14241,6 +14241,12 @@
"name": "limit",
"type": "integer"
},
{
"description": "Encoded team id to list channels in, required if token belongs to org-wide app",
"in": "query",
"name": "team_id",
"type": "string"
},
{
"description": "Authentication token. Requires scope: `conversations:read`",
"in": "query",
Expand Down Expand Up @@ -23150,6 +23156,12 @@
"name": "include_users",
"type": "boolean"
},
{
"description": "Encoded team id to list user groups in, required if org token is used",
"in": "query",
"name": "team_id",
"type": "string"
},
{
"description": "Authentication token. Requires scope: `usergroups:read`",
"in": "query",
Expand Down Expand Up @@ -24816,6 +24828,12 @@
"name": "limit",
"type": "integer"
},
{
"description": "Encoded team id to list users in, required if org token is used",
"in": "query",
"name": "team_id",
"type": "string"
},
{
"description": "Authentication token. Requires scope: `users:read`",
"in": "query",
Expand Down
Loading