import { EventBus } from "@js-soft/ts-utils"; import { AttributeValues, IdentityAttribute, IdentityAttributeQuery, IIdentityAttributeQuery, IIQLQuery, IQLQuery, IRelationshipAttributeQuery, IThirdPartyRelationshipAttributeQuery, RelationshipAttribute, RelationshipAttributeQuery, ThirdPartyRelationshipAttributeQuery } from "@nmshd/content"; import { CoreAddress, CoreId } from "@nmshd/core-types"; import { ConsumptionBaseController } from "../../consumption/ConsumptionBaseController"; import { ConsumptionController } from "../../consumption/ConsumptionController"; import { ValidationResult } from "../common"; import { AttributeForwardingDetails } from "./local/AttributeForwardingDetails"; import { AttributeTagCollection } from "./local/AttributeTagCollection"; import { LocalAttribute } from "./local/attributeTypes/LocalAttribute"; import { OwnIdentityAttribute } from "./local/attributeTypes/OwnIdentityAttribute"; import { OwnRelationshipAttribute } from "./local/attributeTypes/OwnRelationshipAttribute"; import { PeerIdentityAttribute } from "./local/attributeTypes/PeerIdentityAttribute"; import { PeerRelationshipAttribute } from "./local/attributeTypes/PeerRelationshipAttribute"; import { ThirdPartyRelationshipAttribute } from "./local/attributeTypes/ThirdPartyRelationshipAttribute"; import { EmittedAttributeDeletionInfo, ReceivedAttributeDeletionInfo } from "./local/deletionInfos"; import { IOwnIdentityAttributeSuccessorParams, IOwnRelationshipAttributeSuccessorParams, IPeerIdentityAttributeSuccessorParams, IThirdPartyRelationshipAttributeSuccessorParams, OwnIdentityAttributeSuccessorParams, OwnIdentityAttributeSuccessorParamsJSON, OwnRelationshipAttributeSuccessorParams, OwnRelationshipAttributeSuccessorParamsJSON, PeerIdentityAttributeSuccessorParams, PeerIdentityAttributeSuccessorParamsJSON, ThirdPartyRelationshipAttributeSuccessorParams, ThirdPartyRelationshipAttributeSuccessorParamsJSON } from "./local/successorParams"; import { IPeerRelationshipAttributeSuccessorParams, PeerRelationshipAttributeSuccessorParamsJSON } from "./local/successorParams/PeerRelationshipAttributeSuccessorParams"; export declare class AttributesController extends ConsumptionBaseController { private readonly eventBus; private readonly identity; private readonly setDefaultOwnIdentityAttributes; private attributes; private forwardingDetails; private tagCollection; private attributeTagClient; private readTagCollectionPromise; private readonly ETAG_DB_KEY; private readonly CACHE_TIMESTAMP_DB_KEY; private readonly TAG_COLLECTION_DB_KEY; constructor(parent: ConsumptionController, eventBus: EventBus, identity: { address: CoreAddress; }, setDefaultOwnIdentityAttributes: boolean); init(): Promise; getLocalAttribute(id: CoreId): Promise; getLocalAttributes(query?: any, hideTechnical?: boolean): Promise; private addHideTechnicalToQuery; executeIQLQuery(query: IIQLQuery): Promise; executeRelationshipAttributeQuery(query: IRelationshipAttributeQuery): Promise; executeThirdPartyRelationshipAttributeQuery(query: IThirdPartyRelationshipAttributeQuery): Promise; executeIdentityAttributeQuery(query: IIdentityAttributeQuery): Promise; createOwnIdentityAttribute(params: { content: IdentityAttribute; }): Promise; setAsDefaultOwnIdentityAttribute(newDefaultAttribute: OwnIdentityAttribute, skipOverwrite?: boolean): Promise; updateAttributeUnsafe(attribute: LocalAttribute): Promise; createPeerIdentityAttribute(params: { content: IdentityAttribute; peer: CoreAddress; sourceReference: CoreId; id: CoreId; }): Promise; createOwnRelationshipAttribute(params: { content: RelationshipAttribute; peer: CoreAddress; sourceReference: CoreId; id?: CoreId; }): Promise; createPeerRelationshipAttribute(params: { content: RelationshipAttribute; peer: CoreAddress; sourceReference: CoreId; id?: CoreId; }): Promise; createThirdPartyRelationshipAttribute(params: { content: RelationshipAttribute; peer: CoreAddress; sourceReference: CoreId; initialAttributePeer: CoreAddress; id: CoreId; }): Promise; private validateAttributeCreation; addForwardingDetailsToAttribute(attribute: T, peer: CoreAddress, sourceReference: CoreId): Promise; succeedOwnIdentityAttribute(predecessor: OwnIdentityAttribute, successorParams: IOwnIdentityAttributeSuccessorParams | OwnIdentityAttributeSuccessorParamsJSON, validate?: boolean): Promise<{ predecessor: OwnIdentityAttribute; successor: OwnIdentityAttribute; }>; private succeedAttributeUnsafe; private removeDefault; succeedPeerIdentityAttribute(predecessor: PeerIdentityAttribute, successorParams: IPeerIdentityAttributeSuccessorParams | PeerIdentityAttributeSuccessorParamsJSON, validate?: boolean): Promise<{ predecessor: PeerIdentityAttribute; successor: PeerIdentityAttribute; }>; succeedOwnRelationshipAttribute(predecessor: OwnRelationshipAttribute, successorParams: IOwnRelationshipAttributeSuccessorParams | OwnRelationshipAttributeSuccessorParamsJSON, validate?: boolean): Promise<{ predecessor: OwnRelationshipAttribute; successor: OwnRelationshipAttribute; }>; succeedPeerRelationshipAttribute(predecessor: PeerRelationshipAttribute, successorParams: IPeerRelationshipAttributeSuccessorParams | PeerRelationshipAttributeSuccessorParamsJSON, validate?: boolean): Promise<{ predecessor: PeerRelationshipAttribute; successor: PeerRelationshipAttribute; }>; succeedThirdPartyRelationshipAttribute(predecessor: ThirdPartyRelationshipAttribute, successorParams: IThirdPartyRelationshipAttributeSuccessorParams | ThirdPartyRelationshipAttributeSuccessorParamsJSON, validate?: boolean): Promise<{ predecessor: ThirdPartyRelationshipAttribute; successor: ThirdPartyRelationshipAttribute; }>; validateOwnIdentityAttributeSuccession(predecessor: OwnIdentityAttribute, successorParams: OwnIdentityAttributeSuccessorParams | OwnIdentityAttributeSuccessorParamsJSON): Promise; validatePeerIdentityAttributeSuccession(predecessor: PeerIdentityAttribute, successorParams: PeerIdentityAttributeSuccessorParams | PeerIdentityAttributeSuccessorParamsJSON): Promise; validateOwnRelationshipAttributeSuccession(predecessor: OwnRelationshipAttribute, successorParams: OwnRelationshipAttributeSuccessorParams | OwnRelationshipAttributeSuccessorParamsJSON): Promise; validatePeerRelationshipAttributeSuccession(predecessor: PeerRelationshipAttribute, successorParams: IPeerRelationshipAttributeSuccessorParams | PeerRelationshipAttributeSuccessorParamsJSON): Promise; validateThirdPartyRelationshipAttributeSuccession(predecessor: ThirdPartyRelationshipAttribute, successorParams: ThirdPartyRelationshipAttributeSuccessorParams | ThirdPartyRelationshipAttributeSuccessorParamsJSON): Promise; private validateAttributeSuccession; deleteAttribute(attributeId: CoreId): Promise; deleteAttributeUnsafe(id: CoreId): Promise; deleteAttributesExchangedWithPeer(peer: CoreAddress): Promise; deleteForwardingDetailsForAttribute(attribute: OwnIdentityAttribute | OwnRelationshipAttribute | PeerRelationshipAttribute, peer?: CoreAddress): Promise; private _deleteForwardingDetails; executeFullAttributeDeletionProcess(attribute: LocalAttribute): Promise; validateFullAttributeDeletionProcess(attributeId: CoreId): Promise; private detachSuccessor; private deletePredecessorsOfAttribute; private transferDefault; getVersionsOfAttribute(attribute: T): Promise; getPredecessorsOfAttribute(attribute: T): Promise; getSuccessorsOfAttribute(attribute: T): Promise; isSubsequentInSuccession(predecessorId: CoreId, successorId: CoreId): Promise; getVersionsOfAttributeSharedWithPeer(attribute: T, peerAddress: CoreAddress, onlyLatestVersion?: boolean, excludeToBeDeleted?: boolean): Promise; getPredecessorsOfAttributeSharedWithPeer(referenceAttribute: T, peerAddress: CoreAddress, excludeToBeDeleted?: boolean): Promise; getSuccessorsOfAttributeSharedWithPeer(referenceAttribute: T, peerAddress: CoreAddress, excludeToBeDeleted?: boolean): Promise; getPeersWithExclusivelyForwardedPredecessors(attributeId: CoreId): Promise<[CoreAddress, CoreId][]>; getOwnIdentityAttributeWithSameValue(value: AttributeValues.Identity.Json): Promise; getPeerIdentityAttributeWithSameValue(value: AttributeValues.Identity.Json, owner: string): Promise; getThirdPartyRelationshipAttributeWithSameValue(value: AttributeValues.Relationship.Json, peer: string, owner: string, key: string): Promise; private getAttributeWithSameValue; private trimAttribute; private trimAttributeValue; getRelationshipAttributesOfValueTypeToPeerWithGivenKeyAndOwner(key: string, owner: CoreAddress, valueType: string, peer: CoreAddress): Promise; getAttributeTagCollection(): Promise; private _getAttributeTagCollection; private getTagCollection; private setTagCollection; private getETag; private setETag; private isTagCollectionCacheValid; private getCacheTimestamp; private updateCacheTimestamp; validateTagsOfAttribute(attribute: IdentityAttribute | RelationshipAttribute): Promise; validateTagsForType(tags: string[], attributeValueType: string): Promise; validateAttributeQueryTags(attributeQuery: IdentityAttributeQuery | IQLQuery | RelationshipAttributeQuery | ThirdPartyRelationshipAttributeQuery): Promise; private isValidTag; validateAttributeCharacters(attribute: IdentityAttribute | RelationshipAttribute): boolean; setAttributeDeletionInfoOfDeletionProposedRelationship(relationshipId: CoreId): Promise; private setDeletionInfoOfAttributesSharedWithPeer; private setForwardedDeletionInfoOfAttributes; private setPeerDeletionInfoOfOwnRelationshipAttributes; private setPeerDeletionInfoOfReceivedAttributes; setForwardedDeletionInfoOfAttribute(attribute: OwnIdentityAttribute | OwnRelationshipAttribute | PeerRelationshipAttribute, deletionInfo: EmittedAttributeDeletionInfo | undefined, peer: CoreAddress, overrideDeletedOrToBeDeleted?: boolean): Promise; private isAttributeDeletedOrToBeDeletedByForwardingPeer; setPeerDeletionInfoOfOwnRelationshipAttribute(attribute: OwnRelationshipAttribute, deletionInfo: EmittedAttributeDeletionInfo | undefined, overrideDeletedOrToBeDeleted?: boolean): Promise; setPeerDeletionInfoOfReceivedAttribute(attribute: PeerIdentityAttribute | PeerRelationshipAttribute | ThirdPartyRelationshipAttribute, deletionInfo: ReceivedAttributeDeletionInfo | undefined, overrideDeletedOrToBeDeleted?: boolean): Promise; setForwardedDeletionInfoOfAttributeAndPredecessors(attribute: OwnIdentityAttribute | OwnRelationshipAttribute | PeerRelationshipAttribute, deletionInfo: EmittedAttributeDeletionInfo | undefined, peer: CoreAddress, overrideDeletedOrToBeDeleted?: boolean): Promise; setPeerDeletionInfoOfOwnRelationshipAttributeAndPredecessors(attribute: OwnRelationshipAttribute, deletionInfo: EmittedAttributeDeletionInfo | undefined, overrideDeletedOrToBeDeleted?: boolean): Promise; setPeerDeletionInfoOfReceivedAttributeAndPredecessors(attribute: PeerIdentityAttribute | PeerRelationshipAttribute | ThirdPartyRelationshipAttribute, deletionInfo: ReceivedAttributeDeletionInfo | undefined, overrideDeletedOrToBeDeleted?: boolean): Promise; markAttributeAsViewed(id: CoreId): Promise; isAttributeForwardedToPeer(attribute: LocalAttribute, peer: CoreAddress, excludeToBeDeleted?: boolean): Promise; getForwardingDetailsForPeer(attribute: LocalAttribute, peer: CoreAddress, excludeDeletedByRecipient?: boolean): Promise; private upsertForwardingDetailsForPeer; private updateNumberOfForwards; getForwardingPeers(attribute: LocalAttribute, includeToBeDeleted?: boolean): Promise; setDeletionInfoForForwardingPeer(localAttribute: OwnIdentityAttribute | OwnRelationshipAttribute | PeerRelationshipAttribute, deletionInfo: EmittedAttributeDeletionInfo | undefined, peer: CoreAddress, overrideDeleted?: boolean): Promise; getForwardingDetailsForAttribute(attribute: LocalAttribute, query?: any): Promise; getAttributesExchangedWithPeer(peer: CoreAddress, query: any, attributeForwardingDetailsQuery?: any, hideTechnical?: boolean, onlyLatestVersions?: boolean): Promise; getAttributesForwardedToPeer(peer: CoreAddress, query: any, attributeForwardingDetailsQuery?: any, hideTechnical?: boolean, onlyLatestVersions?: boolean): Promise; private getAttributesWithPeer; } //# sourceMappingURL=AttributesController.d.ts.map