refactor: mail interfaces
All checks were successful
Build Test / build (pull_request) Successful in 12s
JS Unit Tests / test (pull_request) Successful in 11s
PHP Unit Tests / test (pull_request) Successful in 39s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-05-14 22:54:51 -04:00
parent d6005246dc
commit f3c882454d
24 changed files with 583 additions and 962 deletions

View File

@@ -26,7 +26,7 @@ use KTXF\Resource\Provider\ResourceServiceLocationInterface;
*
* @since 2025.05.01
*/
interface ProviderServiceDiscoverInterface extends ProviderBaseInterface {
interface ProviderServiceDiscoverInterface {
/**
* Attempts to discover service configuration using provider-specific methods.

View File

@@ -25,9 +25,7 @@ use KTXF\Resource\Provider\ResourceProviderServiceMutateInterface;
* @method string serviceModify(string $tenantId, ?string $userId, ServiceMutableInterface $service) Modify a mail service configuration
* @method bool serviceDestroy(string $tenantId, ?string $userId, ServiceMutableInterface $service) Delete a mail service configuration
*/
interface ProviderServiceMutateInterface extends ProviderBaseInterface, ResourceProviderServiceMutateInterface {
public const JSON_TYPE = ProviderBaseInterface::JSON_TYPE;
interface ProviderServiceMutateInterface extends ResourceProviderServiceMutateInterface {
// Methods inherited from ResourceProviderServiceMutateInterface
// Implementations should return/accept ServiceMutableInterface instances

View File

@@ -10,6 +10,7 @@ declare(strict_types=1);
namespace KTXF\Mail\Provider;
use KTXF\Mail\Service\ServiceBaseInterface;
use KTXF\Mail\Service\ServiceMutableInterface;
/**
* Mail Provider Service Test Interface
@@ -25,7 +26,7 @@ use KTXF\Mail\Service\ServiceBaseInterface;
*
* @since 2025.05.01
*/
interface ProviderServiceTestInterface extends ProviderBaseInterface {
interface ProviderServiceTestInterface {
/**
* Test a service connection
@@ -39,7 +40,7 @@ interface ProviderServiceTestInterface extends ProviderBaseInterface {
*
* @since 2025.05.01
*
* @param ServiceBaseInterface $service Service to test (can be fresh/unsaved or existing)
* @param ServiceBaseInterface|ServiceMutableInterface $service Service to test (can be fresh/unsaved or existing)
* @param array $options Provider-specific test options:
* - 'timeout' => int (seconds, default: 10)
* - 'verify_ssl' => bool (default: true)
@@ -72,6 +73,6 @@ interface ProviderServiceTestInterface extends ProviderBaseInterface {
* ]
* ]
*/
public function serviceTest(ServiceBaseInterface $service, array $options = []): array;
public function serviceTest(ServiceBaseInterface|ServiceMutableInterface $service, array $options = []): array;
}