public function listCollections($index = '', array $options = [])
    {
        $collectionType = 'all';

        if (empty($index)) {
            if (empty($this->defaultIndex)) {
                throw new InvalidArgumentException('Unable to list collections: no index specified');
            }

            $index = $this->defaultIndex;
        }

        if (array_key_exists('type', $options)) {
            $collectionType = $options['type'];
        }

        $options['httpParams'] = [
            ':type' => $collectionType
        ];

        $query = [
            'body' => [
                'type' => $collectionType
            ]
        ];

        $response = $this->query($this->buildQueryArgs('collection', 'list', $index), $query, $options);

        return $response['result']['collections'];
    }