from typing import Dict
from typing import Any
from typing import List
import requests


def find_employees_by_work_history(
    company_url: str, auth_dict: Dict[str, Any]
) -> List[int]:
    """
    Finds a list of employee coresignal id numbers based on where the employees worked.

    Args
    ------

        company_url: HttpUrl
            the linkedin_url of the company you want to find past employees of.

        auth_dict: auth_dict
            the authorization header. Check here for instructions on how to make this

    Returns
    --------

        person_ids: List[int]
            list of strings where every item is an id number of someone who worked at the target comapny
    """
    url = "https://api.coresignal.com/dbapi/v1/search/member"
    data = {"experience_company_linkedin_url": company_url}
    response = requests.post(url, headers=auth_dict, json=data)
    t = [int(x) for x in response.text[1:-1].split(",")]
    return t