ldc-arcadia-genesis-php-client/src/Service/EmployeeService.php

88 lines
2.6 KiB
PHP

<?php
declare(strict_types=1);
namespace Uwil\ArcadiaApiPhpClient\Service;
use Uwil\ArcadiaApiPhpClient\Error\ApiError;
use Uwil\ArcadiaApiPhpClient\Lib\ApiDto\Dto\Employee;
use Uwil\ArcadiaApiPhpClient\Lib\ApiDto\Dto\PageOf;
use Uwil\ArcadiaApiPhpClient\Lib\ApiSorter\EmployeeSorter;
use Uwil\ArcadiaApiPhpClient\Lib\ApiValueObject\ArcadiaEmployeeId;
use Uwil\ArcadiaApiPhpClient\Lib\ApiValueObject\SiteId;
use Uwil\ArcadiaApiPhpClient\Lib\Pagination\PageSize;
use Uwil\ArcadiaApiPhpClient\Lib\Pagination\Pagination;
use Uwil\ArcadiaApiPhpClient\Lib\Pagination\StreamOf;
interface EmployeeService
{
/** @return StreamOf<Employee> */
public function streamAll(
PageSize $pageSize = new PageSize(),
?EmployeeSorter $sorter = null,
): StreamOf;
/** @return StreamOf<Employee> */
public function streamAllSince(
\DateTimeInterface $since,
PageSize $pageSize = new PageSize(),
\SortDirection $sortDirection = \SortDirection::Descending,
): StreamOf;
/**
* @param SiteId[]|SiteId $sites
* @return StreamOf<Employee>
*/
public function streamAllOfSitesSince(
array | SiteId $sites,
\DateTimeInterface $since,
PageSize $pageSize = new PageSize(),
\SortDirection $sortDirection = \SortDirection::Descending,
): StreamOf;
/**
* @param SiteId[]|SiteId $sites
* @return StreamOf<Employee>
*/
public function streamAllOfSites(
array | SiteId $sites,
PageSize $pageSize = new PageSize(),
?EmployeeSorter $sorter = null,
): StreamOf;
/** @return PageOf<Employee>|ApiError */
public function getAllSince(
Pagination $pagination,
\DateTimeInterface $since,
\SortDirection $sortDirection = \SortDirection::Descending,
): PageOf | ApiError;
/** @return PageOf<Employee>|ApiError */
public function getAll(
Pagination $pagination,
?EmployeeSorter $sorter = null,
): PageOf | ApiError;
/**
* @param SiteId[]|SiteId $sites
* @return PageOf<Employee>|ApiError
*/
public function getAllOfSitesSince(
Pagination $pagination,
array | SiteId $sites,
\DateTimeInterface $since,
\SortDirection $sortDirection = \SortDirection::Descending,
): PageOf | ApiError;
/**
* @param SiteId[]|SiteId $sites
* @return PageOf<Employee>|ApiError
*/
public function getAllOfSites(
Pagination $pagination,
array | SiteId $sites,
?EmployeeSorter $sorter = null,
): PageOf | ApiError;
public function findBy(ArcadiaEmployeeId $id): Employee | null | ApiError;
}