Describes a relationship between two individuals. The Relationship.subject and Relationship.object properties are used to identify the connected individuals.
See 5.2 Representing Relationships Between Entities for additional information.
Relationship(values: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?: ; audiences?: (Object | URL)[]; content?: ; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?: ; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?: ; icons?: (Image | URL)[]; image?: ; images?: (Image | URL)[]; replyTarget?: ; replyTargets?: ()[]; location?: ; locations?: ()[]; preview?: ; previews?: ()[]; published?: Temporal.Instant | null; replies?: ; startTime?: Temporal.Instant | null; summary?: ; summaries?: ((string | LanguageString))[]; tags?: ()[]; updated?: Temporal.Instant | null; url?: ; urls?: ((URL | Link))[]; to?: ; tos?: (Object | URL)[]; bto?: ; btos?: (Object | URL)[]; cc?: ; ccs?: (Object | URL)[]; bcc?: ; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: ; proofs?: (DataIntegrityProof | URL)[]; subject?: ; object?: ; objects?: (Object | URL)[]; relationship?: ; relationships?: (Object | URL)[]; },unnamed 1?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },)
Constructs a new instance of Relationship with the given values.
Similar to
Relationship.getObject,
but returns its @id
URL instead of the object itself.
Similar to
Relationship.getObjects,
but returns their @id
s instead of the objects themselves.
relationshipId: URL | null
Similar to
Relationship.getRelationship,
but returns its @id
URL instead of the object itself.
relationshipIds: URL[]
Similar to
Relationship.getRelationships,
but returns their @id
s instead of the objects themselves.
[Symbol.for("Deno.customInspect")](inspect: Deno.inspect,options: Deno.InspectOptions,): string
_getCustomInspectProxy(): Record<string, unknown>
clone(values?: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?: ; audiences?: (Object | URL)[]; content?: ; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?: ; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?: ; icons?: (Image | URL)[]; image?: ; images?: (Image | URL)[]; replyTarget?: ; replyTargets?: ()[]; location?: ; locations?: ()[]; preview?: ; previews?: ()[]; published?: Temporal.Instant | null; replies?: ; startTime?: Temporal.Instant | null; summary?: ; summaries?: ((string | LanguageString))[]; tags?: ()[]; updated?: Temporal.Instant | null; url?: ; urls?: ((URL | Link))[]; to?: ; tos?: (Object | URL)[]; bto?: ; btos?: (Object | URL)[]; cc?: ; ccs?: (Object | URL)[]; bcc?: ; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: ; proofs?: (DataIntegrityProof | URL)[]; subject?: ; object?: ; objects?: (Object | URL)[]; relationship?: ; relationships?: (Object | URL)[]; },options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },): Relationship
Clones this instance, optionally updating it with the given values.
getObject(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): Promise<Object | null>
Describes the entity to which the Relationship.subject is related.
getObjects(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): AsyncIterable<Object>
Describes the entity to which the Relationship.subject is related.
getRelationship(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): Promise<Object | null>
On a Relationship object, the Relationship.relationship property identifies the kind of relationship that exists between Relationship.subject and Relationship.object.
getRelationships(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): AsyncIterable<Object>
On a Relationship object, the Relationship.relationship property identifies the kind of relationship that exists between Relationship.subject and Relationship.object.
getSubject(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): Promise<Object | null>
On a Relationship object, the Relationship.subject property identifies one of the connected individuals. For instance, for a Relationship object describing "John is related to Sally", the Relationship.subject property would refer to John.
isCompactable(): boolean
The type URI of Relationship: https://www.w3.org/ns/activitystreams#Relationship
.
fromJsonLd(json: unknown,options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },): Promise<Relationship>
Converts a JSON-LD structure to an object of this type.