resource provider and service improvements

This commit is contained in:
root
2026-01-04 21:43:20 -05:00
parent 8f35442335
commit 965d839a8c
9 changed files with 64 additions and 127 deletions

View File

@@ -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;
}