• This function looks for duplicate users based on the given user. In doing so it checks exact matches, partial address matches and partial name matches.

    Parameters

    • user: Partial<
          {
              birthday?: string;
              city?: string;
              company?: string;
              country?: string;
              email?: string;
              firstName?: string;
              houseNumber?: string;
              id: number;
              lastName?: string;
              notes?: string[];
              phone?: string;
              postCode?: string;
              salutation?: string;
              street?: string;
              timestamp?: string;
              uid_number?: string;
          },
      >

      The user-data that is being checked for duplicates.

    Returns Promise<
        {
            birthday?: string;
            city?: string;
            company?: string;
            country?: string;
            email?: string;
            firstName?: string;
            houseNumber?: string;
            id: number;
            lastName?: string;
            notes?: string[];
            phone?: string;
            postCode?: string;
            salutation?: string;
            street?: string;
            timestamp?: string;
            uid_number?: string;
        }[],
    >

    An array of users that match or partially match the given user-data.