Global

Members

# DeviceKeyAlgorithm

The key algorithms for device keys.

View Source models/Crypto.ts, line 24

# EncryptionAlgorithm

The available encryption algorithms.

View Source models/Crypto.ts, line 15

# EventKind

Represents the different kinds of events a bot/appservice might see.

View Source models/events/EventKind.ts, line 6

# constant METRIC_IDENTITY_CLIENT_FAILED_FUNCTION_CALL

Counter metric for failed function calls on an IdentityClient. Uses an IdentityClientCallContext.

View Source metrics/names.ts, line 26

# constant METRIC_IDENTITY_CLIENT_FUNCTION_CALL

Time-series metric for how long a function call takes on an IdentityClient. Uses an IdentityClientCallContext.

View Source metrics/names.ts, line 21

# constant METRIC_IDENTITY_CLIENT_SUCCESSFUL_FUNCTION_CALL

Counter metric for successful function calls on an IdentityClient. Uses an IdentityClientCallContext.

View Source metrics/names.ts, line 31

# constant METRIC_INTENT_FAILED_FUNCTION_CALL

Counter metric for failed function calls on an Intent. Uses a IntentCallContext.

View Source metrics/names.ts, line 41

# constant METRIC_INTENT_FUNCTION_CALL

Time-series metric for how long a function call takes on an Intent. Uses a IntentCallContext.

View Source metrics/names.ts, line 36

# constant METRIC_INTENT_SUCCESSFUL_FUNCTION_CALL

Counter metric for successful function calls on an Intent. Uses a IntentCallContext.

View Source metrics/names.ts, line 46

# constant METRIC_MATRIX_CLIENT_FAILED_FUNCTION_CALL

Counter metric for failed function calls on a MatrixClient. Uses a MatrixClientCallContext.

View Source metrics/names.ts, line 11

# constant METRIC_MATRIX_CLIENT_FUNCTION_CALL

Time-series metric for how long a function call takes on MatrixClient. Uses a MatrixClientCallContext.

View Source metrics/names.ts, line 6

# constant METRIC_MATRIX_CLIENT_SUCCESSFUL_FUNCTION_CALL

Counter metric for successful function calls on a MatrixClient. Uses a MatrixClientCallContext.

View Source metrics/names.ts, line 16

# OTKAlgorithm

One time key algorithms.

View Source models/Crypto.ts, line 6

# PowerLevelAction

Actions that can be guarded by power levels.

View Source models/PowerLevelAction.ts, line 5

# RoomEncryptionAlgorithm

The kinds of room encryption algorithms allowed by the spec.
See:

View Source models/events/EncryptionEvent.ts, line 8

# constant SYNC_LOCK_NAME

View Source e2ee/RustEngine.ts, line 9

# SynapseRoomProperty

Available properties on a Synapse room listing to order by.

View Source SynapseAdminApis.ts, line 7

Methods

# decodeBase64(s) → {Uint8Array}

Decodes Base64.
Parameters:
Name Type Description
s string The Base64 string.

View Source b64.ts, line 35

The encoded data as a buffer.
Uint8Array

# decodeUnpaddedBase64(s) → {Uint8Array}

Decodes Unpadded Base64.
Parameters:
Name Type Description
s string The Base64 string.

View Source b64.ts, line 44

The encoded data as a buffer.
Uint8Array

# decodeUnpaddedUrlSafeBase64(s) → {Uint8Array}

Decodes URL-Safe Unpadded Base64.
Parameters:
Name Type Description
s string The Base64 string.

View Source b64.ts, line 53

The encoded data as a buffer.
Uint8Array

# doHttpRequest(baseUrl, method, endpoint, qs, body, headers, timeout, raw, contentType, noEncoding) → {Promise.<any>}

Performs a web request to a server.
Parameters:
Name Type Description
baseUrl string The base URL to apply to the call.
method "GET" | "POST" | "PUT" | "DELETE" The HTTP method to use in the request
endpoint string The endpoint to call. For example: "/_matrix/client/v3/account/whoami"
qs any The query string to send. Optional.
body any The request body to send. Optional. Will be converted to JSON unless the type is a Buffer.
headers any Additional headers to send in the request.
timeout number The number of milliseconds to wait before timing out.
raw boolean If true, the raw response will be returned instead of the response body.
contentType string The content type to send. Only used if the `body` is a Buffer.
noEncoding string Set to true to disable encoding, and return a Buffer. Defaults to false

View Source http.ts, line 21

Resolves to the response (body), rejected if a non-2xx status code was returned.
Promise.<any>

# encodeBase64(b) → {string}

Encodes Base64.
Parameters:
Name Type Description
b ArrayBuffer | Uint8Array The buffer to encode.

