Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace ImovelZapAi\Publishing\Connectors\GroupOlx\Application\Ports; |
| 6 | |
| 7 | use ImovelZapAi\Publishing\Connectors\GroupOlx\Application\Data\FeedStorageVersionData; |
| 8 | use ImovelZapAi\Publishing\Connectors\GroupOlx\Domain\Enums\FeedStorageDriver; |
| 9 | |
| 10 | /** |
| 11 | * Persistência versionada do feed VRSync (Grupo OLX). |
| 12 | * |
| 13 | * Implementações: Local e Cloudflare R2 — mesma interface. |
| 14 | */ |
| 15 | interface FeedStorageInterface |
| 16 | { |
| 17 | /** |
| 18 | * Salva XML, gera hash, versiona e atualiza a versão corrente. |
| 19 | */ |
| 20 | public function store(string $tenantId, string $xml): FeedStorageVersionData; |
| 21 | |
| 22 | /** |
| 23 | * Recupera a última versão (com metadados; XML opcionalmente carregado). |
| 24 | */ |
| 25 | public function latest(string $tenantId, bool $withXml = true): ?FeedStorageVersionData; |
| 26 | |
| 27 | public function get(string $tenantId): ?string; |
| 28 | |
| 29 | public function exists(string $tenantId): bool; |
| 30 | |
| 31 | public function delete(string $tenantId): void; |
| 32 | |
| 33 | public function lastModified(string $tenantId): ?int; |
| 34 | |
| 35 | public function driver(): FeedStorageDriver; |
| 36 | } |