refactor: improvemets
All checks were successful
Build Test / build (pull_request) Successful in 52s
JS Unit Tests / test (pull_request) Successful in 52s
PHP Unit Tests / test (pull_request) Successful in 52s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-03-24 19:13:19 -04:00
parent bcb3431aaa
commit 5254b859d2
6 changed files with 130 additions and 10 deletions

View File

@@ -132,7 +132,7 @@ interface ServiceBaseInterface extends ResourceServiceBaseInterface {
public function entityList(string|int|null $collection, ?IFilter $filter = null, ?ISort $sort = null, ?IRange $range = null, ?array $properties = null): array;
/**
* Creates a filter builder for messages
* Creates a filter builder for entities
*
* @since 2025.05.01
*
@@ -141,7 +141,7 @@ interface ServiceBaseInterface extends ResourceServiceBaseInterface {
public function entityListFilter(): IFilter;
/**
* Creates a sort builder for messages
* Creates a sort builder for entities
*
* @since 2025.05.01
*
@@ -150,7 +150,7 @@ interface ServiceBaseInterface extends ResourceServiceBaseInterface {
public function entityListSort(): ISort;
/**
* Creates a range builder for messages
* Creates a range builder for entities
*
* @since 2025.05.01
*
@@ -209,4 +209,50 @@ interface ServiceBaseInterface extends ResourceServiceBaseInterface {
*/
public function entityRead(string|int|null $collection, string|int $identifier): ?string;
/**
* Lists messages in a collection
*
* @since 2025.05.01
*
* @param string|int|null $collection Collection ID
* @param IFilter|null $filter Optional filter criteria
* @param ISort|null $sort Optional sort order
* @param IRange|null $range Optional pagination
* @param array|null $properties Optional message properties to fetch
*
* @return array<string|int,CollectionBaseInterface|EntityBaseInterface> Nodes indexed by ID
*/
public function nodeList(string|int|null $collection, bool $recursive = false, ?IFilter $filter = null, ?ISort $sort = null, ?IRange $range = null, ?array $properties = null): array;
/**
* Creates a filter builder for nodes
*
* @since 2025.05.01
*
* @return IFilter
*/
public function nodeListFilter(): IFilter;
/**
* Creates a sort builder for nodes
*
* @since 2025.05.01
*
* @return ISort
*/
public function nodeListSort(): ISort;
/**
* Gets incremental changes since last sync
*
* @since 2025.05.01
*
* @param string|int|null $collection Collection ID
* @param string $signature Sync token from previous sync
* @param string $detail Detail level: 'ids', 'minimal', 'full'
*
* @return array ['signature' => string, 'added' => array, 'modified' => array, 'removed' => array]
*/
public function nodeDelta(string|int|null $collection, string $signature, string $detail = 'ids'): Delta;
}

View File

@@ -9,14 +9,16 @@ declare(strict_types=1);
namespace KTXF\Resource\Documents\Service;
use KTXF\Resource\Provider\ResourceServiceMutateInterface;
/**
* Chrono Service Mutable Interface
* Documents Service Mutable Interface
*
* Extends base service interface with setter methods for mutable properties.
* Used for service configuration and updates.
*
* @since 2025.05.01
*/
interface ServiceMutableInterface extends ServiceBaseInterface {
interface ServiceMutableInterface extends ServiceBaseInterface, ResourceServiceMutateInterface {
}