init
This commit is contained in:
188
node_modules/matrix-widget-api/lib/ClientWidgetApi.d.ts
generated
vendored
Normal file
188
node_modules/matrix-widget-api/lib/ClientWidgetApi.d.ts
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
import { EventEmitter } from "events";
|
||||
import { ITransport } from "./transport/ITransport";
|
||||
import { Widget } from "./models/Widget";
|
||||
import { Capability } from "./interfaces/Capabilities";
|
||||
import { WidgetDriver } from "./driver/WidgetDriver";
|
||||
import { ApiVersion } from "./interfaces/ApiVersion";
|
||||
import { IScreenshotActionResponseData } from "./interfaces/ScreenshotAction";
|
||||
import { IWidgetApiResponseData } from "./interfaces/IWidgetApiResponse";
|
||||
import { IModalWidgetOpenRequestData, IModalWidgetOpenRequestDataButton, IModalWidgetReturnData } from "./interfaces/ModalWidgetActions";
|
||||
import { IRoomEvent } from "./interfaces/IRoomEvent";
|
||||
import { Symbols } from "./Symbols";
|
||||
import { IThemeChangeActionRequestData } from "./interfaces/ThemeChangeAction";
|
||||
import { IToDeviceMessage } from "./interfaces/IToDeviceMessage";
|
||||
/**
|
||||
* API handler for the client side of widgets. This raises events
|
||||
* for each action received as `action:${action}` (eg: "action:screenshot").
|
||||
* Default handling can be prevented by using preventDefault() on the
|
||||
* raised event. The default handling varies for each action: ones
|
||||
* which the SDK can handle safely are acknowledged appropriately and
|
||||
* ones which are unhandled (custom or require the client to do something)
|
||||
* are rejected with an error.
|
||||
*
|
||||
* Events which are preventDefault()ed must reply using the transport.
|
||||
* The events raised will have a default of an IWidgetApiRequest
|
||||
* interface.
|
||||
*
|
||||
* When the ClientWidgetApi is ready to start sending requests, it will
|
||||
* raise a "ready" CustomEvent. After the ready event fires, actions can
|
||||
* be sent and the transport will be ready.
|
||||
*
|
||||
* When the widget has indicated it has loaded, this class raises a
|
||||
* "preparing" CustomEvent. The preparing event does not indicate that
|
||||
* the widget is ready to receive communications - that is signified by
|
||||
* the ready event exclusively.
|
||||
*
|
||||
* This class only handles one widget at a time.
|
||||
*/
|
||||
export declare class ClientWidgetApi extends EventEmitter {
|
||||
readonly widget: Widget;
|
||||
private readonly driver;
|
||||
readonly transport: ITransport;
|
||||
private cachedWidgetVersions;
|
||||
private contentLoadedActionSent;
|
||||
private readonly allowedCapabilities;
|
||||
private readonly allowedEvents;
|
||||
private isStopped;
|
||||
private turnServers;
|
||||
private contentLoadedWaitTimer?;
|
||||
private readonly pushRoomStateTasks;
|
||||
private readonly pushRoomStateResult;
|
||||
private flushRoomStateTask;
|
||||
/**
|
||||
* Creates a new client widget API. This will instantiate the transport
|
||||
* and start everything. When the iframe is loaded under the widget's
|
||||
* conditions, a "ready" event will be raised.
|
||||
* @param {Widget} widget The widget to communicate with.
|
||||
* @param {HTMLIFrameElement} iframe The iframe the widget is in.
|
||||
* @param {WidgetDriver} driver The driver for this widget/client.
|
||||
*/
|
||||
constructor(widget: Widget, iframe: HTMLIFrameElement, driver: WidgetDriver);
|
||||
hasCapability(capability: Capability): boolean;
|
||||
canUseRoomTimeline(roomId: string | Symbols.AnyRoom): boolean;
|
||||
canSendRoomEvent(eventType: string, msgtype?: string | null): boolean;
|
||||
canSendStateEvent(eventType: string, stateKey: string): boolean;
|
||||
canSendToDeviceEvent(eventType: string): boolean;
|
||||
canReceiveRoomEvent(eventType: string, msgtype?: string | null): boolean;
|
||||
canReceiveStateEvent(eventType: string, stateKey: string | null): boolean;
|
||||
canReceiveToDeviceEvent(eventType: string): boolean;
|
||||
canReceiveRoomAccountData(eventType: string): boolean;
|
||||
stop(): void;
|
||||
getWidgetVersions(): Promise<ApiVersion[]>;
|
||||
private beginCapabilities;
|
||||
private allowCapabilities;
|
||||
private onIframeLoad;
|
||||
private handleContentLoadedAction;
|
||||
private replyVersions;
|
||||
private supportsUpdateState;
|
||||
private handleCapabilitiesRenegotiate;
|
||||
private handleNavigate;
|
||||
private handleOIDC;
|
||||
private handleReadRoomAccountData;
|
||||
private handleReadEvents;
|
||||
private handleSendEvent;
|
||||
private handleUpdateDelayedEvent;
|
||||
private handleSendToDevice;
|
||||
private pollTurnServers;
|
||||
private handleWatchTurnServers;
|
||||
private handleUnwatchTurnServers;
|
||||
private handleReadRelations;
|
||||
private handleUserDirectorySearch;
|
||||
private handleGetMediaConfig;
|
||||
private handleRtcTransports;
|
||||
private handleUploadFile;
|
||||
private handleDownloadFile;
|
||||
private handleRtcLivekitGetToken;
|
||||
private handleRtcLivekitDelegateDelayedLeave;
|
||||
private handleDriverError;
|
||||
private handleMessage;
|
||||
/**
|
||||
* Informs the widget that the client's theme has changed.
|
||||
* @param theme The theme data, as an object with arbitrary contents.
|
||||
*/
|
||||
updateTheme(theme: IThemeChangeActionRequestData): Promise<IWidgetApiResponseData>;
|
||||
/**
|
||||
* Informs the widget that the client's language has changed.
|
||||
* @param lang The BCP 47 identifier representing the client's current language.
|
||||
*/
|
||||
updateLanguage(lang: string): Promise<IWidgetApiResponseData>;
|
||||
/**
|
||||
* Takes a screenshot of the widget.
|
||||
* @returns Resolves to the widget's screenshot.
|
||||
* @throws Throws if there is a problem.
|
||||
*/
|
||||
takeScreenshot(): Promise<IScreenshotActionResponseData>;
|
||||
/**
|
||||
* Alerts the widget to whether or not it is currently visible.
|
||||
* @param {boolean} isVisible Whether the widget is visible or not.
|
||||
* @returns {Promise<IWidgetApiResponseData>} Resolves when the widget acknowledges the update.
|
||||
*/
|
||||
updateVisibility(isVisible: boolean): Promise<IWidgetApiResponseData>;
|
||||
sendWidgetConfig(data: IModalWidgetOpenRequestData): Promise<void>;
|
||||
notifyModalWidgetButtonClicked(id: IModalWidgetOpenRequestDataButton["id"]): Promise<void>;
|
||||
notifyModalWidgetClose(data: IModalWidgetReturnData): Promise<void>;
|
||||
/**
|
||||
* Feeds an event to the widget. As a client you are expected to call this
|
||||
* for every new event in every room to which you are joined or invited.
|
||||
* @param {IRoomEvent} rawEvent The event to (try to) send to the widget.
|
||||
* @param {string} currentViewedRoomId The room ID the user is currently
|
||||
* interacting with. Not the room ID of the event.
|
||||
* @returns {Promise<void>} Resolves when delivered or if the widget is not
|
||||
* able to read the event due to permissions, rejects if the widget failed
|
||||
* to handle the event.
|
||||
* @deprecated It is recommended to communicate the viewed room ID by calling
|
||||
* {@link ClientWidgetApi.setViewedRoomId} rather than passing it to this
|
||||
* method.
|
||||
*/
|
||||
feedEvent(rawEvent: IRoomEvent, currentViewedRoomId: string): Promise<void>;
|
||||
/**
|
||||
* Feeds an event to the widget. As a client you are expected to call this
|
||||
* for every new event (including state events) in every room to which you are joined or invited.
|
||||
* @param {IRoomEvent} rawEvent The event to (try to) send to the widget.
|
||||
* @returns {Promise<void>} Resolves when delivered or if the widget is not
|
||||
* able to read the event due to permissions, rejects if the widget failed
|
||||
* to handle the event.
|
||||
*/
|
||||
feedEvent(rawEvent: IRoomEvent): Promise<void>;
|
||||
/**
|
||||
* Feeds a to-device event to the widget. As a client you are expected to
|
||||
* call this for every to-device event you receive.
|
||||
* @param {IRoomEvent} rawEvent The event to (try to) send to the widget.
|
||||
* @param {boolean} encrypted Whether the event contents were encrypted.
|
||||
* @returns {Promise<void>} Resolves when delivered or if the widget is not
|
||||
* able to receive the event due to permissions, rejects if the widget
|
||||
* failed to handle the event.
|
||||
*/
|
||||
feedToDevice(message: IToDeviceMessage, encrypted: boolean): Promise<void>;
|
||||
private viewedRoomId;
|
||||
/**
|
||||
* Indicate that a room is being viewed (making it possible for the widget
|
||||
* to interact with it).
|
||||
*/
|
||||
setViewedRoomId(roomId: string | null): void;
|
||||
private flushRoomState;
|
||||
/**
|
||||
* Reads the current sticky state of the room and pushes it to the widget.
|
||||
*
|
||||
* It will only push events that the widget is allowed to receive.
|
||||
* @param roomId
|
||||
* @private
|
||||
*/
|
||||
private pushStickyState;
|
||||
/**
|
||||
* Read the room's state and push all entries that the widget is allowed to
|
||||
* read through to the widget.
|
||||
*/
|
||||
private pushRoomState;
|
||||
/**
|
||||
* Feeds a room state update to the widget. As a client you are expected to
|
||||
* call this for every state update in every room to which you are joined or
|
||||
* invited.
|
||||
* @param {IRoomEvent} rawEvent The state event corresponding to the updated
|
||||
* room state entry.
|
||||
* @returns {Promise<void>} Resolves when delivered or if the widget is not
|
||||
* able to receive the room state due to permissions, rejects if the
|
||||
* widget failed to handle the update.
|
||||
*/
|
||||
feedStateUpdate(rawEvent: IRoomEvent): Promise<void>;
|
||||
}
|
||||
2087
node_modules/matrix-widget-api/lib/ClientWidgetApi.js
generated
vendored
Normal file
2087
node_modules/matrix-widget-api/lib/ClientWidgetApi.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/matrix-widget-api/lib/ClientWidgetApi.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/ClientWidgetApi.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/matrix-widget-api/lib/Symbols.d.ts
generated
vendored
Normal file
3
node_modules/matrix-widget-api/lib/Symbols.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare enum Symbols {
|
||||
AnyRoom = "*"
|
||||
}
|
||||
27
node_modules/matrix-widget-api/lib/Symbols.js
generated
vendored
Normal file
27
node_modules/matrix-widget-api/lib/Symbols.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.Symbols = void 0;
|
||||
/*
|
||||
* Copyright 2021 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var Symbols = /*#__PURE__*/function (Symbols) {
|
||||
Symbols["AnyRoom"] = "*";
|
||||
return Symbols;
|
||||
}({});
|
||||
exports.Symbols = Symbols;
|
||||
//# sourceMappingURL=Symbols.js.map
|
||||
1
node_modules/matrix-widget-api/lib/Symbols.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/Symbols.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Symbols.js","names":["Symbols","exports"],"sources":["../src/Symbols.ts"],"sourcesContent":["/*\n * Copyright 2021 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum Symbols {\n AnyRoom = \"*\",\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,IAgBYA,OAAO,0BAAPA,OAAO;EAAPA,OAAO;EAAA,OAAPA,OAAO;AAAA;AAAAC,OAAA,CAAAD,OAAA,GAAAA,OAAA","ignoreList":[]}
|
||||
364
node_modules/matrix-widget-api/lib/WidgetApi.d.ts
generated
vendored
Normal file
364
node_modules/matrix-widget-api/lib/WidgetApi.d.ts
generated
vendored
Normal file
@@ -0,0 +1,364 @@
|
||||
import { EventEmitter } from "events";
|
||||
import { Capability } from "./interfaces/Capabilities";
|
||||
import { ApiVersion } from "./interfaces/ApiVersion";
|
||||
import { ITransport } from "./transport/ITransport";
|
||||
import { IWidgetApiErrorResponseDataDetails } from "./interfaces/IWidgetApiErrorResponse";
|
||||
import { IStickerActionRequestData } from "./interfaces/StickerAction";
|
||||
import { IOpenIDCredentials } from "./interfaces/GetOpenIDAction";
|
||||
import { WidgetType } from "./interfaces/WidgetType";
|
||||
import { IModalWidgetCreateData, IModalWidgetOpenRequestDataButton, IModalWidgetReturnData, ModalButtonID } from "./interfaces/ModalWidgetActions";
|
||||
import { ISendEventFromWidgetResponseData } from "./interfaces/SendEventAction";
|
||||
import { ISendToDeviceFromWidgetResponseData } from "./interfaces/SendToDeviceAction";
|
||||
import { IRoomEvent } from "./interfaces/IRoomEvent";
|
||||
import { IRoomAccountData } from "./interfaces/IRoomAccountData";
|
||||
import { ITurnServer } from "./interfaces/TurnServerActions";
|
||||
import { Symbols } from "./Symbols";
|
||||
import { IReadRelationsFromWidgetResponseData } from "./interfaces/ReadRelationsAction";
|
||||
import { IUserDirectorySearchFromWidgetResponseData } from "./interfaces/UserDirectorySearchAction";
|
||||
import { IGetMediaConfigActionFromWidgetResponseData } from "./interfaces/GetMediaConfigAction";
|
||||
import { IRtcTransportsFromWidgetResponseData } from "./interfaces/RtcTransportsAction";
|
||||
import { IUploadFileActionFromWidgetResponseData } from "./interfaces/UploadFileAction";
|
||||
import { IDownloadFileActionFromWidgetResponseData } from "./interfaces/DownloadFileAction";
|
||||
import { IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData, IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData, IRtcLivekitGetTokenFromWidgetRequestData, IRtcLivekitGetTokenFromWidgetResponseData } from "./interfaces/RtcLivekitActions";
|
||||
import { IUpdateDelayedEventFromWidgetResponseData } from "./interfaces/UpdateDelayedEventAction";
|
||||
export declare class WidgetApiResponseError extends Error {
|
||||
readonly data: IWidgetApiErrorResponseDataDetails;
|
||||
constructor(message: string, data: IWidgetApiErrorResponseDataDetails);
|
||||
}
|
||||
/**
|
||||
* API handler for widgets. This raises events for each action
|
||||
* received as `action:${action}` (eg: "action:screenshot").
|
||||
* Default handling can be prevented by using preventDefault()
|
||||
* on the raised event. The default handling varies for each
|
||||
* action: ones which the SDK can handle safely are acknowledged
|
||||
* appropriately and ones which are unhandled (custom or require
|
||||
* the widget to do something) are rejected with an error.
|
||||
*
|
||||
* Events which are preventDefault()ed must reply using the
|
||||
* transport. The events raised will have a detail of an
|
||||
* IWidgetApiRequest interface.
|
||||
*
|
||||
* When the WidgetApi is ready to start sending requests, it will
|
||||
* raise a "ready" CustomEvent. After the ready event fires, actions
|
||||
* can be sent and the transport will be ready.
|
||||
*/
|
||||
export declare class WidgetApi extends EventEmitter {
|
||||
readonly transport: ITransport;
|
||||
private capabilitiesFinished;
|
||||
private supportsMSC2974Renegotiate;
|
||||
private readonly requestedCapabilities;
|
||||
private approvedCapabilities?;
|
||||
private cachedClientVersions?;
|
||||
private turnServerWatchers;
|
||||
/**
|
||||
* Creates a new API handler for the given widget.
|
||||
* @param {string} widgetId The widget ID to listen for. If not supplied then
|
||||
* the API will use the widget ID from the first valid request it receives.
|
||||
* @param {string} clientOrigin The origin of the client, or null if not known.
|
||||
*/
|
||||
constructor(widgetId?: string | null, clientOrigin?: string | null);
|
||||
/**
|
||||
* Determines if the widget was granted a particular capability. Note that on
|
||||
* clients where the capabilities are not fed back to the widget this function
|
||||
* will rely on requested capabilities instead.
|
||||
* @param {Capability} capability The capability to check for approval of.
|
||||
* @returns {boolean} True if the widget has approval for the given capability.
|
||||
*/
|
||||
hasCapability(capability: Capability): boolean;
|
||||
/**
|
||||
* Request a capability from the client. It is not guaranteed to be allowed,
|
||||
* but will be asked for.
|
||||
* @param {Capability} capability The capability to request.
|
||||
* @throws Throws if the capabilities negotiation has already started and the
|
||||
* widget is unable to request additional capabilities.
|
||||
*/
|
||||
requestCapability(capability: Capability): void;
|
||||
/**
|
||||
* Request capabilities from the client. They are not guaranteed to be allowed,
|
||||
* but will be asked for if the negotiation has not already happened.
|
||||
* @param {Capability[]} capabilities The capabilities to request.
|
||||
* @throws Throws if the capabilities negotiation has already started.
|
||||
*/
|
||||
requestCapabilities(capabilities: Capability[]): void;
|
||||
/**
|
||||
* Requests the capability to interact with rooms other than the user's currently
|
||||
* viewed room. Applies to event receiving and sending.
|
||||
* @param {string | Symbols.AnyRoom} roomId The room ID, or `Symbols.AnyRoom` to
|
||||
* denote all known rooms.
|
||||
*/
|
||||
requestCapabilityForRoomTimeline(roomId: string | Symbols.AnyRoom): void;
|
||||
/**
|
||||
* Requests the capability to send a given state event with optional explicit
|
||||
* state key. It is not guaranteed to be allowed, but will be asked for if the
|
||||
* negotiation has not already happened.
|
||||
* @param {string} eventType The state event type to ask for.
|
||||
* @param {string} stateKey If specified, the specific state key to request.
|
||||
* Otherwise all state keys will be requested.
|
||||
*/
|
||||
requestCapabilityToSendState(eventType: string, stateKey?: string): void;
|
||||
/**
|
||||
* Requests the capability to receive a given state event with optional explicit
|
||||
* state key. It is not guaranteed to be allowed, but will be asked for if the
|
||||
* negotiation has not already happened.
|
||||
* @param {string} eventType The state event type to ask for.
|
||||
* @param {string} stateKey If specified, the specific state key to request.
|
||||
* Otherwise all state keys will be requested.
|
||||
*/
|
||||
requestCapabilityToReceiveState(eventType: string, stateKey?: string): void;
|
||||
/**
|
||||
* Requests the capability to send a given to-device event. It is not
|
||||
* guaranteed to be allowed, but will be asked for if the negotiation has
|
||||
* not already happened.
|
||||
* @param {string} eventType The room event type to ask for.
|
||||
*/
|
||||
requestCapabilityToSendToDevice(eventType: string): void;
|
||||
/**
|
||||
* Requests the capability to receive a given to-device event. It is not
|
||||
* guaranteed to be allowed, but will be asked for if the negotiation has
|
||||
* not already happened.
|
||||
* @param {string} eventType The room event type to ask for.
|
||||
*/
|
||||
requestCapabilityToReceiveToDevice(eventType: string): void;
|
||||
/**
|
||||
* Requests the capability to send a given room event. It is not guaranteed to be
|
||||
* allowed, but will be asked for if the negotiation has not already happened.
|
||||
* @param {string} eventType The room event type to ask for.
|
||||
*/
|
||||
requestCapabilityToSendEvent(eventType: string): void;
|
||||
/**
|
||||
* Requests the capability to receive a given room event. It is not guaranteed to be
|
||||
* allowed, but will be asked for if the negotiation has not already happened.
|
||||
* @param {string} eventType The room event type to ask for.
|
||||
*/
|
||||
requestCapabilityToReceiveEvent(eventType: string): void;
|
||||
/**
|
||||
* Requests the capability to send a given message event with optional explicit
|
||||
* `msgtype`. It is not guaranteed to be allowed, but will be asked for if the
|
||||
* negotiation has not already happened.
|
||||
* @param {string} msgtype If specified, the specific msgtype to request.
|
||||
* Otherwise all message types will be requested.
|
||||
*/
|
||||
requestCapabilityToSendMessage(msgtype?: string): void;
|
||||
/**
|
||||
* Requests the capability to receive a given message event with optional explicit
|
||||
* `msgtype`. It is not guaranteed to be allowed, but will be asked for if the
|
||||
* negotiation has not already happened.
|
||||
* @param {string} msgtype If specified, the specific msgtype to request.
|
||||
* Otherwise all message types will be requested.
|
||||
*/
|
||||
requestCapabilityToReceiveMessage(msgtype?: string): void;
|
||||
/**
|
||||
* Requests the capability to receive a given item in room account data. It is not guaranteed to be
|
||||
* allowed, but will be asked for if the negotiation has not already happened.
|
||||
* @param {string} eventType The state event type to ask for.
|
||||
*/
|
||||
requestCapabilityToReceiveRoomAccountData(eventType: string): void;
|
||||
/**
|
||||
* Requests the capability to obtain a JWT for a LiveKit SFU through the client.
|
||||
* It is not guaranteed to be allowed, but will be asked for if the negotiation
|
||||
* has not already happened.
|
||||
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
||||
*/
|
||||
requestCapabilityToGetRtcLivekitToken(): void;
|
||||
/**
|
||||
* Requests the capability to hand a MatrixRTC session's delayed leave event over
|
||||
* to the server through the client. It is not guaranteed to be allowed, but will
|
||||
* be asked for if the negotiation has not already happened.
|
||||
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
||||
*/
|
||||
requestCapabilityToDelegateRtcLivekitDelayedLeave(): void;
|
||||
/**
|
||||
* Requests an OpenID Connect token from the client for the currently logged in
|
||||
* user. This token can be validated server-side with the federation API. Note
|
||||
* that the widget is responsible for validating the token and caching any results
|
||||
* it needs.
|
||||
* @returns {Promise<IOpenIDCredentials>} Resolves to a token for verification.
|
||||
* @throws Throws if the user rejected the request or the request failed.
|
||||
*/
|
||||
requestOpenIDConnectToken(): Promise<IOpenIDCredentials>;
|
||||
/**
|
||||
* Asks the client for additional capabilities. Capabilities can be queued for this
|
||||
* request with the requestCapability() functions.
|
||||
* @returns {Promise<void>} Resolves when complete. Note that the promise resolves when
|
||||
* the capabilities request has gone through, not when the capabilities are approved/denied.
|
||||
* Use the WidgetApiToWidgetAction.NotifyCapabilities action to detect changes.
|
||||
*/
|
||||
updateRequestedCapabilities(): Promise<void>;
|
||||
/**
|
||||
* Tell the client that the content has been loaded.
|
||||
* @returns {Promise} Resolves when the client acknowledges the request.
|
||||
*/
|
||||
sendContentLoaded(): Promise<void>;
|
||||
/**
|
||||
* Sends a sticker to the client.
|
||||
* @param {IStickerActionRequestData} sticker The sticker to send.
|
||||
* @returns {Promise} Resolves when the client acknowledges the request.
|
||||
*/
|
||||
sendSticker(sticker: IStickerActionRequestData): Promise<void>;
|
||||
/**
|
||||
* Asks the client to set the always-on-screen status for this widget.
|
||||
* @param {boolean} value The new state to request.
|
||||
* @returns {Promise<boolean>} Resolve with true if the client was able to fulfill
|
||||
* the request, resolves to false otherwise. Rejects if an error occurred.
|
||||
*/
|
||||
setAlwaysOnScreen(value: boolean): Promise<boolean>;
|
||||
/**
|
||||
* Opens a modal widget.
|
||||
* @param {string} url The URL to the modal widget.
|
||||
* @param {string} name The name of the widget.
|
||||
* @param {IModalWidgetOpenRequestDataButton[]} buttons The buttons to have on the widget.
|
||||
* @param {IModalWidgetCreateData} data Data to supply to the modal widget.
|
||||
* @param {WidgetType} type The type of modal widget.
|
||||
* @returns {Promise<void>} Resolves when the modal widget has been opened.
|
||||
*/
|
||||
openModalWidget(url: string, name: string, buttons?: IModalWidgetOpenRequestDataButton[], data?: IModalWidgetCreateData, type?: WidgetType): Promise<void>;
|
||||
/**
|
||||
* Closes the modal widget. The widget's session will be terminated shortly after.
|
||||
* @param {IModalWidgetReturnData} data Optional data to close the modal widget with.
|
||||
* @returns {Promise<void>} Resolves when complete.
|
||||
*/
|
||||
closeModalWidget(data?: IModalWidgetReturnData): Promise<void>;
|
||||
sendRoomEvent(eventType: string, content: unknown, roomId?: string, delay?: number, stickyDurationMs?: number): Promise<ISendEventFromWidgetResponseData>;
|
||||
/**
|
||||
* @deprecated Use the overload of this function without {@link parentDelayId} instead.
|
||||
*/
|
||||
sendRoomEvent(eventType: string, content: unknown, roomId?: string, delay?: number, parentDelayId?: string, stickyDurationMs?: number): Promise<ISendEventFromWidgetResponseData>;
|
||||
sendStateEvent(eventType: string, stateKey: string, content: unknown, roomId?: string, delay?: number): Promise<ISendEventFromWidgetResponseData>;
|
||||
/**
|
||||
* @deprecated Use the overload of this function without {@link parentDelayId} instead.
|
||||
*/
|
||||
sendStateEvent(eventType: string, stateKey: string, content: unknown, roomId?: string, delay?: number, parentDelayId?: string): Promise<ISendEventFromWidgetResponseData>;
|
||||
private sendEvent;
|
||||
/**
|
||||
* @experimental This currently relies on an unstable MSC (MSC4157).
|
||||
*/
|
||||
cancelScheduledDelayedEvent(delayId: string): Promise<IUpdateDelayedEventFromWidgetResponseData>;
|
||||
/**
|
||||
* @experimental This currently relies on an unstable MSC (MSC4157).
|
||||
*/
|
||||
restartScheduledDelayedEvent(delayId: string): Promise<IUpdateDelayedEventFromWidgetResponseData>;
|
||||
/**
|
||||
* @experimental This currently relies on an unstable MSC (MSC4157).
|
||||
*/
|
||||
sendScheduledDelayedEvent(delayId: string): Promise<IUpdateDelayedEventFromWidgetResponseData>;
|
||||
/**
|
||||
* Sends a to-device event.
|
||||
* @param {string} eventType The type of events being sent.
|
||||
* @param {boolean} encrypted Whether to encrypt the message contents.
|
||||
* @param {Object} contentMap A map from user IDs to device IDs to message contents.
|
||||
* @returns {Promise<ISendToDeviceFromWidgetResponseData>} Resolves when complete.
|
||||
*/
|
||||
sendToDevice(eventType: string, encrypted: boolean, contentMap: {
|
||||
[userId: string]: {
|
||||
[deviceId: string]: object;
|
||||
};
|
||||
}): Promise<ISendToDeviceFromWidgetResponseData>;
|
||||
readRoomAccountData(eventType: string, roomIds?: (string | Symbols.AnyRoom)[]): Promise<IRoomAccountData[]>;
|
||||
readRoomEvents(eventType: string, limit?: number, msgtype?: string, roomIds?: (string | Symbols.AnyRoom)[], since?: string | undefined): Promise<IRoomEvent[]>;
|
||||
/**
|
||||
* Reads all related events given a known eventId.
|
||||
* @param eventId The id of the parent event to be read.
|
||||
* @param roomId The room to look within. When undefined, the user's currently
|
||||
* viewed room.
|
||||
* @param relationType The relationship type of child events to search for.
|
||||
* When undefined, all relations are returned.
|
||||
* @param eventType The event type of child events to search for. When undefined,
|
||||
* all related events are returned.
|
||||
* @param limit The maximum number of events to retrieve per room. If not
|
||||
* supplied, the server will apply a default limit.
|
||||
* @param from The pagination token to start returning results from, as
|
||||
* received from a previous call. If not supplied, results start at the most
|
||||
* recent topological event known to the server.
|
||||
* @param to The pagination token to stop returning results at. If not
|
||||
* supplied, results continue up to limit or until there are no more events.
|
||||
* @param direction The direction to search for according to MSC3715.
|
||||
* @returns Resolves to the room relations.
|
||||
*/
|
||||
readEventRelations(eventId: string, roomId?: string, relationType?: string, eventType?: string, limit?: number, from?: string, to?: string, direction?: "f" | "b"): Promise<IReadRelationsFromWidgetResponseData>;
|
||||
readStateEvents(eventType: string, limit?: number, stateKey?: string, roomIds?: (string | Symbols.AnyRoom)[]): Promise<IRoomEvent[]>;
|
||||
/**
|
||||
* Sets a button as disabled or enabled on the modal widget. Buttons are enabled by default.
|
||||
* @param {ModalButtonID} buttonId The button ID to enable/disable.
|
||||
* @param {boolean} isEnabled Whether or not the button is enabled.
|
||||
* @returns {Promise<void>} Resolves when complete.
|
||||
* @throws Throws if the button cannot be disabled, or the client refuses to disable the button.
|
||||
*/
|
||||
setModalButtonEnabled(buttonId: ModalButtonID, isEnabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Attempts to navigate the client to the given URI. This can only be called with Matrix URIs
|
||||
* (currently only matrix.to, but in future a Matrix URI scheme will be defined).
|
||||
* @param {string} uri The URI to navigate to.
|
||||
* @returns {Promise<void>} Resolves when complete.
|
||||
* @throws Throws if the URI is invalid or cannot be processed.
|
||||
* @experimental This currently relies on an unstable MSC (MSC2931).
|
||||
*/
|
||||
navigateTo(uri: string): Promise<void>;
|
||||
/**
|
||||
* Starts watching for TURN servers, yielding an initial set of credentials as soon as possible,
|
||||
* and thereafter yielding new credentials whenever the previous ones expire.
|
||||
* @yields {ITurnServer} The TURN server URIs and credentials currently available to the widget.
|
||||
*/
|
||||
getTurnServers(): AsyncGenerator<ITurnServer>;
|
||||
/**
|
||||
* Search for users in the user directory.
|
||||
* @param searchTerm The term to search for.
|
||||
* @param limit The maximum number of results to return. If not supplied, the
|
||||
* @returns Resolves to the search results.
|
||||
*/
|
||||
searchUserDirectory(searchTerm: string, limit?: number): Promise<IUserDirectorySearchFromWidgetResponseData>;
|
||||
/**
|
||||
* Get the config for the media repository.
|
||||
* @returns Promise which resolves with an object containing the config.
|
||||
*/
|
||||
getMediaConfig(): Promise<IGetMediaConfigActionFromWidgetResponseData>;
|
||||
/**
|
||||
* Discover the RTC transports (e.g. SFUs, TURN servers) the homeserver
|
||||
* supports (MSC4515 / MSC4143).
|
||||
* @returns Promise which resolves with the available RTC transports.
|
||||
*/
|
||||
getRtcTransports(): Promise<IRtcTransportsFromWidgetResponseData>;
|
||||
/**
|
||||
* Upload a file to the media repository on the homeserver.
|
||||
* @param file - The object to upload. Something that can be sent to
|
||||
* XMLHttpRequest.send (typically a File).
|
||||
* @returns Resolves to the location of the uploaded file.
|
||||
*/
|
||||
uploadFile(file: XMLHttpRequestBodyInit): Promise<IUploadFileActionFromWidgetResponseData>;
|
||||
/**
|
||||
* Download a file from the media repository on the homeserver.
|
||||
* @param contentUri - MXC URI of the file to download.
|
||||
* @returns Resolves to the contents of the file.
|
||||
*/
|
||||
downloadFile(contentUri: string): Promise<IDownloadFileActionFromWidgetResponseData>;
|
||||
/**
|
||||
* Obtains a JWT for a LiveKit SFU, by asking the client to call the homeserver's
|
||||
* `/rtc/livekit/get_token` endpoint on the widget's behalf.
|
||||
* @param data The request data, which the client uses as the request body verbatim.
|
||||
* @returns Resolves to the response body of the endpoint, verbatim.
|
||||
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
||||
*/
|
||||
getRtcLivekitToken(data: IRtcLivekitGetTokenFromWidgetRequestData): Promise<IRtcLivekitGetTokenFromWidgetResponseData>;
|
||||
/**
|
||||
* Hands a MatrixRTC session's delayed leave event over to the server, by asking the
|
||||
* client to call the homeserver's `/rtc/livekit/delegate_delayed_leave` endpoint on
|
||||
* the widget's behalf.
|
||||
*
|
||||
* Homeservers may not support this endpoint, in which case the request rejects with a
|
||||
* {@link WidgetApiResponseError} whose `matrix_api_error` reports an HTTP 404 with
|
||||
* `M_UNRECOGNIZED`. The widget is then responsible for refreshing the delayed leave
|
||||
* event itself.
|
||||
* @param data The request data, which the client uses as the request body verbatim.
|
||||
* @returns Resolves to the response body of the endpoint, verbatim.
|
||||
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
||||
*/
|
||||
delegateRtcLivekitDelayedLeave(data: IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData): Promise<IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData>;
|
||||
/**
|
||||
* Starts the communication channel. This should be done early to ensure
|
||||
* that messages are not missed. Communication can only be stopped by the client.
|
||||
*/
|
||||
start(): void;
|
||||
private handleMessage;
|
||||
private replyVersions;
|
||||
getClientVersions(): Promise<ApiVersion[]>;
|
||||
private handleCapabilities;
|
||||
}
|
||||
1186
node_modules/matrix-widget-api/lib/WidgetApi.js
generated
vendored
Normal file
1186
node_modules/matrix-widget-api/lib/WidgetApi.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/matrix-widget-api/lib/WidgetApi.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/WidgetApi.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
371
node_modules/matrix-widget-api/lib/driver/WidgetDriver.d.ts
generated
vendored
Normal file
371
node_modules/matrix-widget-api/lib/driver/WidgetDriver.d.ts
generated
vendored
Normal file
@@ -0,0 +1,371 @@
|
||||
import { Capability, IOpenIDCredentials, OpenIDRequestState, SimpleObservable, IRoomEvent, IRoomAccountData, ITurnServer, IWidgetApiErrorResponseDataDetails, IRtcTransport, IRtcLivekitGetTokenFromWidgetRequestData, IRtcLivekitGetTokenFromWidgetResponseData, IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData, IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData } from "..";
|
||||
export interface ISendEventDetails {
|
||||
roomId: string;
|
||||
eventId: string;
|
||||
}
|
||||
export interface ISendDelayedEventDetails {
|
||||
roomId: string;
|
||||
delayId: string;
|
||||
}
|
||||
export interface IOpenIDUpdate {
|
||||
state: OpenIDRequestState;
|
||||
token?: IOpenIDCredentials;
|
||||
}
|
||||
export interface IReadEventRelationsResult {
|
||||
chunk: IRoomEvent[];
|
||||
nextBatch?: string;
|
||||
prevBatch?: string;
|
||||
}
|
||||
export interface ISearchUserDirectoryResult {
|
||||
limited: boolean;
|
||||
results: Array<{
|
||||
userId: string;
|
||||
displayName?: string;
|
||||
avatarUrl?: string;
|
||||
}>;
|
||||
}
|
||||
export interface IGetMediaConfigResult {
|
||||
[key: string]: unknown;
|
||||
"m.upload.size"?: number;
|
||||
}
|
||||
export interface IRtcTransportsResult {
|
||||
rtc_transports: IRtcTransport[];
|
||||
}
|
||||
/**
|
||||
* Represents the functions and behaviour the widget-api is unable to
|
||||
* do, such as prompting the user for information or interacting with
|
||||
* the UI. Clients are expected to implement this class and override
|
||||
* any functions they need/want to support.
|
||||
*
|
||||
* This class assumes the client will have a context of a Widget
|
||||
* instance already.
|
||||
*/
|
||||
export declare abstract class WidgetDriver {
|
||||
/**
|
||||
* Verifies the widget's requested capabilities, returning the ones
|
||||
* it is approved to use. Mutating the requested capabilities will
|
||||
* have no effect.
|
||||
*
|
||||
* This SHOULD result in the user being prompted to approve/deny
|
||||
* capabilities.
|
||||
*
|
||||
* By default this rejects all capabilities (returns an empty set).
|
||||
* @param {Set<Capability>} requested The set of requested capabilities.
|
||||
* @returns {Promise<Set<Capability>>} Resolves to the allowed capabilities.
|
||||
*/
|
||||
validateCapabilities(requested: Set<Capability>): Promise<Set<Capability>>;
|
||||
/**
|
||||
* Sends an event into a room. If `roomId` is falsy, the client should send the event
|
||||
* into the room the user is currently looking at. The widget API will have already
|
||||
* verified that the widget is capable of sending the event to that room.
|
||||
* @param {string} eventType The event type to be sent.
|
||||
* @param {*} content The content for the event.
|
||||
* @param {string|null} stateKey The state key if this is a state event, otherwise null.
|
||||
* May be an empty string.
|
||||
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
|
||||
* user is currently looking at.
|
||||
* @returns {Promise<ISendEventDetails>} Resolves when the event has been sent with
|
||||
* details of that event.
|
||||
* @throws Rejected when the event could not be sent.
|
||||
*/
|
||||
sendEvent(eventType: string, content: unknown, stateKey?: string | null, roomId?: string | null): Promise<ISendEventDetails>;
|
||||
/**
|
||||
* @experimental Part of MSC4407
|
||||
* Sends a sticky event into a room. If `roomId` is falsy, the client should send the event
|
||||
* into the room the user is currently looking at. The widget API will have already
|
||||
* verified that the widget is capable of sending the event to that room.
|
||||
* @param {number} stickyDurationMs The length of time a sticky event may remain sticky, in milliseconds.
|
||||
* @param {string} eventType The event type to be sent.
|
||||
* @param {*} content The content for the event.
|
||||
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
|
||||
* user is currently looking at.
|
||||
* @returns {Promise<ISendEventDetails>} Resolves when the event has been sent with
|
||||
* details of that event.
|
||||
* @throws Rejected when the event could not be sent.
|
||||
*/
|
||||
sendStickyEvent(stickyDurationMs: number, eventType: string, content: unknown, roomId?: string | null): Promise<ISendEventDetails>;
|
||||
/**
|
||||
* @experimental Part of MSC4140 & MSC4157
|
||||
* Sends a delayed event into a room. If `roomId` is falsy, the client should send it
|
||||
* into the room the user is currently looking at. The widget API will have already
|
||||
* verified that the widget is capable of sending the event to that room.
|
||||
* @param {number} delay How much later to send the event.
|
||||
* @param {string} eventType The event type of the event to be sent.
|
||||
* @param {*} content The content for the event to be sent.
|
||||
* @param {string|null} stateKey The state key if the event to be sent a state event,
|
||||
* otherwise null. May be an empty string.
|
||||
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
|
||||
* user is currently looking at.
|
||||
* @returns {Promise<ISendDelayedEventDetails>} Resolves when the delayed event has been
|
||||
* prepared with details of how to refer to it for updating/sending/canceling it later.
|
||||
* @throws Rejected when the delayed event could not be sent.
|
||||
*/
|
||||
sendDelayedEvent(delay: number, eventType: string, content: unknown, stateKey?: string | null, roomId?: string | null): Promise<ISendDelayedEventDetails>;
|
||||
/**
|
||||
* @experimental Part of MSC4140, MSC4157 and MSC4407
|
||||
* Sends a delayed sticky event into a room. If `roomId` is falsy, the client should send the event
|
||||
* into the room the user is currently looking at. The widget API will have already
|
||||
* verified that the widget is capable of sending the event to that room.
|
||||
* @param {number} stickyDurationMs The length of time a sticky event may remain sticky, in milliseconds.
|
||||
* @param {number} delay How much later to send the event.
|
||||
* @param {string} eventType The event type to be sent.
|
||||
* @param {*} content The content for the event.
|
||||
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
|
||||
* user is currently looking at.
|
||||
* @returns {Promise<ISendDelayedEventDetails>} Resolves when the event has been sent with
|
||||
* details of that event.
|
||||
* @throws Rejected when the event could not be sent.
|
||||
*/
|
||||
sendDelayedStickyEvent(delay: number, stickyDurationMs: number, eventType: string, content: unknown, roomId?: string | null): Promise<ISendDelayedEventDetails>;
|
||||
/**
|
||||
* @experimental Part of MSC4140 & MSC4157
|
||||
* Cancel the scheduled delivery of the delayed event matching the provided {@link delayId}.
|
||||
* @throws Rejected when there is no matching delayed event,
|
||||
* or when the delayed event failed to be cancelled.
|
||||
*/
|
||||
cancelScheduledDelayedEvent(delayId: string): Promise<void>;
|
||||
/**
|
||||
* @experimental Part of MSC4140 & MSC4157
|
||||
* Restart the scheduled delivery of the delayed event matching the provided {@link delayId}.
|
||||
* @throws Rejected when there is no matching delayed event,
|
||||
* or when the delayed event failed to be restarted.
|
||||
*/
|
||||
restartScheduledDelayedEvent(delayId: string): Promise<void>;
|
||||
/**
|
||||
* @experimental Part of MSC4140 & MSC4157
|
||||
* Immediately send the delayed event matching the provided {@link delayId},
|
||||
* instead of waiting for its scheduled delivery.
|
||||
* @throws Rejected when there is no matching delayed event,
|
||||
* or when the delayed event failed to be sent.
|
||||
*/
|
||||
sendScheduledDelayedEvent(delayId: string): Promise<void>;
|
||||
/**
|
||||
* Sends a to-device event. The widget API will have already verified that the widget
|
||||
* is capable of sending the event.
|
||||
* @param {string} eventType The event type to be sent.
|
||||
* @param {boolean} encrypted Whether to encrypt the message contents.
|
||||
* @param {Object} contentMap A map from user ID and device ID to event content.
|
||||
* @returns {Promise<void>} Resolves when the event has been sent.
|
||||
* @throws Rejected when the event could not be sent.
|
||||
*/
|
||||
sendToDevice(eventType: string, encrypted: boolean, contentMap: {
|
||||
[userId: string]: {
|
||||
[deviceId: string]: object;
|
||||
};
|
||||
}): Promise<void>;
|
||||
/**
|
||||
* Reads an element of room account data. The widget API will have already verified that the widget is
|
||||
* capable of receiving the `eventType` of the requested information. If `roomIds` is supplied, it may
|
||||
* contain `Symbols.AnyRoom` to denote that the piece of room account data in each of the client's known
|
||||
* rooms should be returned. When `null`, only the room the user is currently looking at should be considered.
|
||||
* @param eventType The event type to be read.
|
||||
* @param roomIds When null, the user's currently viewed room. Otherwise, the list of room IDs
|
||||
* to look within, possibly containing Symbols.AnyRoom to denote all known rooms.
|
||||
* @returns {Promise<IRoomAccountData[]>} Resolves to the element of room account data, or an empty array.
|
||||
*/
|
||||
readRoomAccountData(eventType: string, roomIds?: string[] | null): Promise<IRoomAccountData[]>;
|
||||
/**
|
||||
* Reads all events of the given type, and optionally `msgtype` (if applicable/defined),
|
||||
* the user has access to. The widget API will have already verified that the widget is
|
||||
* capable of receiving the events. Less events than the limit are allowed to be returned,
|
||||
* but not more. If `roomIds` is supplied, it may contain `Symbols.AnyRoom` to denote that
|
||||
* `limit` in each of the client's known rooms should be returned. When `null`, only the
|
||||
* room the user is currently looking at should be considered. If `since` is specified but
|
||||
* the event ID isn't present in the number of events fetched by the client due to `limit`,
|
||||
* the client will return all the events.
|
||||
* @param eventType The event type to be read.
|
||||
* @param msgtype The msgtype of the events to be read, if applicable/defined.
|
||||
* @param stateKey The state key of the events to be read, if applicable/defined.
|
||||
* @param limit The maximum number of events to retrieve per room. Will be zero to denote "as many
|
||||
* as possible".
|
||||
* @param roomIds When null, the user's currently viewed room. Otherwise, the list of room IDs
|
||||
* to look within, possibly containing Symbols.AnyRoom to denote all known rooms.
|
||||
* @param since When null, retrieves the number of events specified by the "limit" parameter.
|
||||
* Otherwise, the event ID at which only subsequent events will be returned, as many as specified
|
||||
* in "limit".
|
||||
* @returns {Promise<IRoomEvent[]>} Resolves to the room events, or an empty array.
|
||||
* @deprecated Clients are advised to implement {@link WidgetDriver.readRoomTimeline} instead.
|
||||
*/
|
||||
readRoomEvents(eventType: string, msgtype: string | undefined, limit: number, roomIds?: string[] | null, since?: string): Promise<IRoomEvent[]>;
|
||||
/**
|
||||
* Reads all events of the given type, and optionally state key (if applicable/defined),
|
||||
* the user has access to. The widget API will have already verified that the widget is
|
||||
* capable of receiving the events. Less events than the limit are allowed to be returned,
|
||||
* but not more. If `roomIds` is supplied, it may contain `Symbols.AnyRoom` to denote that
|
||||
* `limit` in each of the client's known rooms should be returned. When `null`, only the
|
||||
* room the user is currently looking at should be considered.
|
||||
* @param eventType The event type to be read.
|
||||
* @param stateKey The state key of the events to be read, if applicable/defined.
|
||||
* @param limit The maximum number of events to retrieve. Will be zero to denote "as many
|
||||
* as possible".
|
||||
* @param roomIds When null, the user's currently viewed room. Otherwise, the list of room IDs
|
||||
* to look within, possibly containing Symbols.AnyRoom to denote all known rooms.
|
||||
* @returns {Promise<IRoomEvent[]>} Resolves to the state events, or an empty array.
|
||||
* @deprecated Clients are advised to implement {@link WidgetDriver.readRoomTimeline} instead.
|
||||
*/
|
||||
readStateEvents(eventType: string, stateKey: string | undefined, limit: number, roomIds?: string[] | null): Promise<IRoomEvent[]>;
|
||||
/**
|
||||
* Gets all sticky events of the given type the user has access to.
|
||||
* The widget API will have already verified that the widget is capable of receiving the events.
|
||||
*
|
||||
* This is needed because widgets will get only live messages as they appear in the timeline.
|
||||
* However, sticky events act like a state, and the current state is made by events that may have been
|
||||
* sent before the widget was loaded.
|
||||
* Events are sticky for 1h maximum, so the widget has access to the past hour of sticky events maximum.
|
||||
*
|
||||
* @experimental Part of MSC4407 - Sticky Events (Widget API)
|
||||
* @param roomId - The ID of the room.
|
||||
*/
|
||||
readStickyEvents(roomId: string): Promise<IRoomEvent[]>;
|
||||
/**
|
||||
* Reads all events of the given type, and optionally `msgtype` (if applicable/defined),
|
||||
* the user has access to. The widget API will have already verified that the widget is
|
||||
* capable of receiving the events. Less events than the limit are allowed to be returned,
|
||||
* but not more.
|
||||
* @param roomId The ID of the room to look within.
|
||||
* @param eventType The event type to be read.
|
||||
* @param msgtype The msgtype of the events to be read, if applicable/defined.
|
||||
* @param stateKey The state key of the events to be read, if applicable/defined.
|
||||
* @param limit The maximum number of events to retrieve. Will be zero to denote "as many as
|
||||
* possible".
|
||||
* @param since When null, retrieves the number of events specified by the "limit" parameter.
|
||||
* Otherwise, the event ID at which only subsequent events will be returned, as many as specified
|
||||
* in "limit".
|
||||
* @returns {Promise<IRoomEvent[]>} Resolves to the room events, or an empty array.
|
||||
*/
|
||||
readRoomTimeline(roomId: string, eventType: string, msgtype: string | undefined, stateKey: string | undefined, limit: number, since: string | undefined): Promise<IRoomEvent[]>;
|
||||
/**
|
||||
* Reads the current values of all matching room state entries.
|
||||
* @param roomId The ID of the room.
|
||||
* @param eventType The event type of the entries to be read.
|
||||
* @param stateKey The state key of the entry to be read. If undefined,
|
||||
* all room state entries with a matching event type should be returned.
|
||||
* @returns {Promise<IRoomEvent[]>} Resolves to the events representing the
|
||||
* current values of the room state entries.
|
||||
*/
|
||||
readRoomState(roomId: string, eventType: string, stateKey: string | undefined): Promise<IRoomEvent[]>;
|
||||
/**
|
||||
* Reads all events that are related to a given event. The widget API will
|
||||
* have already verified that the widget is capable of receiving the event,
|
||||
* or will make sure to reject access to events which are returned from this
|
||||
* function, but are not capable of receiving. If `relationType` or `eventType`
|
||||
* are set, the returned events should already be filtered. Less events than
|
||||
* the limit are allowed to be returned, but not more.
|
||||
* @param eventId The id of the parent event to be read.
|
||||
* @param roomId The room to look within. When undefined, the user's
|
||||
* currently viewed room.
|
||||
* @param relationType The relationship type of child events to search for.
|
||||
* When undefined, all relations are returned.
|
||||
* @param eventType The event type of child events to search for. When undefined,
|
||||
* all related events are returned.
|
||||
* @param from The pagination token to start returning results from, as
|
||||
* received from a previous call. If not supplied, results start at the most
|
||||
* recent topological event known to the server.
|
||||
* @param to The pagination token to stop returning results at. If not
|
||||
* supplied, results continue up to limit or until there are no more events.
|
||||
* @param limit The maximum number of events to retrieve per room. If not
|
||||
* supplied, the server will apply a default limit.
|
||||
* @param direction The direction to search for according to MSC3715
|
||||
* @returns Resolves to the room relations.
|
||||
*/
|
||||
readEventRelations(eventId: string, roomId?: string, relationType?: string, eventType?: string, from?: string, to?: string, limit?: number, direction?: "f" | "b"): Promise<IReadEventRelationsResult>;
|
||||
/**
|
||||
* Asks the user for permission to validate their identity through OpenID Connect. The
|
||||
* interface for this function is an observable which accepts the state machine of the
|
||||
* OIDC exchange flow. For example, if the client/user blocks the request then it would
|
||||
* feed back a `{state: Blocked}` into the observable. Similarly, if the user already
|
||||
* approved the widget then a `{state: Allowed}` would be fed into the observable alongside
|
||||
* the token itself. If the client is asking for permission, it should feed in a
|
||||
* `{state: PendingUserConfirmation}` followed by the relevant Allowed or Blocked state.
|
||||
*
|
||||
* The widget API will reject the widget's request with an error if this contract is not
|
||||
* met properly. By default, the widget driver will block all OIDC requests.
|
||||
* @param {SimpleObservable<IOpenIDUpdate>} observer The observable to feed updates into.
|
||||
*/
|
||||
askOpenID(observer: SimpleObservable<IOpenIDUpdate>): void;
|
||||
/**
|
||||
* Navigates the client with a matrix.to URI. In future this function will also be provided
|
||||
* with the Matrix URIs once matrix.to is replaced. The given URI will have already been
|
||||
* lightly checked to ensure it looks like a valid URI, though the implementation is recommended
|
||||
* to do further checks on the URI.
|
||||
* @param {string} uri The URI to navigate to.
|
||||
* @returns {Promise<void>} Resolves when complete.
|
||||
* @throws Throws if there's a problem with the navigation, such as invalid format.
|
||||
*/
|
||||
navigate(uri: string): Promise<void>;
|
||||
/**
|
||||
* Polls for TURN server data, yielding an initial set of credentials as soon as possible, and
|
||||
* thereafter yielding new credentials whenever the previous ones expire. The widget API will
|
||||
* have already verified that the widget has permission to access TURN servers.
|
||||
* @yields {ITurnServer} The TURN server URIs and credentials currently available to the client.
|
||||
*/
|
||||
getTurnServers(): AsyncGenerator<ITurnServer>;
|
||||
/**
|
||||
* Search for users in the user directory.
|
||||
* @param searchTerm The term to search for.
|
||||
* @param limit The maximum number of results to return. If not supplied, the
|
||||
* @returns Resolves to the search results.
|
||||
*/
|
||||
searchUserDirectory(searchTerm: string, limit?: number): Promise<ISearchUserDirectoryResult>;
|
||||
/**
|
||||
* Get the config for the media repository.
|
||||
* @returns Promise which resolves with an object containing the config.
|
||||
*/
|
||||
getMediaConfig(): Promise<IGetMediaConfigResult>;
|
||||
/**
|
||||
* Discover the RTC transports (e.g. SFUs, TURN servers) the homeserver
|
||||
* supports, by delegating to the authenticated
|
||||
* `GET /_matrix/client/v1/rtc/transports` Client-Server endpoint (MSC4143).
|
||||
* @returns Promise which resolves with the available transports.
|
||||
*/
|
||||
getRtcTransports(): Promise<IRtcTransportsResult>;
|
||||
/**
|
||||
* Upload a file to the media repository on the homeserver.
|
||||
* @param file - The object to upload. Something that can be sent to
|
||||
* XMLHttpRequest.send (typically a File).
|
||||
* @returns Resolves to the location of the uploaded file.
|
||||
*/
|
||||
uploadFile(file: XMLHttpRequestBodyInit): Promise<{
|
||||
contentUri: string;
|
||||
}>;
|
||||
/**
|
||||
* Download a file from the media repository on the homeserver.
|
||||
* @param contentUri - MXC URI of the file to download.
|
||||
* @returns Resolves to the contents of the file.
|
||||
*/
|
||||
downloadFile(contentUri: string): Promise<{
|
||||
file: XMLHttpRequestBodyInit;
|
||||
}>;
|
||||
/**
|
||||
* Obtains a JWT for a LiveKit SFU by calling the homeserver's
|
||||
* `/rtc/livekit/get_token` endpoint on the widget's behalf. The widget API
|
||||
* will have already verified that the widget has permission to do so.
|
||||
* @param data The request data, to be used as the request body verbatim.
|
||||
* @returns Resolves to the response body of the endpoint, verbatim.
|
||||
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
||||
*/
|
||||
getRtcLivekitToken(data: IRtcLivekitGetTokenFromWidgetRequestData): Promise<IRtcLivekitGetTokenFromWidgetResponseData>;
|
||||
/**
|
||||
* Hands a MatrixRTC session's delayed leave event over to the server by
|
||||
* calling the homeserver's `/rtc/livekit/delegate_delayed_leave` endpoint on
|
||||
* the widget's behalf. The widget API will have already verified that the
|
||||
* widget has permission to do so.
|
||||
* @param data The request data, to be used as the request body verbatim.
|
||||
* @returns Resolves to the response body of the endpoint, verbatim.
|
||||
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
||||
*/
|
||||
delegateRtcLivekitDelayedLeave(data: IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData): Promise<IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData>;
|
||||
/**
|
||||
* Gets the IDs of all joined or invited rooms currently known to the
|
||||
* client.
|
||||
* @returns The room IDs.
|
||||
*/
|
||||
getKnownRooms(): string[];
|
||||
/**
|
||||
* Expresses an error thrown by this driver in a format compatible with the Widget API.
|
||||
* @param error The error to handle.
|
||||
* @returns The error expressed as a {@link IWidgetApiErrorResponseDataDetails},
|
||||
* or undefined if it cannot be expressed as one.
|
||||
*/
|
||||
processError(error: unknown): IWidgetApiErrorResponseDataDetails | undefined;
|
||||
}
|
||||
523
node_modules/matrix-widget-api/lib/driver/WidgetDriver.js
generated
vendored
Normal file
523
node_modules/matrix-widget-api/lib/driver/WidgetDriver.js
generated
vendored
Normal file
@@ -0,0 +1,523 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.WidgetDriver = void 0;
|
||||
var _ = require("..");
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||||
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
||||
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
||||
* Copyright 2020 - 2024 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Represents the functions and behaviour the widget-api is unable to
|
||||
* do, such as prompting the user for information or interacting with
|
||||
* the UI. Clients are expected to implement this class and override
|
||||
* any functions they need/want to support.
|
||||
*
|
||||
* This class assumes the client will have a context of a Widget
|
||||
* instance already.
|
||||
*/
|
||||
var WidgetDriver = /*#__PURE__*/function () {
|
||||
function WidgetDriver() {
|
||||
_classCallCheck(this, WidgetDriver);
|
||||
}
|
||||
_createClass(WidgetDriver, [{
|
||||
key: "validateCapabilities",
|
||||
value:
|
||||
/**
|
||||
* Verifies the widget's requested capabilities, returning the ones
|
||||
* it is approved to use. Mutating the requested capabilities will
|
||||
* have no effect.
|
||||
*
|
||||
* This SHOULD result in the user being prompted to approve/deny
|
||||
* capabilities.
|
||||
*
|
||||
* By default this rejects all capabilities (returns an empty set).
|
||||
* @param {Set<Capability>} requested The set of requested capabilities.
|
||||
* @returns {Promise<Set<Capability>>} Resolves to the allowed capabilities.
|
||||
*/
|
||||
function validateCapabilities(requested) {
|
||||
return Promise.resolve(new Set());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an event into a room. If `roomId` is falsy, the client should send the event
|
||||
* into the room the user is currently looking at. The widget API will have already
|
||||
* verified that the widget is capable of sending the event to that room.
|
||||
* @param {string} eventType The event type to be sent.
|
||||
* @param {*} content The content for the event.
|
||||
* @param {string|null} stateKey The state key if this is a state event, otherwise null.
|
||||
* May be an empty string.
|
||||
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
|
||||
* user is currently looking at.
|
||||
* @returns {Promise<ISendEventDetails>} Resolves when the event has been sent with
|
||||
* details of that event.
|
||||
* @throws Rejected when the event could not be sent.
|
||||
*/
|
||||
}, {
|
||||
key: "sendEvent",
|
||||
value: function sendEvent(eventType, content) {
|
||||
var stateKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
||||
var roomId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
||||
return Promise.reject(new Error("Failed to override function"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental Part of MSC4407
|
||||
* Sends a sticky event into a room. If `roomId` is falsy, the client should send the event
|
||||
* into the room the user is currently looking at. The widget API will have already
|
||||
* verified that the widget is capable of sending the event to that room.
|
||||
* @param {number} stickyDurationMs The length of time a sticky event may remain sticky, in milliseconds.
|
||||
* @param {string} eventType The event type to be sent.
|
||||
* @param {*} content The content for the event.
|
||||
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
|
||||
* user is currently looking at.
|
||||
* @returns {Promise<ISendEventDetails>} Resolves when the event has been sent with
|
||||
* details of that event.
|
||||
* @throws Rejected when the event could not be sent.
|
||||
*/
|
||||
}, {
|
||||
key: "sendStickyEvent",
|
||||
value: function sendStickyEvent(stickyDurationMs, eventType, content) {
|
||||
var roomId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental Part of MSC4140 & MSC4157
|
||||
* Sends a delayed event into a room. If `roomId` is falsy, the client should send it
|
||||
* into the room the user is currently looking at. The widget API will have already
|
||||
* verified that the widget is capable of sending the event to that room.
|
||||
* @param {number} delay How much later to send the event.
|
||||
* @param {string} eventType The event type of the event to be sent.
|
||||
* @param {*} content The content for the event to be sent.
|
||||
* @param {string|null} stateKey The state key if the event to be sent a state event,
|
||||
* otherwise null. May be an empty string.
|
||||
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
|
||||
* user is currently looking at.
|
||||
* @returns {Promise<ISendDelayedEventDetails>} Resolves when the delayed event has been
|
||||
* prepared with details of how to refer to it for updating/sending/canceling it later.
|
||||
* @throws Rejected when the delayed event could not be sent.
|
||||
*/
|
||||
}, {
|
||||
key: "sendDelayedEvent",
|
||||
value: function sendDelayedEvent(delay, eventType, content) {
|
||||
var stateKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
||||
var roomId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
||||
return Promise.reject(new Error("Failed to override function"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental Part of MSC4140, MSC4157 and MSC4407
|
||||
* Sends a delayed sticky event into a room. If `roomId` is falsy, the client should send the event
|
||||
* into the room the user is currently looking at. The widget API will have already
|
||||
* verified that the widget is capable of sending the event to that room.
|
||||
* @param {number} stickyDurationMs The length of time a sticky event may remain sticky, in milliseconds.
|
||||
* @param {number} delay How much later to send the event.
|
||||
* @param {string} eventType The event type to be sent.
|
||||
* @param {*} content The content for the event.
|
||||
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
|
||||
* user is currently looking at.
|
||||
* @returns {Promise<ISendDelayedEventDetails>} Resolves when the event has been sent with
|
||||
* details of that event.
|
||||
* @throws Rejected when the event could not be sent.
|
||||
*/
|
||||
}, {
|
||||
key: "sendDelayedStickyEvent",
|
||||
value: function sendDelayedStickyEvent(delay, stickyDurationMs, eventType, content) {
|
||||
var roomId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental Part of MSC4140 & MSC4157
|
||||
* Cancel the scheduled delivery of the delayed event matching the provided {@link delayId}.
|
||||
* @throws Rejected when there is no matching delayed event,
|
||||
* or when the delayed event failed to be cancelled.
|
||||
*/
|
||||
}, {
|
||||
key: "cancelScheduledDelayedEvent",
|
||||
value: function cancelScheduledDelayedEvent(delayId) {
|
||||
return Promise.reject(new Error("Failed to override function"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental Part of MSC4140 & MSC4157
|
||||
* Restart the scheduled delivery of the delayed event matching the provided {@link delayId}.
|
||||
* @throws Rejected when there is no matching delayed event,
|
||||
* or when the delayed event failed to be restarted.
|
||||
*/
|
||||
}, {
|
||||
key: "restartScheduledDelayedEvent",
|
||||
value: function restartScheduledDelayedEvent(delayId) {
|
||||
return Promise.reject(new Error("Failed to override function"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental Part of MSC4140 & MSC4157
|
||||
* Immediately send the delayed event matching the provided {@link delayId},
|
||||
* instead of waiting for its scheduled delivery.
|
||||
* @throws Rejected when there is no matching delayed event,
|
||||
* or when the delayed event failed to be sent.
|
||||
*/
|
||||
}, {
|
||||
key: "sendScheduledDelayedEvent",
|
||||
value: function sendScheduledDelayedEvent(delayId) {
|
||||
return Promise.reject(new Error("Failed to override function"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a to-device event. The widget API will have already verified that the widget
|
||||
* is capable of sending the event.
|
||||
* @param {string} eventType The event type to be sent.
|
||||
* @param {boolean} encrypted Whether to encrypt the message contents.
|
||||
* @param {Object} contentMap A map from user ID and device ID to event content.
|
||||
* @returns {Promise<void>} Resolves when the event has been sent.
|
||||
* @throws Rejected when the event could not be sent.
|
||||
*/
|
||||
}, {
|
||||
key: "sendToDevice",
|
||||
value: function sendToDevice(eventType, encrypted, contentMap) {
|
||||
return Promise.reject(new Error("Failed to override function"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads an element of room account data. The widget API will have already verified that the widget is
|
||||
* capable of receiving the `eventType` of the requested information. If `roomIds` is supplied, it may
|
||||
* contain `Symbols.AnyRoom` to denote that the piece of room account data in each of the client's known
|
||||
* rooms should be returned. When `null`, only the room the user is currently looking at should be considered.
|
||||
* @param eventType The event type to be read.
|
||||
* @param roomIds When null, the user's currently viewed room. Otherwise, the list of room IDs
|
||||
* to look within, possibly containing Symbols.AnyRoom to denote all known rooms.
|
||||
* @returns {Promise<IRoomAccountData[]>} Resolves to the element of room account data, or an empty array.
|
||||
*/
|
||||
}, {
|
||||
key: "readRoomAccountData",
|
||||
value: function readRoomAccountData(eventType) {
|
||||
var roomIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads all events of the given type, and optionally `msgtype` (if applicable/defined),
|
||||
* the user has access to. The widget API will have already verified that the widget is
|
||||
* capable of receiving the events. Less events than the limit are allowed to be returned,
|
||||
* but not more. If `roomIds` is supplied, it may contain `Symbols.AnyRoom` to denote that
|
||||
* `limit` in each of the client's known rooms should be returned. When `null`, only the
|
||||
* room the user is currently looking at should be considered. If `since` is specified but
|
||||
* the event ID isn't present in the number of events fetched by the client due to `limit`,
|
||||
* the client will return all the events.
|
||||
* @param eventType The event type to be read.
|
||||
* @param msgtype The msgtype of the events to be read, if applicable/defined.
|
||||
* @param stateKey The state key of the events to be read, if applicable/defined.
|
||||
* @param limit The maximum number of events to retrieve per room. Will be zero to denote "as many
|
||||
* as possible".
|
||||
* @param roomIds When null, the user's currently viewed room. Otherwise, the list of room IDs
|
||||
* to look within, possibly containing Symbols.AnyRoom to denote all known rooms.
|
||||
* @param since When null, retrieves the number of events specified by the "limit" parameter.
|
||||
* Otherwise, the event ID at which only subsequent events will be returned, as many as specified
|
||||
* in "limit".
|
||||
* @returns {Promise<IRoomEvent[]>} Resolves to the room events, or an empty array.
|
||||
* @deprecated Clients are advised to implement {@link WidgetDriver.readRoomTimeline} instead.
|
||||
*/
|
||||
}, {
|
||||
key: "readRoomEvents",
|
||||
value: function readRoomEvents(eventType, msgtype, limit) {
|
||||
var roomIds = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
||||
var since = arguments.length > 4 ? arguments[4] : undefined;
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads all events of the given type, and optionally state key (if applicable/defined),
|
||||
* the user has access to. The widget API will have already verified that the widget is
|
||||
* capable of receiving the events. Less events than the limit are allowed to be returned,
|
||||
* but not more. If `roomIds` is supplied, it may contain `Symbols.AnyRoom` to denote that
|
||||
* `limit` in each of the client's known rooms should be returned. When `null`, only the
|
||||
* room the user is currently looking at should be considered.
|
||||
* @param eventType The event type to be read.
|
||||
* @param stateKey The state key of the events to be read, if applicable/defined.
|
||||
* @param limit The maximum number of events to retrieve. Will be zero to denote "as many
|
||||
* as possible".
|
||||
* @param roomIds When null, the user's currently viewed room. Otherwise, the list of room IDs
|
||||
* to look within, possibly containing Symbols.AnyRoom to denote all known rooms.
|
||||
* @returns {Promise<IRoomEvent[]>} Resolves to the state events, or an empty array.
|
||||
* @deprecated Clients are advised to implement {@link WidgetDriver.readRoomTimeline} instead.
|
||||
*/
|
||||
}, {
|
||||
key: "readStateEvents",
|
||||
value: function readStateEvents(eventType, stateKey, limit) {
|
||||
var roomIds = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all sticky events of the given type the user has access to.
|
||||
* The widget API will have already verified that the widget is capable of receiving the events.
|
||||
*
|
||||
* This is needed because widgets will get only live messages as they appear in the timeline.
|
||||
* However, sticky events act like a state, and the current state is made by events that may have been
|
||||
* sent before the widget was loaded.
|
||||
* Events are sticky for 1h maximum, so the widget has access to the past hour of sticky events maximum.
|
||||
*
|
||||
* @experimental Part of MSC4407 - Sticky Events (Widget API)
|
||||
* @param roomId - The ID of the room.
|
||||
*/
|
||||
}, {
|
||||
key: "readStickyEvents",
|
||||
value: function readStickyEvents(roomId) {
|
||||
throw new Error("readStickyEvents is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads all events of the given type, and optionally `msgtype` (if applicable/defined),
|
||||
* the user has access to. The widget API will have already verified that the widget is
|
||||
* capable of receiving the events. Less events than the limit are allowed to be returned,
|
||||
* but not more.
|
||||
* @param roomId The ID of the room to look within.
|
||||
* @param eventType The event type to be read.
|
||||
* @param msgtype The msgtype of the events to be read, if applicable/defined.
|
||||
* @param stateKey The state key of the events to be read, if applicable/defined.
|
||||
* @param limit The maximum number of events to retrieve. Will be zero to denote "as many as
|
||||
* possible".
|
||||
* @param since When null, retrieves the number of events specified by the "limit" parameter.
|
||||
* Otherwise, the event ID at which only subsequent events will be returned, as many as specified
|
||||
* in "limit".
|
||||
* @returns {Promise<IRoomEvent[]>} Resolves to the room events, or an empty array.
|
||||
*/
|
||||
}, {
|
||||
key: "readRoomTimeline",
|
||||
value: function readRoomTimeline(roomId, eventType, msgtype, stateKey, limit, since) {
|
||||
// For backward compatibility we try the deprecated methods, in case
|
||||
// they're implemented
|
||||
if (stateKey === undefined) return this.readRoomEvents(eventType, msgtype, limit, [roomId], since);else return this.readStateEvents(eventType, stateKey, limit, [roomId]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the current values of all matching room state entries.
|
||||
* @param roomId The ID of the room.
|
||||
* @param eventType The event type of the entries to be read.
|
||||
* @param stateKey The state key of the entry to be read. If undefined,
|
||||
* all room state entries with a matching event type should be returned.
|
||||
* @returns {Promise<IRoomEvent[]>} Resolves to the events representing the
|
||||
* current values of the room state entries.
|
||||
*/
|
||||
}, {
|
||||
key: "readRoomState",
|
||||
value: function readRoomState(roomId, eventType, stateKey) {
|
||||
return this.readStateEvents(eventType, stateKey, Number.MAX_SAFE_INTEGER, [roomId]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads all events that are related to a given event. The widget API will
|
||||
* have already verified that the widget is capable of receiving the event,
|
||||
* or will make sure to reject access to events which are returned from this
|
||||
* function, but are not capable of receiving. If `relationType` or `eventType`
|
||||
* are set, the returned events should already be filtered. Less events than
|
||||
* the limit are allowed to be returned, but not more.
|
||||
* @param eventId The id of the parent event to be read.
|
||||
* @param roomId The room to look within. When undefined, the user's
|
||||
* currently viewed room.
|
||||
* @param relationType The relationship type of child events to search for.
|
||||
* When undefined, all relations are returned.
|
||||
* @param eventType The event type of child events to search for. When undefined,
|
||||
* all related events are returned.
|
||||
* @param from The pagination token to start returning results from, as
|
||||
* received from a previous call. If not supplied, results start at the most
|
||||
* recent topological event known to the server.
|
||||
* @param to The pagination token to stop returning results at. If not
|
||||
* supplied, results continue up to limit or until there are no more events.
|
||||
* @param limit The maximum number of events to retrieve per room. If not
|
||||
* supplied, the server will apply a default limit.
|
||||
* @param direction The direction to search for according to MSC3715
|
||||
* @returns Resolves to the room relations.
|
||||
*/
|
||||
}, {
|
||||
key: "readEventRelations",
|
||||
value: function readEventRelations(eventId, roomId, relationType, eventType, from, to, limit, direction) {
|
||||
return Promise.resolve({
|
||||
chunk: []
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Asks the user for permission to validate their identity through OpenID Connect. The
|
||||
* interface for this function is an observable which accepts the state machine of the
|
||||
* OIDC exchange flow. For example, if the client/user blocks the request then it would
|
||||
* feed back a `{state: Blocked}` into the observable. Similarly, if the user already
|
||||
* approved the widget then a `{state: Allowed}` would be fed into the observable alongside
|
||||
* the token itself. If the client is asking for permission, it should feed in a
|
||||
* `{state: PendingUserConfirmation}` followed by the relevant Allowed or Blocked state.
|
||||
*
|
||||
* The widget API will reject the widget's request with an error if this contract is not
|
||||
* met properly. By default, the widget driver will block all OIDC requests.
|
||||
* @param {SimpleObservable<IOpenIDUpdate>} observer The observable to feed updates into.
|
||||
*/
|
||||
}, {
|
||||
key: "askOpenID",
|
||||
value: function askOpenID(observer) {
|
||||
observer.update({
|
||||
state: _.OpenIDRequestState.Blocked
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates the client with a matrix.to URI. In future this function will also be provided
|
||||
* with the Matrix URIs once matrix.to is replaced. The given URI will have already been
|
||||
* lightly checked to ensure it looks like a valid URI, though the implementation is recommended
|
||||
* to do further checks on the URI.
|
||||
* @param {string} uri The URI to navigate to.
|
||||
* @returns {Promise<void>} Resolves when complete.
|
||||
* @throws Throws if there's a problem with the navigation, such as invalid format.
|
||||
*/
|
||||
}, {
|
||||
key: "navigate",
|
||||
value: function navigate(uri) {
|
||||
throw new Error("Navigation is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Polls for TURN server data, yielding an initial set of credentials as soon as possible, and
|
||||
* thereafter yielding new credentials whenever the previous ones expire. The widget API will
|
||||
* have already verified that the widget has permission to access TURN servers.
|
||||
* @yields {ITurnServer} The TURN server URIs and credentials currently available to the client.
|
||||
*/
|
||||
}, {
|
||||
key: "getTurnServers",
|
||||
value: function getTurnServers() {
|
||||
throw new Error("TURN server support is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for users in the user directory.
|
||||
* @param searchTerm The term to search for.
|
||||
* @param limit The maximum number of results to return. If not supplied, the
|
||||
* @returns Resolves to the search results.
|
||||
*/
|
||||
}, {
|
||||
key: "searchUserDirectory",
|
||||
value: function searchUserDirectory(searchTerm, limit) {
|
||||
return Promise.resolve({
|
||||
limited: false,
|
||||
results: []
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the config for the media repository.
|
||||
* @returns Promise which resolves with an object containing the config.
|
||||
*/
|
||||
}, {
|
||||
key: "getMediaConfig",
|
||||
value: function getMediaConfig() {
|
||||
throw new Error("Get media config is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Discover the RTC transports (e.g. SFUs, TURN servers) the homeserver
|
||||
* supports, by delegating to the authenticated
|
||||
* `GET /_matrix/client/v1/rtc/transports` Client-Server endpoint (MSC4143).
|
||||
* @returns Promise which resolves with the available transports.
|
||||
*/
|
||||
}, {
|
||||
key: "getRtcTransports",
|
||||
value: function getRtcTransports() {
|
||||
throw new Error("Get RTC transports is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload a file to the media repository on the homeserver.
|
||||
* @param file - The object to upload. Something that can be sent to
|
||||
* XMLHttpRequest.send (typically a File).
|
||||
* @returns Resolves to the location of the uploaded file.
|
||||
*/
|
||||
}, {
|
||||
key: "uploadFile",
|
||||
value: function uploadFile(file) {
|
||||
throw new Error("Upload file is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Download a file from the media repository on the homeserver.
|
||||
* @param contentUri - MXC URI of the file to download.
|
||||
* @returns Resolves to the contents of the file.
|
||||
*/
|
||||
}, {
|
||||
key: "downloadFile",
|
||||
value: function downloadFile(contentUri) {
|
||||
throw new Error("Download file is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains a JWT for a LiveKit SFU by calling the homeserver's
|
||||
* `/rtc/livekit/get_token` endpoint on the widget's behalf. The widget API
|
||||
* will have already verified that the widget has permission to do so.
|
||||
* @param data The request data, to be used as the request body verbatim.
|
||||
* @returns Resolves to the response body of the endpoint, verbatim.
|
||||
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
||||
*/
|
||||
}, {
|
||||
key: "getRtcLivekitToken",
|
||||
value: function getRtcLivekitToken(data) {
|
||||
throw new Error("Getting a LiveKit token is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Hands a MatrixRTC session's delayed leave event over to the server by
|
||||
* calling the homeserver's `/rtc/livekit/delegate_delayed_leave` endpoint on
|
||||
* the widget's behalf. The widget API will have already verified that the
|
||||
* widget has permission to do so.
|
||||
* @param data The request data, to be used as the request body verbatim.
|
||||
* @returns Resolves to the response body of the endpoint, verbatim.
|
||||
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
||||
*/
|
||||
}, {
|
||||
key: "delegateRtcLivekitDelayedLeave",
|
||||
value: function delegateRtcLivekitDelayedLeave(data) {
|
||||
throw new Error("Delegating a LiveKit delayed leave is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the IDs of all joined or invited rooms currently known to the
|
||||
* client.
|
||||
* @returns The room IDs.
|
||||
*/
|
||||
}, {
|
||||
key: "getKnownRooms",
|
||||
value: function getKnownRooms() {
|
||||
throw new Error("Querying known rooms is not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Expresses an error thrown by this driver in a format compatible with the Widget API.
|
||||
* @param error The error to handle.
|
||||
* @returns The error expressed as a {@link IWidgetApiErrorResponseDataDetails},
|
||||
* or undefined if it cannot be expressed as one.
|
||||
*/
|
||||
}, {
|
||||
key: "processError",
|
||||
value: function processError(error) {
|
||||
return undefined;
|
||||
}
|
||||
}]);
|
||||
return WidgetDriver;
|
||||
}();
|
||||
exports.WidgetDriver = WidgetDriver;
|
||||
//# sourceMappingURL=WidgetDriver.js.map
|
||||
1
node_modules/matrix-widget-api/lib/driver/WidgetDriver.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/driver/WidgetDriver.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
56
node_modules/matrix-widget-api/lib/index.d.ts
generated
vendored
Normal file
56
node_modules/matrix-widget-api/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
export * from "./WidgetApi";
|
||||
export * from "./ClientWidgetApi";
|
||||
export * from "./Symbols";
|
||||
export type * from "./transport/ITransport";
|
||||
export * from "./transport/PostmessageTransport";
|
||||
export type * from "./interfaces/ICustomWidgetData";
|
||||
export type * from "./interfaces/IJitsiWidgetData";
|
||||
export type * from "./interfaces/IStickerpickerWidgetData";
|
||||
export type * from "./interfaces/IWidget";
|
||||
export * from "./interfaces/WidgetType";
|
||||
export * from "./interfaces/IWidgetApiErrorResponse";
|
||||
export type * from "./interfaces/IWidgetApiRequest";
|
||||
export type * from "./interfaces/IWidgetApiResponse";
|
||||
export * from "./interfaces/WidgetApiAction";
|
||||
export * from "./interfaces/WidgetApiDirection";
|
||||
export * from "./interfaces/ApiVersion";
|
||||
export * from "./interfaces/Capabilities";
|
||||
export type * from "./interfaces/CapabilitiesAction";
|
||||
export type * from "./interfaces/ContentLoadedAction";
|
||||
export type * from "./interfaces/ScreenshotAction";
|
||||
export type * from "./interfaces/StickerAction";
|
||||
export type * from "./interfaces/StickyAction";
|
||||
export type * from "./interfaces/SupportedVersionsAction";
|
||||
export type * from "./interfaces/VisibilityAction";
|
||||
export * from "./interfaces/GetOpenIDAction";
|
||||
export type * from "./interfaces/OpenIDCredentialsAction";
|
||||
export * from "./interfaces/WidgetKind";
|
||||
export * from "./interfaces/ModalButtonKind";
|
||||
export * from "./interfaces/ModalWidgetActions";
|
||||
export type * from "./interfaces/SetModalButtonEnabledAction";
|
||||
export type * from "./interfaces/WidgetConfigAction";
|
||||
export type * from "./interfaces/SendEventAction";
|
||||
export type * from "./interfaces/SendToDeviceAction";
|
||||
export type * from "./interfaces/ReadEventAction";
|
||||
export type * from "./interfaces/IRoomEvent";
|
||||
export type * from "./interfaces/IRoomAccountData";
|
||||
export type * from "./interfaces/NavigateAction";
|
||||
export type * from "./interfaces/TurnServerActions";
|
||||
export type * from "./interfaces/ReadRelationsAction";
|
||||
export type * from "./interfaces/GetMediaConfigAction";
|
||||
export type * from "./interfaces/RtcTransportsAction";
|
||||
export * from "./interfaces/UpdateDelayedEventAction";
|
||||
export type * from "./interfaces/UpdateStateAction";
|
||||
export type * from "./interfaces/UploadFileAction";
|
||||
export type * from "./interfaces/DownloadFileAction";
|
||||
export type * from "./interfaces/RtcLivekitActions";
|
||||
export type * from "./interfaces/ThemeChangeAction";
|
||||
export type * from "./interfaces/LanguageChangeAction";
|
||||
export * from "./models/WidgetEventCapability";
|
||||
export * from "./models/validation/url";
|
||||
export * from "./models/validation/utils";
|
||||
export * from "./models/Widget";
|
||||
export * from "./models/WidgetParser";
|
||||
export * from "./templating/url-template";
|
||||
export * from "./util/SimpleObservable";
|
||||
export * from "./driver/WidgetDriver";
|
||||
259
node_modules/matrix-widget-api/lib/index.js
generated
vendored
Normal file
259
node_modules/matrix-widget-api/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,259 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _WidgetApi = require("./WidgetApi");
|
||||
Object.keys(_WidgetApi).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _WidgetApi[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _WidgetApi[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _ClientWidgetApi = require("./ClientWidgetApi");
|
||||
Object.keys(_ClientWidgetApi).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _ClientWidgetApi[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _ClientWidgetApi[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _Symbols = require("./Symbols");
|
||||
Object.keys(_Symbols).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _Symbols[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _Symbols[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _PostmessageTransport = require("./transport/PostmessageTransport");
|
||||
Object.keys(_PostmessageTransport).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _PostmessageTransport[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _PostmessageTransport[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _WidgetType = require("./interfaces/WidgetType");
|
||||
Object.keys(_WidgetType).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _WidgetType[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _WidgetType[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _IWidgetApiErrorResponse = require("./interfaces/IWidgetApiErrorResponse");
|
||||
Object.keys(_IWidgetApiErrorResponse).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _IWidgetApiErrorResponse[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _IWidgetApiErrorResponse[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _WidgetApiAction = require("./interfaces/WidgetApiAction");
|
||||
Object.keys(_WidgetApiAction).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _WidgetApiAction[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _WidgetApiAction[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _WidgetApiDirection = require("./interfaces/WidgetApiDirection");
|
||||
Object.keys(_WidgetApiDirection).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _WidgetApiDirection[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _WidgetApiDirection[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _ApiVersion = require("./interfaces/ApiVersion");
|
||||
Object.keys(_ApiVersion).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _ApiVersion[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _ApiVersion[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _Capabilities = require("./interfaces/Capabilities");
|
||||
Object.keys(_Capabilities).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _Capabilities[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _Capabilities[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _GetOpenIDAction = require("./interfaces/GetOpenIDAction");
|
||||
Object.keys(_GetOpenIDAction).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _GetOpenIDAction[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _GetOpenIDAction[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _WidgetKind = require("./interfaces/WidgetKind");
|
||||
Object.keys(_WidgetKind).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _WidgetKind[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _WidgetKind[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _ModalButtonKind = require("./interfaces/ModalButtonKind");
|
||||
Object.keys(_ModalButtonKind).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _ModalButtonKind[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _ModalButtonKind[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _ModalWidgetActions = require("./interfaces/ModalWidgetActions");
|
||||
Object.keys(_ModalWidgetActions).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _ModalWidgetActions[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _ModalWidgetActions[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _UpdateDelayedEventAction = require("./interfaces/UpdateDelayedEventAction");
|
||||
Object.keys(_UpdateDelayedEventAction).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _UpdateDelayedEventAction[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _UpdateDelayedEventAction[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _WidgetEventCapability = require("./models/WidgetEventCapability");
|
||||
Object.keys(_WidgetEventCapability).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _WidgetEventCapability[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _WidgetEventCapability[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _url = require("./models/validation/url");
|
||||
Object.keys(_url).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _url[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _url[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _utils = require("./models/validation/utils");
|
||||
Object.keys(_utils).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _utils[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _utils[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _Widget = require("./models/Widget");
|
||||
Object.keys(_Widget).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _Widget[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _Widget[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _WidgetParser = require("./models/WidgetParser");
|
||||
Object.keys(_WidgetParser).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _WidgetParser[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _WidgetParser[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _urlTemplate = require("./templating/url-template");
|
||||
Object.keys(_urlTemplate).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _urlTemplate[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _urlTemplate[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _SimpleObservable = require("./util/SimpleObservable");
|
||||
Object.keys(_SimpleObservable).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _SimpleObservable[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _SimpleObservable[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
var _WidgetDriver = require("./driver/WidgetDriver");
|
||||
Object.keys(_WidgetDriver).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (key in exports && exports[key] === _WidgetDriver[key]) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _WidgetDriver[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/matrix-widget-api/lib/index.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
22
node_modules/matrix-widget-api/lib/interfaces/ApiVersion.d.ts
generated
vendored
Normal file
22
node_modules/matrix-widget-api/lib/interfaces/ApiVersion.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
export declare enum MatrixApiVersion {
|
||||
Prerelease1 = "0.0.1",
|
||||
Prerelease2 = "0.0.2"
|
||||
}
|
||||
export declare enum UnstableApiVersion {
|
||||
MSC2762 = "org.matrix.msc2762",
|
||||
MSC2762_UPDATE_STATE = "org.matrix.msc2762_update_state",
|
||||
MSC2871 = "org.matrix.msc2871",
|
||||
MSC2873 = "org.matrix.msc2873",
|
||||
MSC2931 = "org.matrix.msc2931",
|
||||
MSC2974 = "org.matrix.msc2974",
|
||||
MSC2876 = "org.matrix.msc2876",
|
||||
MSC3819 = "org.matrix.msc3819",
|
||||
MSC3846 = "town.robin.msc3846",
|
||||
MSC3869 = "org.matrix.msc3869",
|
||||
MSC3973 = "org.matrix.msc3973",
|
||||
MSC4039 = "org.matrix.msc4039",
|
||||
MSC4515 = "org.matrix.msc4515",
|
||||
MSC4533 = "org.matrix.msc4533"
|
||||
}
|
||||
export type ApiVersion = MatrixApiVersion | UnstableApiVersion | string;
|
||||
export declare const CurrentApiVersions: ApiVersion[];
|
||||
50
node_modules/matrix-widget-api/lib/interfaces/ApiVersion.js
generated
vendored
Normal file
50
node_modules/matrix-widget-api/lib/interfaces/ApiVersion.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.UnstableApiVersion = exports.MatrixApiVersion = exports.CurrentApiVersions = void 0;
|
||||
/*
|
||||
* Copyright 2020 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var MatrixApiVersion = /*#__PURE__*/function (MatrixApiVersion) {
|
||||
MatrixApiVersion["Prerelease1"] = "0.0.1";
|
||||
MatrixApiVersion["Prerelease2"] = "0.0.2";
|
||||
return MatrixApiVersion;
|
||||
}({});
|
||||
exports.MatrixApiVersion = MatrixApiVersion;
|
||||
var UnstableApiVersion = /*#__PURE__*/function (UnstableApiVersion) {
|
||||
UnstableApiVersion["MSC2762"] = "org.matrix.msc2762";
|
||||
UnstableApiVersion["MSC2762_UPDATE_STATE"] = "org.matrix.msc2762_update_state";
|
||||
UnstableApiVersion["MSC2871"] = "org.matrix.msc2871";
|
||||
UnstableApiVersion["MSC2873"] = "org.matrix.msc2873";
|
||||
UnstableApiVersion["MSC2931"] = "org.matrix.msc2931";
|
||||
UnstableApiVersion["MSC2974"] = "org.matrix.msc2974";
|
||||
UnstableApiVersion["MSC2876"] = "org.matrix.msc2876";
|
||||
UnstableApiVersion["MSC3819"] = "org.matrix.msc3819";
|
||||
UnstableApiVersion["MSC3846"] = "town.robin.msc3846";
|
||||
UnstableApiVersion["MSC3869"] = "org.matrix.msc3869";
|
||||
UnstableApiVersion["MSC3973"] = "org.matrix.msc3973";
|
||||
UnstableApiVersion["MSC4039"] = "org.matrix.msc4039";
|
||||
UnstableApiVersion["MSC4515"] = "org.matrix.msc4515";
|
||||
UnstableApiVersion["MSC4533"] = "org.matrix.msc4533";
|
||||
return UnstableApiVersion;
|
||||
}({});
|
||||
exports.UnstableApiVersion = UnstableApiVersion;
|
||||
var CurrentApiVersions = [MatrixApiVersion.Prerelease1, MatrixApiVersion.Prerelease2,
|
||||
//MatrixApiVersion.V010,
|
||||
UnstableApiVersion.MSC2762, UnstableApiVersion.MSC2762_UPDATE_STATE, UnstableApiVersion.MSC2871, UnstableApiVersion.MSC2873, UnstableApiVersion.MSC2931, UnstableApiVersion.MSC2974, UnstableApiVersion.MSC2876, UnstableApiVersion.MSC3819, UnstableApiVersion.MSC3846, UnstableApiVersion.MSC3869, UnstableApiVersion.MSC3973, UnstableApiVersion.MSC4039, UnstableApiVersion.MSC4515, UnstableApiVersion.MSC4533];
|
||||
exports.CurrentApiVersions = CurrentApiVersions;
|
||||
//# sourceMappingURL=ApiVersion.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/ApiVersion.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/ApiVersion.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ApiVersion.js","names":["MatrixApiVersion","exports","UnstableApiVersion","CurrentApiVersions","Prerelease1","Prerelease2","MSC2762","MSC2762_UPDATE_STATE","MSC2871","MSC2873","MSC2931","MSC2974","MSC2876","MSC3819","MSC3846","MSC3869","MSC3973","MSC4039","MSC4515","MSC4533"],"sources":["../../src/interfaces/ApiVersion.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum MatrixApiVersion {\n Prerelease1 = \"0.0.1\",\n Prerelease2 = \"0.0.2\",\n //V010 = \"0.1.0\", // first release\n}\n\nexport enum UnstableApiVersion {\n MSC2762 = \"org.matrix.msc2762\",\n MSC2762_UPDATE_STATE = \"org.matrix.msc2762_update_state\",\n MSC2871 = \"org.matrix.msc2871\",\n MSC2873 = \"org.matrix.msc2873\",\n MSC2931 = \"org.matrix.msc2931\",\n MSC2974 = \"org.matrix.msc2974\",\n MSC2876 = \"org.matrix.msc2876\",\n MSC3819 = \"org.matrix.msc3819\",\n MSC3846 = \"town.robin.msc3846\",\n MSC3869 = \"org.matrix.msc3869\",\n MSC3973 = \"org.matrix.msc3973\",\n MSC4039 = \"org.matrix.msc4039\",\n MSC4515 = \"org.matrix.msc4515\",\n MSC4533 = \"org.matrix.msc4533\",\n}\n\nexport type ApiVersion = MatrixApiVersion | UnstableApiVersion | string;\n\nexport const CurrentApiVersions: ApiVersion[] = [\n MatrixApiVersion.Prerelease1,\n MatrixApiVersion.Prerelease2,\n //MatrixApiVersion.V010,\n UnstableApiVersion.MSC2762,\n UnstableApiVersion.MSC2762_UPDATE_STATE,\n UnstableApiVersion.MSC2871,\n UnstableApiVersion.MSC2873,\n UnstableApiVersion.MSC2931,\n UnstableApiVersion.MSC2974,\n UnstableApiVersion.MSC2876,\n UnstableApiVersion.MSC3819,\n UnstableApiVersion.MSC3846,\n UnstableApiVersion.MSC3869,\n UnstableApiVersion.MSC3973,\n UnstableApiVersion.MSC4039,\n UnstableApiVersion.MSC4515,\n UnstableApiVersion.MSC4533,\n];\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,IAgBYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAAAC,OAAA,CAAAD,gBAAA,GAAAA,gBAAA;AAAA,IAMhBE,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAAD,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAmBvB,IAAMC,kBAAgC,GAAG,CAC5CH,gBAAgB,CAACI,WAAW,EAC5BJ,gBAAgB,CAACK,WAAW;AAC5B;AACAH,kBAAkB,CAACI,OAAO,EAC1BJ,kBAAkB,CAACK,oBAAoB,EACvCL,kBAAkB,CAACM,OAAO,EAC1BN,kBAAkB,CAACO,OAAO,EAC1BP,kBAAkB,CAACQ,OAAO,EAC1BR,kBAAkB,CAACS,OAAO,EAC1BT,kBAAkB,CAACU,OAAO,EAC1BV,kBAAkB,CAACW,OAAO,EAC1BX,kBAAkB,CAACY,OAAO,EAC1BZ,kBAAkB,CAACa,OAAO,EAC1Bb,kBAAkB,CAACc,OAAO,EAC1Bd,kBAAkB,CAACe,OAAO,EAC1Bf,kBAAkB,CAACgB,OAAO,EAC1BhB,kBAAkB,CAACiB,OAAO,CAC7B;AAAClB,OAAA,CAAAE,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
||||
81
node_modules/matrix-widget-api/lib/interfaces/Capabilities.d.ts
generated
vendored
Normal file
81
node_modules/matrix-widget-api/lib/interfaces/Capabilities.d.ts
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
import { Symbols } from "../Symbols";
|
||||
export declare enum MatrixCapabilities {
|
||||
Screenshots = "m.capability.screenshot",
|
||||
StickerSending = "m.sticker",
|
||||
AlwaysOnScreen = "m.always_on_screen",
|
||||
/**
|
||||
* @deprecated It is not recommended to rely on this existing - it can be removed without notice.
|
||||
* Ask Element to not give the option to move the widget into a separate tab.
|
||||
*/
|
||||
RequiresClient = "io.element.requires_client",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC2931Navigate = "org.matrix.msc2931.navigate",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC3846TurnServers = "town.robin.msc3846.turn_servers",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC3973UserDirectorySearch = "org.matrix.msc3973.user_directory_search",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4039UploadFile = "org.matrix.msc4039.upload_file",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4039DownloadFile = "org.matrix.msc4039.download_file",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4157SendDelayedEvent = "org.matrix.msc4157.send.delayed_event",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4157UpdateDelayedEvent = "org.matrix.msc4157.update_delayed_event",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4407SendStickyEvent = "org.matrix.msc4407.send.sticky_event",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4407ReceiveStickyEvent = "org.matrix.msc4407.receive.sticky_event",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4515RtcTransports = "org.matrix.msc4515.rtc_transports",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4533RtcLivekitGetToken = "org.matrix.msc4533.rtc_livekit_get_token",
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4533RtcLivekitDelegateDelayedLeave = "org.matrix.msc4533.rtc_livekit_delegate_delayed_leave"
|
||||
}
|
||||
export type Capability = MatrixCapabilities | string;
|
||||
export declare const StickerpickerCapabilities: Capability[];
|
||||
export declare const VideoConferenceCapabilities: Capability[];
|
||||
/**
|
||||
* Determines if a capability is a capability for a timeline.
|
||||
* @param {Capability} capability The capability to test.
|
||||
* @returns {boolean} True if a timeline capability, false otherwise.
|
||||
*/
|
||||
export declare function isTimelineCapability(capability: Capability): boolean;
|
||||
/**
|
||||
* Determines if a capability is a timeline capability for the given room.
|
||||
* @param {Capability} capability The capability to test.
|
||||
* @param {string | Symbols.AnyRoom} roomId The room ID, or `Symbols.AnyRoom` for that designation.
|
||||
* @returns {boolean} True if a matching capability, false otherwise.
|
||||
*/
|
||||
export declare function isTimelineCapabilityFor(capability: Capability, roomId: string | Symbols.AnyRoom): boolean;
|
||||
/**
|
||||
* Gets the room ID described by a timeline capability.
|
||||
* @param {string} capability The capability to parse.
|
||||
* @returns {string} The room ID.
|
||||
*/
|
||||
export declare function getTimelineRoomIDFromCapability(capability: Capability): string;
|
||||
78
node_modules/matrix-widget-api/lib/interfaces/Capabilities.js
generated
vendored
Normal file
78
node_modules/matrix-widget-api/lib/interfaces/Capabilities.js
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VideoConferenceCapabilities = exports.StickerpickerCapabilities = exports.MatrixCapabilities = void 0;
|
||||
exports.getTimelineRoomIDFromCapability = getTimelineRoomIDFromCapability;
|
||||
exports.isTimelineCapability = isTimelineCapability;
|
||||
exports.isTimelineCapabilityFor = isTimelineCapabilityFor;
|
||||
/*
|
||||
* Copyright 2020 - 2021 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var MatrixCapabilities = /*#__PURE__*/function (MatrixCapabilities) {
|
||||
MatrixCapabilities["Screenshots"] = "m.capability.screenshot";
|
||||
MatrixCapabilities["StickerSending"] = "m.sticker";
|
||||
MatrixCapabilities["AlwaysOnScreen"] = "m.always_on_screen";
|
||||
MatrixCapabilities["RequiresClient"] = "io.element.requires_client";
|
||||
MatrixCapabilities["MSC2931Navigate"] = "org.matrix.msc2931.navigate";
|
||||
MatrixCapabilities["MSC3846TurnServers"] = "town.robin.msc3846.turn_servers";
|
||||
MatrixCapabilities["MSC3973UserDirectorySearch"] = "org.matrix.msc3973.user_directory_search";
|
||||
MatrixCapabilities["MSC4039UploadFile"] = "org.matrix.msc4039.upload_file";
|
||||
MatrixCapabilities["MSC4039DownloadFile"] = "org.matrix.msc4039.download_file";
|
||||
MatrixCapabilities["MSC4157SendDelayedEvent"] = "org.matrix.msc4157.send.delayed_event";
|
||||
MatrixCapabilities["MSC4157UpdateDelayedEvent"] = "org.matrix.msc4157.update_delayed_event";
|
||||
MatrixCapabilities["MSC4407SendStickyEvent"] = "org.matrix.msc4407.send.sticky_event";
|
||||
MatrixCapabilities["MSC4407ReceiveStickyEvent"] = "org.matrix.msc4407.receive.sticky_event";
|
||||
MatrixCapabilities["MSC4515RtcTransports"] = "org.matrix.msc4515.rtc_transports";
|
||||
MatrixCapabilities["MSC4533RtcLivekitGetToken"] = "org.matrix.msc4533.rtc_livekit_get_token";
|
||||
MatrixCapabilities["MSC4533RtcLivekitDelegateDelayedLeave"] = "org.matrix.msc4533.rtc_livekit_delegate_delayed_leave";
|
||||
return MatrixCapabilities;
|
||||
}({});
|
||||
exports.MatrixCapabilities = MatrixCapabilities;
|
||||
var StickerpickerCapabilities = [MatrixCapabilities.StickerSending];
|
||||
exports.StickerpickerCapabilities = StickerpickerCapabilities;
|
||||
var VideoConferenceCapabilities = [MatrixCapabilities.AlwaysOnScreen];
|
||||
|
||||
/**
|
||||
* Determines if a capability is a capability for a timeline.
|
||||
* @param {Capability} capability The capability to test.
|
||||
* @returns {boolean} True if a timeline capability, false otherwise.
|
||||
*/
|
||||
exports.VideoConferenceCapabilities = VideoConferenceCapabilities;
|
||||
function isTimelineCapability(capability) {
|
||||
// TODO: Change when MSC2762 becomes stable.
|
||||
return capability === null || capability === void 0 ? void 0 : capability.startsWith("org.matrix.msc2762.timeline:");
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a capability is a timeline capability for the given room.
|
||||
* @param {Capability} capability The capability to test.
|
||||
* @param {string | Symbols.AnyRoom} roomId The room ID, or `Symbols.AnyRoom` for that designation.
|
||||
* @returns {boolean} True if a matching capability, false otherwise.
|
||||
*/
|
||||
function isTimelineCapabilityFor(capability, roomId) {
|
||||
return capability === "org.matrix.msc2762.timeline:".concat(roomId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the room ID described by a timeline capability.
|
||||
* @param {string} capability The capability to parse.
|
||||
* @returns {string} The room ID.
|
||||
*/
|
||||
function getTimelineRoomIDFromCapability(capability) {
|
||||
return capability.substring(capability.indexOf(":") + 1);
|
||||
}
|
||||
//# sourceMappingURL=Capabilities.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/Capabilities.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/Capabilities.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
34
node_modules/matrix-widget-api/lib/interfaces/CapabilitiesAction.d.ts
generated
vendored
Normal file
34
node_modules/matrix-widget-api/lib/interfaces/CapabilitiesAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData, IWidgetApiRequestEmptyData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { Capability } from "./Capabilities";
|
||||
import { IWidgetApiAcknowledgeResponseData, IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
export interface ICapabilitiesActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.Capabilities;
|
||||
data: IWidgetApiRequestEmptyData;
|
||||
}
|
||||
export interface ICapabilitiesActionResponseData extends IWidgetApiResponseData {
|
||||
capabilities: Capability[];
|
||||
}
|
||||
export interface ICapabilitiesActionResponse extends ICapabilitiesActionRequest {
|
||||
response: ICapabilitiesActionResponseData;
|
||||
}
|
||||
export interface INotifyCapabilitiesActionRequestData extends IWidgetApiRequestData {
|
||||
requested: Capability[];
|
||||
approved: Capability[];
|
||||
}
|
||||
export interface INotifyCapabilitiesActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.NotifyCapabilities;
|
||||
data: INotifyCapabilitiesActionRequestData;
|
||||
}
|
||||
export interface INotifyCapabilitiesActionResponse extends INotifyCapabilitiesActionRequest {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
export interface IRenegotiateCapabilitiesActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC2974RenegotiateCapabilities;
|
||||
data: IRenegotiateCapabilitiesRequestData;
|
||||
}
|
||||
export interface IRenegotiateCapabilitiesRequestData extends IWidgetApiResponseData {
|
||||
capabilities: Capability[];
|
||||
}
|
||||
export interface IRenegotiateCapabilitiesActionResponse extends IRenegotiateCapabilitiesActionRequest {
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/CapabilitiesAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/CapabilitiesAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=CapabilitiesAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/CapabilitiesAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/CapabilitiesAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"CapabilitiesAction.js","names":[],"sources":["../../src/interfaces/CapabilitiesAction.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData, IWidgetApiRequestEmptyData } from \"./IWidgetApiRequest\";\nimport { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from \"./WidgetApiAction\";\nimport { Capability } from \"./Capabilities\";\nimport { IWidgetApiAcknowledgeResponseData, IWidgetApiResponseData } from \"./IWidgetApiResponse\";\n\nexport interface ICapabilitiesActionRequest extends IWidgetApiRequest {\n action: WidgetApiToWidgetAction.Capabilities;\n data: IWidgetApiRequestEmptyData;\n}\n\nexport interface ICapabilitiesActionResponseData extends IWidgetApiResponseData {\n capabilities: Capability[];\n}\n\nexport interface ICapabilitiesActionResponse extends ICapabilitiesActionRequest {\n response: ICapabilitiesActionResponseData;\n}\n\nexport interface INotifyCapabilitiesActionRequestData extends IWidgetApiRequestData {\n requested: Capability[];\n approved: Capability[];\n}\n\nexport interface INotifyCapabilitiesActionRequest extends IWidgetApiRequest {\n action: WidgetApiToWidgetAction.NotifyCapabilities;\n data: INotifyCapabilitiesActionRequestData;\n}\n\nexport interface INotifyCapabilitiesActionResponse extends INotifyCapabilitiesActionRequest {\n response: IWidgetApiAcknowledgeResponseData;\n}\n\nexport interface IRenegotiateCapabilitiesActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC2974RenegotiateCapabilities;\n data: IRenegotiateCapabilitiesRequestData;\n}\n\nexport interface IRenegotiateCapabilitiesRequestData extends IWidgetApiResponseData {\n capabilities: Capability[];\n}\n\nexport interface IRenegotiateCapabilitiesActionResponse extends IRenegotiateCapabilitiesActionRequest {\n // nothing\n}\n"],"mappings":"","ignoreList":[]}
|
||||
10
node_modules/matrix-widget-api/lib/interfaces/ContentLoadedAction.d.ts
generated
vendored
Normal file
10
node_modules/matrix-widget-api/lib/interfaces/ContentLoadedAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestEmptyData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";
|
||||
export interface IContentLoadedActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.ContentLoaded;
|
||||
data: IWidgetApiRequestEmptyData;
|
||||
}
|
||||
export interface IContentLoadedActionResponse extends IContentLoadedActionRequest {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/ContentLoadedAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/ContentLoadedAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=ContentLoadedAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/ContentLoadedAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/ContentLoadedAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ContentLoadedAction.js","names":[],"sources":["../../src/interfaces/ContentLoadedAction.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestEmptyData } from \"./IWidgetApiRequest\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\nimport { IWidgetApiAcknowledgeResponseData } from \"./IWidgetApiResponse\";\n\nexport interface IContentLoadedActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.ContentLoaded;\n data: IWidgetApiRequestEmptyData;\n}\n\nexport interface IContentLoadedActionResponse extends IContentLoadedActionRequest {\n response: IWidgetApiAcknowledgeResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
16
node_modules/matrix-widget-api/lib/interfaces/DownloadFileAction.d.ts
generated
vendored
Normal file
16
node_modules/matrix-widget-api/lib/interfaces/DownloadFileAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
export interface IDownloadFileActionFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
content_uri: string;
|
||||
}
|
||||
export interface IDownloadFileActionFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC4039DownloadFileAction;
|
||||
data: IDownloadFileActionFromWidgetRequestData;
|
||||
}
|
||||
export interface IDownloadFileActionFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
file: XMLHttpRequestBodyInit;
|
||||
}
|
||||
export interface IDownloadFileActionFromWidgetActionResponse extends IDownloadFileActionFromWidgetActionRequest {
|
||||
response: IDownloadFileActionFromWidgetResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/DownloadFileAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/DownloadFileAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=DownloadFileAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/DownloadFileAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/DownloadFileAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DownloadFileAction.js","names":[],"sources":["../../src/interfaces/DownloadFileAction.ts"],"sourcesContent":["/*\n * Copyright 2024 Nordeck IT + Consulting GmbH\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\n\nexport interface IDownloadFileActionFromWidgetRequestData extends IWidgetApiRequestData {\n content_uri: string; // eslint-disable-line camelcase\n}\n\nexport interface IDownloadFileActionFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC4039DownloadFileAction;\n data: IDownloadFileActionFromWidgetRequestData;\n}\n\nexport interface IDownloadFileActionFromWidgetResponseData extends IWidgetApiResponseData {\n file: XMLHttpRequestBodyInit;\n}\n\nexport interface IDownloadFileActionFromWidgetActionResponse extends IDownloadFileActionFromWidgetActionRequest {\n response: IDownloadFileActionFromWidgetResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
15
node_modules/matrix-widget-api/lib/interfaces/GetMediaConfigAction.d.ts
generated
vendored
Normal file
15
node_modules/matrix-widget-api/lib/interfaces/GetMediaConfigAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
export interface IGetMediaConfigActionFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
}
|
||||
export interface IGetMediaConfigActionFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC4039GetMediaConfigAction;
|
||||
data: IGetMediaConfigActionFromWidgetRequestData;
|
||||
}
|
||||
export interface IGetMediaConfigActionFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
"m.upload.size"?: number;
|
||||
}
|
||||
export interface IGetMediaConfigActionFromWidgetActionResponse extends IGetMediaConfigActionFromWidgetActionRequest {
|
||||
response: IGetMediaConfigActionFromWidgetResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/GetMediaConfigAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/GetMediaConfigAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=GetMediaConfigAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/GetMediaConfigAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/GetMediaConfigAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"GetMediaConfigAction.js","names":[],"sources":["../../src/interfaces/GetMediaConfigAction.ts"],"sourcesContent":["/*\n * Copyright 2023 Nordeck IT + Consulting GmbH.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\n\nexport interface IGetMediaConfigActionFromWidgetRequestData extends IWidgetApiRequestData {}\n\nexport interface IGetMediaConfigActionFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC4039GetMediaConfigAction;\n data: IGetMediaConfigActionFromWidgetRequestData;\n}\n\nexport interface IGetMediaConfigActionFromWidgetResponseData extends IWidgetApiResponseData {\n \"m.upload.size\"?: number;\n}\n\nexport interface IGetMediaConfigActionFromWidgetActionResponse extends IGetMediaConfigActionFromWidgetActionRequest {\n response: IGetMediaConfigActionFromWidgetResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
26
node_modules/matrix-widget-api/lib/interfaces/GetOpenIDAction.d.ts
generated
vendored
Normal file
26
node_modules/matrix-widget-api/lib/interfaces/GetOpenIDAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
export declare enum OpenIDRequestState {
|
||||
Allowed = "allowed",
|
||||
Blocked = "blocked",
|
||||
PendingUserConfirmation = "request"
|
||||
}
|
||||
export interface IOpenIDCredentials {
|
||||
access_token?: string;
|
||||
expires_in?: number;
|
||||
matrix_server_name?: string;
|
||||
token_type?: "Bearer" | string;
|
||||
}
|
||||
export interface IGetOpenIDActionRequestData extends IWidgetApiRequestData {
|
||||
}
|
||||
export interface IGetOpenIDActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.GetOpenIDCredentials;
|
||||
data: IGetOpenIDActionRequestData;
|
||||
}
|
||||
export interface IGetOpenIDActionResponseData extends IWidgetApiResponseData, IOpenIDCredentials {
|
||||
state: OpenIDRequestState;
|
||||
}
|
||||
export interface IGetOpenIDActionResponse extends IGetOpenIDActionRequest {
|
||||
response: IGetOpenIDActionResponseData;
|
||||
}
|
||||
29
node_modules/matrix-widget-api/lib/interfaces/GetOpenIDAction.js
generated
vendored
Normal file
29
node_modules/matrix-widget-api/lib/interfaces/GetOpenIDAction.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.OpenIDRequestState = void 0;
|
||||
/*
|
||||
* Copyright 2020 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var OpenIDRequestState = /*#__PURE__*/function (OpenIDRequestState) {
|
||||
OpenIDRequestState["Allowed"] = "allowed";
|
||||
OpenIDRequestState["Blocked"] = "blocked";
|
||||
OpenIDRequestState["PendingUserConfirmation"] = "request";
|
||||
return OpenIDRequestState;
|
||||
}({});
|
||||
exports.OpenIDRequestState = OpenIDRequestState;
|
||||
//# sourceMappingURL=GetOpenIDAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/GetOpenIDAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/GetOpenIDAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"GetOpenIDAction.js","names":["OpenIDRequestState","exports"],"sources":["../../src/interfaces/GetOpenIDAction.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\n\nexport enum OpenIDRequestState {\n Allowed = \"allowed\",\n Blocked = \"blocked\",\n PendingUserConfirmation = \"request\",\n}\n\nexport interface IOpenIDCredentials {\n access_token?: string; // eslint-disable-line camelcase\n expires_in?: number; // eslint-disable-line camelcase\n matrix_server_name?: string; // eslint-disable-line camelcase\n token_type?: \"Bearer\" | string; // eslint-disable-line camelcase\n}\n\nexport interface IGetOpenIDActionRequestData extends IWidgetApiRequestData {\n // nothing\n}\n\nexport interface IGetOpenIDActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.GetOpenIDCredentials;\n data: IGetOpenIDActionRequestData;\n}\n\nexport interface IGetOpenIDActionResponseData extends IWidgetApiResponseData, IOpenIDCredentials {\n state: OpenIDRequestState;\n}\n\nexport interface IGetOpenIDActionResponse extends IGetOpenIDActionRequest {\n response: IGetOpenIDActionResponseData;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,IAoBYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAAC,OAAA,CAAAD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
||||
10
node_modules/matrix-widget-api/lib/interfaces/ICustomWidgetData.d.ts
generated
vendored
Normal file
10
node_modules/matrix-widget-api/lib/interfaces/ICustomWidgetData.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { IWidgetData } from "./IWidget";
|
||||
/**
|
||||
* Widget data for m.custom specifically.
|
||||
*/
|
||||
export interface ICustomWidgetData extends IWidgetData {
|
||||
/**
|
||||
* The URL for the widget if the templated URL is not exactly what will be loaded.
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/ICustomWidgetData.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/ICustomWidgetData.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=ICustomWidgetData.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/ICustomWidgetData.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/ICustomWidgetData.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ICustomWidgetData.js","names":[],"sources":["../../src/interfaces/ICustomWidgetData.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetData } from \"./IWidget\";\n\n/**\n * Widget data for m.custom specifically.\n */\nexport interface ICustomWidgetData extends IWidgetData {\n /**\n * The URL for the widget if the templated URL is not exactly what will be loaded.\n */\n url?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
19
node_modules/matrix-widget-api/lib/interfaces/IJitsiWidgetData.d.ts
generated
vendored
Normal file
19
node_modules/matrix-widget-api/lib/interfaces/IJitsiWidgetData.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { IWidgetData } from "./IWidget";
|
||||
/**
|
||||
* Widget data for m.jitsi widgets.
|
||||
*/
|
||||
export interface IJitsiWidgetData extends IWidgetData {
|
||||
/**
|
||||
* The domain where the Jitsi Meet conference is being held.
|
||||
*/
|
||||
domain: string;
|
||||
/**
|
||||
* The conference ID (also known as the room name) where the conference is being held.
|
||||
*/
|
||||
conferenceId: string;
|
||||
/**
|
||||
* Optional. True to indicate that the conference should be without video, false
|
||||
* otherwise (default).
|
||||
*/
|
||||
isAudioOnly?: boolean;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/IJitsiWidgetData.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/IJitsiWidgetData.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=IJitsiWidgetData.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/IJitsiWidgetData.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/IJitsiWidgetData.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IJitsiWidgetData.js","names":[],"sources":["../../src/interfaces/IJitsiWidgetData.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetData } from \"./IWidget\";\n\n/**\n * Widget data for m.jitsi widgets.\n */\nexport interface IJitsiWidgetData extends IWidgetData {\n /**\n * The domain where the Jitsi Meet conference is being held.\n */\n domain: string;\n\n /**\n * The conference ID (also known as the room name) where the conference is being held.\n */\n conferenceId: string;\n\n /**\n * Optional. True to indicate that the conference should be without video, false\n * otherwise (default).\n */\n isAudioOnly?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
5
node_modules/matrix-widget-api/lib/interfaces/IRoomAccountData.d.ts
generated
vendored
Normal file
5
node_modules/matrix-widget-api/lib/interfaces/IRoomAccountData.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface IRoomAccountData {
|
||||
type: string;
|
||||
room_id: string;
|
||||
content: Record<string, unknown>;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/IRoomAccountData.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/IRoomAccountData.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=IRoomAccountData.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/IRoomAccountData.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/IRoomAccountData.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IRoomAccountData.js","names":[],"sources":["../../src/interfaces/IRoomAccountData.ts"],"sourcesContent":["/*\n * Copyright 2023 Beeper Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface IRoomAccountData {\n type: string;\n room_id: string; // eslint-disable-line camelcase\n content: Record<string, unknown>;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
16
node_modules/matrix-widget-api/lib/interfaces/IRoomEvent.d.ts
generated
vendored
Normal file
16
node_modules/matrix-widget-api/lib/interfaces/IRoomEvent.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export interface IRoomEvent {
|
||||
type: string;
|
||||
sender: string;
|
||||
event_id: string;
|
||||
room_id: string;
|
||||
state_key?: string;
|
||||
origin_server_ts: number;
|
||||
content: Record<string, unknown>;
|
||||
unsigned: Record<string, unknown>;
|
||||
sticky?: {
|
||||
duration_ms: number;
|
||||
};
|
||||
msc4354_sticky?: {
|
||||
duration_ms: number;
|
||||
};
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/IRoomEvent.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/IRoomEvent.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=IRoomEvent.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/IRoomEvent.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/IRoomEvent.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IRoomEvent.js","names":[],"sources":["../../src/interfaces/IRoomEvent.ts"],"sourcesContent":["/*\n * Copyright 2020 - 2021 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface IRoomEvent {\n type: string;\n sender: string;\n event_id: string; // eslint-disable-line camelcase\n room_id: string; // eslint-disable-line camelcase\n state_key?: string; // eslint-disable-line camelcase\n origin_server_ts: number; // eslint-disable-line camelcase\n content: Record<string, unknown>;\n unsigned: Record<string, unknown>;\n //MSC4354\n sticky?: {\n duration_ms: number;\n };\n msc4354_sticky?: {\n duration_ms: number;\n };\n}\n"],"mappings":"","ignoreList":[]}
|
||||
3
node_modules/matrix-widget-api/lib/interfaces/IStickerpickerWidgetData.d.ts
generated
vendored
Normal file
3
node_modules/matrix-widget-api/lib/interfaces/IStickerpickerWidgetData.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { IWidgetData } from "./IWidget";
|
||||
export interface IStickerpickerWidgetData extends IWidgetData {
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/IStickerpickerWidgetData.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/IStickerpickerWidgetData.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=IStickerpickerWidgetData.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/IStickerpickerWidgetData.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/IStickerpickerWidgetData.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IStickerpickerWidgetData.js","names":[],"sources":["../../src/interfaces/IStickerpickerWidgetData.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetData } from \"./IWidget\";\n\nexport interface IStickerpickerWidgetData extends IWidgetData {\n // no additional properties (for now)\n}\n"],"mappings":"","ignoreList":[]}
|
||||
5
node_modules/matrix-widget-api/lib/interfaces/IToDeviceMessage.d.ts
generated
vendored
Normal file
5
node_modules/matrix-widget-api/lib/interfaces/IToDeviceMessage.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface IToDeviceMessage {
|
||||
content: Record<string, unknown>;
|
||||
sender: string;
|
||||
type: string;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/IToDeviceMessage.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/IToDeviceMessage.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=IToDeviceMessage.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/IToDeviceMessage.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/IToDeviceMessage.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IToDeviceMessage.js","names":[],"sources":["../../src/interfaces/IToDeviceMessage.ts"],"sourcesContent":["/*\n * Copyright 2025 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface IToDeviceMessage {\n content: Record<string, unknown>;\n sender: string;\n type: string;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
50
node_modules/matrix-widget-api/lib/interfaces/IWidget.d.ts
generated
vendored
Normal file
50
node_modules/matrix-widget-api/lib/interfaces/IWidget.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import { WidgetType } from "./WidgetType";
|
||||
/**
|
||||
* Widget data.
|
||||
*/
|
||||
export interface IWidgetData {
|
||||
/**
|
||||
* Optional title for the widget.
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Custom keys for inclusion in the template URL.
|
||||
*/
|
||||
[key: string]: unknown;
|
||||
}
|
||||
/**
|
||||
* Common properties of a widget.
|
||||
* https://matrix.org/docs/spec/widgets/latest#widgetcommonproperties-schema
|
||||
*/
|
||||
export interface IWidget {
|
||||
/**
|
||||
* The ID of the widget.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The user ID who originally created the widget.
|
||||
*/
|
||||
creatorUserId: string;
|
||||
/**
|
||||
* Optional name for the widget.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The type of widget.
|
||||
*/
|
||||
type: WidgetType;
|
||||
/**
|
||||
* The URL for the widget, with template variables.
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* Optional flag to indicate whether or not the client should initiate communication
|
||||
* right after the iframe loads (default, true) or when the widget indicates it is
|
||||
* ready (false).
|
||||
*/
|
||||
waitForIframeLoad?: boolean;
|
||||
/**
|
||||
* Data for the widget.
|
||||
*/
|
||||
data?: IWidgetData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/IWidget.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/IWidget.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=IWidget.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/IWidget.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/IWidget.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IWidget.js","names":[],"sources":["../../src/interfaces/IWidget.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WidgetType } from \"./WidgetType\";\n\n/**\n * Widget data.\n */\nexport interface IWidgetData {\n /**\n * Optional title for the widget.\n */\n title?: string;\n\n /**\n * Custom keys for inclusion in the template URL.\n */\n [key: string]: unknown;\n}\n\n/**\n * Common properties of a widget.\n * https://matrix.org/docs/spec/widgets/latest#widgetcommonproperties-schema\n */\nexport interface IWidget {\n /**\n * The ID of the widget.\n */\n id: string;\n\n /**\n * The user ID who originally created the widget.\n */\n creatorUserId: string;\n\n /**\n * Optional name for the widget.\n */\n name?: string;\n\n /**\n * The type of widget.\n */\n type: WidgetType;\n\n /**\n * The URL for the widget, with template variables.\n */\n url: string;\n\n /**\n * Optional flag to indicate whether or not the client should initiate communication\n * right after the iframe loads (default, true) or when the widget indicates it is\n * ready (false).\n */\n waitForIframeLoad?: boolean;\n\n /**\n * Data for the widget.\n */\n data?: IWidgetData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
34
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiErrorResponse.d.ts
generated
vendored
Normal file
34
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiErrorResponse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import { IWidgetApiResponse, IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
/**
|
||||
* The format of errors returned by Matrix API requests
|
||||
* made by a WidgetDriver.
|
||||
*/
|
||||
export interface IMatrixApiError {
|
||||
/** The HTTP status code of the associated request. */
|
||||
http_status: number;
|
||||
/** Any HTTP response headers that are relevant to the error. */
|
||||
http_headers: {
|
||||
[name: string]: string;
|
||||
};
|
||||
/** The URL of the failed request. */
|
||||
url: string;
|
||||
/** @see {@link https://spec.matrix.org/latest/client-server-api/#standard-error-response} */
|
||||
response: {
|
||||
errcode: string;
|
||||
error: string;
|
||||
} & IWidgetApiResponseData;
|
||||
}
|
||||
export interface IWidgetApiErrorResponseDataDetails {
|
||||
/** Set if the error came from a Matrix API request made by a widget driver */
|
||||
matrix_api_error?: IMatrixApiError;
|
||||
}
|
||||
export interface IWidgetApiErrorResponseData extends IWidgetApiResponseData {
|
||||
error: {
|
||||
/** A user-friendly string describing the error */
|
||||
message: string;
|
||||
} & IWidgetApiErrorResponseDataDetails;
|
||||
}
|
||||
export interface IWidgetApiErrorResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiErrorResponseData;
|
||||
}
|
||||
export declare function isErrorResponse(responseData: IWidgetApiResponseData): responseData is IWidgetApiErrorResponseData;
|
||||
33
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiErrorResponse.js
generated
vendored
Normal file
33
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiErrorResponse.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isErrorResponse = isErrorResponse;
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
/*
|
||||
* Copyright 2020 - 2024 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The format of errors returned by Matrix API requests
|
||||
* made by a WidgetDriver.
|
||||
*/
|
||||
|
||||
function isErrorResponse(responseData) {
|
||||
var error = responseData.error;
|
||||
return _typeof(error) === "object" && error !== null && "message" in error && typeof error.message === "string";
|
||||
}
|
||||
//# sourceMappingURL=IWidgetApiErrorResponse.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiErrorResponse.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiErrorResponse.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IWidgetApiErrorResponse.js","names":["isErrorResponse","responseData","error","_typeof","message"],"sources":["../../src/interfaces/IWidgetApiErrorResponse.ts"],"sourcesContent":["/*\n * Copyright 2020 - 2024 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiResponse, IWidgetApiResponseData } from \"./IWidgetApiResponse\";\n\n/**\n * The format of errors returned by Matrix API requests\n * made by a WidgetDriver.\n */\nexport interface IMatrixApiError {\n /** The HTTP status code of the associated request. */\n http_status: number; // eslint-disable-line camelcase\n /** Any HTTP response headers that are relevant to the error. */\n http_headers: { [name: string]: string }; // eslint-disable-line camelcase\n /** The URL of the failed request. */\n url: string;\n /** @see {@link https://spec.matrix.org/latest/client-server-api/#standard-error-response} */\n response: {\n errcode: string;\n error: string;\n } & IWidgetApiResponseData; // extensible\n}\n\nexport interface IWidgetApiErrorResponseDataDetails {\n /** Set if the error came from a Matrix API request made by a widget driver */\n matrix_api_error?: IMatrixApiError; // eslint-disable-line camelcase\n}\n\nexport interface IWidgetApiErrorResponseData extends IWidgetApiResponseData {\n error: {\n /** A user-friendly string describing the error */\n message: string;\n } & IWidgetApiErrorResponseDataDetails;\n}\n\nexport interface IWidgetApiErrorResponse extends IWidgetApiResponse {\n response: IWidgetApiErrorResponseData;\n}\n\nexport function isErrorResponse(responseData: IWidgetApiResponseData): responseData is IWidgetApiErrorResponseData {\n const error = responseData.error;\n return typeof error === \"object\" && error !== null && \"message\" in error && typeof error.message === \"string\";\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;;AA+BO,SAASA,eAAeA,CAACC,YAAoC,EAA+C;EAC/G,IAAMC,KAAK,GAAGD,YAAY,CAACC,KAAK;EAChC,OAAOC,OAAA,CAAOD,KAAK,MAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,IAAI,SAAS,IAAIA,KAAK,IAAI,OAAOA,KAAK,CAACE,OAAO,KAAK,QAAQ;AACjH","ignoreList":[]}
|
||||
15
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiRequest.d.ts
generated
vendored
Normal file
15
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiRequest.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { WidgetApiDirection } from "./WidgetApiDirection";
|
||||
import { WidgetApiAction } from "./WidgetApiAction";
|
||||
export interface IWidgetApiRequestData {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
export interface IWidgetApiRequestEmptyData extends IWidgetApiRequestData {
|
||||
}
|
||||
export interface IWidgetApiRequest {
|
||||
api: WidgetApiDirection;
|
||||
requestId: string;
|
||||
action: WidgetApiAction;
|
||||
widgetId: string;
|
||||
data: IWidgetApiRequestData;
|
||||
visible?: any;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiRequest.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiRequest.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=IWidgetApiRequest.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiRequest.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiRequest.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IWidgetApiRequest.js","names":[],"sources":["../../src/interfaces/IWidgetApiRequest.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WidgetApiDirection } from \"./WidgetApiDirection\";\nimport { WidgetApiAction } from \"./WidgetApiAction\";\n\nexport interface IWidgetApiRequestData {\n [key: string]: unknown;\n}\n\nexport interface IWidgetApiRequestEmptyData extends IWidgetApiRequestData {\n // nothing\n}\n\nexport interface IWidgetApiRequest {\n api: WidgetApiDirection;\n requestId: string;\n action: WidgetApiAction;\n widgetId: string;\n data: IWidgetApiRequestData;\n // XXX: This is for Scalar support\n // TODO: Fix scalar\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n visible?: any;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
9
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiResponse.d.ts
generated
vendored
Normal file
9
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiResponse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { IWidgetApiRequest } from "./IWidgetApiRequest";
|
||||
export interface IWidgetApiResponseData {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
export interface IWidgetApiAcknowledgeResponseData extends IWidgetApiResponseData {
|
||||
}
|
||||
export interface IWidgetApiResponse extends IWidgetApiRequest {
|
||||
response: IWidgetApiResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiResponse.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiResponse.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=IWidgetApiResponse.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiResponse.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/IWidgetApiResponse.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IWidgetApiResponse.js","names":[],"sources":["../../src/interfaces/IWidgetApiResponse.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest } from \"./IWidgetApiRequest\";\n\nexport interface IWidgetApiResponseData {\n [key: string]: unknown;\n}\n\nexport interface IWidgetApiAcknowledgeResponseData extends IWidgetApiResponseData {\n // nothing\n}\n\nexport interface IWidgetApiResponse extends IWidgetApiRequest {\n response: IWidgetApiResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
16
node_modules/matrix-widget-api/lib/interfaces/LanguageChangeAction.d.ts
generated
vendored
Normal file
16
node_modules/matrix-widget-api/lib/interfaces/LanguageChangeAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";
|
||||
export interface ILanguageChangeActionRequestData extends IWidgetApiRequestData {
|
||||
/**
|
||||
* The BCP 47 identifier for the client's current language.
|
||||
*/
|
||||
lang: string;
|
||||
}
|
||||
export interface ILanguageChangeActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.LanguageChange;
|
||||
data: ILanguageChangeActionRequestData;
|
||||
}
|
||||
export interface ILanguageChangeActionResponse extends ILanguageChangeActionRequest {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/LanguageChangeAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/LanguageChangeAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=LanguageChangeAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/LanguageChangeAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/LanguageChangeAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"LanguageChangeAction.js","names":[],"sources":["../../src/interfaces/LanguageChangeAction.ts"],"sourcesContent":["/*\n * Copyright 2024 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { WidgetApiToWidgetAction } from \"./WidgetApiAction\";\nimport { IWidgetApiAcknowledgeResponseData } from \"./IWidgetApiResponse\";\n\nexport interface ILanguageChangeActionRequestData extends IWidgetApiRequestData {\n /**\n * The BCP 47 identifier for the client's current language.\n */\n lang: string;\n}\n\nexport interface ILanguageChangeActionRequest extends IWidgetApiRequest {\n action: WidgetApiToWidgetAction.LanguageChange;\n data: ILanguageChangeActionRequestData;\n}\n\nexport interface ILanguageChangeActionResponse extends ILanguageChangeActionRequest {\n response: IWidgetApiAcknowledgeResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
7
node_modules/matrix-widget-api/lib/interfaces/ModalButtonKind.d.ts
generated
vendored
Normal file
7
node_modules/matrix-widget-api/lib/interfaces/ModalButtonKind.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export declare enum ModalButtonKind {
|
||||
Primary = "m.primary",
|
||||
Secondary = "m.secondary",
|
||||
Warning = "m.warning",
|
||||
Danger = "m.danger",
|
||||
Link = "m.link"
|
||||
}
|
||||
31
node_modules/matrix-widget-api/lib/interfaces/ModalButtonKind.js
generated
vendored
Normal file
31
node_modules/matrix-widget-api/lib/interfaces/ModalButtonKind.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.ModalButtonKind = void 0;
|
||||
/*
|
||||
* Copyright 2020 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var ModalButtonKind = /*#__PURE__*/function (ModalButtonKind) {
|
||||
ModalButtonKind["Primary"] = "m.primary";
|
||||
ModalButtonKind["Secondary"] = "m.secondary";
|
||||
ModalButtonKind["Warning"] = "m.warning";
|
||||
ModalButtonKind["Danger"] = "m.danger";
|
||||
ModalButtonKind["Link"] = "m.link";
|
||||
return ModalButtonKind;
|
||||
}({});
|
||||
exports.ModalButtonKind = ModalButtonKind;
|
||||
//# sourceMappingURL=ModalButtonKind.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/ModalButtonKind.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/ModalButtonKind.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ModalButtonKind.js","names":["ModalButtonKind","exports"],"sources":["../../src/interfaces/ModalButtonKind.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum ModalButtonKind {\n Primary = \"m.primary\",\n Secondary = \"m.secondary\",\n Warning = \"m.warning\",\n Danger = \"m.danger\",\n Link = \"m.link\",\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,IAgBYA,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAAAC,OAAA,CAAAD,eAAA,GAAAA,eAAA","ignoreList":[]}
|
||||
55
node_modules/matrix-widget-api/lib/interfaces/ModalWidgetActions.d.ts
generated
vendored
Normal file
55
node_modules/matrix-widget-api/lib/interfaces/ModalWidgetActions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData, IWidgetApiResponse } from "./IWidgetApiResponse";
|
||||
import { IWidget } from "./IWidget";
|
||||
import { ModalButtonKind } from "./ModalButtonKind";
|
||||
export declare enum BuiltInModalButtonID {
|
||||
Close = "m.close"
|
||||
}
|
||||
export type ModalButtonID = BuiltInModalButtonID | string;
|
||||
export interface IModalWidgetCreateData extends IWidgetApiRequestData {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
export interface IModalWidgetReturnData {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
export interface IModalWidgetOpenRequestDataButton {
|
||||
id: ModalButtonID;
|
||||
label: string;
|
||||
kind: ModalButtonKind | string;
|
||||
disabled?: boolean;
|
||||
}
|
||||
export interface IModalWidgetOpenRequestData extends IModalWidgetCreateData, Omit<IWidget, "id" | "creatorUserId"> {
|
||||
buttons?: IModalWidgetOpenRequestDataButton[];
|
||||
}
|
||||
export interface IModalWidgetOpenRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.OpenModalWidget;
|
||||
data: IModalWidgetOpenRequestData;
|
||||
}
|
||||
export interface IModalWidgetOpenResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
export interface IModalWidgetButtonClickedRequestData extends IWidgetApiRequestData {
|
||||
id: IModalWidgetOpenRequestDataButton["id"];
|
||||
}
|
||||
export interface IModalWidgetButtonClickedRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.ButtonClicked;
|
||||
data: IModalWidgetButtonClickedRequestData;
|
||||
}
|
||||
export interface IModalWidgetButtonClickedResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
export interface IModalWidgetCloseRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.CloseModalWidget;
|
||||
data: IModalWidgetReturnData;
|
||||
}
|
||||
export interface IModalWidgetCloseResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
export interface IModalWidgetCloseNotificationRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.CloseModalWidget;
|
||||
data: IModalWidgetReturnData;
|
||||
}
|
||||
export interface IModalWidgetCloseNotificationResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
30
node_modules/matrix-widget-api/lib/interfaces/ModalWidgetActions.js
generated
vendored
Normal file
30
node_modules/matrix-widget-api/lib/interfaces/ModalWidgetActions.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.BuiltInModalButtonID = void 0;
|
||||
/*
|
||||
* Copyright 2020 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var BuiltInModalButtonID = /*#__PURE__*/function (BuiltInModalButtonID) {
|
||||
BuiltInModalButtonID["Close"] = "m.close";
|
||||
return BuiltInModalButtonID;
|
||||
}({}); // Types for a normal modal requesting the opening a modal widget
|
||||
// Types for a modal widget receiving notifications that its buttons have been pressed
|
||||
// Types for a modal widget requesting close
|
||||
// Types for a normal widget being notified that the modal widget it opened has been closed
|
||||
exports.BuiltInModalButtonID = BuiltInModalButtonID;
|
||||
//# sourceMappingURL=ModalWidgetActions.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/ModalWidgetActions.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/ModalWidgetActions.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ModalWidgetActions.js","names":["BuiltInModalButtonID","exports"],"sources":["../../src/interfaces/ModalWidgetActions.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from \"./WidgetApiAction\";\nimport { IWidgetApiAcknowledgeResponseData, IWidgetApiResponse } from \"./IWidgetApiResponse\";\nimport { IWidget } from \"./IWidget\";\nimport { ModalButtonKind } from \"./ModalButtonKind\";\n\nexport enum BuiltInModalButtonID {\n Close = \"m.close\",\n}\nexport type ModalButtonID = BuiltInModalButtonID | string;\n\nexport interface IModalWidgetCreateData extends IWidgetApiRequestData {\n [key: string]: unknown;\n}\n\nexport interface IModalWidgetReturnData {\n [key: string]: unknown;\n}\n\n// Types for a normal modal requesting the opening a modal widget\nexport interface IModalWidgetOpenRequestDataButton {\n id: ModalButtonID;\n label: string;\n kind: ModalButtonKind | string;\n disabled?: boolean;\n}\n\nexport interface IModalWidgetOpenRequestData extends IModalWidgetCreateData, Omit<IWidget, \"id\" | \"creatorUserId\"> {\n buttons?: IModalWidgetOpenRequestDataButton[];\n}\n\nexport interface IModalWidgetOpenRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.OpenModalWidget;\n data: IModalWidgetOpenRequestData;\n}\n\nexport interface IModalWidgetOpenResponse extends IWidgetApiResponse {\n response: IWidgetApiAcknowledgeResponseData;\n}\n\n// Types for a modal widget receiving notifications that its buttons have been pressed\nexport interface IModalWidgetButtonClickedRequestData extends IWidgetApiRequestData {\n id: IModalWidgetOpenRequestDataButton[\"id\"];\n}\n\nexport interface IModalWidgetButtonClickedRequest extends IWidgetApiRequest {\n action: WidgetApiToWidgetAction.ButtonClicked;\n data: IModalWidgetButtonClickedRequestData;\n}\n\nexport interface IModalWidgetButtonClickedResponse extends IWidgetApiResponse {\n response: IWidgetApiAcknowledgeResponseData;\n}\n\n// Types for a modal widget requesting close\nexport interface IModalWidgetCloseRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.CloseModalWidget;\n data: IModalWidgetReturnData;\n}\n\nexport interface IModalWidgetCloseResponse extends IWidgetApiResponse {\n response: IWidgetApiAcknowledgeResponseData;\n}\n\n// Types for a normal widget being notified that the modal widget it opened has been closed\nexport interface IModalWidgetCloseNotificationRequest extends IWidgetApiRequest {\n action: WidgetApiToWidgetAction.CloseModalWidget;\n data: IModalWidgetReturnData;\n}\n\nexport interface IModalWidgetCloseNotificationResponse extends IWidgetApiResponse {\n response: IWidgetApiAcknowledgeResponseData;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,IAsBYA,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA,OAahC;AAqBA;AAcA;AAUA;AAAAC,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
||||
13
node_modules/matrix-widget-api/lib/interfaces/NavigateAction.d.ts
generated
vendored
Normal file
13
node_modules/matrix-widget-api/lib/interfaces/NavigateAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";
|
||||
export interface INavigateActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC2931Navigate;
|
||||
data: INavigateActionRequestData;
|
||||
}
|
||||
export interface INavigateActionRequestData extends IWidgetApiRequestData {
|
||||
uri: string;
|
||||
}
|
||||
export interface INavigateActionResponse extends INavigateActionRequest {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/NavigateAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/NavigateAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=NavigateAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/NavigateAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/NavigateAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"NavigateAction.js","names":[],"sources":["../../src/interfaces/NavigateAction.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\nimport { IWidgetApiAcknowledgeResponseData } from \"./IWidgetApiResponse\";\n\nexport interface INavigateActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC2931Navigate;\n data: INavigateActionRequestData;\n}\n\nexport interface INavigateActionRequestData extends IWidgetApiRequestData {\n uri: string;\n}\n\nexport interface INavigateActionResponse extends INavigateActionRequest {\n response: IWidgetApiAcknowledgeResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
17
node_modules/matrix-widget-api/lib/interfaces/OpenIDCredentialsAction.d.ts
generated
vendored
Normal file
17
node_modules/matrix-widget-api/lib/interfaces/OpenIDCredentialsAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { IOpenIDCredentials, OpenIDRequestState } from "./GetOpenIDAction";
|
||||
export interface IOpenIDCredentialsActionRequestData extends IWidgetApiRequestData, IOpenIDCredentials {
|
||||
state: OpenIDRequestState;
|
||||
original_request_id: string;
|
||||
}
|
||||
export interface IOpenIDCredentialsActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.OpenIDCredentials;
|
||||
data: IOpenIDCredentialsActionRequestData;
|
||||
}
|
||||
export interface IOpenIDCredentialsActionResponseData extends IWidgetApiResponseData {
|
||||
}
|
||||
export interface IOpenIDCredentialsIDActionResponse extends IOpenIDCredentialsActionRequest {
|
||||
response: IOpenIDCredentialsActionResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/OpenIDCredentialsAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/OpenIDCredentialsAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=OpenIDCredentialsAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/OpenIDCredentialsAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/OpenIDCredentialsAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"OpenIDCredentialsAction.js","names":[],"sources":["../../src/interfaces/OpenIDCredentialsAction.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { WidgetApiToWidgetAction } from \"./WidgetApiAction\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { IOpenIDCredentials, OpenIDRequestState } from \"./GetOpenIDAction\";\n\nexport interface IOpenIDCredentialsActionRequestData extends IWidgetApiRequestData, IOpenIDCredentials {\n state: OpenIDRequestState;\n original_request_id: string; // eslint-disable-line camelcase\n}\n\nexport interface IOpenIDCredentialsActionRequest extends IWidgetApiRequest {\n action: WidgetApiToWidgetAction.OpenIDCredentials;\n data: IOpenIDCredentialsActionRequestData;\n}\n\nexport interface IOpenIDCredentialsActionResponseData extends IWidgetApiResponseData {\n // nothing\n}\n\nexport interface IOpenIDCredentialsIDActionResponse extends IOpenIDCredentialsActionRequest {\n response: IOpenIDCredentialsActionResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
23
node_modules/matrix-widget-api/lib/interfaces/ReadEventAction.d.ts
generated
vendored
Normal file
23
node_modules/matrix-widget-api/lib/interfaces/ReadEventAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { IRoomEvent } from "./IRoomEvent";
|
||||
import { Symbols } from "../Symbols";
|
||||
export interface IReadEventFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
state_key?: string | boolean;
|
||||
msgtype?: string;
|
||||
type: string;
|
||||
limit?: number;
|
||||
room_ids?: Symbols.AnyRoom | string[];
|
||||
since?: string;
|
||||
}
|
||||
export interface IReadEventFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC2876ReadEvents;
|
||||
data: IReadEventFromWidgetRequestData;
|
||||
}
|
||||
export interface IReadEventFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
events: IRoomEvent[];
|
||||
}
|
||||
export interface IReadEventFromWidgetActionResponse extends IReadEventFromWidgetActionRequest {
|
||||
response: IReadEventFromWidgetResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/ReadEventAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/ReadEventAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=ReadEventAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/ReadEventAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/ReadEventAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ReadEventAction.js","names":[],"sources":["../../src/interfaces/ReadEventAction.ts"],"sourcesContent":["/*\n * Copyright 2021 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { IRoomEvent } from \"./IRoomEvent\";\nimport { Symbols } from \"../Symbols\";\n\nexport interface IReadEventFromWidgetRequestData extends IWidgetApiRequestData {\n state_key?: string | boolean; // eslint-disable-line camelcase\n msgtype?: string;\n type: string;\n limit?: number;\n room_ids?: Symbols.AnyRoom | string[]; // eslint-disable-line camelcase\n since?: string;\n}\n\nexport interface IReadEventFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC2876ReadEvents;\n data: IReadEventFromWidgetRequestData;\n}\n\nexport interface IReadEventFromWidgetResponseData extends IWidgetApiResponseData {\n events: IRoomEvent[];\n}\n\nexport interface IReadEventFromWidgetActionResponse extends IReadEventFromWidgetActionRequest {\n response: IReadEventFromWidgetResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
26
node_modules/matrix-widget-api/lib/interfaces/ReadRelationsAction.d.ts
generated
vendored
Normal file
26
node_modules/matrix-widget-api/lib/interfaces/ReadRelationsAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { IRoomEvent } from "./IRoomEvent";
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
export interface IReadRelationsFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
event_id: string;
|
||||
rel_type?: string;
|
||||
event_type?: string;
|
||||
room_id?: string;
|
||||
limit?: number;
|
||||
from?: string;
|
||||
to?: string;
|
||||
direction?: "f" | "b";
|
||||
}
|
||||
export interface IReadRelationsFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC3869ReadRelations;
|
||||
data: IReadRelationsFromWidgetRequestData;
|
||||
}
|
||||
export interface IReadRelationsFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
chunk: IRoomEvent[];
|
||||
next_batch?: string;
|
||||
prev_batch?: string;
|
||||
}
|
||||
export interface IReadRelationsFromWidgetActionResponse extends IReadRelationsFromWidgetActionRequest {
|
||||
response: IReadRelationsFromWidgetResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/ReadRelationsAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/ReadRelationsAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=ReadRelationsAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/ReadRelationsAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/ReadRelationsAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ReadRelationsAction.js","names":[],"sources":["../../src/interfaces/ReadRelationsAction.ts"],"sourcesContent":["/*\n * Copyright 2022 Nordeck IT + Consulting GmbH.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IRoomEvent } from \"./IRoomEvent\";\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\n\nexport interface IReadRelationsFromWidgetRequestData extends IWidgetApiRequestData {\n event_id: string; // eslint-disable-line camelcase\n rel_type?: string; // eslint-disable-line camelcase\n event_type?: string; // eslint-disable-line camelcase\n room_id?: string; // eslint-disable-line camelcase\n\n limit?: number;\n from?: string;\n to?: string;\n direction?: \"f\" | \"b\";\n}\n\nexport interface IReadRelationsFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC3869ReadRelations;\n data: IReadRelationsFromWidgetRequestData;\n}\n\nexport interface IReadRelationsFromWidgetResponseData extends IWidgetApiResponseData {\n chunk: IRoomEvent[];\n\n next_batch?: string; // eslint-disable-line camelcase\n prev_batch?: string; // eslint-disable-line camelcase\n}\n\nexport interface IReadRelationsFromWidgetActionResponse extends IReadRelationsFromWidgetActionRequest {\n response: IReadRelationsFromWidgetResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
19
node_modules/matrix-widget-api/lib/interfaces/ReadRoomAccountDataAction.d.ts
generated
vendored
Normal file
19
node_modules/matrix-widget-api/lib/interfaces/ReadRoomAccountDataAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { IRoomAccountData } from "./IRoomAccountData";
|
||||
import { Symbols } from "../Symbols";
|
||||
export interface IReadRoomAccountDataFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
type: string;
|
||||
room_ids?: Symbols.AnyRoom | string[];
|
||||
}
|
||||
export interface IReadRoomAccountDataFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.BeeperReadRoomAccountData;
|
||||
data: IReadRoomAccountDataFromWidgetRequestData;
|
||||
}
|
||||
export interface IReadRoomAccountDataFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
events: IRoomAccountData[];
|
||||
}
|
||||
export interface IReadRoomAccountDataFromWidgetActionResponse extends IReadRoomAccountDataFromWidgetActionRequest {
|
||||
response: IReadRoomAccountDataFromWidgetResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/ReadRoomAccountDataAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/ReadRoomAccountDataAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=ReadRoomAccountDataAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/ReadRoomAccountDataAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/ReadRoomAccountDataAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ReadRoomAccountDataAction.js","names":[],"sources":["../../src/interfaces/ReadRoomAccountDataAction.ts"],"sourcesContent":["/*\n * Copyright 2023 Beeper Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { IRoomAccountData } from \"./IRoomAccountData\";\nimport { Symbols } from \"../Symbols\";\n\nexport interface IReadRoomAccountDataFromWidgetRequestData extends IWidgetApiRequestData {\n type: string;\n room_ids?: Symbols.AnyRoom | string[]; // eslint-disable-line camelcase\n}\n\nexport interface IReadRoomAccountDataFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.BeeperReadRoomAccountData;\n data: IReadRoomAccountDataFromWidgetRequestData;\n}\n\nexport interface IReadRoomAccountDataFromWidgetResponseData extends IWidgetApiResponseData {\n events: IRoomAccountData[];\n}\n\nexport interface IReadRoomAccountDataFromWidgetActionResponse extends IReadRoomAccountDataFromWidgetActionRequest {\n response: IReadRoomAccountDataFromWidgetResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
53
node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.d.ts
generated
vendored
Normal file
53
node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
/**
|
||||
* The MatrixRTC member a LiveKit request is made for.
|
||||
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4195|MSC4195}
|
||||
*/
|
||||
export interface IRtcLivekitMember {
|
||||
/** The identifier of the member within the MatrixRTC session. */
|
||||
id: string;
|
||||
/** The device ID the member claims to be using. */
|
||||
claimed_device_id?: string;
|
||||
}
|
||||
export interface IRtcLivekitGetTokenFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
/** The name of the homeserver hosting the MatrixRTC session. */
|
||||
server_name: string;
|
||||
/** The URL of the LiveKit SFU to obtain a token for. */
|
||||
url: string;
|
||||
/** The room the MatrixRTC session belongs to. */
|
||||
room_id: string;
|
||||
/** The MatrixRTC session (slot) to join. */
|
||||
slot_id: string;
|
||||
member: IRtcLivekitMember;
|
||||
}
|
||||
export interface IRtcLivekitGetTokenFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC4533RtcLivekitGetToken;
|
||||
data: IRtcLivekitGetTokenFromWidgetRequestData;
|
||||
}
|
||||
export interface IRtcLivekitGetTokenFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
/** The JWT to authenticate against the SFU with. */
|
||||
jwt: string;
|
||||
}
|
||||
export interface IRtcLivekitGetTokenFromWidgetActionResponse extends IRtcLivekitGetTokenFromWidgetActionRequest {
|
||||
response: IRtcLivekitGetTokenFromWidgetResponseData;
|
||||
}
|
||||
export interface IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
/** The room the MatrixRTC session belongs to. */
|
||||
room_id: string;
|
||||
/** The MatrixRTC session (slot) the delayed leave event belongs to. */
|
||||
slot_id: string;
|
||||
member: IRtcLivekitMember;
|
||||
/** The ID of the delayed leave event to hand over to the server. */
|
||||
delay_id: string;
|
||||
}
|
||||
export interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC4533RtcLivekitDelegateDelayedLeave;
|
||||
data: IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData;
|
||||
}
|
||||
export interface IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
}
|
||||
export interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionResponse extends IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest {
|
||||
response: IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=RtcLivekitActions.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"RtcLivekitActions.js","names":[],"sources":["../../src/interfaces/RtcLivekitActions.ts"],"sourcesContent":["/*\n * Copyright 2026 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\n\n/**\n * The MatrixRTC member a LiveKit request is made for.\n * @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4195|MSC4195}\n */\nexport interface IRtcLivekitMember {\n /** The identifier of the member within the MatrixRTC session. */\n id: string;\n /** The device ID the member claims to be using. */\n claimed_device_id?: string; // eslint-disable-line camelcase\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetRequestData extends IWidgetApiRequestData {\n /** The name of the homeserver hosting the MatrixRTC session. */\n server_name: string; // eslint-disable-line camelcase\n /** The URL of the LiveKit SFU to obtain a token for. */\n url: string;\n /** The room the MatrixRTC session belongs to. */\n room_id: string; // eslint-disable-line camelcase\n /** The MatrixRTC session (slot) to join. */\n slot_id: string; // eslint-disable-line camelcase\n member: IRtcLivekitMember;\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC4533RtcLivekitGetToken;\n data: IRtcLivekitGetTokenFromWidgetRequestData;\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetResponseData extends IWidgetApiResponseData {\n /** The JWT to authenticate against the SFU with. */\n jwt: string;\n}\n\nexport interface IRtcLivekitGetTokenFromWidgetActionResponse extends IRtcLivekitGetTokenFromWidgetActionRequest {\n response: IRtcLivekitGetTokenFromWidgetResponseData;\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData extends IWidgetApiRequestData {\n /** The room the MatrixRTC session belongs to. */\n room_id: string; // eslint-disable-line camelcase\n /** The MatrixRTC session (slot) the delayed leave event belongs to. */\n slot_id: string; // eslint-disable-line camelcase\n member: IRtcLivekitMember;\n /** The ID of the delayed leave event to hand over to the server. */\n delay_id: string; // eslint-disable-line camelcase\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC4533RtcLivekitDelegateDelayedLeave;\n data: IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData;\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData extends IWidgetApiResponseData {\n // nothing\n}\n\nexport interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionResponse\n extends IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest {\n response: IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
24
node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.d.ts
generated
vendored
Normal file
24
node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
export interface IRtcTransport {
|
||||
/**
|
||||
* The globally unique transport identifier. Follows the Common Namespaced
|
||||
* Identifier Grammar (without the namespacing requirement).
|
||||
*/
|
||||
type: string;
|
||||
/** Further transport-specific properties, defined by the transport's specification.*/
|
||||
[key: string]: unknown;
|
||||
}
|
||||
export interface IRtcTransportsFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
}
|
||||
export interface IRtcTransportsFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC4515GetRtcTransports;
|
||||
data: IRtcTransportsFromWidgetRequestData;
|
||||
}
|
||||
export interface IRtcTransportsFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
rtc_transports: IRtcTransport[];
|
||||
}
|
||||
export interface IRtcTransportsFromWidgetActionResponse extends IRtcTransportsFromWidgetActionRequest {
|
||||
response: IRtcTransportsFromWidgetResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=RtcTransportsAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"RtcTransportsAction.js","names":[],"sources":["../../src/interfaces/RtcTransportsAction.ts"],"sourcesContent":["/*\n * Copyright 2026 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestData } from \"./IWidgetApiRequest\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\nimport { WidgetApiFromWidgetAction } from \"./WidgetApiAction\";\n\nexport interface IRtcTransport {\n /**\n * The globally unique transport identifier. Follows the Common Namespaced\n * Identifier Grammar (without the namespacing requirement).\n */\n type: string;\n /** Further transport-specific properties, defined by the transport's specification.*/\n [key: string]: unknown;\n}\n\nexport interface IRtcTransportsFromWidgetRequestData extends IWidgetApiRequestData {}\n\nexport interface IRtcTransportsFromWidgetActionRequest extends IWidgetApiRequest {\n action: WidgetApiFromWidgetAction.MSC4515GetRtcTransports;\n data: IRtcTransportsFromWidgetRequestData;\n}\n\nexport interface IRtcTransportsFromWidgetResponseData extends IWidgetApiResponseData {\n rtc_transports: IRtcTransport[];\n}\n\nexport interface IRtcTransportsFromWidgetActionResponse extends IRtcTransportsFromWidgetActionRequest {\n response: IRtcTransportsFromWidgetResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
13
node_modules/matrix-widget-api/lib/interfaces/ScreenshotAction.d.ts
generated
vendored
Normal file
13
node_modules/matrix-widget-api/lib/interfaces/ScreenshotAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestEmptyData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
export interface IScreenshotActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.TakeScreenshot;
|
||||
data: IWidgetApiRequestEmptyData;
|
||||
}
|
||||
export interface IScreenshotActionResponseData extends IWidgetApiResponseData {
|
||||
screenshot: Blob;
|
||||
}
|
||||
export interface IScreenshotActionResponse extends IScreenshotActionRequest {
|
||||
response: IScreenshotActionResponseData;
|
||||
}
|
||||
6
node_modules/matrix-widget-api/lib/interfaces/ScreenshotAction.js
generated
vendored
Normal file
6
node_modules/matrix-widget-api/lib/interfaces/ScreenshotAction.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
//# sourceMappingURL=ScreenshotAction.js.map
|
||||
1
node_modules/matrix-widget-api/lib/interfaces/ScreenshotAction.js.map
generated
vendored
Normal file
1
node_modules/matrix-widget-api/lib/interfaces/ScreenshotAction.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ScreenshotAction.js","names":[],"sources":["../../src/interfaces/ScreenshotAction.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IWidgetApiRequest, IWidgetApiRequestEmptyData } from \"./IWidgetApiRequest\";\nimport { WidgetApiToWidgetAction } from \"./WidgetApiAction\";\nimport { IWidgetApiResponseData } from \"./IWidgetApiResponse\";\n\nexport interface IScreenshotActionRequest extends IWidgetApiRequest {\n action: WidgetApiToWidgetAction.TakeScreenshot;\n data: IWidgetApiRequestEmptyData;\n}\n\nexport interface IScreenshotActionResponseData extends IWidgetApiResponseData {\n screenshot: Blob;\n}\n\nexport interface IScreenshotActionResponse extends IScreenshotActionRequest {\n response: IScreenshotActionResponseData;\n}\n"],"mappings":"","ignoreList":[]}
|
||||
37
node_modules/matrix-widget-api/lib/interfaces/SendEventAction.d.ts
generated
vendored
Normal file
37
node_modules/matrix-widget-api/lib/interfaces/SendEventAction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { IRoomEvent } from "./IRoomEvent";
|
||||
export interface ISendEventFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
state_key?: string;
|
||||
type: string;
|
||||
content: unknown;
|
||||
room_id?: string;
|
||||
delay?: number;
|
||||
/** @deprecated */
|
||||
parent_delay_id?: string;
|
||||
sticky_duration_ms?: number;
|
||||
}
|
||||
export interface ISendEventFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.SendEvent;
|
||||
data: ISendEventFromWidgetRequestData;
|
||||
}
|
||||
export interface ISendEventFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
room_id: string;
|
||||
event_id?: string;
|
||||
delay_id?: string;
|
||||
}
|
||||
export interface ISendEventFromWidgetActionResponse extends ISendEventFromWidgetActionRequest {
|
||||
response: ISendEventFromWidgetResponseData;
|
||||
}
|
||||
export interface ISendEventToWidgetRequestData extends IWidgetApiRequestData, IRoomEvent {
|
||||
}
|
||||
export interface ISendEventToWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.SendEvent;
|
||||
data: ISendEventToWidgetRequestData;
|
||||
}
|
||||
export interface ISendEventToWidgetResponseData extends IWidgetApiResponseData {
|
||||
}
|
||||
export interface ISendEventToWidgetActionResponse extends ISendEventToWidgetActionRequest {
|
||||
response: ISendEventToWidgetResponseData;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user