import re


def get_wiki_links(text: str) -> list:
    """
    Get all wiki links from the given text and return a list of them.
    Each list item is a dictionary with the following keys:
    - wiki_link: the exact match
    - link: the extracted link
    - text: the possible extracted text
    """
    wiki_links = []
    wiki_link_regex = r'\[\[(.*?)\]\]'
    for match in re.finditer(wiki_link_regex, text):
        out = {
            "wiki_link": match.group(),
        }

        if '|' in match.group(1):
            out['link'], out['text'] = match.group(1).split('|')
        else:
            out['link'] = match.group(1)
            out['text'] = match.group(1)

        # if the link ends with `_index` remove it
        if out['link'].endswith('_index'):
            out['link'] = out['link'][:-6]

        wiki_links.append(out)
    return wiki_links