1313
1414namespace JoliCode \Slack \Api \Endpoint ;
1515
16- class ChannelsLeave extends \Jane \ OpenApiRuntime \ Client \BaseEndpoint implements \Jane \ OpenApiRuntime \Client \Endpoint
16+ class AdminConversationsArchive extends \JoliCode \ Slack \ Api \ Runtime \ Client \BaseEndpoint implements \JoliCode \ Slack \ Api \ Runtime \Client \Endpoint
1717{
18- use \Jane \ OpenApiRuntime \Client \EndpointTrait;
18+ use \JoliCode \ Slack \ Api \ Runtime \Client \EndpointTrait;
1919
2020 /**
21- * Leaves a channel.
21+ * Archive a public or private channel.
2222 *
2323 * @param array $formParameters {
2424 *
25- * @var string $channel Channel to leave
25+ * @var string $channel_id The channel to archive.
2626 * }
2727 *
2828 * @param array $headerParameters {
2929 *
30- * @var string $token Authentication token. Requires scope: `channels :write`
30+ * @var string $token Authentication token. Requires scope: `admin.conversations :write`
3131 * }
3232 */
3333 public function __construct (array $ formParameters = [], array $ headerParameters = [])
@@ -43,7 +43,7 @@ public function getMethod(): string
4343
4444 public function getUri (): string
4545 {
46- return '/channels.leave ' ;
46+ return '/admin.conversations.archive ' ;
4747 }
4848
4949 public function getBody (\Symfony \Component \Serializer \SerializerInterface $ serializer , $ streamFactory = null ): array
@@ -64,10 +64,10 @@ public function getAuthenticationScopes(): array
6464 protected function getFormOptionsResolver (): \Symfony \Component \OptionsResolver \OptionsResolver
6565 {
6666 $ optionsResolver = parent ::getFormOptionsResolver ();
67- $ optionsResolver ->setDefined (['channel ' ]);
68- $ optionsResolver ->setRequired ([]);
67+ $ optionsResolver ->setDefined (['channel_id ' ]);
68+ $ optionsResolver ->setRequired ([' channel_id ' ]);
6969 $ optionsResolver ->setDefaults ([]);
70- $ optionsResolver ->setAllowedTypes ('channel ' , ['string ' ]);
70+ $ optionsResolver ->setAllowedTypes ('channel_id ' , ['string ' ]);
7171
7272 return $ optionsResolver ;
7373 }
@@ -86,14 +86,14 @@ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolv
8686 /**
8787 * {@inheritdoc}
8888 *
89- * @return \JoliCode\Slack\Api\Model\ChannelsLeavePostResponse200 |\JoliCode\Slack\Api\Model\ChannelsLeavePostResponsedefault |null
89+ * @return \JoliCode\Slack\Api\Model\AdminConversationsArchivePostResponse200 |\JoliCode\Slack\Api\Model\AdminConversationsArchivePostResponsedefault |null
9090 */
9191 protected function transformResponseBody (string $ body , int $ status , \Symfony \Component \Serializer \SerializerInterface $ serializer , ?string $ contentType )
9292 {
9393 if (200 === $ status ) {
94- return $ serializer ->deserialize ($ body , 'JoliCode \\Slack \\Api \\Model \\ChannelsLeavePostResponse200 ' , 'json ' );
94+ return $ serializer ->deserialize ($ body , 'JoliCode \\Slack \\Api \\Model \\AdminConversationsArchivePostResponse200 ' , 'json ' );
9595 }
9696
97- return $ serializer ->deserialize ($ body , 'JoliCode \\Slack \\Api \\Model \\ChannelsLeavePostResponsedefault ' , 'json ' );
97+ return $ serializer ->deserialize ($ body , 'JoliCode \\Slack \\Api \\Model \\AdminConversationsArchivePostResponsedefault ' , 'json ' );
9898 }
9999}
0 commit comments