Skip to main content
This release is 14 versions behind 1.3.3 — the latest version of @fedify/fedify. Jump to latest

Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
3 months ago (1.2.0)
class Profile
extends Object

A Profile is a content object that describes another Object, typically used to describe Actor Type objects. The Profile.describes property is used to reference the object being described by the profile.

Constructors

new
Profile(
values: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?:
Object
| URL
| null
; audiences?: (Object | URL)[]; content?:
string
| LanguageString
| null
; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?:
string
| LanguageString
| null
; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?:
Image
| URL
| null
; icons?: (Image | URL)[]; image?:
Image
| URL
| null
; images?: (Image | URL)[]; replyTarget?:
Object
| Link
| URL
| null
; replyTargets?: ()[]; location?:
Object
| Link
| URL
| null
; locations?: ()[]; preview?:
Link
| Object
| URL
| null
; previews?: ()[]; published?: Temporal.Instant | null; replies?:
Collection
| URL
| null
; startTime?: Temporal.Instant | null; summary?:
string
| LanguageString
| null
; summaries?: ((string | LanguageString))[]; tags?: ()[]; 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?: ; proofs?: (DataIntegrityProof | URL)[]; describes?:
Object
| URL
| null
; }
,
unnamed 1?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
)

Constructs a new instance of Profile with the given values.

Properties

readonly
describesId: URL | null

Similar to Profile.getDescribes, but returns its @id URL instead of the object itself.

Methods

[Symbol.for("nodejs.util.inspect.custom")](
_depth: number,
options: unknown,
inspect: (
value: unknown,
options: unknown,
) => string
,
): string
protected
_getCustomInspectProxy(): Record<string, unknown>
clone(
values?: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?:
Object
| URL
| null
; audiences?: (Object | URL)[]; content?:
string
| LanguageString
| null
; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?:
string
| LanguageString
| null
; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?:
Image
| URL
| null
; icons?: (Image | URL)[]; image?:
Image
| URL
| null
; images?: (Image | URL)[]; replyTarget?:
Object
| Link
| URL
| null
; replyTargets?: ()[]; location?:
Object
| Link
| URL
| null
; locations?: ()[]; preview?:
Link
| Object
| URL
| null
; previews?: ()[]; published?: Temporal.Instant | null; replies?:
Collection
| URL
| null
; startTime?: Temporal.Instant | null; summary?:
string
| LanguageString
| null
; summaries?: ((string | LanguageString))[]; tags?: ()[]; 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?: ; proofs?: (DataIntegrityProof | URL)[]; describes?:
Object
| URL
| null
; }
,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
): Profile

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

getDescribes(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): Promise<Object | null>

On a Profile object, the Profile.describes property identifies the object described by the Profile.

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.

Static Properties

readonly
typeId: URL

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

Static Methods

fromJsonLd(
json: unknown,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
): Promise<Profile>

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

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { Profile } from "@fedify/fedify/vocab";

---- OR ----

Import directly with a jsr specifier

import { Profile } from "jsr:@fedify/fedify/vocab";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { Profile } from "@fedify/fedify/vocab";

Add Package

yarn dlx jsr add @fedify/fedify

Import symbol

import { Profile } from "@fedify/fedify/vocab";

Add Package

pnpm dlx jsr add @fedify/fedify

Import symbol

import { Profile } from "@fedify/fedify/vocab";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { Profile } from "@fedify/fedify/vocab";