70 lines
1.6 KiB
PHP
70 lines
1.6 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace KTXF\People\Provider;
|
|
|
|
use KTXF\Json\JsonDeserializable;
|
|
use KTXF\People\Service\IServiceBase;
|
|
|
|
interface IProviderServiceMutate extends 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
|
|
*
|
|
* @param string $userId user identifier
|
|
*
|
|
* @return IServiceBase
|
|
*/
|
|
public function serviceFresh(string $userId = ''): IServiceBase;
|
|
|
|
/**
|
|
* create a service configuration for a specific user
|
|
*
|
|
* @since 2025.05.01
|
|
*
|
|
* @param string $userId user identifier
|
|
* @param IServiceBase $service service instance
|
|
*
|
|
* @return string
|
|
*/
|
|
public function serviceCreate(string $userId, IServiceBase $service): string;
|
|
|
|
/**
|
|
* modify a service configuration for a specific user
|
|
*
|
|
* @since 2025.05.01
|
|
*
|
|
* @param string $userId user identifier
|
|
* @param IServiceBase $service service instance
|
|
*
|
|
* @return string
|
|
*/
|
|
public function serviceModify(string $userId, IServiceBase $service): string;
|
|
|
|
/**
|
|
* delete a service configuration for a specific user
|
|
*
|
|
* @since 2025.05.01
|
|
*
|
|
* @param string $userId user identifier
|
|
* @param IServiceBase $service service instance
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function serviceDestroy(string $userId, IServiceBase $service): bool;
|
|
|
|
}
|