first commit

This commit is contained in:
2026-02-15 01:34:17 +07:00
commit baac22e3ae
95 changed files with 13238 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace App\Contracts;
use App\DTO\WbRequestDTO;
use App\Exceptions\WbServiceException;
interface WbClientInterface
{
/**
* @throws WbServiceException
*/
public function fetch(WbRequestDTO $requestDTO): array;
}

View File

@@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace App\Contracts;
use App\Enums\WbEndpoint;
interface WbSyncFactoryInterface
{
public function make(WbEndpoint $type): WbSyncInterface;
}

View File

@@ -0,0 +1,14 @@
<?php
declare(strict_types=1);
namespace App\Contracts;
use App\DTO\WbRequestDTO;
interface WbSyncInterface
{
public function sync(WbRequestDTO $dto): array;
public function save(array $data): void;
}

View File

@@ -0,0 +1,41 @@
<?php
declare(strict_types=1);
namespace App\Contracts;
use App\Enums\WbEndpoint;
interface WbSyncManagerInterface
{
public function start(
WbEndpoint $endpoint,
string $dateFrom,
?string $dateTo = null
): void;
public function handleFirstPage(
WbEndpoint $endpoint,
string $dateFrom,
?string $dateTo,
int $lastPage
): void;
public function incrementProgress(
WbEndpoint $endpoint,
string $dateFrom,
?string $dateTo
): void;
public function markSuccess(
WbEndpoint $endpoint,
string $dateFrom,
?string $dateTo
): void;
public function markFailed(
WbEndpoint $endpoint,
string $dateFrom,
?string $dateTo
): void;
}