refactor: mail interfaces
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user