Skip to main content

Built and signed on GitHub Actions

Works with
This package works with Cloudflare Workers, Node.js, Deno, Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
•JSR Score100%•
License
MIT
•
Downloads398/wk
•
Published2 weeks ago (2.4.5)

Vocabularies library for Fedify

class Follow
extends Activity

Indicates that the actor is "following" the object. Following is defined in the sense typically used within Social systems in which the actor is interested in any activity performed by or on the object. The target and origin typically have no defined meaning.

Constructors

new Follow(
values: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: ; attributions?: (Application | Group | Organization | Person | Service | URL)[]; audience?: Object | URL | null; audiences?: (Object | URL)[]; content?: string | LanguageString | null; contents?: ((string | LanguageString))[]; contexts?: (Object | Link | URL)[]; name?: string | LanguageString | null; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: (Object | Link | URL)[]; icon?: Image | URL | null; icons?: (Image | URL)[]; image?: Image | URL | null; images?: (Image | URL)[]; replyTarget?: Object | Link | URL | null; replyTargets?: (Object | Link | URL)[]; location?: Object | Link | URL | null; locations?: (Object | Link | URL)[]; preview?: Link | Object | URL | null; previews?: (Link | Object | URL)[]; published?: Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: Temporal.Instant | null; url?: URL | Link | null; urls?: ((URL | Link))[]; to?: Object | URL | null; tos?: (Object | URL)[]; bto?: Object | URL | null; btos?: (Object | URL)[]; cc?: Object | URL | null; ccs?: (Object | URL)[]; bcc?: Object | URL | null; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; interactionPolicy?: InteractionPolicy | null; approvedBy?: URL | null; likeAuthorization?: LikeAuthorization | URL | null; replyAuthorization?: ReplyAuthorization | URL | null; announceAuthorization?: AnnounceAuthorization | URL | null; translations?: (Translation)[]; actor?: ; actors?: (Application | Group | Organization | Person | Service | URL)[]; object?: Object | URL | null; objects?: (Object | URL)[]; target?: Object | URL | null; targets?: (Object | URL)[]; result?: Object | URL | null; results?: (Object | URL)[]; origin?: Object | URL | null; origins?: (Object | URL)[]; instrument?: Object | URL | null; instruments?: (Object | URL)[]; },
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; verifyPortableObject?: PortableObjectVerifier; }
)

Constructs a new instance of Follow with the given values.

Parameters
values: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: ; attributions?: (Application | Group | Organization | Person | Service | URL)[]; audience?: Object | URL | null; audiences?: (Object | URL)[]; content?: string | LanguageString | null; contents?: ((string | LanguageString))[]; contexts?: (Object | Link | URL)[]; name?: string | LanguageString | null; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: (Object | Link | URL)[]; icon?: Image | URL | null; icons?: (Image | URL)[]; image?: Image | URL | null; images?: (Image | URL)[]; replyTarget?: Object | Link | URL | null; replyTargets?: (Object | Link | URL)[]; location?: Object | Link | URL | null; locations?: (Object | Link | URL)[]; preview?: Link | Object | URL | null; previews?: (Link | Object | URL)[]; published?: Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: Temporal.Instant | null; url?: URL | Link | null; urls?: ((URL | Link))[]; to?: Object | URL | null; tos?: (Object | URL)[]; bto?: Object | URL | null; btos?: (Object | URL)[]; cc?: Object | URL | null; ccs?: (Object | URL)[]; bcc?: Object | URL | null; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; interactionPolicy?: InteractionPolicy | null; approvedBy?: URL | null; likeAuthorization?: LikeAuthorization | URL | null; replyAuthorization?: ReplyAuthorization | URL | null; announceAuthorization?: AnnounceAuthorization | URL | null; translations?: (Translation)[]; actor?: ; actors?: (Application | Group | Organization | Person | Service | URL)[]; object?: Object | URL | null; objects?: (Object | URL)[]; target?: Object | URL | null; targets?: (Object | URL)[]; result?: Object | URL | null; results?: (Object | URL)[]; origin?: Object | URL | null; origins?: (Object | URL)[]; instrument?: Object | URL | null; instruments?: (Object | URL)[]; }

