Options
All
  • Public
  • Public/Protected
  • All
Menu

Convergence JavaScript Client API

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

ChatMembership

ChatMembership: "public" | "private"

ChatPermission

ChatPermission: "create_chat" | "remove_chat" | "join_chat" | "leave_chat" | "add_chat_user" | "remove_chat_user" | "set_chat_name" | "set_topic" | "manage_chat_permissions"

ChatType

ChatType: "direct" | "channel" | "room"

ConvergenceEventListener

ConvergenceEventListener: function

The ConvergenceEventListener type defines a function which takes a specific subclass of IConvergenceEvent as a single argument in order to receive fired events. Consumers can use the familiar Node style event registration methods (e.g. addListener, removeListener, on, off, once, etc.) or they can consume events as an observable stream using the events method.

param

The subclass of IConvergenceEvent that represents the fired event.

Type declaration

    • (event: T): void
    • Parameters

      • event: T

      Returns void

DomainUserIdentifier

DomainUserIdentifier: string | DomainUserId

ModelDataCallback

ModelDataCallback: function

Type declaration

    • (): object
    • Returns object

      • [key: string]: any

ModelDataInitializer

ModelDataInitializer: ModelData | ModelDataCallback

Path

Path: PathElement[]

PathElement

PathElement: string | number

ReferenceType

ReferenceType: "index" | "range" | "element" | "property"

StringMapLike

StringMapLike: Map<string, any> | object

UserField

UserField: "username" | "email" | "firstName" | "lastName" | "displayName"

WebSocketFactory

WebSocketFactory: function

Type declaration

    • (url: string): WebSocket
    • Parameters

      • url: string

      Returns WebSocket

Variables

Const connect

connect: connect = Convergence.connect

Const connectAnonymously

connectAnonymously: connectAnonymously = Convergence.connectAnonymously

Const connectWithJwt

connectWithJwt: connectWithJwt = Convergence.connectWithJwt

Const reconnect

reconnect: reconnect = Convergence.reconnect

Functions

extractValueAndType

  • extractValueAndType(values: IReferenceValues): ValueAndType
  • Parameters

    • values: IReferenceValues

    Returns ValueAndType

isReferenceMessage

  • isReferenceMessage(message: IConvergenceMessage): boolean
  • Parameters

    • message: IConvergenceMessage

    Returns boolean

toIOperationData

  • toIOperationData(operation: Operation): IOperationData
  • Parameters

    • operation: Operation

    Returns IOperationData

toIReferenceValues

  • toIReferenceValues(type: ReferenceType, values: any[]): IReferenceValues
  • Parameters

    Returns IReferenceValues

toModelOperation

  • toModelOperation(operationData: IModelOperationData, identityCache: IdentityCache): ModelOperation
  • Parameters

    • operationData: IModelOperationData
    • identityCache: IdentityCache

    Returns ModelOperation

toOperation

  • toOperation(operationData: IOperationData): Operation
  • Parameters

    • operationData: IOperationData

    Returns Operation

toRemoteReferenceEvent

  • toRemoteReferenceEvent(message: IConvergenceMessage): RemoteReferenceEvent
  • Parameters

    • message: IConvergenceMessage

    Returns RemoteReferenceEvent

Object literals

Const ChatTypes

ChatTypes: object

CHANNEL

CHANNEL: string = "group"

DIRECT

DIRECT: string = "direct"

ROOM

ROOM: string = "room"

Const ObservableArrayEventConstants

ObservableArrayEventConstants: object

INSERT

INSERT: string = "insert"

REMOVE

REMOVE: string = "remove"

REORDER

REORDER: string = "reorder"

SET

SET: string = "set"

Const ObservableElementEventConstants

ObservableElementEventConstants: object

DETACHED

DETACHED: string = "detached"

MODEL_CHANGED

MODEL_CHANGED: string = "model_changed"

REFERENCE

REFERENCE: string = "reference"

VALUE

VALUE: string = "value"

Const ObservableModelEventConstants

ObservableModelEventConstants: object

CLOSED

CLOSED: string = "closed"

DELETED

DELETED: string = "deleted"

VERSION_CHANGED

VERSION_CHANGED: string = "version_changed"

Const ObservableNumberEventConstants

ObservableNumberEventConstants: object

DELTA

DELTA: string = "delta"

Const ObservableObjectEventConstants

ObservableObjectEventConstants: object

REMOVE

REMOVE: string = "remove"

SET

SET: string = "set"

Const ObservableStringEventConstants

ObservableStringEventConstants: object

INSERT

INSERT: string = "insert"

REMOVE

REMOVE: string = "remove"