<?php

namespace NoahVet\Reef\Business\Enumerator;

use NoahVet\Reef\Jane\Model\VeterinaryEstablishmentResponse;
use NoahVet\Reef\Jane\Model\VeterinaryEstablishmentUserResponse;

/**
 * @psalm-type VeterinaryEstablishmentTeamMembersFilter = array{
 *      id?: string[],
 *      jobTitle?: string[],
 *      department?: string[],
 *      userId?: string[],
 *      veterinaryEstablishmentId?: string[],
 *      veterinaryServiceOptionId?: string[],
 *      fromCreatedDate?: string[],
 *      fromUpdatedDate?: string[],
 *      fromEntryDate?: string[],
 *      fromExitDate?: string[],
 *      fromServiceSubscriptionStartDate?: string[],
 *      fromServiceSubscriptionEndDate?: string[],
 *      toCreatedDate?: string[],
 *      toUpdatedDate?: string[],
 *      toEntryDate?: string[],
 *      toExitDate?: string[],
 *      toServiceSubscriptionStartDate?: string[],
 *      toServiceSubscriptionEndDate?: string[],
 *      sortCreatedDate?: string,
 *      sortUpdatedDatesortCreatedDate?: string,
 *      sortEntryDatesortCreatedDate?: string,
 *      sortExitDatesortCreatedDate?: string,
 *      sortJobTitlesortCreatedDate?: string
 *   }
 */
interface VeterinaryEstablishmentTeamMembersEnumeratorInterface
{
    /**
     * @param VeterinaryEstablishmentTeamMembersFilter $filters
     *
     * @return \Generator<VeterinaryEstablishmentUserResponse>
     *
     * @see Client::getAllVeterinaryEstablishmentUser
     */
    public function enumerateAll(
        array $filters = [],
        int $querySize = 50,
    ): \Generator;

    /**
     * @param array<int, VeterinaryEstablishmentResponse> $establishments
     *
     * @return array<string, array<VeterinaryEstablishmentUserResponse>>
     */
    public function getTeamMembers(
        array $establishments,
        int $querySize = 50,
        ?\DateTimeImmutable $now = null,
    ): array;
}
