resource provider and service improvements
This commit is contained in:
@@ -11,9 +11,14 @@ use KTXF\Json\JsonSerializable;
|
||||
*/
|
||||
interface ResourceProviderBaseInterface extends ProviderInterface, JsonSerializable
|
||||
{
|
||||
public const CAPABILITY_SERVICE_LIST = 'ServiceList';
|
||||
public const CAPABILITY_SERVICE_LIST = 'ServiceList';
|
||||
public const CAPABILITY_SERVICE_FETCH = 'ServiceFetch';
|
||||
public const CAPABILITY_SERVICE_EXTANT = 'ServiceExtant';
|
||||
public const CAPABILITY_SERVICE_CREATE = 'ServiceCreate';
|
||||
public const CAPABILITY_SERVICE_MODIFY = 'ServiceModify';
|
||||
public const CAPABILITY_SERVICE_DESTROY = 'ServiceDestroy';
|
||||
public const CAPABILITY_SERVICE_DISCOVER = 'ServiceDiscover';
|
||||
public const CAPABILITY_SERVICE_TEST = 'ServiceTest';
|
||||
|
||||
public const JSON_TYPE = 'resource.provider';
|
||||
public const JSON_PROPERTY_TYPE = '@type';
|
||||
|
||||
@@ -13,37 +13,32 @@ use KTXF\Json\JsonDeserializable;
|
||||
|
||||
interface ResourceProviderServiceMutateInterface extends ResourceProviderBaseInterface, JsonDeserializable {
|
||||
|
||||
public const CAPABILITY_SERVICE_FRESH = 'ServiceFresh';
|
||||
public const CAPABILITY_SERVICE_CREATE = 'ServiceCreate';
|
||||
public const CAPABILITY_SERVICE_UPDATE = 'ServiceUpdate';
|
||||
public const CAPABILITY_SERVICE_DESTROY = 'ServiceDestroy';
|
||||
|
||||
/**
|
||||
* construct and new blank service instance
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*/
|
||||
public function serviceFresh(string $tenantId, ?string $userId): ResourceServiceMutateInterface;
|
||||
public function serviceFresh(): ResourceServiceMutateInterface;
|
||||
|
||||
/**
|
||||
* create a service configuration for a specific user
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*/
|
||||
public function serviceCreate(string $tenantId, ?string $userId, ResourceServiceMutateInterface $service): string;
|
||||
public function serviceCreate(string $tenantId, string $userId, ResourceServiceMutateInterface $service): string;
|
||||
|
||||
/**
|
||||
* modify a service configuration for a specific user
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*/
|
||||
public function serviceModify(string $tenantId, ?string $userId, ResourceServiceMutateInterface $service): string;
|
||||
public function serviceModify(string $tenantId, string $userId, ResourceServiceMutateInterface $service): string;
|
||||
|
||||
/**
|
||||
* delete a service configuration for a specific user
|
||||
*
|
||||
* @since 2025.05.01
|
||||
*/
|
||||
public function serviceDestroy(string $tenantId, ?string $userId, ResourceServiceMutateInterface $service): bool;
|
||||
public function serviceDestroy(string $tenantId, string $userId, ResourceServiceMutateInterface $service): bool;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ interface ResourceServiceBaseInterface extends JsonSerializable {
|
||||
// JSON Constants
|
||||
public const JSON_TYPE = 'resource.service';
|
||||
public const JSON_PROPERTY_TYPE = '@type';
|
||||
public const JSON_PROPERTY_PROVIDER = 'provider';
|
||||
public const JSON_PROPERTY_ID = 'id';
|
||||
public const JSON_PROPERTY_LABEL = 'label';
|
||||
public const JSON_PROPERTY_ENABLED = 'enabled';
|
||||
|
||||
Reference in New Issue
Block a user