View Source b64.ts, line 8

The Base64 string.
string

# encodeUnpaddedBase64(b) → {string}

Encodes Unpadded Base64.
Parameters:
Name Type Description
b ArrayBuffer | Uint8Array The buffer to encode.

View Source b64.ts, line 17

The Base64 string.
string

# encodeUnpaddedUrlSafeBase64(b) → {string}

Encodes URL-Safe Unpadded Base64.
Parameters:
Name Type Description
b ArrayBuffer | Uint8Array The buffer to encode.

View Source b64.ts, line 26

The Base64 string.
string

# extractRequestError(err) → {*}

Extracts the useful part of a request's error into something loggable.
Parameters:
Name Type Description
err Error The error to parse.

View Source logging/LogService.ts, line 160

The extracted error, or the given error if unaltered.
*

# getRequestFn()

Gets the `request`-compatible function for performing HTTP requests.

View Source request.ts, line 17

The request function.

# requiresCrypto()

Flags a MatrixClient function as needing end-to-end encryption enabled.

View Source e2ee/decorators.ts, line 6

# requiresReady()

Flags a CryptoClient function as needing the CryptoClient to be ready.

View Source e2ee/decorators.ts, line 22

# setRequestFn(fn)

Sets the function to use for performing HTTP requests. Must be compatible with `request`.
Parameters:
Name Type Description
fn The new request function.

View Source request.ts, line 9

# timedIdentityClientFunctionCall()

Times an IdentityClient function call for metrics.

View Source metrics/decorators.ts, line 35

# timedIntentFunctionCall()

Times an Intent function call for metrics.

View Source metrics/decorators.ts, line 63

# timedMatrixClientFunctionCall()

Times a MatrixClient function call for metrics.

View Source metrics/decorators.ts, line 7

# validateSpaceOrderString(order) → {boolean}

Validate the 'order' parameter of a child space entry. It must be a string between the range of \x20 - \x7F and contain no more than 50 characters.
Parameters:
Name Type Description
order string The 'order' parameter of a m.space.child

View Source simple-validation.ts, line 11

If the string is not valid
Error
True if the string is valid
boolean

# wrapRoomEvent(event) → {RoomEvent.<any>}

Wraps a room event into a more suitable container.
Parameters:
Name Type Description
event any The event object to wrap.

View Source models/events/converter.ts, line 11

An instance of the most suitable container for the event.
RoomEvent.<any>

Type Definitions

"join" | "leave" | "invite"

# EffectiveMembership

The effective membership states a user can be in.
See:

View Source models/events/MembershipEvent.ts, line 55

"public" | "knock" | "invite" | "private"

# JoinRule

The types of join rules that are valid in Matrix.
See:

View Source models/events/JoinRulesEvent.ts, line 20

"join" | "leave" | "ban" | "invite"

# Membership

The types of membership that are valid in Matrix.
See:

View Source models/events/MembershipEvent.ts, line 49

"m.text" | "m.emote" | "m.notice" | "m.image" | "m.file" | "m.audio" | "m.location" | "m.video" | string

# MessageType

The types of messages that are valid in Matrix.
See:

View Source models/events/MessageEvent.ts, line 49

object

# NewChildOpts

Options for creating a new child space or room.

View Source models/Spaces.ts, line 159

object

# OTKs

One Time Keys structure model.

View Source models/Crypto.ts, line 47

"online" | "offline" | "unavailable"

# PresenceState

The allowed states of presence in Matrix. * `online`: The default state when the user is connected to an event stream. * `unavailable`: The user is not reachable at this time e.g. they are idle. * `offline`: The user is not connected to an event stream or is explicitly suppressing their profile information from being sent.
See:

View Source models/events/PresenceEvent.ts, line 20

"private_chat" | "trusted_private_chat" | "public_chat"

# RoomPreset

"private_chat" sets: - join_rules to `invite` - history_visibility to `shared` - guest_access to `can_join` "trusted_private_chat" sets: - join_rules to `invite` - history_visibility to `shared` - guest_access to `can_join` - All invitees are given the same power level as the room creator. "public_chat" sets: - join_rules to `public` - history_visibility to `shared` - guest_access to `forbidden`

View Source models/CreateRoom.ts, line 6

"public" | "private"

# RoomVisibility

"public" visibility indicates that the room will be shown in the published room list. "private" visibility indicates that the room will not be included in published room list.

View Source models/CreateRoom.ts, line 25

object

# ServerVersions

Representation of the server's supported specification versions and unstable feature flags.
Properties:
Name Type Attributes Description
unstable_features Record.<string, boolean> <optional>
versions Array

View Source models/ServerVersions.ts, line 4