api.routes.internal.contact.match ================================= .. py:module:: api.routes.internal.contact.match Attributes ---------- .. autoapisummary:: api.routes.internal.contact.match.logger api.routes.internal.contact.match.router Classes ------- .. autoapisummary:: api.routes.internal.contact.match.MatchIn Functions --------- .. autoapisummary:: api.routes.internal.contact.match.match_emails api.routes.internal.contact.match.match_contacts Module Contents --------------- .. py:data:: logger .. py:data:: router .. py:class:: MatchIn Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: emails :type: list[str] .. py:function:: match_emails(emails: list[str], contacts: list[dict]) -> tuple[dict[str, list[str]], dict[str, list[str]]] (emails that are a contact -> their Entreprise ids, domains of those emails that a contact also uses -> Entreprise ids). Pure: tested alone. .. py:function:: match_contacts(payload: MatchIn) One Airtable pass for a whole list (the U3000 campaign page imports hundreds of addresses): ``clients`` = exact email matches, ``domains`` = domains of the list that a known contact also uses. Values = company names. Generic hosts (gmail.com...) are filtered by the caller, which owns that list.