Create a new sliding sync instance
The base URL of the sliding sync proxy
The lists to use for sliding sync.
The params to use for room subscriptions.
The client to use for /sync calls.
The number of milliseconds to wait for a response.
Private
Optional
abortPrivate
Readonly
clientThe client to use for /sync calls.
Private
confirmedPrivate
desiredPrivate
extensionsPrivate
listPrivate
listsPrivate
needsPrivate
Optional
pendingPrivate
Readonly
proxyThe base URL of the sliding sync proxy
Private
roomThe params to use for room subscriptions.
Private
terminatedPrivate
Readonly
timeoutMSThe number of milliseconds to wait for a response.
Private
txnPrivate
txnPrivate
addRest
...args: Parameters<SlidingSyncEventHandlerMap[T]>Rest
...args: Parameters<SlidingSyncEventHandlerMap[T]>Private
getGet the full list parameters for a list index. This function is provided for callers to use in conjunction with setList to update fields on an existing list.
A copy of the list or undefined.
The list index to get the list for.
Get the room data for a list.
The list data which contains the rooms in this list
The list index
Private
invokeInvoke all attached lifecycle listeners.
The Lifecycle state
The raw sync response JSON
Optional
err: ErrorAny error that occurred when making the request e.g. network errors.
Private
invokeInvoke all attached room data listeners.
The room which received some data.
The raw sliding sync response JSON.
Modify which events to retrieve for room subscriptions. Invalidates all room subscriptions such that they will be sent up afresh.
A promise which resolves to the transaction ID when it has been received down sync (or rejects with the transaction ID if the action was not applied e.g the request was cancelled immediately after sending, in which case the action will be applied in the subsequent request)
The new room subscription fields to fetch.
Modify the room subscriptions for the sync API. Calling this function will interrupt the /sync request to resend new subscriptions. If the /sync stream has not started, this will prepare the room subscriptions for when start() is called.
A promise which resolves to the transaction ID when it has been received down sync (or rejects with the transaction ID if the action was not applied e.g the request was cancelled immediately after sending, in which case the action will be applied in the subsequent request)
The new desired room subscriptions.
Private
onPrivate
onPrivate
processOptional
event: EventEmitterEvents | SlidingSyncEventPrivate
removePrivate
resetupPrivate
resolveAdd or replace a list. Calling this function will interrupt the /sync request to resend new lists.
A promise which resolves to the transaction ID when it has been received down sync (or rejects with the transaction ID if the action was not applied e.g the request was cancelled immediately after sending, in which case the action will be applied in the subsequent request)
The index to modify
The new list parameters.
Set new ranges for an existing list. Calling this function when only the ranges have changed is more efficient than calling setList(index,list) as this function won't resend sticky params, whereas setList always will.
A promise which resolves to the transaction ID when it has been received down sync (or rejects with the transaction ID if the action was not applied e.g the request was cancelled immediately after sending, in which case the action will be applied in the subsequent request)
The list index to modify
The new ranges to apply.
Private
shiftPrivate
shiftGenerated using TypeDoc
SlidingSync is a high-level data structure which controls the majority of sliding sync. It has no hooks into JS SDK except for needing a MatrixClient to perform the HTTP request. This means this class (and everything it uses) can be used in isolation from JS SDK if needed. To hook this up with the JS SDK, you need to use SlidingSyncSdk.