JSR

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

Downloads198/wk

Published5 days ago (2.3.6)

Vocabularies library for Fedify

Represents a sub-policy within an InteractionPolicy, defining which actors receive automatic or manual approval for a specific interaction type (like, reply, or announce).

Valid values in the approval lists include:

  • The ActivityStreams public collection (https://www.w3.org/ns/activitystreams#Public) for anyone
  • The post author's followers or following collection URIs
  • Individual actor URIs

When an actor appears in both automaticApproval and manualApproval, the more specific value takes precedence (individual URI overrides collection membership), and automaticApproval takes precedence over manualApproval for identical URIs.

See GoToSocial interaction controls for details.

Constructors

new InteractionRule(

values: { id?: URL | null; automaticApproval?: URL | null; automaticApprovals?: (URL)[]; manualApproval?: URL | null; manualApprovals?: (URL)[]; },

options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }

)

View code

Constructs a new instance of InteractionRule with the given values.

Parameters

values: { id?: URL | null; automaticApproval?: URL | null; automaticApprovals?: (URL)[]; manualApproval?: URL | null; manualApprovals?: (URL)[]; }

View code

The values to initialize the instance with.

The options to use for initialization.

Static Properties

The type URI of InteractionRule: https://gotosocial.org/ns#InteractionRule.

Static Methods

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

Properties

URIs of actors or collections whose interactions are automatically approved without requiring manual review by the post author.

URIs of actors or collections whose interactions are automatically approved without requiring manual review by the post author.

URIs of actors or collections whose interactions require manual approval by the post author. The post author can accept or reject these interactions at their discretion.

URIs of actors or collections whose interactions require manual approval by the post author. The post author can accept or reject these interactions at their discretion.

Methods

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

Converts this object to a JSON-LD structure.

Read the original on jsr.io ↗