UNPKG

@fedify/fedify

Version:

An ActivityPub server framework

1,233 lines (1,232 loc) • 618 kB
import * as dntShim from "../_dnt.shims.js"; import { type Span, type TracerProvider } from "@opentelemetry/api"; import { LanguageTag } from "@phensley/language-tag"; import { type DocumentLoader } from "../runtime/docloader.js"; import { LanguageString } from "../runtime/langstr.js"; /** Describes an object of any kind. The Object type serves as the base type for * most of the other kinds of objects defined in the Activity Vocabulary, * including other Core types such as {@link Activity}, * {@link IntransitiveActivity}, {@link Collection} and * {@link OrderedCollection}. */ export declare class Object { #private; readonly id: URL | null; protected get _documentLoader(): DocumentLoader | undefined; protected get _contextLoader(): DocumentLoader | undefined; protected get _tracerProvider(): TracerProvider | undefined; protected get _warning(): { category: string[]; message: string; values?: Record<string, unknown>; } | undefined; protected get _cachedJsonLd(): unknown | undefined; protected set _cachedJsonLd(value: unknown | undefined); /** * The type URI of {@link Object}: `https://www.w3.org/ns/activitystreams#Object`. */ static get typeId(): URL; /** * Constructs a new instance of Object with the given values. * @param values The values to initialize the instance with. * @param options The options to use for initialization. */ constructor(values: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: Application | Group | Organization | Person | Service | URL | null; 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?: dntShim.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?: dntShim.Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: dntShim.Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: dntShim.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?: dntShim.Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; }, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }); /** * Clones this instance, optionally updating it with the given values. * @param values The values to update the clone with. * @options The options to use for cloning. * @returns The cloned instance. */ clone(values?: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: Application | Group | Organization | Person | Service | URL | null; 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?: dntShim.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?: dntShim.Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: dntShim.Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: dntShim.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?: dntShim.Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; }, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; }): Object; /** * Similar to * {@link Object.getAttachments}, * but returns their `@id`s instead of the objects themselves. */ get attachmentIds(): URL[]; /** Identifies a resource attached or related to an object that potentially * requires special handling. The intent is to provide a model that is at * least semantically similar to attachments in email. */ getAttachments(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object | Link | PropertyValue>; /** * Similar to * {@link Object.getAttribution}, * but returns its `@id` URL instead of the object itself. */ get attributionId(): URL | null; /** Identifies one or more entities to which this object is attributed. * The attributed entities might not be Actors. For instance, * an object might be attributed to the completion of another activity. */ getAttribution(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Application | Group | Organization | Person | Service | null>; /** * Similar to * {@link Object.getAttributions}, * but returns their `@id`s instead of the objects themselves. */ get attributionIds(): URL[]; /** Identifies one or more entities to which this object is attributed. * The attributed entities might not be Actors. For instance, * an object might be attributed to the completion of another activity. */ getAttributions(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Application | Group | Organization | Person | Service>; /** * Similar to * {@link Object.getAudience}, * but returns its `@id` URL instead of the object itself. */ get audienceId(): URL | null; /** Identifies one or more entities that represent the total population of * entities for which the object can considered to be relevant. */ getAudience(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Object | null>; /** * Similar to * {@link Object.getAudiences}, * but returns their `@id`s instead of the objects themselves. */ get audienceIds(): URL[]; /** Identifies one or more entities that represent the total population of * entities for which the object can considered to be relevant. */ getAudiences(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object>; /** The content or textual representation of the Object encoded as a JSON * string. By default, the value of `content` is HTML. The `mediaType` * property can be used in the object to indicate a different content type. * * The content MAY be expressed using multiple language-tagged values. */ get content(): string | LanguageString | null; /** The content or textual representation of the Object encoded as a JSON * string. By default, the value of `content` is HTML. The `mediaType` * property can be used in the object to indicate a different content type. * * The content MAY be expressed using multiple language-tagged values. */ get contents(): ((string | LanguageString))[]; /** * Similar to * {@link Object.getContexts}, * but returns their `@id`s instead of the objects themselves. */ get contextIds(): URL[]; /** Identifies the context within which the object exists or an activity was * performed. * * The notion of "context" used is intentionally vague. The intended function * is to serve as a means of grouping objects and activities that share * a common originating context or purpose. An example could be all activities * relating to a common project or event. */ getContexts(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object | Link>; /** A simple, human-readable, plain-text name for the object. HTML markup MUST * NOT be included. The name MAY be expressed using multiple language-tagged * values. */ get name(): string | LanguageString | null; /** A simple, human-readable, plain-text name for the object. HTML markup MUST * NOT be included. The name MAY be expressed using multiple language-tagged * values. */ get names(): ((string | LanguageString))[]; /** The date and time describing the actual or expected ending time of * the object. When used with an {@link Activity} object, for instance, * the `endTime`` property specifies the moment the activity concluded * or is expected to conclude. */ get endTime(): dntShim.Temporal.Instant | null; /** * Similar to * {@link Object.getGenerators}, * but returns their `@id`s instead of the objects themselves. */ get generatorIds(): URL[]; /** Identifies the entity (e.g. an application) that generated the object. */ getGenerators(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object | Link>; /** * Similar to * {@link Object.getIcon}, * but returns its `@id` URL instead of the object itself. */ get iconId(): URL | null; /** Indicates an entity that describes an icon for this object. * The image should have an aspect ratio of one (horizontal) to one * (vertical) and should be suitable for presentation at a small size. */ getIcon(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Image | null>; /** * Similar to * {@link Object.getIcons}, * but returns their `@id`s instead of the objects themselves. */ get iconIds(): URL[]; /** Indicates an entity that describes an icon for this object. * The image should have an aspect ratio of one (horizontal) to one * (vertical) and should be suitable for presentation at a small size. */ getIcons(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Image>; /** * Similar to * {@link Object.getImage}, * but returns its `@id` URL instead of the object itself. */ get imageId(): URL | null; /** Indicates an entity that describes an image for this object. * Unlike the icon property, there are no aspect ratio or display size * limitations assumed. */ getImage(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Image | null>; /** * Similar to * {@link Object.getImages}, * but returns their `@id`s instead of the objects themselves. */ get imageIds(): URL[]; /** Indicates an entity that describes an image for this object. * Unlike the icon property, there are no aspect ratio or display size * limitations assumed. */ getImages(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Image>; /** * Similar to * {@link Object.getReplyTarget}, * but returns its `@id` URL instead of the object itself. */ get replyTargetId(): URL | null; /** Indicates one or more entities for which this object is considered * a response. */ getReplyTarget(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Object | Link | null>; /** * Similar to * {@link Object.getReplyTargets}, * but returns their `@id`s instead of the objects themselves. */ get replyTargetIds(): URL[]; /** Indicates one or more entities for which this object is considered * a response. */ getReplyTargets(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object | Link>; /** * Similar to * {@link Object.getLocation}, * but returns its `@id` URL instead of the object itself. */ get locationId(): URL | null; /** Indicates one or more physical or logical locations associated with * the object. */ getLocation(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Object | Link | null>; /** * Similar to * {@link Object.getLocations}, * but returns their `@id`s instead of the objects themselves. */ get locationIds(): URL[]; /** Indicates one or more physical or logical locations associated with * the object. */ getLocations(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object | Link>; /** * Similar to * {@link Object.getPreview}, * but returns its `@id` URL instead of the object itself. */ get previewId(): URL | null; /** Identifies an entity that provides a preview of this object. */ getPreview(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Link | Object | null>; /** * Similar to * {@link Object.getPreviews}, * but returns their `@id`s instead of the objects themselves. */ get previewIds(): URL[]; /** Identifies an entity that provides a preview of this object. */ getPreviews(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Link | Object>; /** The date and time at which the object was published. */ get published(): dntShim.Temporal.Instant | null; /** * Similar to * {@link Object.getReplies}, * but returns its `@id` URL instead of the object itself. */ get repliesId(): URL | null; /** Identifies a {@link Collection} containing objects considered to be * responses to this object. */ getReplies(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Collection | null>; /** * Similar to * {@link Object.getShares}, * but returns its `@id` URL instead of the object itself. */ get sharesId(): URL | null; /** Every object *may* have a `shares` collection. This is a list of all * {@link Announce} activities with this object as the `object` property, * added as a [side effect]. The `shares` collection *must* be either * an {@link OrderedCollection} or a {@link Collection} and *may* be filtered * on privileges of an authenticated user or as appropriate * when no authentication is given. * * [side effect]: https://www.w3.org/TR/activitypub/#announce-activity-inbox */ getShares(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Collection | null>; /** * Similar to * {@link Object.getLikes}, * but returns its `@id` URL instead of the object itself. */ get likesId(): URL | null; /** Every object *may* have a `likes` collection. This is a list of all * {@link Like} activities with this object as the `object` property, * added as a [side effect]. The `likes` collection *must* be either * an {@link OrderedCollection} or a {@link Collection} and *may* be filtered * on privileges of an authenticated user or as appropriate * when no authentication is given. * * [side effect]: https://www.w3.org/TR/activitypub/#announce-activity-inbox */ getLikes(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Collection | null>; /** * Similar to * {@link Object.getEmojiReactions}, * but returns its `@id` URL instead of the object itself. */ get emojiReactionsId(): URL | null; /** Identifies a {@link Collection} containing objects considered to be * emoji reactions to this object. */ getEmojiReactions(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Collection | null>; /** The date and time describing the actual or expected starting time of * the object. When used with an {@link Activity} object, for instance, * the `startTime` property specifies the moment the activity began or * is scheduled to begin. */ get startTime(): dntShim.Temporal.Instant | null; /** A natural language summarization of the object encoded as HTML. * Multiple language tagged summaries MAY be provided. */ get summary(): string | LanguageString | null; /** A natural language summarization of the object encoded as HTML. * Multiple language tagged summaries MAY be provided. */ get summaries(): ((string | LanguageString))[]; /** * Similar to * {@link Object.getTags}, * but returns their `@id`s instead of the objects themselves. */ get tagIds(): URL[]; /** One or more "tags" that have been associated with an objects. * A tag can be any kind of Object. The key difference between `attachment` * and `tag` is that the former implies association by inclusion, * while the latter implies associated by reference. */ getTags(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object | Link>; /** The date and time at which the object was updated. */ get updated(): dntShim.Temporal.Instant | null; /** Identifies one or more links to representations of the object. */ get url(): URL | Link | null; /** Identifies one or more links to representations of the object. */ get urls(): ((URL | Link))[]; /** * Similar to * {@link Object.getTo}, * but returns its `@id` URL instead of the object itself. */ get toId(): URL | null; /** Identifies an entity considered to be part of the public primary audience * of an Object. */ getTo(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Object | null>; /** * Similar to * {@link Object.getTos}, * but returns their `@id`s instead of the objects themselves. */ get toIds(): URL[]; /** Identifies an entity considered to be part of the public primary audience * of an Object. */ getTos(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object>; /** * Similar to * {@link Object.getBto}, * but returns its `@id` URL instead of the object itself. */ get btoId(): URL | null; /** Identifies an Object that is part of the private primary audience of * this Object. */ getBto(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Object | null>; /** * Similar to * {@link Object.getBtos}, * but returns their `@id`s instead of the objects themselves. */ get btoIds(): URL[]; /** Identifies an Object that is part of the private primary audience of * this Object. */ getBtos(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object>; /** * Similar to * {@link Object.getCc}, * but returns its `@id` URL instead of the object itself. */ get ccId(): URL | null; /** Identifies an Object that is part of the public secondary audience of * this Object. */ getCc(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Object | null>; /** * Similar to * {@link Object.getCcs}, * but returns their `@id`s instead of the objects themselves. */ get ccIds(): URL[]; /** Identifies an Object that is part of the public secondary audience of * this Object. */ getCcs(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object>; /** * Similar to * {@link Object.getBcc}, * but returns its `@id` URL instead of the object itself. */ get bccId(): URL | null; /** Identifies one or more Objects that are part of the private secondary * audience of this Object. */ getBcc(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<Object | null>; /** * Similar to * {@link Object.getBccs}, * but returns their `@id`s instead of the objects themselves. */ get bccIds(): URL[]; /** Identifies one or more Objects that are part of the private secondary * audience of this Object. */ getBccs(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<Object>; /** When used on an {@link Object}, identifies the MIME media type of the value * of the `content` property. If not specified, the `content` property is * assumed to contain `text/html` content. */ get mediaType(): string | null; /** When the object describes a time-bound resource, such as an audio or video, * a meeting, etc, the `duration` property indicates the object's approximate * duration. The value MUST be expressed as an `xsd:duration` as defined by * W3C XML Schema Definition Language (XSD) 1.1 Part 2: DataTypes, section * 3.3.6 (e.g. a period of 5 seconds is represented as `PT5S`). */ get duration(): dntShim.Temporal.Duration | null; /** Whether it contains any sensitive contents. */ get sensitive(): boolean | null; /** The `source` property is intended to convey some sort of source from which * the `content` markup was derived, as a form of provenance, or to support * future editing by clients. In general, clients do the conversion from * `source` to `content`, not the other way around. */ get source(): Source | null; /** * Similar to * {@link Object.getProof}, * but returns its `@id` URL instead of the object itself. */ get proofId(): URL | null; /** A cryptographic proof that can be used to verify the integrity of an object. */ getProof(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): Promise<DataIntegrityProof | null>; /** * Similar to * {@link Object.getProofs}, * but returns their `@id`s instead of the objects themselves. */ get proofIds(): URL[]; /** A cryptographic proof that can be used to verify the integrity of an object. */ getProofs(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; tracerProvider?: TracerProvider; }): AsyncIterable<DataIntegrityProof>; /** * Converts this object to a JSON-LD structure. * @param options The options to use. * - `format`: The format of the output: `compact` or `expand`. * - `contextLoader`: The loader for remote JSON-LD contexts. * - `context`: The JSON-LD context to use. Not applicable when `format` is set to `'expand'`. * @returns The JSON-LD representation of this object. */ toJsonLd(options?: { format?: "compact" | "expand"; contextLoader?: DocumentLoader; context?: string | Record<string, string> | (string | Record<string, string>)[]; }): Promise<unknown>; protected isCompactable(): boolean; /** * Converts a JSON-LD structure to an object of this type. * @param json The JSON-LD structure to convert. * @param options The options to use. * - `documentLoader`: The loader for remote JSON-LD documents. * - `contextLoader`: The loader for remote JSON-LD contexts. * - `tracerProvider`: The OpenTelemetry tracer provider to use. * If omitted, the global tracer provider is used. * @returns The object of this type. * @throws {TypeError} If the given `json` is invalid. */ static fromJsonLd(json: unknown, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }): Promise<Object>; protected static __fromJsonLd__Object__(json: unknown, span: Span, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }): Promise<Object>; protected _getCustomInspectProxy(): Record<string, unknown>; } /** Represents a custom emoji. */ export declare class Emoji extends Object { /** * The type URI of {@link Emoji}: `http://joinmastodon.org/ns#Emoji`. */ static get typeId(): URL; /** * Constructs a new instance of Emoji with the given values. * @param values The values to initialize the instance with. * @param options The options to use for initialization. */ constructor(values: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: Application | Group | Organization | Person | Service | URL | null; 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?: dntShim.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?: dntShim.Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: dntShim.Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: dntShim.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?: dntShim.Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; }, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }); /** * Clones this instance, optionally updating it with the given values. * @param values The values to update the clone with. * @options The options to use for cloning. * @returns The cloned instance. */ clone(values?: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: Application | Group | Organization | Person | Service | URL | null; 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?: dntShim.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?: dntShim.Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: dntShim.Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: dntShim.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?: dntShim.Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; }, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; }): Emoji; /** * Converts this object to a JSON-LD structure. * @param options The options to use. * - `format`: The format of the output: `compact` or `expand`. * - `contextLoader`: The loader for remote JSON-LD contexts. * - `context`: The JSON-LD context to use. Not applicable when `format` is set to `'expand'`. * @returns The JSON-LD representation of this object. */ toJsonLd(options?: { format?: "compact" | "expand"; contextLoader?: DocumentLoader; context?: string | Record<string, string> | (string | Record<string, string>)[]; }): Promise<unknown>; protected isCompactable(): boolean; /** * Converts a JSON-LD structure to an object of this type. * @param json The JSON-LD structure to convert. * @param options The options to use. * - `documentLoader`: The loader for remote JSON-LD documents. * - `contextLoader`: The loader for remote JSON-LD contexts. * - `tracerProvider`: The OpenTelemetry tracer provider to use. * If omitted, the global tracer provider is used. * @returns The object of this type. * @throws {TypeError} If the given `json` is invalid. */ static fromJsonLd(json: unknown, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }): Promise<Emoji>; protected static __fromJsonLd__Emoji__(json: unknown, span: Span, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }): Promise<Emoji>; protected _getCustomInspectProxy(): Record<string, unknown>; } /** `ChatMessage`s are the messages sent in 1-on-1 chats. They are similar to * {@link Note}s, but the addressing is done by having a single AP actor in * the `to` field. Addressing multiple actors is not allowed. These messages * are always private, there is no public version of them. They are created with * a {@link Create} activity. */ export declare class ChatMessage extends Object { #private; /** * The type URI of {@link ChatMessage}: `http://litepub.social/ns#ChatMessage`. */ static get typeId(): URL; /** * Constructs a new instance of ChatMessage with the given values. * @param values The values to initialize the instance with. * @param options The options to use for initialization. */ constructor(values: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: Application | Group | Organization | Person | Service | URL | null; 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?: dntShim.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?: dntShim.Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: dntShim.Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: dntShim.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?: dntShim.Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; quoteUrl?: URL | null; }, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }); /** * Clones this instance, optionally updating it with the given values. * @param values The values to update the clone with. * @options The options to use for cloning. * @returns The cloned instance. */ clone(values?: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: Application | Group | Organization | Person | Service | URL | null; 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?: dntShim.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?: dntShim.Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: dntShim.Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: dntShim.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?: dntShim.Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; quoteUrl?: URL | null; }, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; }): ChatMessage; /** The URI of the ActivityStreams object that this object quotes. * * This property sets three JSON-LD properties at once under the hood: * * 1. https://www.w3.org/ns/activitystreams#quoteUrl * 2. https://misskey-hub.net/ns#_misskey_quote * 3. http://fedibird.com/ns#quoteUri * * When a JSON-LD object is parsed, this property is filled with one of * the values of those three properties in order. */ get quoteUrl(): URL | null; /** * Converts this object to a JSON-LD structure. * @param options The options to use. * - `format`: The format of the output: `compact` or `expand`. * - `contextLoader`: The loader for remote JSON-LD contexts. * - `context`: The JSON-LD context to use. Not applicable when `format` is set to `'expand'`. * @returns The JSON-LD representation of this object. */ toJsonLd(options?: { format?: "compact" | "expand"; contextLoader?: DocumentLoader; context?: string | Record<string, string> | (string | Record<string, string>)[]; }): Promise<unknown>; protected isCompactable(): boolean; /** * Converts a JSON-LD structure to an object of this type. * @param json The JSON-LD structure to convert. * @param options The options to use. * - `documentLoader`: The loader for remote JSON-LD documents. * - `contextLoader`: The loader for remote JSON-LD contexts. * - `tracerProvider`: The OpenTelemetry tracer provider to use. * If omitted, the global tracer provider is used. * @returns The object of this type. * @throws {TypeError} If the given `json` is invalid. */ static fromJsonLd(json: unknown, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }): Promise<ChatMessage>; protected static __fromJsonLd__ChatMessage__(json: unknown, span: Span, options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }): Promise<ChatMessage>; protected _getCustomInspectProxy(): Record<string, unknown>; } /** An Activity is a subtype of {@link Object} that describes some form of action * that may happen, is currently happening, or has already happened. * The {@link Activity} type itself serves as an abstract base type for all types * of activities. It is important to note that the {@link Activity} type itself * does not carry any specific semantics about the kind of action being taken. */ export declare class Activity extends Object { #private; /** * The type URI of {@link Activity}: `https://www.w3.org/ns/activitystreams#Activity`. */ static get typeId(): URL; /** * Constructs a new instance of Activity with the given values. * @param values The values to initialize the instance with. * @param options The options to use for initialization. */ constructor(values: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: Application | Group | Organization | Person | Service | URL | null; 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?: dntShim.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?: dntShim.Temporal.Instant | null; replies?: Collection | URL | null; shares?: Collection | URL | null; likes?: Collection | URL | null; emojiReactions?: Collection | URL | null; startTime?: dntShim.Temporal.Instant | null; summary?: string | LanguageString | null; summaries?: ((string | LanguageString))[]; tags?: (Object | Link | URL)[]; updated?: dntShim.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?: dntShim.Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: DataIntegrityProof | URL | null; proofs?: (DataIntegrityProof | URL)[]; actor?: Application | Group | Organization | Person | Service | URL | null; 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; }); /** * Clones this instance, optionally updating it with the given values. * @param values The values to update the clone with. * @options The options to use for cloning. * @returns The cloned instance. */ clone(values?: { id?: URL | null; attachments?: (Object | Link | PropertyValue | URL)[]; attribution?: Application | Group | Organization | Person | Service | URL | null; 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?: dntShim.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?: dntShim.Temporal.Instant | null; replies?: Collection | URL | null;