refactor: list and fetch
All checks were successful
Build Test / build (pull_request) Successful in 13s
JS Unit Tests / test (pull_request) Successful in 12s
PHP Unit Tests / test (pull_request) Successful in 33s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-05-17 17:57:44 -04:00
parent b2a1a17acd
commit 4e1d6d65d0
7 changed files with 39 additions and 11 deletions

View File

@@ -71,6 +71,13 @@ abstract class NodeBaseAbstract implements NodeBaseInterface {
return $this->data[static::PROPERTY_TYPE];
}
/**
* @inheritDoc
*/
public function urn(): string {
return (string) $this->nodeIdentifier();
}
/**
* @inheritDoc
*/

View File

@@ -35,6 +35,13 @@ interface NodeBaseInterface extends JsonSerializable {
* @since 2025.05.01
*/
public function type(): string;
/**
* Node URN
*
* @since 2025.05.01
*/
public function urn(): string;
/**
* Provider identifier

View File

@@ -14,11 +14,6 @@ interface ResourceProviderBaseInterface extends ProviderInterface, JsonSerializa
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';

View File

@@ -12,6 +12,10 @@ namespace KTXF\Resource\Provider;
use KTXF\Json\JsonDeserializable;
interface ResourceProviderServiceMutateInterface extends JsonDeserializable {
public const CAPABILITY_SERVICE_CREATE = 'ServiceCreate';
public const CAPABILITY_SERVICE_MODIFY = 'ServiceModify';
public const CAPABILITY_SERVICE_DESTROY = 'ServiceDestroy';
/**
* construct and new blank service instance