The values to initialize the instance with.

optional
options: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; verifyPortableObject?: PortableObjectVerifier; }

The options to use for initialization.

Static Properties

The type URI of Follow: https://www.w3.org/ns/activitystreams#Follow.

Static Methods

protected
__fromJsonLd__Follow__(
json: unknown,
span: Span,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; verifyPortableObject?: PortableObjectVerifier; baseUrl?: URL; }
): Promise<Follow>
fromJsonLd(
json: unknown,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; verifyPortableObject?: PortableObjectVerifier; baseUrl?: URL; }
): Promise<Follow>

Converts a JSON-LD structure to an object of this type.

Methods

protected
_getCustomInspectProxy(): Record<string, unknown>
clone(
values?: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: ; attributions?: (Application | Group | Organization | Person | Service | URL)[]; audience?: Object | URL | null; audiences?: (Object | URL)[]; content?: string | LanguageString | null; contents?: ((string | LanguageString))[]; contexts?: (Object | Link | URL)[]; name?: string | LanguageString | null; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: (Object | Link | URL)[]; icon?: Image | URL | null; icons?: (Image | URL)[]; image?: Image | URL | null; images?: (Image | URL)[]; replyTarget?: Object | Link | URL | null; replyTargets?: (Object | Link | URL)[]; location?: Object | Link | URL | null; locations?: (Object | Link | URL)[]; preview?: Link | Object | URL | null; previews?: (Link | Object | URL)[]; published?: Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: Temporal.Instant | null; url?: URL | Link | null; urls?: ((URL | Link))[]; to?: Object | URL | null; tos?: (Object | URL)[]; bto?: Object | URL | null; btos?: (Object | URL)[]; cc?: Object | URL | null; ccs?: (Object | URL)[]; bcc?: Object | URL | null; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; interactionPolicy?: InteractionPolicy | null; approvedBy?: URL | null; likeAuthorization?: LikeAuthorization | URL | null; replyAuthorization?: ReplyAuthorization | URL | null; announceAuthorization?: AnnounceAuthorization | URL | null; translations?: (Translation)[]; actor?: ; actors?: (Application | Group | Organization | Person | Service | URL)[]; object?: Object | URL | null; objects?: (Object | URL)[]; target?: Object | URL | null; targets?: (Object | URL)[]; result?: Object | URL | null; results?: (Object | URL)[]; origin?: Object | URL | null; origins?: (Object | URL)[]; instrument?: Object | URL | null; instruments?: (Object | URL)[]; },
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; verifyPortableObject?: PortableObjectVerifier; }
): Follow

Clones this instance, optionally updating it with the given values.

This is a shallow copy: property arrays are copied, but nested objects and URLs are shared with this instance. Dereferencing accessors can cache fetched objects in the instance whose accessor is called. Hydrating a shared nested object through the clone can affect the original as well, and can change JSON-LD output when either is embedded in another object. Hydrating a top-level property of the clone does not update this instance's property.

To resolve properties without sharing nested objects, serialize and re-parse the instance before hydration rather than using this method. See the vocabulary manual for details, including how cached JSON-LD affects serialization.

A clone never inherits a signed JSON-LD representation retained by signObject(): the clone may differ from the document that the proof covers, so embedding the original secured JSON in a parent document would be wrong. Sign the clone again if it has to be embedded as a secured child.

toJsonLd(options?: { format?: "compact" | "expand"; contextLoader?: DocumentLoader; context?:
string
| Record<string, string>
| (string | Record<string, string>)[]
; }
): Promise<unknown>

Converts this object to a JSON-LD structure.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/vocab

Import symbol

import { Follow } from "@fedify/vocab";
or

Import directly with a jsr specifier

import { Follow } from "jsr:@fedify/vocab@^2.4.5";