summaryrefslogtreecommitdiff
path: root/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/relations.d.ts
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2023-11-17 23:25:29 +0100
committerRaindropsSys <raindrops@equestria.dev>2023-11-17 23:25:29 +0100
commit953ddd82e48dd206cef5ac94456549aed13b3ad5 (patch)
tree8f003106ee2e7f422e5a22d2ee04d0db302e66c0 /includes/external/matrix/node_modules/matrix-js-sdk/lib/models/relations.d.ts
parent62a9199846b0c07c03218703b33e8385764f42d9 (diff)
downloadpluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.gz
pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.bz2
pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.zip
Updated 30 files and deleted 2976 files (automated)
Diffstat (limited to 'includes/external/matrix/node_modules/matrix-js-sdk/lib/models/relations.d.ts')
-rw-r--r--includes/external/matrix/node_modules/matrix-js-sdk/lib/models/relations.d.ts114
1 files changed, 0 insertions, 114 deletions
diff --git a/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/relations.d.ts b/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/relations.d.ts
deleted file mode 100644
index e99d3b4..0000000
--- a/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/relations.d.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-import { MatrixEvent } from "./event";
-import { RelationType } from "../@types/event";
-import { TypedEventEmitter } from "./typed-event-emitter";
-import { MatrixClient } from "../client";
-import { Room } from "./room";
-export declare enum RelationsEvent {
- Add = "Relations.add",
- Remove = "Relations.remove",
- Redaction = "Relations.redaction"
-}
-export type EventHandlerMap = {
- [RelationsEvent.Add]: (event: MatrixEvent) => void;
- [RelationsEvent.Remove]: (event: MatrixEvent) => void;
- [RelationsEvent.Redaction]: (event: MatrixEvent) => void;
-};
-/**
- * A container for relation events that supports easy access to common ways of
- * aggregating such events. Each instance holds events that of a single relation
- * type and event type. All of the events also relate to the same original event.
- *
- * The typical way to get one of these containers is via
- * EventTimelineSet#getRelationsForEvent.
- */
-export declare class Relations extends TypedEventEmitter<RelationsEvent, EventHandlerMap> {
- readonly relationType: RelationType | string;
- readonly eventType: string;
- readonly altEventTypes?: string[] | undefined;
- private relationEventIds;
- private relations;
- private annotationsByKey;
- private annotationsBySender;
- private sortedAnnotationsByKey;
- private targetEvent;
- private creationEmitted;
- private readonly client;
- /**
- * @param relationType - The type of relation involved, such as "m.annotation", "m.reference", "m.replace", etc.
- * @param eventType - The relation event's type, such as "m.reaction", etc.
- * @param client - The client which created this instance. For backwards compatibility also accepts a Room.
- * @param altEventTypes - alt event types for relation events, for example to support unstable prefixed event types
- */
- constructor(relationType: RelationType | string, eventType: string, client: MatrixClient | Room, altEventTypes?: string[] | undefined);
- /**
- * Add relation events to this collection.
- *
- * @param event - The new relation event to be added.
- */
- addEvent(event: MatrixEvent): Promise<void>;
- /**
- * Remove relation event from this collection.
- *
- * @param event - The relation event to remove.
- */
- removeEvent(event: MatrixEvent): Promise<void>;
- /**
- * Listens for event status changes to remove cancelled events.
- *
- * @param event - The event whose status has changed
- * @param status - The new status
- */
- private onEventStatus;
- /**
- * Get all relation events in this collection.
- *
- * These are currently in the order of insertion to this collection, which
- * won't match timeline order in the case of scrollback.
- * TODO: Tweak `addEvent` to insert correctly for scrollback.
- *
- * Relation events in insertion order.
- */
- getRelations(): MatrixEvent[];
- private addAnnotationToAggregation;
- private removeAnnotationFromAggregation;
- /**
- * For relations that have been redacted, we want to remove them from
- * aggregation data sets and emit an update event.
- *
- * To do so, we listen for `Event.beforeRedaction`, which happens:
- * - after the server accepted the redaction and remote echoed back to us
- * - before the original event has been marked redacted in the client
- *
- * @param redactedEvent - The original relation event that is about to be redacted.
- */
- private onBeforeRedaction;
- /**
- * Get all events in this collection grouped by key and sorted by descending
- * event count in each group.
- *
- * This is currently only supported for the annotation relation type.
- *
- * An array of [key, events] pairs sorted by descending event count.
- * The events are stored in a Set (which preserves insertion order).
- */
- getSortedAnnotationsByKey(): [string, Set<MatrixEvent>][] | null;
- /**
- * Get all events in this collection grouped by sender.
- *
- * This is currently only supported for the annotation relation type.
- *
- * An object with each relation sender as a key and the matching Set of
- * events for that sender as a value.
- */
- getAnnotationsBySender(): Record<string, Set<MatrixEvent>> | null;
- /**
- * Returns the most recent (and allowed) m.replace relation, if any.
- *
- * This is currently only supported for the m.replace relation type,
- * once the target event is known, see `addEvent`.
- */
- getLastReplacement(): Promise<MatrixEvent | null>;
- setTargetEvent(event: MatrixEvent): Promise<void>;
- private maybeEmitCreated;
-}
-//# sourceMappingURL=relations.d.ts.map \ No newline at end of file