public function all($query)
    {
        $authSession = $this->repositoryDispatcher->getCookieAuthSession();

        $response = $this->client->request('POST', $this->endpoint . '/rest/api/2/search', [
            RequestOptions::HEADERS => [
                'Cookie' => $authSession->getName() . '=' . $authSession->getValue(),
            ],
            RequestOptions::JSON => $query,
        ]);

        $body = $response->getBody();
        $body->seek(0);
        $contents = $body->getContents();

        $decodedContents = json_decode($contents, true);

        $issues = [];
        if (isset($decodedContents['issues']) && is_array($decodedContents['issues'])) {
            foreach ($decodedContents['issues'] as $issue) {
                $issues[] = $this->createInstance($issue);
            }
        }

        return $issues;
    }