refactor: use resource identifiers
Build Test / test (pull_request) Successful in 26s
JS Unit Tests / test (pull_request) Failing after 29s
PHP Unit Tests / test (pull_request) Successful in 56s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-05-14 22:34:18 -04:00
parent 69d4b2f42c
commit c7ef2c5495
13 changed files with 425 additions and 621 deletions
+9 -8
View File
@@ -6,6 +6,7 @@ import type { EntityInterface, EntityModelInterface } from "@/types/entity";
import type { MessageInterface } from "@/types/message";
import { MessageObject } from "./message";
import { clonePlain } from './clone-plain';
import type { CollectionIdentifier, EntityIdentifier, ServiceIdentifier } from "@/services";
export class EntityObject implements EntityModelInterface {
@@ -18,8 +19,8 @@ export class EntityObject implements EntityModelInterface {
version: 1,
provider: '',
service: '',
collection: '',
identifier: '',
collection: null,
identifier: null,
signature: null,
created: null,
modified: null,
@@ -54,16 +55,16 @@ export class EntityObject implements EntityModelInterface {
return this._data.provider;
}
get service(): string {
return this._data.service;
get service(): ServiceIdentifier {
return this._data.service as ServiceIdentifier;
}
get collection(): string|number {
return this._data.collection;
get collection(): CollectionIdentifier {
return this._data.collection as CollectionIdentifier;
}
get identifier(): string|number {
return this._data.identifier;
get identifier(): EntityIdentifier {
return this._data.identifier as EntityIdentifier;
}
get signature(): string | null {