refactor: people interfaces to unified design

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-06-20 19:04:39 -04:00
parent 802849a60d
commit a6e2a447e5
13 changed files with 148 additions and 72 deletions
@@ -14,7 +14,7 @@ use KTXF\Resource\Provider\ResourceProviderServiceMutateInterface;
/**
* Provider Service Mutate Interface
*
* Optional interface for providers that support service CRUD operations.
* Optional interface for providers that support service CRUD operations
*
* @since 2025.05.01
*
@@ -25,4 +25,6 @@ use KTXF\Resource\Provider\ResourceProviderServiceMutateInterface;
*/
interface ProviderServiceMutateInterface extends ResourceProviderServiceMutateInterface {
// Methods inherited from ResourceProviderServiceMutateInterface
}
@@ -9,6 +9,7 @@ declare(strict_types=1);
namespace KTXF\People\Provider;
use KTXF\Chrono\Service\ServiceMutableInterface;
use KTXF\Mail\Service\ServiceBaseInterface;
/**
@@ -20,6 +21,8 @@ use KTXF\Mail\Service\ServiceBaseInterface;
*/
interface ProviderServiceTestInterface {
public const CAPABILITY_SERVICE_TEST = 'ServiceTest';
/**
* Test a service connection
*
@@ -27,7 +30,7 @@ interface ProviderServiceTestInterface {
*
* @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)
@@ -36,10 +39,10 @@ interface ProviderServiceTestInterface {
*
* @return array Test results in the format:
* [
* 'success' => bool,
* 'message' => 'Connection successful' | 'Error message'
* 'disposition' => 'Success' | 'Failure' | 'Warning',
* 'message' => 'Connection successful' | 'Error message',
* ]
*/
public function serviceTest(ServiceBaseInterface $service, array $options = []): array;
public function serviceTest(ServiceBaseInterface|ServiceMutableInterface $service, array $options = []): array;
}