init
This commit is contained in:
60
node_modules/matrix-widget-api/src/interfaces/ApiVersion.ts
generated
vendored
Normal file
60
node_modules/matrix-widget-api/src/interfaces/ApiVersion.ts
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export enum MatrixApiVersion {
|
||||
Prerelease1 = "0.0.1",
|
||||
Prerelease2 = "0.0.2",
|
||||
//V010 = "0.1.0", // first release
|
||||
}
|
||||
|
||||
export 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 const CurrentApiVersions: ApiVersion[] = [
|
||||
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,
|
||||
];
|
||||
110
node_modules/matrix-widget-api/src/interfaces/Capabilities.ts
generated
vendored
Normal file
110
node_modules/matrix-widget-api/src/interfaces/Capabilities.ts
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { Symbols } from "../Symbols";
|
||||
|
||||
export 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 const StickerpickerCapabilities: Capability[] = [MatrixCapabilities.StickerSending];
|
||||
export const VideoConferenceCapabilities: Capability[] = [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.
|
||||
*/
|
||||
export function isTimelineCapability(capability: Capability): boolean {
|
||||
// TODO: Change when MSC2762 becomes stable.
|
||||
return 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.
|
||||
*/
|
||||
export function isTimelineCapabilityFor(capability: Capability, roomId: string | Symbols.AnyRoom): boolean {
|
||||
return capability === `org.matrix.msc2762.timeline:${roomId}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the room ID described by a timeline capability.
|
||||
* @param {string} capability The capability to parse.
|
||||
* @returns {string} The room ID.
|
||||
*/
|
||||
export function getTimelineRoomIDFromCapability(capability: Capability): string {
|
||||
return capability.substring(capability.indexOf(":") + 1);
|
||||
}
|
||||
60
node_modules/matrix-widget-api/src/interfaces/CapabilitiesAction.ts
generated
vendored
Normal file
60
node_modules/matrix-widget-api/src/interfaces/CapabilitiesAction.ts
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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 {
|
||||
// nothing
|
||||
}
|
||||
28
node_modules/matrix-widget-api/src/interfaces/ContentLoadedAction.ts
generated
vendored
Normal file
28
node_modules/matrix-widget-api/src/interfaces/ContentLoadedAction.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
36
node_modules/matrix-widget-api/src/interfaces/DownloadFileAction.ts
generated
vendored
Normal file
36
node_modules/matrix-widget-api/src/interfaces/DownloadFileAction.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2024 Nordeck IT + Consulting GmbH
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
|
||||
export interface IDownloadFileActionFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
content_uri: string; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface IDownloadFileActionFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC4039DownloadFileAction;
|
||||
data: IDownloadFileActionFromWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface IDownloadFileActionFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
file: XMLHttpRequestBodyInit;
|
||||
}
|
||||
|
||||
export interface IDownloadFileActionFromWidgetActionResponse extends IDownloadFileActionFromWidgetActionRequest {
|
||||
response: IDownloadFileActionFromWidgetResponseData;
|
||||
}
|
||||
34
node_modules/matrix-widget-api/src/interfaces/GetMediaConfigAction.ts
generated
vendored
Normal file
34
node_modules/matrix-widget-api/src/interfaces/GetMediaConfigAction.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2023 Nordeck IT + Consulting GmbH.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
49
node_modules/matrix-widget-api/src/interfaces/GetOpenIDAction.ts
generated
vendored
Normal file
49
node_modules/matrix-widget-api/src/interfaces/GetOpenIDAction.ts
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
|
||||
export enum OpenIDRequestState {
|
||||
Allowed = "allowed",
|
||||
Blocked = "blocked",
|
||||
PendingUserConfirmation = "request",
|
||||
}
|
||||
|
||||
export interface IOpenIDCredentials {
|
||||
access_token?: string; // eslint-disable-line camelcase
|
||||
expires_in?: number; // eslint-disable-line camelcase
|
||||
matrix_server_name?: string; // eslint-disable-line camelcase
|
||||
token_type?: "Bearer" | string; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface IGetOpenIDActionRequestData extends IWidgetApiRequestData {
|
||||
// nothing
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
27
node_modules/matrix-widget-api/src/interfaces/ICustomWidgetData.ts
generated
vendored
Normal file
27
node_modules/matrix-widget-api/src/interfaces/ICustomWidgetData.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
38
node_modules/matrix-widget-api/src/interfaces/IJitsiWidgetData.ts
generated
vendored
Normal file
38
node_modules/matrix-widget-api/src/interfaces/IJitsiWidgetData.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
21
node_modules/matrix-widget-api/src/interfaces/IRoomAccountData.ts
generated
vendored
Normal file
21
node_modules/matrix-widget-api/src/interfaces/IRoomAccountData.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2023 Beeper Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export interface IRoomAccountData {
|
||||
type: string;
|
||||
room_id: string; // eslint-disable-line camelcase
|
||||
content: Record<string, unknown>;
|
||||
}
|
||||
33
node_modules/matrix-widget-api/src/interfaces/IRoomEvent.ts
generated
vendored
Normal file
33
node_modules/matrix-widget-api/src/interfaces/IRoomEvent.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export interface IRoomEvent {
|
||||
type: string;
|
||||
sender: string;
|
||||
event_id: string; // eslint-disable-line camelcase
|
||||
room_id: string; // eslint-disable-line camelcase
|
||||
state_key?: string; // eslint-disable-line camelcase
|
||||
origin_server_ts: number; // eslint-disable-line camelcase
|
||||
content: Record<string, unknown>;
|
||||
unsigned: Record<string, unknown>;
|
||||
//MSC4354
|
||||
sticky?: {
|
||||
duration_ms: number;
|
||||
};
|
||||
msc4354_sticky?: {
|
||||
duration_ms: number;
|
||||
};
|
||||
}
|
||||
21
node_modules/matrix-widget-api/src/interfaces/IStickerpickerWidgetData.ts
generated
vendored
Normal file
21
node_modules/matrix-widget-api/src/interfaces/IStickerpickerWidgetData.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetData } from "./IWidget";
|
||||
|
||||
export interface IStickerpickerWidgetData extends IWidgetData {
|
||||
// no additional properties (for now)
|
||||
}
|
||||
21
node_modules/matrix-widget-api/src/interfaces/IToDeviceMessage.ts
generated
vendored
Normal file
21
node_modules/matrix-widget-api/src/interfaces/IToDeviceMessage.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2025 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.
|
||||
*/
|
||||
|
||||
export interface IToDeviceMessage {
|
||||
content: Record<string, unknown>;
|
||||
sender: string;
|
||||
type: string;
|
||||
}
|
||||
75
node_modules/matrix-widget-api/src/interfaces/IWidget.ts
generated
vendored
Normal file
75
node_modules/matrix-widget-api/src/interfaces/IWidget.ts
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
56
node_modules/matrix-widget-api/src/interfaces/IWidgetApiErrorResponse.ts
generated
vendored
Normal file
56
node_modules/matrix-widget-api/src/interfaces/IWidgetApiErrorResponse.ts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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; // eslint-disable-line camelcase
|
||||
/** Any HTTP response headers that are relevant to the error. */
|
||||
http_headers: { [name: string]: string }; // eslint-disable-line camelcase
|
||||
/** 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; // extensible
|
||||
}
|
||||
|
||||
export interface IWidgetApiErrorResponseDataDetails {
|
||||
/** Set if the error came from a Matrix API request made by a widget driver */
|
||||
matrix_api_error?: IMatrixApiError; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface IWidgetApiErrorResponseData extends IWidgetApiResponseData {
|
||||
error: {
|
||||
/** A user-friendly string describing the error */
|
||||
message: string;
|
||||
} & IWidgetApiErrorResponseDataDetails;
|
||||
}
|
||||
|
||||
export interface IWidgetApiErrorResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiErrorResponseData;
|
||||
}
|
||||
|
||||
export function isErrorResponse(responseData: IWidgetApiResponseData): responseData is IWidgetApiErrorResponseData {
|
||||
const error = responseData.error;
|
||||
return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
|
||||
}
|
||||
38
node_modules/matrix-widget-api/src/interfaces/IWidgetApiRequest.ts
generated
vendored
Normal file
38
node_modules/matrix-widget-api/src/interfaces/IWidgetApiRequest.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { WidgetApiDirection } from "./WidgetApiDirection";
|
||||
import { WidgetApiAction } from "./WidgetApiAction";
|
||||
|
||||
export interface IWidgetApiRequestData {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface IWidgetApiRequestEmptyData extends IWidgetApiRequestData {
|
||||
// nothing
|
||||
}
|
||||
|
||||
export interface IWidgetApiRequest {
|
||||
api: WidgetApiDirection;
|
||||
requestId: string;
|
||||
action: WidgetApiAction;
|
||||
widgetId: string;
|
||||
data: IWidgetApiRequestData;
|
||||
// XXX: This is for Scalar support
|
||||
// TODO: Fix scalar
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
visible?: any;
|
||||
}
|
||||
29
node_modules/matrix-widget-api/src/interfaces/IWidgetApiResponse.ts
generated
vendored
Normal file
29
node_modules/matrix-widget-api/src/interfaces/IWidgetApiResponse.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest } from "./IWidgetApiRequest";
|
||||
|
||||
export interface IWidgetApiResponseData {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface IWidgetApiAcknowledgeResponseData extends IWidgetApiResponseData {
|
||||
// nothing
|
||||
}
|
||||
|
||||
export interface IWidgetApiResponse extends IWidgetApiRequest {
|
||||
response: IWidgetApiResponseData;
|
||||
}
|
||||
35
node_modules/matrix-widget-api/src/interfaces/LanguageChangeAction.ts
generated
vendored
Normal file
35
node_modules/matrix-widget-api/src/interfaces/LanguageChangeAction.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 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.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
23
node_modules/matrix-widget-api/src/interfaces/ModalButtonKind.ts
generated
vendored
Normal file
23
node_modules/matrix-widget-api/src/interfaces/ModalButtonKind.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export enum ModalButtonKind {
|
||||
Primary = "m.primary",
|
||||
Secondary = "m.secondary",
|
||||
Warning = "m.warning",
|
||||
Danger = "m.danger",
|
||||
Link = "m.link",
|
||||
}
|
||||
89
node_modules/matrix-widget-api/src/interfaces/ModalWidgetActions.ts
generated
vendored
Normal file
89
node_modules/matrix-widget-api/src/interfaces/ModalWidgetActions.ts
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData, IWidgetApiResponse } from "./IWidgetApiResponse";
|
||||
import { IWidget } from "./IWidget";
|
||||
import { ModalButtonKind } from "./ModalButtonKind";
|
||||
|
||||
export enum BuiltInModalButtonID {
|
||||
Close = "m.close",
|
||||
}
|
||||
export type ModalButtonID = BuiltInModalButtonID | string;
|
||||
|
||||
export interface IModalWidgetCreateData extends IWidgetApiRequestData {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface IModalWidgetReturnData {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
// Types for a normal modal requesting the opening a modal widget
|
||||
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;
|
||||
}
|
||||
|
||||
// Types for a modal widget receiving notifications that its buttons have been pressed
|
||||
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;
|
||||
}
|
||||
|
||||
// Types for a modal widget requesting close
|
||||
export interface IModalWidgetCloseRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.CloseModalWidget;
|
||||
data: IModalWidgetReturnData;
|
||||
}
|
||||
|
||||
export interface IModalWidgetCloseResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
|
||||
// Types for a normal widget being notified that the modal widget it opened has been closed
|
||||
export interface IModalWidgetCloseNotificationRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.CloseModalWidget;
|
||||
data: IModalWidgetReturnData;
|
||||
}
|
||||
|
||||
export interface IModalWidgetCloseNotificationResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
32
node_modules/matrix-widget-api/src/interfaces/NavigateAction.ts
generated
vendored
Normal file
32
node_modules/matrix-widget-api/src/interfaces/NavigateAction.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
38
node_modules/matrix-widget-api/src/interfaces/OpenIDCredentialsAction.ts
generated
vendored
Normal file
38
node_modules/matrix-widget-api/src/interfaces/OpenIDCredentialsAction.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface IOpenIDCredentialsActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.OpenIDCredentials;
|
||||
data: IOpenIDCredentialsActionRequestData;
|
||||
}
|
||||
|
||||
export interface IOpenIDCredentialsActionResponseData extends IWidgetApiResponseData {
|
||||
// nothing
|
||||
}
|
||||
|
||||
export interface IOpenIDCredentialsIDActionResponse extends IOpenIDCredentialsActionRequest {
|
||||
response: IOpenIDCredentialsActionResponseData;
|
||||
}
|
||||
43
node_modules/matrix-widget-api/src/interfaces/ReadEventAction.ts
generated
vendored
Normal file
43
node_modules/matrix-widget-api/src/interfaces/ReadEventAction.ts
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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; // eslint-disable-line camelcase
|
||||
msgtype?: string;
|
||||
type: string;
|
||||
limit?: number;
|
||||
room_ids?: Symbols.AnyRoom | string[]; // eslint-disable-line camelcase
|
||||
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;
|
||||
}
|
||||
48
node_modules/matrix-widget-api/src/interfaces/ReadRelationsAction.ts
generated
vendored
Normal file
48
node_modules/matrix-widget-api/src/interfaces/ReadRelationsAction.ts
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2022 Nordeck IT + Consulting GmbH.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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; // eslint-disable-line camelcase
|
||||
rel_type?: string; // eslint-disable-line camelcase
|
||||
event_type?: string; // eslint-disable-line camelcase
|
||||
room_id?: string; // eslint-disable-line camelcase
|
||||
|
||||
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; // eslint-disable-line camelcase
|
||||
prev_batch?: string; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface IReadRelationsFromWidgetActionResponse extends IReadRelationsFromWidgetActionRequest {
|
||||
response: IReadRelationsFromWidgetResponseData;
|
||||
}
|
||||
39
node_modules/matrix-widget-api/src/interfaces/ReadRoomAccountDataAction.ts
generated
vendored
Normal file
39
node_modules/matrix-widget-api/src/interfaces/ReadRoomAccountDataAction.ts
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2023 Beeper Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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[]; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface IReadRoomAccountDataFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.BeeperReadRoomAccountData;
|
||||
data: IReadRoomAccountDataFromWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface IReadRoomAccountDataFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
events: IRoomAccountData[];
|
||||
}
|
||||
|
||||
export interface IReadRoomAccountDataFromWidgetActionResponse extends IReadRoomAccountDataFromWidgetActionRequest {
|
||||
response: IReadRoomAccountDataFromWidgetResponseData;
|
||||
}
|
||||
80
node_modules/matrix-widget-api/src/interfaces/RtcLivekitActions.ts
generated
vendored
Normal file
80
node_modules/matrix-widget-api/src/interfaces/RtcLivekitActions.ts
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright 2026 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.
|
||||
*/
|
||||
|
||||
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; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface IRtcLivekitGetTokenFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
/** The name of the homeserver hosting the MatrixRTC session. */
|
||||
server_name: string; // eslint-disable-line camelcase
|
||||
/** The URL of the LiveKit SFU to obtain a token for. */
|
||||
url: string;
|
||||
/** The room the MatrixRTC session belongs to. */
|
||||
room_id: string; // eslint-disable-line camelcase
|
||||
/** The MatrixRTC session (slot) to join. */
|
||||
slot_id: string; // eslint-disable-line camelcase
|
||||
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; // eslint-disable-line camelcase
|
||||
/** The MatrixRTC session (slot) the delayed leave event belongs to. */
|
||||
slot_id: string; // eslint-disable-line camelcase
|
||||
member: IRtcLivekitMember;
|
||||
/** The ID of the delayed leave event to hand over to the server. */
|
||||
delay_id: string; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC4533RtcLivekitDelegateDelayedLeave;
|
||||
data: IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
// nothing
|
||||
}
|
||||
|
||||
export interface IRtcLivekitDelegateDelayedLeaveFromWidgetActionResponse
|
||||
extends IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest {
|
||||
response: IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData;
|
||||
}
|
||||
44
node_modules/matrix-widget-api/src/interfaces/RtcTransportsAction.ts
generated
vendored
Normal file
44
node_modules/matrix-widget-api/src/interfaces/RtcTransportsAction.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2026 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.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
32
node_modules/matrix-widget-api/src/interfaces/ScreenshotAction.ts
generated
vendored
Normal file
32
node_modules/matrix-widget-api/src/interfaces/ScreenshotAction.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
67
node_modules/matrix-widget-api/src/interfaces/SendEventAction.ts
generated
vendored
Normal file
67
node_modules/matrix-widget-api/src/interfaces/SendEventAction.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
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; // eslint-disable-line camelcase
|
||||
type: string;
|
||||
content: unknown;
|
||||
room_id?: string; // eslint-disable-line camelcase
|
||||
|
||||
// MSC4157
|
||||
delay?: number; // eslint-disable-line camelcase
|
||||
/** @deprecated */
|
||||
parent_delay_id?: string; // eslint-disable-line camelcase
|
||||
|
||||
// MSC4407
|
||||
sticky_duration_ms?: number;
|
||||
}
|
||||
|
||||
export interface ISendEventFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.SendEvent;
|
||||
data: ISendEventFromWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface ISendEventFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
room_id: string; // eslint-disable-line camelcase
|
||||
event_id?: string; // eslint-disable-line camelcase
|
||||
|
||||
// MSC4157
|
||||
delay_id?: string; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
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 {
|
||||
// nothing
|
||||
}
|
||||
|
||||
export interface ISendEventToWidgetActionResponse extends ISendEventToWidgetActionRequest {
|
||||
response: ISendEventToWidgetResponseData;
|
||||
}
|
||||
56
node_modules/matrix-widget-api/src/interfaces/SendToDeviceAction.ts
generated
vendored
Normal file
56
node_modules/matrix-widget-api/src/interfaces/SendToDeviceAction.ts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright 2022 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { IToDeviceMessage } from "./IToDeviceMessage";
|
||||
|
||||
export interface ISendToDeviceFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
type: string;
|
||||
encrypted: boolean;
|
||||
messages: { [userId: string]: { [deviceId: string]: object } };
|
||||
}
|
||||
|
||||
export interface ISendToDeviceFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.SendToDevice;
|
||||
data: ISendToDeviceFromWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface ISendToDeviceFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
// nothing
|
||||
}
|
||||
|
||||
export interface ISendToDeviceFromWidgetActionResponse extends ISendToDeviceFromWidgetActionRequest {
|
||||
response: ISendToDeviceFromWidgetResponseData;
|
||||
}
|
||||
|
||||
export interface ISendToDeviceToWidgetRequestData extends IWidgetApiRequestData, IToDeviceMessage {
|
||||
encrypted: boolean;
|
||||
}
|
||||
|
||||
export interface ISendToDeviceToWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.SendToDevice;
|
||||
data: ISendToDeviceToWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface ISendToDeviceToWidgetResponseData extends IWidgetApiResponseData {
|
||||
// nothing
|
||||
}
|
||||
|
||||
export interface ISendToDeviceToWidgetActionResponse extends ISendToDeviceToWidgetActionRequest {
|
||||
response: ISendToDeviceToWidgetResponseData;
|
||||
}
|
||||
34
node_modules/matrix-widget-api/src/interfaces/SetModalButtonEnabledAction.ts
generated
vendored
Normal file
34
node_modules/matrix-widget-api/src/interfaces/SetModalButtonEnabledAction.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";
|
||||
import { ModalButtonID } from "./ModalWidgetActions";
|
||||
|
||||
export interface ISetModalButtonEnabledActionRequestData extends IWidgetApiRequestData {
|
||||
enabled: boolean;
|
||||
button: ModalButtonID;
|
||||
}
|
||||
|
||||
export interface ISetModalButtonEnabledActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.SetModalButtonEnabled;
|
||||
data: ISetModalButtonEnabledActionRequestData;
|
||||
}
|
||||
|
||||
export interface ISetModalButtonEnabledActionResponse extends ISetModalButtonEnabledActionRequest {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
49
node_modules/matrix-widget-api/src/interfaces/StickerAction.ts
generated
vendored
Normal file
49
node_modules/matrix-widget-api/src/interfaces/StickerAction.ts
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";
|
||||
|
||||
export interface IStickerActionRequestData extends IWidgetApiRequestData {
|
||||
name: string;
|
||||
description?: string;
|
||||
content: {
|
||||
url: string;
|
||||
info?: {
|
||||
h?: number;
|
||||
w?: number;
|
||||
mimetype?: string;
|
||||
size?: number;
|
||||
thumbnail_info?: {
|
||||
// eslint-disable-line camelcase
|
||||
h?: number;
|
||||
w?: number;
|
||||
mimetype?: string;
|
||||
size?: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface IStickerActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.SendSticker;
|
||||
data: IStickerActionRequestData;
|
||||
}
|
||||
|
||||
export interface IStickerActionResponse extends IStickerActionRequest {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
36
node_modules/matrix-widget-api/src/interfaces/StickyAction.ts
generated
vendored
Normal file
36
node_modules/matrix-widget-api/src/interfaces/StickyAction.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
|
||||
export interface IStickyActionRequestData extends IWidgetApiRequestData {
|
||||
value: boolean;
|
||||
}
|
||||
|
||||
export interface IStickyActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.UpdateAlwaysOnScreen;
|
||||
data: IStickyActionRequestData;
|
||||
}
|
||||
|
||||
export interface IStickyActionResponseData extends IWidgetApiResponseData {
|
||||
success: boolean;
|
||||
}
|
||||
|
||||
export interface IStickyActionResponse extends IStickyActionRequest {
|
||||
response: IStickyActionResponseData;
|
||||
}
|
||||
33
node_modules/matrix-widget-api/src/interfaces/SupportedVersionsAction.ts
generated
vendored
Normal file
33
node_modules/matrix-widget-api/src/interfaces/SupportedVersionsAction.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestEmptyData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { ApiVersion } from "./ApiVersion";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
|
||||
export interface ISupportedVersionsActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.SupportedApiVersions | WidgetApiToWidgetAction.SupportedApiVersions;
|
||||
data: IWidgetApiRequestEmptyData;
|
||||
}
|
||||
|
||||
export interface ISupportedVersionsActionResponseData extends IWidgetApiResponseData {
|
||||
supported_versions: ApiVersion[]; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface ISupportedVersionsActionResponse extends ISupportedVersionsActionRequest {
|
||||
response: ISupportedVersionsActionResponseData;
|
||||
}
|
||||
32
node_modules/matrix-widget-api/src/interfaces/ThemeChangeAction.ts
generated
vendored
Normal file
32
node_modules/matrix-widget-api/src/interfaces/ThemeChangeAction.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";
|
||||
|
||||
export interface IThemeChangeActionRequestData extends IWidgetApiRequestData {
|
||||
// The format of a theme is deliberately unstandardized
|
||||
}
|
||||
|
||||
export interface IThemeChangeActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.ThemeChange;
|
||||
data: IThemeChangeActionRequestData;
|
||||
}
|
||||
|
||||
export interface IThemeChangeActionResponse extends IThemeChangeActionRequest {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
54
node_modules/matrix-widget-api/src/interfaces/TurnServerActions.ts
generated
vendored
Normal file
54
node_modules/matrix-widget-api/src/interfaces/TurnServerActions.ts
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2022 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData, IWidgetApiRequestEmptyData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData, IWidgetApiResponse } from "./IWidgetApiResponse";
|
||||
|
||||
export interface ITurnServer {
|
||||
uris: string[];
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface IWatchTurnServersRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.WatchTurnServers;
|
||||
data: IWidgetApiRequestEmptyData;
|
||||
}
|
||||
|
||||
export interface IWatchTurnServersResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
|
||||
export interface IUnwatchTurnServersRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.UnwatchTurnServers;
|
||||
data: IWidgetApiRequestEmptyData;
|
||||
}
|
||||
|
||||
export interface IUnwatchTurnServersResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
|
||||
export interface IUpdateTurnServersRequestData extends IWidgetApiRequestData, ITurnServer {}
|
||||
|
||||
export interface IUpdateTurnServersRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.UpdateTurnServers;
|
||||
data: IUpdateTurnServersRequestData;
|
||||
}
|
||||
|
||||
export interface IUpdateTurnServersResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
43
node_modules/matrix-widget-api/src/interfaces/UpdateDelayedEventAction.ts
generated
vendored
Normal file
43
node_modules/matrix-widget-api/src/interfaces/UpdateDelayedEventAction.ts
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
|
||||
export enum UpdateDelayedEventAction {
|
||||
Cancel = "cancel",
|
||||
Restart = "restart",
|
||||
Send = "send",
|
||||
}
|
||||
|
||||
export interface IUpdateDelayedEventFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
delay_id: string; // eslint-disable-line camelcase
|
||||
action: UpdateDelayedEventAction;
|
||||
}
|
||||
|
||||
export interface IUpdateDelayedEventFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC4157UpdateDelayedEvent;
|
||||
data: IUpdateDelayedEventFromWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface IUpdateDelayedEventFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
// nothing
|
||||
}
|
||||
|
||||
export interface IUpdateDelayedEventFromWidgetActionResponse extends IUpdateDelayedEventFromWidgetActionRequest {
|
||||
response: IUpdateDelayedEventFromWidgetResponseData;
|
||||
}
|
||||
37
node_modules/matrix-widget-api/src/interfaces/UpdateStateAction.ts
generated
vendored
Normal file
37
node_modules/matrix-widget-api/src/interfaces/UpdateStateAction.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { IRoomEvent } from "./IRoomEvent";
|
||||
|
||||
export interface IUpdateStateToWidgetRequestData extends IWidgetApiRequestData {
|
||||
state: IRoomEvent[];
|
||||
}
|
||||
|
||||
export interface IUpdateStateToWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.UpdateState;
|
||||
data: IUpdateStateToWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface IUpdateStateToWidgetResponseData extends IWidgetApiResponseData {
|
||||
// nothing
|
||||
}
|
||||
|
||||
export interface IUpdateStateToWidgetActionResponse extends IUpdateStateToWidgetActionRequest {
|
||||
response: IUpdateStateToWidgetResponseData;
|
||||
}
|
||||
36
node_modules/matrix-widget-api/src/interfaces/UploadFileAction.ts
generated
vendored
Normal file
36
node_modules/matrix-widget-api/src/interfaces/UploadFileAction.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2023 Nordeck IT + Consulting GmbH.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
|
||||
export interface IUploadFileActionFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
file: XMLHttpRequestBodyInit;
|
||||
}
|
||||
|
||||
export interface IUploadFileActionFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC4039UploadFileAction;
|
||||
data: IUploadFileActionFromWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface IUploadFileActionFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
content_uri: string; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
export interface IUploadFileActionFromWidgetActionResponse extends IUploadFileActionFromWidgetActionRequest {
|
||||
response: IUploadFileActionFromWidgetResponseData;
|
||||
}
|
||||
42
node_modules/matrix-widget-api/src/interfaces/UserDirectorySearchAction.ts
generated
vendored
Normal file
42
node_modules/matrix-widget-api/src/interfaces/UserDirectorySearchAction.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2023 Nordeck IT + Consulting GmbH.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { IWidgetApiResponseData } from "./IWidgetApiResponse";
|
||||
import { WidgetApiFromWidgetAction } from "./WidgetApiAction";
|
||||
|
||||
export interface IUserDirectorySearchFromWidgetRequestData extends IWidgetApiRequestData {
|
||||
search_term: string; // eslint-disable-line camelcase
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export interface IUserDirectorySearchFromWidgetActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiFromWidgetAction.MSC3973UserDirectorySearch;
|
||||
data: IUserDirectorySearchFromWidgetRequestData;
|
||||
}
|
||||
|
||||
export interface IUserDirectorySearchFromWidgetResponseData extends IWidgetApiResponseData {
|
||||
limited: boolean;
|
||||
results: Array<{
|
||||
user_id: string; // eslint-disable-line camelcase
|
||||
display_name?: string; // eslint-disable-line camelcase
|
||||
avatar_url?: string; // eslint-disable-line camelcase
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface IUserDirectorySearchFromWidgetActionResponse extends IUserDirectorySearchFromWidgetActionRequest {
|
||||
response: IUserDirectorySearchFromWidgetResponseData;
|
||||
}
|
||||
32
node_modules/matrix-widget-api/src/interfaces/VisibilityAction.ts
generated
vendored
Normal file
32
node_modules/matrix-widget-api/src/interfaces/VisibilityAction.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
|
||||
import { WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData } from "./IWidgetApiResponse";
|
||||
|
||||
export interface IVisibilityActionRequestData extends IWidgetApiRequestData {
|
||||
visible: boolean;
|
||||
}
|
||||
|
||||
export interface IVisibilityActionRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.UpdateVisibility;
|
||||
data: IVisibilityActionRequestData;
|
||||
}
|
||||
|
||||
export interface IVisibilityActionResponse extends IVisibilityActionRequest {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
112
node_modules/matrix-widget-api/src/interfaces/WidgetApiAction.ts
generated
vendored
Normal file
112
node_modules/matrix-widget-api/src/interfaces/WidgetApiAction.ts
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export enum WidgetApiToWidgetAction {
|
||||
SupportedApiVersions = "supported_api_versions",
|
||||
Capabilities = "capabilities",
|
||||
NotifyCapabilities = "notify_capabilities",
|
||||
ThemeChange = "theme_change",
|
||||
LanguageChange = "language_change",
|
||||
TakeScreenshot = "screenshot",
|
||||
UpdateVisibility = "visibility",
|
||||
OpenIDCredentials = "openid_credentials",
|
||||
WidgetConfig = "widget_config",
|
||||
CloseModalWidget = "close_modal",
|
||||
ButtonClicked = "button_clicked",
|
||||
SendEvent = "send_event",
|
||||
SendToDevice = "send_to_device",
|
||||
UpdateState = "update_state",
|
||||
UpdateTurnServers = "update_turn_servers",
|
||||
}
|
||||
|
||||
export enum WidgetApiFromWidgetAction {
|
||||
SupportedApiVersions = "supported_api_versions",
|
||||
ContentLoaded = "content_loaded",
|
||||
SendSticker = "m.sticker",
|
||||
UpdateAlwaysOnScreen = "set_always_on_screen",
|
||||
GetOpenIDCredentials = "get_openid",
|
||||
CloseModalWidget = "close_modal",
|
||||
OpenModalWidget = "open_modal",
|
||||
SetModalButtonEnabled = "set_button_enabled",
|
||||
SendEvent = "send_event",
|
||||
SendToDevice = "send_to_device",
|
||||
WatchTurnServers = "watch_turn_servers",
|
||||
UnwatchTurnServers = "unwatch_turn_servers",
|
||||
|
||||
BeeperReadRoomAccountData = "com.beeper.read_room_account_data",
|
||||
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC2876ReadEvents = "org.matrix.msc2876.read_events",
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
MSC2974RenegotiateCapabilities = "org.matrix.msc2974.request_capabilities",
|
||||
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC3869ReadRelations = "org.matrix.msc3869.read_relations",
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
MSC4039GetMediaConfigAction = "org.matrix.msc4039.get_media_config",
|
||||
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4039UploadFileAction = "org.matrix.msc4039.upload_file",
|
||||
|
||||
/**
|
||||
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
||||
*/
|
||||
MSC4039DownloadFileAction = "org.matrix.msc4039.download_file",
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
MSC4515GetRtcTransports = "org.matrix.msc4515.get_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 WidgetApiAction = WidgetApiToWidgetAction | WidgetApiFromWidgetAction | string;
|
||||
30
node_modules/matrix-widget-api/src/interfaces/WidgetApiDirection.ts
generated
vendored
Normal file
30
node_modules/matrix-widget-api/src/interfaces/WidgetApiDirection.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export enum WidgetApiDirection {
|
||||
ToWidget = "toWidget",
|
||||
FromWidget = "fromWidget",
|
||||
}
|
||||
|
||||
export function invertedDirection(dir: WidgetApiDirection): WidgetApiDirection {
|
||||
if (dir === WidgetApiDirection.ToWidget) {
|
||||
return WidgetApiDirection.FromWidget;
|
||||
} else if (dir === WidgetApiDirection.FromWidget) {
|
||||
return WidgetApiDirection.ToWidget;
|
||||
} else {
|
||||
throw new Error("Invalid direction");
|
||||
}
|
||||
}
|
||||
29
node_modules/matrix-widget-api/src/interfaces/WidgetConfigAction.ts
generated
vendored
Normal file
29
node_modules/matrix-widget-api/src/interfaces/WidgetConfigAction.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { IWidgetApiRequest } from "./IWidgetApiRequest";
|
||||
import { WidgetApiToWidgetAction } from "./WidgetApiAction";
|
||||
import { IWidgetApiAcknowledgeResponseData, IWidgetApiResponse } from "./IWidgetApiResponse";
|
||||
import { IModalWidgetOpenRequestData } from "./ModalWidgetActions";
|
||||
|
||||
export interface IWidgetConfigRequest extends IWidgetApiRequest {
|
||||
action: WidgetApiToWidgetAction.WidgetConfig;
|
||||
data: IModalWidgetOpenRequestData;
|
||||
}
|
||||
|
||||
export interface IWidgetConfigResponse extends IWidgetApiResponse {
|
||||
response: IWidgetApiAcknowledgeResponseData;
|
||||
}
|
||||
21
node_modules/matrix-widget-api/src/interfaces/WidgetKind.ts
generated
vendored
Normal file
21
node_modules/matrix-widget-api/src/interfaces/WidgetKind.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export enum WidgetKind {
|
||||
Room = "room",
|
||||
Account = "account",
|
||||
Modal = "modal",
|
||||
}
|
||||
23
node_modules/matrix-widget-api/src/interfaces/WidgetType.ts
generated
vendored
Normal file
23
node_modules/matrix-widget-api/src/interfaces/WidgetType.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export enum MatrixWidgetType {
|
||||
Custom = "m.custom",
|
||||
JitsiMeet = "m.jitsi",
|
||||
Stickerpicker = "m.stickerpicker",
|
||||
}
|
||||
|
||||
export type WidgetType = MatrixWidgetType | string;
|
||||
Reference in New Issue
Block a user