Skip to content

Commit

Permalink
Feature/Add AcceptResponseItems (#76)
Browse files Browse the repository at this point in the history
* Feature/Add ThirdPartyOwnedRelationshipAttributeSuccession (#74)

* feat: add thirdPartyOwnedRelationshipAttributeSuccession

* fix: remove todos

* Feature/AttributeSuccessionAcceptResponseItem for ReadAttributeRequestItemProcessor (#80)

* feat: add is{Predecessor,Successor}Of

* feat: add AttributeSuccessionAcceptResponseItem

* feat: adjust ReadAttributeRequestItemProcessor

* test: AttributeSuccessionAcceptResponseItem for
ReadAttributeRequestItemProcessor

* feat: add thirdPartyOwnedRelationshipAttributeSuccession

* fix: succession in ReadAttributeRequestItemProcessor

* test: succession in ReadAttributeRequestItemProcessor

* feat: omit check for RepositoryAttribute in getSharedVersionsOfRepositoryAttribute

* fix: ownSharedThirdPartyAttributeSuccession

* feat: allow applyIncomingResponseItem to return events

* fix: make iql tests independent

* test: returned event applying incoming ResponseItem

* feat: integrate comments

* feat: add AttributeSuccessionAcceptResponseItem to DataViewExpander

* feat: integrate comments

* fix: adjust renamed functions in tests

* feat: integrate comments

* feat: correct test names

* feat: combine isA{Predecessor,Successor}Of to a single function

* feat: add TODO comment for renaming getSharedVersionsOfRepositoryAttribute

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Feature/AttributeSuccessionAcceptResponseItem for ProposeAttributeRequestItemProcessor (#101)

* feat: add AttributeSuccessionAcceptResponseItem for ProposeAttributeRequestItemProcessor

* test: AcceptSuccessionResponseItem in ProposeAttributeRequestItemDVO

* feat: integrate comments

* feat: integrate comments

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* feat: add AttributeAlreadySharedAcceptResponseItem (#108)

* Refactor/adapt runtime to new relationships api (#90)

* chore: adapt accept, reject, revoke runtime use cases

* chore: change relationship classes

* chore: adapt transmission types

* chore: rename transmission request/response types

* fix: relationships backbone response type

* chore: adapt RelationshipsController

* chore: adapt ExternalEventsProcessor

* chore: adapt the relationship use cases

* chore: adapt request response type

* chore: adapt completing incoming requests

* refactor: content type names

* feat: get relationship with audit logs, fix types

* chore: adapt outgoing request controller and use cases

* chore: adapt relationship (change) dtos

* chore: adapt request module

* chore: adapt index file

* refactor: auditLog is transport relationship member

* chore: adapt relationship getter use cases

* chore: rename use cases

* chore: adapt transport validation

* chore: adapt schemas and further renaming

* chore: rename relation creation request content file

* refactor: renaming types

* chore: adapt request consumption tests

* refactor: rename content to creation content in sendRelationship

* fix: relationship creation request type name

* chore: adapt final consumption and transport tests

* chore: adapt runtime tests

* fix: adapt changes in transport tests

* chore: adapt the new external event processor

* chore: use correct backbone version

* fix: adapt to backbone signature

* fix: await promise

* fix: update status with relationship

* refactor: move audit log to relationship cache

* refactor: merge the relationship event handlers

* fix: relationship controller flows

* refactor: relationship types

* fix: audit log deserializer

* fix: relationship event payload

* fix: get correct creation/acceptance content

* fix: only decrypt relationship if secrets available

* fix: don't use sync result in a test

* chore: remove comments / debug code

* fix: transport tests, sort audit log

* fix: consumption tests, request controller type

* refactor: remove auditLog flag in useCases

* fix: assorted fixes

* chore: update app-runtime

* fix: exports

* refactor: massively simplify DTO creation

* fix: app runtime tests

* fix: import

* fix: mandatory audit log

* fix: adapt relationship dto/dvo, remove null checks

* refactor/fix: add audit log to test factory, remove redundant method

* fix: de-duplicate functions

* fix: redo old behaviour

* fix: casing

* fix: update event behaviour

* fix: re-add some tests

* fix: make peer an address again

* refactor: mandatory payload in put

* feat: add the relationship changes to the relationship dto

* chore: add validation to outoing request controller

* refactor: relationshipCreationContent instead of CreationRequestContent

* refactor/fix: auditLog to relationshipAuditLog, add createdByDevice

* refactor: simplify RelationshipMapper

* chore: remove unused runtime error

* fix: re-add check, remove throw

* fix: add createdByDevice to relationship DTO

* refactor: cleaner function call

* test: add old relationship change tests; test for creation content

* fix: add createdByDevice to audit log method

* fix: wrong type annotations

* fix: condition in createRequestFromTemplateResponse

* fix: add createdBDevice to TestObjectFactory audit logs

* refactor: rename auditLog file

* refactor: cosmetic changes

* refactor: correct audit log in test object factory

* fix: add oldStatus

* refactor: remove empty acceptanceContents

* refactor: request/response to creation-/acceptanceContent

* chore: adapt backbone return types, type check

* fix: correctly use types

* refactor: no type extension in backboneGetRelationships

* fix: catch undefined creation content

* refactor: fail fast undefined creation content

* fix: this was supposed to be the previous commit

* refactor: add relationship prefix to audit log

* refactor: rename relationship event processor

* refactor: change checks, use JSONWrapper for creation content

* refactor: split audit log class

* fix: update import

* refactor: acceptanceContent -> creationResponseContent

* refactor: combine events

* fix: naming

* chore: bump backbone

* chore: add admin ui to compose

* fix: naming

* chore: naming

* fix: Relationships

* fix: re-add import

* fix: update types and errors

* chore: bump backbone

* fix: add enum validators

* chore: any is always nullable

* fix: pass creation content

* fix: throw error again

* chore: remove unused content

* fix: make publicCreationResponseContentCrypto required

* chore: update validate annotation

---------

Co-authored-by: Julian König <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Feature/Rename getSharedVersionsOfAttribute (#109)

* feat: rename getSharedVersionsOfAttribute

* chore: remove todo

* refactor: rename variables

* feat: integrate comments

* feat: re-add deprecated getSharedVersionsOfRepositoryAttribute

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix: allow for slower tests to succeed

* fix: use correct statuses

* chore: undo v5 changes

* chore: version bump

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Magnus Kuhn <[email protected]>
Co-authored-by: Julian König <[email protected]>
  • Loading branch information
4 people authored May 24, 2024
1 parent d2bf7dc commit 73d8168
Show file tree
Hide file tree
Showing 42 changed files with 2,429 additions and 254 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/consumption/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nmshd/consumption",
"version": "3.10.0",
"version": "3.11.0",
"description": "The consumption library extends the transport library.",
"homepage": "https://enmeshed.eu",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/consumption/src/consumption/CoreErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ class Attributes {
return new CoreError("error.consumption.attributes.predecessorIsNotPeerSharedRelationshipAttribute", "Predecessor is not a peer shared relationship attribute.");
}

public predecessorIsNotThirdPartyOwnedRelationshipAttribute() {
return new CoreError("error.consumption.attributes.predecessorIsNotThirdPartyOwnedRelationshipAttribute", "Predecessor is not a third party owned relationship attribute.");
}

public successorIsNotRepositoryAttribute() {
return new CoreError("error.consumption.attributes.successorIsNotRepositoryAttribute", "Successor is not a repository attribute.");
}
Expand All @@ -112,6 +116,10 @@ class Attributes {
return new CoreError("error.consumption.attributes.successorIsNotPeerSharedRelationshipAttribute", "Successor is not a peer shared relationship attribute.");
}

public successorIsNotThirdPartyOwnedRelationshipAttribute() {
return new CoreError("error.consumption.attributes.successorIsNotThirdPartyOwnedRelationshipAttribute", "Successor is not a third party owned relationship attribute.");
}

public setPredecessorIdDoesNotMatchActualPredecessorId() {
return new CoreError(
"error.consumption.attributes.setPredecessorIdDoesNotMatchActualPredecessorId",
Expand Down
156 changes: 123 additions & 33 deletions packages/consumption/src/modules/attributes/AttributesController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ import { ConsumptionError } from "../../consumption/ConsumptionError";
import { ConsumptionIds } from "../../consumption/ConsumptionIds";
import { CoreErrors } from "../../consumption/CoreErrors";
import { ValidationResult } from "../common";
import { AttributeCreatedEvent, AttributeDeletedEvent, OwnSharedAttributeSucceededEvent, RepositoryAttributeSucceededEvent, SharedAttributeCopyCreatedEvent } from "./events";
import {
AttributeCreatedEvent,
AttributeDeletedEvent,
OwnSharedAttributeSucceededEvent,
RepositoryAttributeSucceededEvent,
SharedAttributeCopyCreatedEvent,
ThirdPartyOwnedRelationshipAttributeSucceededEvent
} from "./events";
import { AttributeSuccessorParams, AttributeSuccessorParamsJSON, IAttributeSuccessorParams } from "./local/AttributeSuccessorParams";
import { CreateLocalAttributeParams, ICreateLocalAttributeParams } from "./local/CreateLocalAttributeParams";
import { ICreatePeerLocalAttributeParams } from "./local/CreatePeerLocalAttributeParams";
Expand Down Expand Up @@ -449,6 +456,35 @@ export class AttributesController extends ConsumptionBaseController {
return { predecessor, successor };
}

public async succeedThirdPartyOwnedRelationshipAttribute(
predecessorId: CoreId,
successorParams: IAttributeSuccessorParams | AttributeSuccessorParamsJSON,
validate = true
): Promise<{ predecessor: LocalAttribute; successor: LocalAttribute }> {
const parsedSuccessorParams = AttributeSuccessorParams.from(successorParams);

if (validate) {
const validationResult = await this.validateThirdPartyOwnedRelationshipAttributeSuccession(predecessorId, parsedSuccessorParams);
if (validationResult.isError()) {
throw validationResult.error;
}
}

const { predecessor, successor } = await this._succeedAttributeUnsafe(predecessorId, {
id: parsedSuccessorParams.id,
content: parsedSuccessorParams.content,
succeeds: predecessorId,
shareInfo: parsedSuccessorParams.shareInfo,
parentId: parsedSuccessorParams.parentId,
createdAt: parsedSuccessorParams.createdAt,
succeededBy: parsedSuccessorParams.succeededBy
});

this.eventBus.publish(new ThirdPartyOwnedRelationshipAttributeSucceededEvent(this.identity.address.toString(), predecessor, successor));

return { predecessor, successor };
}

private async succeedChildrenOfComplexAttribute(parentSuccessorId: CoreId) {
const parentSuccessor = await this.getLocalAttribute(parentSuccessorId);
if (typeof parentSuccessor === "undefined") {
Expand Down Expand Up @@ -767,6 +803,50 @@ export class AttributesController extends ConsumptionBaseController {
return ValidationResult.success();
}

public async validateThirdPartyOwnedRelationshipAttributeSuccession(
predecessorId: CoreId,
successorParams: IAttributeSuccessorParams | AttributeSuccessorParamsJSON
): Promise<ValidationResult> {
let parsedSuccessorParams;
try {
parsedSuccessorParams = AttributeSuccessorParams.from(successorParams);
} catch (e: unknown) {
return ValidationResult.error(CoreErrors.attributes.successorIsNotAValidAttribute(e));
}

const commonValidation = await this.validateAttributeSuccessionCommon(predecessorId, parsedSuccessorParams);
if (commonValidation.isError()) return commonValidation;

const predecessor = (await this.getLocalAttribute(predecessorId))!;
const successor = LocalAttribute.from({
id: CoreId.from(parsedSuccessorParams.id ?? "dummy"),
content: parsedSuccessorParams.content,
createdAt: parsedSuccessorParams.createdAt ?? CoreDate.utc(),
succeeds: parsedSuccessorParams.succeeds,
succeededBy: parsedSuccessorParams.succeededBy,
shareInfo: parsedSuccessorParams.shareInfo,
parentId: parsedSuccessorParams.parentId
});

if (!predecessor.isThirdPartyOwnedRelationshipAttribute(this.identity.address)) {
return ValidationResult.error(CoreErrors.attributes.predecessorIsNotThirdPartyOwnedRelationshipAttribute());
}

if (!successor.isThirdPartyOwnedRelationshipAttribute(this.identity.address)) {
return ValidationResult.error(CoreErrors.attributes.successorIsNotThirdPartyOwnedRelationshipAttribute());
}

if (successor.content.key !== predecessor.content.key) {
return ValidationResult.error(CoreErrors.attributes.successionMustNotChangeKey());
}

if (!predecessor.shareInfo.peer.equals(successor.shareInfo.peer)) {
return ValidationResult.error(CoreErrors.attributes.successionMustNotChangePeer());
}

return ValidationResult.success();
}

public async validateAttributeSuccessionCommon(predecessorId: CoreId, successorParams: IAttributeSuccessorParams | AttributeSuccessorParamsJSON): Promise<ValidationResult> {
let parsedSuccessorParams;
try {
Expand Down Expand Up @@ -893,7 +973,7 @@ export class AttributesController extends ConsumptionBaseController {
}

const attributeCopies = await this.getLocalAttributes({ "shareInfo.sourceAttribute": attribute.id.toString() });
const attributePredecessorCopies = await this.getSharedPredecessorsOfRepositoryAttribute(attribute);
const attributePredecessorCopies = await this.getSharedPredecessorsOfAttribute(attribute);
const attributeCopiesToDetach = [...attributeCopies, ...attributePredecessorCopies];
await this.detachAttributeCopies(attributeCopiesToDetach);

Expand All @@ -908,7 +988,7 @@ export class AttributesController extends ConsumptionBaseController {
}

const attributeCopies = await this.getLocalAttributes({ "shareInfo.sourceAttribute": attribute.id.toString() });
const attributePredecessorCopies = await this.getSharedPredecessorsOfRepositoryAttribute(attribute);
const attributePredecessorCopies = await this.getSharedPredecessorsOfAttribute(attribute);
const attributeCopiesToDetach = [...attributeCopies, ...attributePredecessorCopies];

const validateSharedAttributesResult = this.validateSharedAttributes(attributeCopiesToDetach);
Expand Down Expand Up @@ -1010,67 +1090,77 @@ export class AttributesController extends ConsumptionBaseController {
return successors;
}

public async getSharedVersionsOfRepositoryAttribute(id: CoreId, peers?: CoreAddress[], onlyLatestVersions = true): Promise<LocalAttribute[]> {
const repositoryAttribute = await this.getLocalAttribute(id);
if (typeof repositoryAttribute === "undefined") {
throw TransportCoreErrors.general.recordNotFound(LocalAttribute, id.toString());
public async isSubsequentInSuccession(predecessor: LocalAttribute, successor: LocalAttribute): Promise<boolean> {
while (typeof predecessor.succeededBy !== "undefined") {
const directSuccessor = await this.getLocalAttribute(predecessor.succeededBy);
if (typeof directSuccessor === "undefined") {
throw TransportCoreErrors.general.recordNotFound(LocalAttribute, predecessor.succeededBy.toString());
}

if (predecessor.succeededBy.toString() === successor.id.toString()) return true;

predecessor = directSuccessor;
}
return false;
}

if (!repositoryAttribute.isRepositoryAttribute(this.identity.address)) {
throw CoreErrors.attributes.invalidPropertyValue(`Attribute '${id}' isn't a repository attribute.`);
public async getSharedVersionsOfAttribute(id: CoreId, peers?: CoreAddress[], onlyLatestVersions = true): Promise<LocalAttribute[]> {
const sourceAttribute = await this.getLocalAttribute(id);
if (typeof sourceAttribute === "undefined") {
throw TransportCoreErrors.general.recordNotFound(LocalAttribute, id.toString());
}

const query: any = { "shareInfo.sourceAttribute": repositoryAttribute.id.toString() };
const query: any = { "shareInfo.sourceAttribute": sourceAttribute.id.toString() };
if (typeof peers !== "undefined") {
query["shareInfo.peer"] = { $in: peers.map((address) => address.toString()) };
}
if (onlyLatestVersions) {
query["succeededBy"] = { $exists: false };
}

const ownSharedIdentityAttributes = await this.getLocalAttributes(query);
const ownSharedIdentityAttributePredecessors = await this.getSharedPredecessorsOfRepositoryAttribute(repositoryAttribute, query);
const ownSharedIdentityAttributeSuccessors = await this.getSharedSuccessorsOfRepositoryAttribute(repositoryAttribute, query);
const ownSharedAttributes = await this.getLocalAttributes(query);
const ownSharedAttributePredecessors = await this.getSharedPredecessorsOfAttribute(sourceAttribute, query);
const ownSharedAttributeSuccessors = await this.getSharedSuccessorsOfAttribute(sourceAttribute, query);

const ownSharedIdentityAttributeVersions = [...ownSharedIdentityAttributeSuccessors.reverse(), ...ownSharedIdentityAttributes, ...ownSharedIdentityAttributePredecessors];
return ownSharedIdentityAttributeVersions;
const ownSharedAttributeVersions = [...ownSharedAttributeSuccessors.reverse(), ...ownSharedAttributes, ...ownSharedAttributePredecessors];
return ownSharedAttributeVersions;
}

public async getSharedPredecessorsOfRepositoryAttribute(repositoryAttribute: LocalAttribute, query: any = {}): Promise<LocalAttribute[]> {
const ownSharedIdentityAttributePredecessors: LocalAttribute[] = [];
while (typeof repositoryAttribute.succeeds !== "undefined") {
const predecessor = await this.getLocalAttribute(repositoryAttribute.succeeds);
public async getSharedPredecessorsOfAttribute(sourceAttribute: LocalAttribute, query: any = {}): Promise<LocalAttribute[]> {
const ownSharedAttributePredecessors: LocalAttribute[] = [];
while (typeof sourceAttribute.succeeds !== "undefined") {
const predecessor = await this.getLocalAttribute(sourceAttribute.succeeds);
if (typeof predecessor === "undefined") {
throw TransportCoreErrors.general.recordNotFound(LocalAttribute, repositoryAttribute.succeeds.toString());
throw TransportCoreErrors.general.recordNotFound(LocalAttribute, sourceAttribute.succeeds.toString());
}

repositoryAttribute = predecessor;
sourceAttribute = predecessor;

query["shareInfo.sourceAttribute"] = repositoryAttribute.id.toString();
query["shareInfo.sourceAttribute"] = sourceAttribute.id.toString();
const sharedCopies = await this.getLocalAttributes(query);

ownSharedIdentityAttributePredecessors.push(...sharedCopies);
ownSharedAttributePredecessors.push(...sharedCopies);
}

return ownSharedIdentityAttributePredecessors;
return ownSharedAttributePredecessors;
}

public async getSharedSuccessorsOfRepositoryAttribute(repositoryAttribute: LocalAttribute, query: any = {}): Promise<LocalAttribute[]> {
const ownSharedIdentityAttributeSuccessors: LocalAttribute[] = [];
while (typeof repositoryAttribute.succeededBy !== "undefined") {
const successor = await this.getLocalAttribute(repositoryAttribute.succeededBy);
public async getSharedSuccessorsOfAttribute(sourceAttribute: LocalAttribute, query: any = {}): Promise<LocalAttribute[]> {
const ownSharedAttributeSuccessors: LocalAttribute[] = [];
while (typeof sourceAttribute.succeededBy !== "undefined") {
const successor = await this.getLocalAttribute(sourceAttribute.succeededBy);
if (typeof successor === "undefined") {
throw TransportCoreErrors.general.recordNotFound(LocalAttribute, repositoryAttribute.succeededBy.toString());
throw TransportCoreErrors.general.recordNotFound(LocalAttribute, sourceAttribute.succeededBy.toString());
}

repositoryAttribute = successor;
sourceAttribute = successor;

query["shareInfo.sourceAttribute"] = repositoryAttribute.id.toString();
query["shareInfo.sourceAttribute"] = sourceAttribute.id.toString();
const sharedCopies = await this.getLocalAttributes(query);

ownSharedIdentityAttributeSuccessors.push(...sharedCopies);
ownSharedAttributeSuccessors.push(...sharedCopies);
}

return ownSharedIdentityAttributeSuccessors;
return ownSharedAttributeSuccessors;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { TransportDataEvent } from "@nmshd/transport";
import { LocalAttribute } from "../local/LocalAttribute";
import { AttributeSucceededEventData } from "./AttributeSucceededEventData";

export class ThirdPartyOwnedRelationshipAttributeSucceededEvent extends TransportDataEvent<AttributeSucceededEventData> {
public static readonly namespace = "consumption.thirdPartyOwnedRelationshipAttributeSucceded";

public constructor(eventTargetAddress: string, predecessor: LocalAttribute, successor: LocalAttribute) {
super(ThirdPartyOwnedRelationshipAttributeSucceededEvent.namespace, eventTargetAddress, { predecessor, successor });
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ export * from "./PeerSharedAttributeSucceededEvent";
export * from "./RepositoryAttributeSucceededEvent";
export * from "./SharedAttributeCopyCreatedEvent";
export * from "./ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent";
export * from "./ThirdPartyOwnedRelationshipAttributeSucceededEvent";
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import { RequestItemProcessorRegistry } from "../itemProcessors/RequestItemProce
import { ILocalRequestSource, LocalRequest } from "../local/LocalRequest";
import { LocalRequestStatus } from "../local/LocalRequestStatus";
import { LocalResponse, LocalResponseSource } from "../local/LocalResponse";
import { DecideRequestParametersValidator } from "./DecideRequestParametersValidator";
import { CheckPrerequisitesOfIncomingRequestParameters, ICheckPrerequisitesOfIncomingRequestParameters } from "./checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters";
import { CompleteIncomingRequestParameters, ICompleteIncomingRequestParameters } from "./complete/CompleteIncomingRequestParameters";
import { DecideRequestItemGroupParametersJSON } from "./decide/DecideRequestItemGroupParameters";
import { DecideRequestItemParametersJSON } from "./decide/DecideRequestItemParameters";
import { DecideRequestParametersJSON } from "./decide/DecideRequestParameters";
import { InternalDecideRequestParameters, InternalDecideRequestParametersJSON } from "./decide/InternalDecideRequestParameters";
import { DecideRequestParametersValidator } from "./DecideRequestParametersValidator";
import { IReceivedIncomingRequestParameters, ReceivedIncomingRequestParameters } from "./received/ReceivedIncomingRequestParameters";
import {
IRequireManualDecisionOfIncomingRequestParameters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Event } from "@js-soft/ts-utils";
import { AcceptResponseItem, RejectResponseItem, Request, RequestItem, ResponseItem } from "@nmshd/content";
import { AccountController, CoreAddress } from "@nmshd/transport";
import { ConsumptionController } from "../../../consumption/ConsumptionController";
Expand Down Expand Up @@ -31,5 +32,5 @@ export abstract class AbstractRequestItemProcessor<
requestItem: TRequestItem,
requestInfo: LocalRequestInfo
): ValidationResult | Promise<ValidationResult>;
public abstract applyIncomingResponseItem(responseItem: ResponseItem, requestItem: TRequestItem, requestInfo: LocalRequestInfo): void | Promise<void>;
public abstract applyIncomingResponseItem(responseItem: ResponseItem, requestItem: TRequestItem, requestInfo: LocalRequestInfo): Event | void | Promise<Event | void>;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { Event } from "@js-soft/ts-utils";
import { AcceptResponseItem, RejectResponseItem, Request, RequestItem, ResponseItem, ResponseItemResult } from "@nmshd/content";
import { CoreAddress } from "@nmshd/transport";
import { ValidationResult } from "../../common/ValidationResult";
Expand Down Expand Up @@ -40,7 +41,7 @@ export class GenericRequestItemProcessor<
return ValidationResult.success();
}

public applyIncomingResponseItem(responseItem: ResponseItem, requestItem: TRequestItem, requestInfo: LocalRequestInfo): Promise<void> | void {
public applyIncomingResponseItem(responseItem: ResponseItem, requestItem: TRequestItem, requestInfo: LocalRequestInfo): Event | void | Promise<Event | void> {
// do nothing
}
}
Loading

0 comments on commit 73d8168

Please sign in to comment.