From 633c92eae865e957121e08de634aeee11a8b3992 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Mon, 24 Apr 2023 14:03:36 +0200 Subject: Updated 18 files, added 1692 files and deleted includes/system/compare.inc (automated) --- .../node_modules/matrix-js-sdk/lib/embedded.d.ts | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.d.ts (limited to 'includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.d.ts') diff --git a/includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.d.ts b/includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.d.ts new file mode 100644 index 0000000..0754b64 --- /dev/null +++ b/includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.d.ts @@ -0,0 +1,86 @@ +import { WidgetApi } from "matrix-widget-api"; +import { ISendEventResponse } from "./@types/requests"; +import { MatrixClient, IMatrixClientCreateOpts, IStartClientOpts, SendToDeviceContentMap } from "./client"; +import { SyncState } from "./sync"; +import { MatrixEvent } from "./models/event"; +import { Room } from "./models/room"; +import { ToDeviceBatch } from "./models/ToDeviceMessage"; +import { DeviceInfo } from "./crypto/deviceinfo"; +import { IOlmDevice } from "./crypto/algorithms/megolm"; +interface IStateEventRequest { + eventType: string; + stateKey?: string; +} +export interface ICapabilities { + /** + * Event types that this client expects to send. + */ + sendEvent?: string[]; + /** + * Event types that this client expects to receive. + */ + receiveEvent?: string[]; + /** + * Message types that this client expects to send, or true for all message + * types. + */ + sendMessage?: string[] | true; + /** + * Message types that this client expects to receive, or true for all + * message types. + */ + receiveMessage?: string[] | true; + /** + * Types of state events that this client expects to send. + */ + sendState?: IStateEventRequest[]; + /** + * Types of state events that this client expects to receive. + */ + receiveState?: IStateEventRequest[]; + /** + * To-device event types that this client expects to send. + */ + sendToDevice?: string[]; + /** + * To-device event types that this client expects to receive. + */ + receiveToDevice?: string[]; + /** + * Whether this client needs access to TURN servers. + * @defaultValue false + */ + turnServers?: boolean; +} +/** + * A MatrixClient that routes its requests through the widget API instead of the + * real CS API. + * @experimental This class is considered unstable! + */ +export declare class RoomWidgetClient extends MatrixClient { + private readonly widgetApi; + private readonly capabilities; + private readonly roomId; + private room?; + private widgetApiReady; + private lifecycle?; + private syncState; + constructor(widgetApi: WidgetApi, capabilities: ICapabilities, roomId: string, opts: IMatrixClientCreateOpts); + startClient(opts?: IStartClientOpts): Promise; + stopClient(): void; + joinRoom(roomIdOrAlias: string): Promise; + protected encryptAndSendEvent(room: Room, event: MatrixEvent): Promise; + sendStateEvent(roomId: string, eventType: string, content: any, stateKey?: string): Promise; + sendToDevice(eventType: string, contentMap: SendToDeviceContentMap): Promise<{}>; + queueToDevice({ eventType, batch }: ToDeviceBatch): Promise; + encryptAndSendToDevices(userDeviceInfoArr: IOlmDevice[], payload: object): Promise; + checkTurnServers(): Promise; + getSyncState(): SyncState | null; + private setSyncState; + private ack; + private onEvent; + private onToDevice; + private watchTurnServers; +} +export {}; +//# sourceMappingURL=embedded.d.ts.map \ No newline at end of file -- cgit