diff options
Diffstat (limited to 'comm/chat/protocols/matrix/lib/matrix-sdk/@types')
23 files changed, 1119 insertions, 0 deletions
diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/IIdentityServerProvider.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/IIdentityServerProvider.js new file mode 100644 index 0000000000..430afc16cd --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/IIdentityServerProvider.js @@ -0,0 +1,5 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +});
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/PushRules.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/PushRules.js new file mode 100644 index 0000000000..a3f9efa1ef --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/PushRules.js @@ -0,0 +1,101 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TweakName = exports.RuleId = exports.PushRuleKind = exports.PushRuleActionName = exports.DMMemberCountCondition = exports.ConditionOperator = exports.ConditionKind = void 0; +exports.isDmMemberCountCondition = isDmMemberCountCondition; +/* +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. +*/ +// allow camelcase as these are things that go onto the wire +/* eslint-disable camelcase */ +let PushRuleActionName = /*#__PURE__*/function (PushRuleActionName) { + PushRuleActionName["DontNotify"] = "dont_notify"; + PushRuleActionName["Notify"] = "notify"; + PushRuleActionName["Coalesce"] = "coalesce"; + return PushRuleActionName; +}({}); +exports.PushRuleActionName = PushRuleActionName; +let TweakName = /*#__PURE__*/function (TweakName) { + TweakName["Highlight"] = "highlight"; + TweakName["Sound"] = "sound"; + return TweakName; +}({}); +exports.TweakName = TweakName; +let ConditionOperator = /*#__PURE__*/function (ConditionOperator) { + ConditionOperator["ExactEquals"] = "=="; + ConditionOperator["LessThan"] = "<"; + ConditionOperator["GreaterThan"] = ">"; + ConditionOperator["GreaterThanOrEqual"] = ">="; + ConditionOperator["LessThanOrEqual"] = "<="; + return ConditionOperator; +}({}); +exports.ConditionOperator = ConditionOperator; +const DMMemberCountCondition = "2"; +exports.DMMemberCountCondition = DMMemberCountCondition; +function isDmMemberCountCondition(condition) { + return condition === "==2" || condition === "2"; +} +let ConditionKind = /*#__PURE__*/function (ConditionKind) { + ConditionKind["EventMatch"] = "event_match"; + ConditionKind["EventPropertyIs"] = "event_property_is"; + ConditionKind["EventPropertyContains"] = "event_property_contains"; + ConditionKind["ContainsDisplayName"] = "contains_display_name"; + ConditionKind["RoomMemberCount"] = "room_member_count"; + ConditionKind["SenderNotificationPermission"] = "sender_notification_permission"; + ConditionKind["CallStarted"] = "call_started"; + ConditionKind["CallStartedPrefix"] = "org.matrix.msc3914.call_started"; + return ConditionKind; +}({}); // XXX: custom conditions are possible but always fail, and break the typescript discriminated union so ignore them here +// IPushRuleCondition<Exclude<string, ConditionKind>> unfortunately does not resolve this at the time of writing. +exports.ConditionKind = ConditionKind; +let PushRuleKind = /*#__PURE__*/function (PushRuleKind) { + PushRuleKind["Override"] = "override"; + PushRuleKind["ContentSpecific"] = "content"; + PushRuleKind["RoomSpecific"] = "room"; + PushRuleKind["SenderSpecific"] = "sender"; + PushRuleKind["Underride"] = "underride"; + return PushRuleKind; +}({}); +exports.PushRuleKind = PushRuleKind; +let RuleId = /*#__PURE__*/function (RuleId) { + RuleId["Master"] = ".m.rule.master"; + RuleId["IsUserMention"] = ".org.matrix.msc3952.is_user_mention"; + RuleId["IsRoomMention"] = ".org.matrix.msc3952.is_room_mention"; + RuleId["ContainsDisplayName"] = ".m.rule.contains_display_name"; + RuleId["ContainsUserName"] = ".m.rule.contains_user_name"; + RuleId["AtRoomNotification"] = ".m.rule.roomnotif"; + RuleId["DM"] = ".m.rule.room_one_to_one"; + RuleId["EncryptedDM"] = ".m.rule.encrypted_room_one_to_one"; + RuleId["Message"] = ".m.rule.message"; + RuleId["EncryptedMessage"] = ".m.rule.encrypted"; + RuleId["InviteToSelf"] = ".m.rule.invite_for_me"; + RuleId["MemberEvent"] = ".m.rule.member_event"; + RuleId["IncomingCall"] = ".m.rule.call"; + RuleId["SuppressNotices"] = ".m.rule.suppress_notices"; + RuleId["Tombstone"] = ".m.rule.tombstone"; + RuleId["PollStart"] = ".m.rule.poll_start"; + RuleId["PollStartUnstable"] = ".org.matrix.msc3930.rule.poll_start"; + RuleId["PollEnd"] = ".m.rule.poll_end"; + RuleId["PollEndUnstable"] = ".org.matrix.msc3930.rule.poll_end"; + RuleId["PollStartOneToOne"] = ".m.rule.poll_start_one_to_one"; + RuleId["PollStartOneToOneUnstable"] = ".org.matrix.msc3930.rule.poll_start_one_to_one"; + RuleId["PollEndOneToOne"] = ".m.rule.poll_end_one_to_one"; + RuleId["PollEndOneToOneUnstable"] = ".org.matrix.msc3930.rule.poll_end_one_to_one"; + return RuleId; +}({}); +/* eslint-enable camelcase */ +exports.RuleId = RuleId;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/another-json.d.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/another-json.d.js new file mode 100644 index 0000000000..9a390c31f7 --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/another-json.d.js @@ -0,0 +1 @@ +"use strict";
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/auth.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/auth.js new file mode 100644 index 0000000000..360f679311 --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/auth.js @@ -0,0 +1,68 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SSOAction = exports.IdentityProviderBrand = exports.DELEGATED_OIDC_COMPATIBILITY = void 0; +var _NamespacedValue = require("../NamespacedValue"); +/* +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. +*/ + +// disable lint because these are wire responses +/* eslint-disable camelcase */ + +/** + * Represents a response to the CSAPI `/refresh` endpoint. + */ + +/* eslint-enable camelcase */ + +/** + * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login + */ + +const DELEGATED_OIDC_COMPATIBILITY = new _NamespacedValue.UnstableValue("delegated_oidc_compatibility", "org.matrix.msc3824.delegated_oidc_compatibility"); + +/** + * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso + */ +exports.DELEGATED_OIDC_COMPATIBILITY = DELEGATED_OIDC_COMPATIBILITY; +let IdentityProviderBrand = /*#__PURE__*/function (IdentityProviderBrand) { + IdentityProviderBrand["Gitlab"] = "gitlab"; + IdentityProviderBrand["Github"] = "github"; + IdentityProviderBrand["Apple"] = "apple"; + IdentityProviderBrand["Google"] = "google"; + IdentityProviderBrand["Facebook"] = "facebook"; + IdentityProviderBrand["Twitter"] = "twitter"; + return IdentityProviderBrand; +}({}); +/** + * Parameters to login request as per https://spec.matrix.org/v1.3/client-server-api/#login + */ +/* eslint-disable camelcase */ +exports.IdentityProviderBrand = IdentityProviderBrand; +/* eslint-enable camelcase */ +let SSOAction = /*#__PURE__*/function (SSOAction) { + SSOAction["LOGIN"] = "login"; + SSOAction["REGISTER"] = "register"; + return SSOAction; +}({}); +/** + * The result of a successful [MSC3882](https://github.com/matrix-org/matrix-spec-proposals/pull/3882) + * `m.login.token` issuance request. + * Note that this is UNSTABLE and subject to breaking changes without notice. + */ +exports.SSOAction = SSOAction;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/beacon.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/beacon.js new file mode 100644 index 0000000000..b844583bcc --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/beacon.js @@ -0,0 +1,126 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.M_BEACON_INFO = exports.M_BEACON = void 0; +var _NamespacedValue = require("../NamespacedValue"); +/* +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. +*/ + +/** + * Beacon info and beacon event types as described in MSC3672 + * https://github.com/matrix-org/matrix-spec-proposals/pull/3672 + */ + +/** + * Beacon info events are state events. + * We have two requirements for these events: + * 1. they can only be written by their owner + * 2. a user can have an arbitrary number of beacon_info events + * + * 1. is achieved by setting the state_key to the owners mxid. + * Event keys in room state are a combination of `type` + `state_key`. + * To achieve an arbitrary number of only owner-writable state events + * we introduce a variable suffix to the event type + * + * @example + * ``` + * { + * "type": "m.beacon_info.@matthew:matrix.org.1", + * "state_key": "@matthew:matrix.org", + * "content": { + * "m.beacon_info": { + * "description": "The Matthew Tracker", + * "timeout": 86400000, + * }, + * // more content as described below + * } + * }, + * { + * "type": "m.beacon_info.@matthew:matrix.org.2", + * "state_key": "@matthew:matrix.org", + * "content": { + * "m.beacon_info": { + * "description": "Another different Matthew tracker", + * "timeout": 400000, + * }, + * // more content as described below + * } + * } + * ``` + */ + +/** + * Non-variable type for m.beacon_info event content + */ +const M_BEACON_INFO = new _NamespacedValue.UnstableValue("m.beacon_info", "org.matrix.msc3672.beacon_info"); +exports.M_BEACON_INFO = M_BEACON_INFO; +const M_BEACON = new _NamespacedValue.UnstableValue("m.beacon", "org.matrix.msc3672.beacon"); + +/** + * m.beacon_info Event example from the spec + * https://github.com/matrix-org/matrix-spec-proposals/pull/3672 + * @example + * ``` + * { + * "type": "m.beacon_info", + * "state_key": "@matthew:matrix.org", + * "content": { + * "m.beacon_info": { + * "description": "The Matthew Tracker", // same as an `m.location` description + * "timeout": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds + * }, + * "m.ts": 1436829458432, // creation timestamp of the beacon on the client + * "m.asset": { + * "type": "m.self" // the type of asset being tracked as per MSC3488 + * } + * } + * } + * ``` + */ + +/** + * m.beacon_info.* event content + */ + +/** + * m.beacon event example + * https://github.com/matrix-org/matrix-spec-proposals/pull/3672 + * @example + * ``` + * { + * "type": "m.beacon", + * "sender": "@matthew:matrix.org", + * "content": { + * "m.relates_to": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674 + * "rel_type": "m.reference", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267 + * "event_id": "$beacon_info" + * }, + * "m.location": { + * "uri": "geo:51.5008,0.1247;u=35", + * "description": "Arbitrary beacon information" + * }, + * "m.ts": 1636829458432, + * } + * } + * ``` + */ + +/** + * Content of an m.beacon event + */ +exports.M_BEACON = M_BEACON;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/crypto.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/crypto.js new file mode 100644 index 0000000000..430afc16cd --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/crypto.js @@ -0,0 +1,5 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +});
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/event.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/event.js new file mode 100644 index 0000000000..1dbbbcaf5e --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/event.js @@ -0,0 +1,240 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UNSTABLE_MSC3089_TREE_SUBTYPE = exports.UNSTABLE_MSC3089_LEAF = exports.UNSTABLE_MSC3089_BRANCH = exports.UNSTABLE_MSC3088_PURPOSE = exports.UNSTABLE_MSC3088_ENABLED = exports.UNSTABLE_MSC2716_MARKER = exports.UNSTABLE_ELEMENT_FUNCTIONAL_USERS = exports.UNSIGNED_THREAD_ID_FIELD = exports.ToDeviceMessageId = exports.RoomType = exports.RoomCreateTypeField = exports.RelationType = exports.PUSHER_ENABLED = exports.PUSHER_DEVICE_ID = exports.MsgType = exports.MSC3912_RELATION_BASED_REDACTIONS_PROP = exports.LOCAL_NOTIFICATION_SETTINGS_PREFIX = exports.EventType = exports.EVENT_VISIBILITY_CHANGE_TYPE = void 0; +var _NamespacedValue = require("../NamespacedValue"); +/* +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. +*/ +let EventType = /*#__PURE__*/function (EventType) { + EventType["RoomCanonicalAlias"] = "m.room.canonical_alias"; + EventType["RoomCreate"] = "m.room.create"; + EventType["RoomJoinRules"] = "m.room.join_rules"; + EventType["RoomMember"] = "m.room.member"; + EventType["RoomThirdPartyInvite"] = "m.room.third_party_invite"; + EventType["RoomPowerLevels"] = "m.room.power_levels"; + EventType["RoomName"] = "m.room.name"; + EventType["RoomTopic"] = "m.room.topic"; + EventType["RoomAvatar"] = "m.room.avatar"; + EventType["RoomPinnedEvents"] = "m.room.pinned_events"; + EventType["RoomEncryption"] = "m.room.encryption"; + EventType["RoomHistoryVisibility"] = "m.room.history_visibility"; + EventType["RoomGuestAccess"] = "m.room.guest_access"; + EventType["RoomServerAcl"] = "m.room.server_acl"; + EventType["RoomTombstone"] = "m.room.tombstone"; + EventType["RoomPredecessor"] = "org.matrix.msc3946.room_predecessor"; + EventType["SpaceChild"] = "m.space.child"; + EventType["SpaceParent"] = "m.space.parent"; + EventType["RoomRedaction"] = "m.room.redaction"; + EventType["RoomMessage"] = "m.room.message"; + EventType["RoomMessageEncrypted"] = "m.room.encrypted"; + EventType["Sticker"] = "m.sticker"; + EventType["CallInvite"] = "m.call.invite"; + EventType["CallCandidates"] = "m.call.candidates"; + EventType["CallAnswer"] = "m.call.answer"; + EventType["CallHangup"] = "m.call.hangup"; + EventType["CallReject"] = "m.call.reject"; + EventType["CallSelectAnswer"] = "m.call.select_answer"; + EventType["CallNegotiate"] = "m.call.negotiate"; + EventType["CallSDPStreamMetadataChanged"] = "m.call.sdp_stream_metadata_changed"; + EventType["CallSDPStreamMetadataChangedPrefix"] = "org.matrix.call.sdp_stream_metadata_changed"; + EventType["CallReplaces"] = "m.call.replaces"; + EventType["CallAssertedIdentity"] = "m.call.asserted_identity"; + EventType["CallAssertedIdentityPrefix"] = "org.matrix.call.asserted_identity"; + EventType["KeyVerificationRequest"] = "m.key.verification.request"; + EventType["KeyVerificationStart"] = "m.key.verification.start"; + EventType["KeyVerificationCancel"] = "m.key.verification.cancel"; + EventType["KeyVerificationMac"] = "m.key.verification.mac"; + EventType["KeyVerificationDone"] = "m.key.verification.done"; + EventType["KeyVerificationKey"] = "m.key.verification.key"; + EventType["KeyVerificationAccept"] = "m.key.verification.accept"; + EventType["KeyVerificationReady"] = "m.key.verification.ready"; + EventType["RoomMessageFeedback"] = "m.room.message.feedback"; + EventType["Reaction"] = "m.reaction"; + EventType["PollStart"] = "org.matrix.msc3381.poll.start"; + EventType["Typing"] = "m.typing"; + EventType["Receipt"] = "m.receipt"; + EventType["Presence"] = "m.presence"; + EventType["FullyRead"] = "m.fully_read"; + EventType["Tag"] = "m.tag"; + EventType["SpaceOrder"] = "org.matrix.msc3230.space_order"; + EventType["PushRules"] = "m.push_rules"; + EventType["Direct"] = "m.direct"; + EventType["IgnoredUserList"] = "m.ignored_user_list"; + EventType["RoomKey"] = "m.room_key"; + EventType["RoomKeyRequest"] = "m.room_key_request"; + EventType["ForwardedRoomKey"] = "m.forwarded_room_key"; + EventType["Dummy"] = "m.dummy"; + EventType["GroupCallPrefix"] = "org.matrix.msc3401.call"; + EventType["GroupCallMemberPrefix"] = "org.matrix.msc3401.call.member"; + return EventType; +}({}); +exports.EventType = EventType; +let RelationType = /*#__PURE__*/function (RelationType) { + RelationType["Annotation"] = "m.annotation"; + RelationType["Replace"] = "m.replace"; + RelationType["Reference"] = "m.reference"; + RelationType["Thread"] = "m.thread"; + return RelationType; +}({}); +exports.RelationType = RelationType; +let MsgType = /*#__PURE__*/function (MsgType) { + MsgType["Text"] = "m.text"; + MsgType["Emote"] = "m.emote"; + MsgType["Notice"] = "m.notice"; + MsgType["Image"] = "m.image"; + MsgType["File"] = "m.file"; + MsgType["Audio"] = "m.audio"; + MsgType["Location"] = "m.location"; + MsgType["Video"] = "m.video"; + MsgType["KeyVerificationRequest"] = "m.key.verification.request"; + return MsgType; +}({}); +exports.MsgType = MsgType; +const RoomCreateTypeField = "type"; +exports.RoomCreateTypeField = RoomCreateTypeField; +let RoomType = /*#__PURE__*/function (RoomType) { + RoomType["Space"] = "m.space"; + RoomType["UnstableCall"] = "org.matrix.msc3417.call"; + RoomType["ElementVideo"] = "io.element.video"; + return RoomType; +}({}); +exports.RoomType = RoomType; +const ToDeviceMessageId = "org.matrix.msgid"; + +/** + * Identifier for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088) + * room purpose. Note that this reference is UNSTABLE and subject to breaking changes, + * including its eventual removal. + */ +exports.ToDeviceMessageId = ToDeviceMessageId; +const UNSTABLE_MSC3088_PURPOSE = new _NamespacedValue.UnstableValue("m.room.purpose", "org.matrix.msc3088.purpose"); + +/** + * Enabled flag for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088) + * room purpose. Note that this reference is UNSTABLE and subject to breaking changes, + * including its eventual removal. + */ +exports.UNSTABLE_MSC3088_PURPOSE = UNSTABLE_MSC3088_PURPOSE; +const UNSTABLE_MSC3088_ENABLED = new _NamespacedValue.UnstableValue("m.enabled", "org.matrix.msc3088.enabled"); + +/** + * Subtype for an [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. + * Note that this reference is UNSTABLE and subject to breaking changes, including its + * eventual removal. + */ +exports.UNSTABLE_MSC3088_ENABLED = UNSTABLE_MSC3088_ENABLED; +const UNSTABLE_MSC3089_TREE_SUBTYPE = new _NamespacedValue.UnstableValue("m.data_tree", "org.matrix.msc3089.data_tree"); + +/** + * Leaf type for an event in a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. + * Note that this reference is UNSTABLE and subject to breaking changes, including its + * eventual removal. + */ +exports.UNSTABLE_MSC3089_TREE_SUBTYPE = UNSTABLE_MSC3089_TREE_SUBTYPE; +const UNSTABLE_MSC3089_LEAF = new _NamespacedValue.UnstableValue("m.leaf", "org.matrix.msc3089.leaf"); + +/** + * Branch (Leaf Reference) type for the index approach in a + * [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. Note that this reference is + * UNSTABLE and subject to breaking changes, including its eventual removal. + */ +exports.UNSTABLE_MSC3089_LEAF = UNSTABLE_MSC3089_LEAF; +const UNSTABLE_MSC3089_BRANCH = new _NamespacedValue.UnstableValue("m.branch", "org.matrix.msc3089.branch"); + +/** + * Marker event type to point back at imported historical content in a room. See + * [MSC2716](https://github.com/matrix-org/matrix-spec-proposals/pull/2716). + * Note that this reference is UNSTABLE and subject to breaking changes, + * including its eventual removal. + */ +exports.UNSTABLE_MSC3089_BRANCH = UNSTABLE_MSC3089_BRANCH; +const UNSTABLE_MSC2716_MARKER = new _NamespacedValue.UnstableValue("m.room.marker", "org.matrix.msc2716.marker"); + +/** + * Name of the "with_relations" request property for relation based redactions. + * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912} + */ +exports.UNSTABLE_MSC2716_MARKER = UNSTABLE_MSC2716_MARKER; +const MSC3912_RELATION_BASED_REDACTIONS_PROP = new _NamespacedValue.UnstableValue("with_relations", "org.matrix.msc3912.with_relations"); + +/** + * Functional members type for declaring a purpose of room members (e.g. helpful bots). + * Note that this reference is UNSTABLE and subject to breaking changes, including its + * eventual removal. + * + * Schema (TypeScript): + * ``` + * { + * service_members?: string[] + * } + * ``` + * + * @example + * ``` + * { + * "service_members": [ + * "@helperbot:localhost", + * "@reminderbot:alice.tdl" + * ] + * } + * ``` + */ +exports.MSC3912_RELATION_BASED_REDACTIONS_PROP = MSC3912_RELATION_BASED_REDACTIONS_PROP; +const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new _NamespacedValue.UnstableValue("io.element.functional_members", "io.element.functional_members"); + +/** + * A type of message that affects visibility of a message, + * as per https://github.com/matrix-org/matrix-doc/pull/3531 + * + * @experimental + */ +exports.UNSTABLE_ELEMENT_FUNCTIONAL_USERS = UNSTABLE_ELEMENT_FUNCTIONAL_USERS; +const EVENT_VISIBILITY_CHANGE_TYPE = new _NamespacedValue.UnstableValue("m.visibility", "org.matrix.msc3531.visibility"); + +/** + * https://github.com/matrix-org/matrix-doc/pull/3881 + * + * @experimental + */ +exports.EVENT_VISIBILITY_CHANGE_TYPE = EVENT_VISIBILITY_CHANGE_TYPE; +const PUSHER_ENABLED = new _NamespacedValue.UnstableValue("enabled", "org.matrix.msc3881.enabled"); + +/** + * https://github.com/matrix-org/matrix-doc/pull/3881 + * + * @experimental + */ +exports.PUSHER_ENABLED = PUSHER_ENABLED; +const PUSHER_DEVICE_ID = new _NamespacedValue.UnstableValue("device_id", "org.matrix.msc3881.device_id"); + +/** + * https://github.com/matrix-org/matrix-doc/pull/3890 + * + * @experimental + */ +exports.PUSHER_DEVICE_ID = PUSHER_DEVICE_ID; +const LOCAL_NOTIFICATION_SETTINGS_PREFIX = new _NamespacedValue.UnstableValue("m.local_notification_settings", "org.matrix.msc3890.local_notification_settings"); + +/** + * https://github.com/matrix-org/matrix-doc/pull/4023 + * + * @experimental + */ +exports.LOCAL_NOTIFICATION_SETTINGS_PREFIX = LOCAL_NOTIFICATION_SETTINGS_PREFIX; +const UNSIGNED_THREAD_ID_FIELD = new _NamespacedValue.UnstableValue("thread_id", "org.matrix.msc4023.thread_id"); +exports.UNSIGNED_THREAD_ID_FIELD = UNSIGNED_THREAD_ID_FIELD;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/extensible_events.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/extensible_events.js new file mode 100644 index 0000000000..847909dd99 --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/extensible_events.js @@ -0,0 +1,121 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.REFERENCE_RELATION = exports.M_TEXT = exports.M_MESSAGE = exports.M_HTML = void 0; +exports.isEventTypeSame = isEventTypeSame; +var _matrixEventsSdk = require("matrix-events-sdk"); +var _utilities = require("../extensible_events_v1/utilities"); +/* +Copyright 2021 - 2023 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. +*/ + +// Types and utilities for MSC1767: Extensible events (version 1) in Matrix + +/** + * Represents the stable and unstable values of a given namespace. + */ + +/** + * Represents a namespaced value, if the value is a string. Used to extract provided types + * from a TSNamespace<N> (in cases where only stable *or* unstable is provided). + */ + +/** + * Creates a type which is V when T is `never`, otherwise T. + */ +// See https://github.com/microsoft/TypeScript/issues/23182#issuecomment-379091887 for details on the array syntax. + +/** + * The namespaced value for m.message + */ +const M_MESSAGE = new _matrixEventsSdk.UnstableValue("m.message", "org.matrix.msc1767.message"); + +/** + * An m.message event rendering + */ + +/** + * The content for an m.message event + */ +exports.M_MESSAGE = M_MESSAGE; +/** + * The namespaced value for m.text + */ +const M_TEXT = new _matrixEventsSdk.UnstableValue("m.text", "org.matrix.msc1767.text"); + +/** + * The content for an m.text event + */ +exports.M_TEXT = M_TEXT; +/** + * The namespaced value for m.html + */ +const M_HTML = new _matrixEventsSdk.UnstableValue("m.html", "org.matrix.msc1767.html"); + +/** + * The content for an m.html event + */ + +/** + * The content for an m.message, m.text, or m.html event + */ +exports.M_HTML = M_HTML; +/** + * The namespaced value for an m.reference relation + */ +const REFERENCE_RELATION = new _matrixEventsSdk.NamespacedValue("m.reference"); + +/** + * Represents any relation type + */ + +/** + * An m.relates_to relationship + */ + +/** + * Partial types for a Matrix Event. + */ + +/** + * Represents a potentially namespaced event type. + */ +exports.REFERENCE_RELATION = REFERENCE_RELATION; +/** + * Determines if two event types are the same, including namespaces. + * @param given - The given event type. This will be compared + * against the expected type. + * @param expected - The expected event type. + * @returns True if the given type matches the expected type. + */ +function isEventTypeSame(given, expected) { + if (typeof given === "string") { + if (typeof expected === "string") { + return expected === given; + } else { + return expected.matches(given); + } + } else { + if (typeof expected === "string") { + return given.matches(expected); + } else { + const expectedNs = expected; + const givenNs = given; + return expectedNs.matches(givenNs.name) || (0, _utilities.isProvided)(givenNs.altName) && expectedNs.matches(givenNs.altName); + } + } +}
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/global.d.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/global.d.js new file mode 100644 index 0000000000..9329ae092a --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/global.d.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +require("@matrix-org/olm");
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/local_notifications.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/local_notifications.js new file mode 100644 index 0000000000..430afc16cd --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/local_notifications.js @@ -0,0 +1,5 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +});
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/location.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/location.js new file mode 100644 index 0000000000..0acaf952bf --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/location.js @@ -0,0 +1,72 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.M_TIMESTAMP = exports.M_LOCATION = exports.M_ASSET = exports.LocationAssetType = void 0; +var _NamespacedValue = require("../NamespacedValue"); +var _extensible_events = require("./extensible_events"); +/* +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. +*/ +// Types for MSC3488 - m.location: Extending events with location data +let LocationAssetType = /*#__PURE__*/function (LocationAssetType) { + LocationAssetType["Self"] = "m.self"; + LocationAssetType["Pin"] = "m.pin"; + return LocationAssetType; +}({}); +exports.LocationAssetType = LocationAssetType; +const M_ASSET = new _NamespacedValue.UnstableValue("m.asset", "org.matrix.msc3488.asset"); + +/** + * The event definition for an m.asset event (in content) + */ +exports.M_ASSET = M_ASSET; +const M_TIMESTAMP = new _NamespacedValue.UnstableValue("m.ts", "org.matrix.msc3488.ts"); +/** + * The event definition for an m.ts event (in content) + */ +exports.M_TIMESTAMP = M_TIMESTAMP; +const M_LOCATION = new _NamespacedValue.UnstableValue("m.location", "org.matrix.msc3488.location"); + +/* From the spec at: + * https://github.com/matrix-org/matrix-doc/blob/matthew/location/proposals/3488-location.md +{ + "type": "m.room.message", + "content": { + "body": "Matthew was at geo:51.5008,0.1247;u=35 as of Sat Nov 13 18:50:58 2021", + "msgtype": "m.location", + "geo_uri": "geo:51.5008,0.1247;u=35", + "m.location": { + "uri": "geo:51.5008,0.1247;u=35", + "description": "Matthew's whereabouts", + }, + "m.asset": { + "type": "m.self" + }, + "m.text": "Matthew was at geo:51.5008,0.1247;u=35 as of Sat Nov 13 18:50:58 2021", + "m.ts": 1636829458432, + } +} +*/ + +/** + * The content for an m.location event + */ + +/** + * Possible content for location events as sent over the wire + */ +exports.M_LOCATION = M_LOCATION;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/partials.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/partials.js new file mode 100644 index 0000000000..8d12c51c3d --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/partials.js @@ -0,0 +1,63 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Visibility = exports.RestrictedAllowType = exports.Preset = exports.JoinRule = exports.HistoryVisibility = exports.GuestAccess = void 0; +/* +Copyright 2021 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +let Visibility = /*#__PURE__*/function (Visibility) { + Visibility["Public"] = "public"; + Visibility["Private"] = "private"; + return Visibility; +}({}); +exports.Visibility = Visibility; +let Preset = /*#__PURE__*/function (Preset) { + Preset["PrivateChat"] = "private_chat"; + Preset["TrustedPrivateChat"] = "trusted_private_chat"; + Preset["PublicChat"] = "public_chat"; + return Preset; +}({}); +exports.Preset = Preset; +// Knock and private are reserved keywords which are not yet implemented. +let JoinRule = /*#__PURE__*/function (JoinRule) { + JoinRule["Public"] = "public"; + JoinRule["Invite"] = "invite"; + JoinRule["Private"] = "private"; + JoinRule["Knock"] = "knock"; + JoinRule["Restricted"] = "restricted"; + return JoinRule; +}({}); +exports.JoinRule = JoinRule; +let RestrictedAllowType = /*#__PURE__*/function (RestrictedAllowType) { + RestrictedAllowType["RoomMembership"] = "m.room_membership"; + return RestrictedAllowType; +}({}); +exports.RestrictedAllowType = RestrictedAllowType; +let GuestAccess = /*#__PURE__*/function (GuestAccess) { + GuestAccess["CanJoin"] = "can_join"; + GuestAccess["Forbidden"] = "forbidden"; + return GuestAccess; +}({}); +exports.GuestAccess = GuestAccess; +let HistoryVisibility = /*#__PURE__*/function (HistoryVisibility) { + HistoryVisibility["Invited"] = "invited"; + HistoryVisibility["Joined"] = "joined"; + HistoryVisibility["Shared"] = "shared"; + HistoryVisibility["WorldReadable"] = "world_readable"; + return HistoryVisibility; +}({}); +exports.HistoryVisibility = HistoryVisibility;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/polls.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/polls.js new file mode 100644 index 0000000000..6366b7ebfa --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/polls.js @@ -0,0 +1,93 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.M_POLL_START = exports.M_POLL_RESPONSE = exports.M_POLL_KIND_UNDISCLOSED = exports.M_POLL_KIND_DISCLOSED = exports.M_POLL_END = void 0; +var _matrixEventsSdk = require("matrix-events-sdk"); +/* +Copyright 2022 - 2023 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. +*/ + +/** + * Identifier for a disclosed poll. + */ +const M_POLL_KIND_DISCLOSED = new _matrixEventsSdk.UnstableValue("m.poll.disclosed", "org.matrix.msc3381.poll.disclosed"); + +/** + * Identifier for an undisclosed poll. + */ +exports.M_POLL_KIND_DISCLOSED = M_POLL_KIND_DISCLOSED; +const M_POLL_KIND_UNDISCLOSED = new _matrixEventsSdk.UnstableValue("m.poll.undisclosed", "org.matrix.msc3381.poll.undisclosed"); + +/** + * Any poll kind. + */ + +/** + * Known poll kind namespaces. + */ +exports.M_POLL_KIND_UNDISCLOSED = M_POLL_KIND_UNDISCLOSED; +/** + * The namespaced value for m.poll.start + */ +const M_POLL_START = new _matrixEventsSdk.UnstableValue("m.poll.start", "org.matrix.msc3381.poll.start"); + +/** + * The m.poll.start type within event content + */ + +/** + * A poll answer. + */ + +/** + * The event definition for an m.poll.start event (in content) + */ + +/** + * The content for an m.poll.start event + */ +exports.M_POLL_START = M_POLL_START; +/** + * The namespaced value for m.poll.response + */ +const M_POLL_RESPONSE = new _matrixEventsSdk.UnstableValue("m.poll.response", "org.matrix.msc3381.poll.response"); + +/** + * The m.poll.response type within event content + */ + +/** + * The event definition for an m.poll.response event (in content) + */ + +/** + * The content for an m.poll.response event + */ +exports.M_POLL_RESPONSE = M_POLL_RESPONSE; +/** + * The namespaced value for m.poll.end + */ +const M_POLL_END = new _matrixEventsSdk.UnstableValue("m.poll.end", "org.matrix.msc3381.poll.end"); + +/** + * The event definition for an m.poll.end event (in content) + */ + +/** + * The content for an m.poll.end event + */ +exports.M_POLL_END = M_POLL_END;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/read_receipts.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/read_receipts.js new file mode 100644 index 0000000000..70ad6132f5 --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/read_receipts.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ReceiptType = exports.MAIN_ROOM_TIMELINE = void 0; +/* +Copyright 2022 Šimon Brandner <simon.bra.ag@gmail.com> + +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. +*/ +let ReceiptType = /*#__PURE__*/function (ReceiptType) { + ReceiptType["Read"] = "m.read"; + ReceiptType["FullyRead"] = "m.fully_read"; + ReceiptType["ReadPrivate"] = "m.read.private"; + return ReceiptType; +}({}); +exports.ReceiptType = ReceiptType; +const MAIN_ROOM_TIMELINE = "main"; + +// We will only hold a synthetic receipt if we do not have a real receipt or the synthetic is newer. +// map: receipt type → user Id → receipt +exports.MAIN_ROOM_TIMELINE = MAIN_ROOM_TIMELINE;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/requests.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/requests.js new file mode 100644 index 0000000000..430afc16cd --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/requests.js @@ -0,0 +1,5 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +});
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/search.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/search.js new file mode 100644 index 0000000000..52a63fd30b --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/search.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SearchOrderBy = void 0; +/* +Copyright 2021 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Types relating to the /search API +/* eslint-disable camelcase */ +var GroupKey = /*#__PURE__*/function (GroupKey) { + GroupKey["RoomId"] = "room_id"; + GroupKey["Sender"] = "sender"; + return GroupKey; +}(GroupKey || {}); +let SearchOrderBy = /*#__PURE__*/function (SearchOrderBy) { + SearchOrderBy["Recent"] = "recent"; + SearchOrderBy["Rank"] = "rank"; + return SearchOrderBy; +}({}); +/* eslint-enable camelcase */ +exports.SearchOrderBy = SearchOrderBy;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/signed.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/signed.js new file mode 100644 index 0000000000..430afc16cd --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/signed.js @@ -0,0 +1,5 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +});
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/spaces.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/spaces.js new file mode 100644 index 0000000000..430afc16cd --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/spaces.js @@ -0,0 +1,5 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +});
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/synapse.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/synapse.js new file mode 100644 index 0000000000..430afc16cd --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/synapse.js @@ -0,0 +1,5 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +});
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/sync.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/sync.js new file mode 100644 index 0000000000..4e1da31379 --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/sync.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UNREAD_THREAD_NOTIFICATIONS = void 0; +var _NamespacedValue = require("../NamespacedValue"); +/* +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. +*/ + +/** + * https://github.com/matrix-org/matrix-doc/pull/3773 + * + * @experimental + */ +const UNREAD_THREAD_NOTIFICATIONS = new _NamespacedValue.ServerControlledNamespacedValue("unread_thread_notifications", "org.matrix.msc3773.unread_thread_notifications"); +exports.UNREAD_THREAD_NOTIFICATIONS = UNREAD_THREAD_NOTIFICATIONS;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/threepids.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/threepids.js new file mode 100644 index 0000000000..5c0f76a731 --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/threepids.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ThreepidMedium = void 0; +/* +Copyright 2021 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +let ThreepidMedium = /*#__PURE__*/function (ThreepidMedium) { + ThreepidMedium["Email"] = "email"; + ThreepidMedium["Phone"] = "msisdn"; + return ThreepidMedium; +}({}); // TODO: Are these types universal, or specific to just /account/3pid? +exports.ThreepidMedium = ThreepidMedium;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/topic.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/topic.js new file mode 100644 index 0000000000..97db425c21 --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/topic.js @@ -0,0 +1,63 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.M_TOPIC = void 0; +var _NamespacedValue = require("../NamespacedValue"); +/* +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. +*/ + +/** + * Extensible topic event type based on MSC3765 + * https://github.com/matrix-org/matrix-spec-proposals/pull/3765 + * + * @example + * ``` + * { + * "type": "m.room.topic, + * "state_key": "", + * "content": { + * "topic": "All about **pizza**", + * "m.topic": [{ + * "body": "All about **pizza**", + * "mimetype": "text/plain", + * }, { + * "body": "All about <b>pizza</b>", + * "mimetype": "text/html", + * }], + * } + * } + * ``` + */ + +/** + * The event type for an m.topic event (in content) + */ +const M_TOPIC = new _NamespacedValue.UnstableValue("m.topic", "org.matrix.msc3765.topic"); + +/** + * The event content for an m.topic event (in content) + */ + +/** + * The event definition for an m.topic event (in content) + */ + +/** + * The event content for an m.room.topic event + */ +exports.M_TOPIC = M_TOPIC;
\ No newline at end of file diff --git a/comm/chat/protocols/matrix/lib/matrix-sdk/@types/uia.js b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/uia.js new file mode 100644 index 0000000000..430afc16cd --- /dev/null +++ b/comm/chat/protocols/matrix/lib/matrix-sdk/@types/uia.js @@ -0,0 +1,5 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +});
\ No newline at end of file |