PrivMX DOCS
API Reference/PrivMX Endpoint Web/Types

Types

SortOrder

interface SortOrder{...}

Fields

Event

interface Event{...}

Fields

type

string

event type

channel

string

channel

connectionId

number

id of source connection

data

unknown

subscriptions

string[]

version

number

timestamp

number

PagingQuery

interface PagingQuery{...}

Fields

skip

number

number of elements to skip from result

limit

number

limit of elements to return for query

sortOrder

SortOrder

Order of elements in result. Use "asc" for ascending, "desc" for descending.

lastId

string

id of the element from which query results should start

sortBy

string

field name to sort elements by

queryAsJson

string

extra query parameters in serialized JSON

PagingList

interface PagingList{...}

Fields

totalAvailable

number

total items available to get

readItems

T[]

list of items read during single method call

Context

interface Context{...}

Fields

userId

string

ID of user requesting information

contextId

string

ID of context

UserWithPubKey

interface UserWithPubKey{...}

Fields

userId

string

ID of the user

pubKey

string

user's public key

UserStatusChange

interface UserStatusChange{...}

Fields

action

string

User status change action, which can be "login" or "logout"

timestamp

number

Timestamp of the change

UserInfo

interface UserInfo{...}

Fields

user

UserWithPubKey

User publicKey and userId

isActive

boolean

is user connected to the Bridge

lastStatusChange

UserStatusChange

User last status change or no value if they have never logged in

ContextUserEventData

interface ContextUserEventData{...}

Fields

contextId

string

ID of the Context

user

UserWithPubKey

user metadata

UserWithAction

interface UserWithAction{...}

Fields

user

UserWithPubKey

user metadata

action

"login" | "logout"

User status change action, e.g. "login" or "logout"

ContextUsersStatusChangedEventData

interface ContextUsersStatusChangedEventData{...}

Fields

contextId

string

ID of the Context

users

UserWithAction[]

List of users with their status changes

ContextCustomEventData

interface ContextCustomEventData{...}

Fields

contextId

string

ID of the Context where the event originated

userId

string

ID of the user who emitted the event

payload

Uint8Array

Raw payload of the custom event

statusCode

number

Status code of payload decryption

schemaVersion

number

Version describing payload encoding/encryption

Thread

interface Thread{...}

Fields

contextId

string

ID of the Context

threadId

string

ID ot the Thread

createDate

number

Thread creation timestamp

creator

string

lastModificationDate

number

Thread last modification timestamp

lastModifier

string

ID of the user who last modified the Thread

users

string[]

list of users (their IDs) with access to the Thread

managers

string[]

list of users (their IDs) with management rights

version

number

version number (changes on updates)

lastMsgDate

number

timestamp of last posted message

publicMeta

Uint8Array

Thread's public metadata

privateMeta

Uint8Array

Thread's private metadata

policy

ContainerPolicy

Thread's policies

messagesCount

number

total number of messages in the Thread

statusCode

number

status code of retrieval and decryption of the Thread

Message

interface Message{...}

Fields

info

ServerMessageInfo

message's information created by server

publicMeta

Uint8Array

message's public metadata

privateMeta

Uint8Array

message's private metadata

data

Uint8Array

message's data

authorPubKey

string

public key of an author of the message

statusCode

number

status code of retrieval and decryption of the message

ServerMessageInfo

interface ServerMessageInfo{...}

Fields

threadId

string

ID of the Thread

messageId

string

ID of the message

createDate

number

message's creation timestamp

author

string

ID of the user who created the message

Store

interface Store{...}

Fields

storeId

string

ID ot the Store

contextId

string

ID of the Context

createDate

number

Store creation timestamp

creator

string

ID of user who created the Store

lastModificationDate

number

Thread last modification timestamp

lastFileDate

number

timestamp of last created file

lastModifier

string

ID of the user who last modified the Store

users

string[]

list of users (their IDs) with access to the Store

managers

string[]

list of users (their IDs) with management rights

version

number

version number (changes on updates)

publicMeta

Uint8Array

Store's public metadata

privateMeta

Uint8Array

Store's private metadata

policy

ContainerPolicy

Store's policies

filesCount

number

total number of files in the Store

statusCode

number

status code of retrieval and decryption of the Store

File

interface File{...}

Fields

info

ServerFileInfo

file's information created by server

publicMeta

Uint8Array

file's public metadata

privateMeta

Uint8Array

file's private metadata

size

number

file's size

authorPubKey

string

public key of an author of the file

statusCode

number

ServerFileInfo

interface ServerFileInfo{...}

Fields

storeId

string

ID of the Store

fileId

string

ID of the file

createDate

number

file's creation timestamp

author

string

ID of the user who created the file

Inbox

interface Inbox{...}

Fields

inboxId

string

ID ot the Inbox

contextId

string

ID of the Context

createDate

number

Inbox creation timestamp

creator

string

ID of user who created the Inbox

lastModificationDate

number

Inbox last modification timestamp

lastModifier

string

ID of the user who last modified the Inbox

users

string[]

list of users (their IDs) with access to the Inbox

managers

string[]

list of users (their IDs) with management rights

version

number

version number (changes on updates)

publicMeta

Uint8Array

Inbox' public metadata

privateMeta

Uint8Array

Inbox' private metadata

filesConfig

FilesConfig

Inbox' files configuration

policy

ContainerWithoutItemPolicy

Inbox' policies

statusCode

number

status code of retrieval and decryption of the Inbox

InboxPublicView

interface InboxPublicView{...}

Fields

inboxId

string

ID of the Inbox

version

number

version of the Inbox

publicMeta

Uint8Array

Inbox' public metadata

InboxEntry

interface InboxEntry{...}

Fields

entryId

string

ID of the entry

inboxId

string

ID of the Inbox

data

Uint8Array

entry data

files

File[]

list of files attached to the entry

authorPubKey

string

public key of the author of an entry

createDate

number

Inbox entry creation timestamp

statusCode

number

status code of retrieval and decryption of the Inbox entry

FilesConfig

interface FilesConfig{...}

Fields

minCount

number

minimum number of files required when sending inbox entry

maxCount

number

maximum number of files allowed when sending inbox entry

maxFileSize

number

maximum file size allowed when sending inbox entry

maxWholeUploadSize

number

maximum size of all files in total allowed when sending inbox entry

Kvdb

interface Kvdb{...}

Fields

contextId

string

ID of the Context

kvdbId

string

ID ot the KVDB

createDate

number

KVDB creation timestamp

creator

string

lastModificationDate

number

KVDB last modification timestamp

lastModifier

string

ID of the user who last modified the KVDB

users

string[]

list of users (their IDs) with access to the KVDB

managers

string[]

list of users (their IDs) with management rights

version

number

version number (changes on updates)

lastMsgDate

number

timestamp of last posted message

publicMeta

Uint8Array

KVDB's public meta data

privateMeta

Uint8Array

KVDB's private mata data

policy

ContainerPolicy

KVDB's policies

entries

number

total number of entries in the KVDB

statusCode

number

status code of retrival and decryption of the KVDB

schemaVersion

number

Version of the KVDB data structure and how it is encoded/encrypted

KvdbEntry

interface KvdbEntry{...}

Fields

info

ServerKvdbEntryInfo

KVDB entry's information created by server

publicMeta

Uint8Array

KVDB entry's public meta data

privateMeta

Uint8Array

KVDB entry's private mata data

data

Uint8Array

KVDB entry's data

authorPubKey

string

public key of an author of the KVDB entry

version

number

version of the KVDB entry

statusCode

number

status code of retrival and decryption of the KVDB entry

schemaVersion

number

Version of the KVDB entry data structure and how it is encoded/encrypted

ServerKvdbEntryInfo

interface ServerKvdbEntryInfo{...}

Fields

kvdbId

string

ID of the kvdb

key

string

KVDB entry's key

createDate

number

entry creation timestamp

author

string

ID of the user who created the entry

DeleteEntriesResult

interface DeleteEntriesResult{...}

Fields

ContainerWithoutItemPolicy

interface ContainerWithoutItemPolicy{...}

Fields

get

PolicyEntry

determine who can get a container

update

PolicyEntry

determine who can update a container

delete

PolicyEntry

determine who can delete a container

updatePolicy

PolicyEntry

determine who can update the policy of a container

updaterCanBeRemovedFromManagers

PolicyBooleanEntry

determine whether the updater can be removed from the list of managers

ownerCanBeRemovedFromManagers

PolicyBooleanEntry

determine whether the owner can be removed from the list of managers

ContainerPolicy

interface ContainerPolicy{...} extends ContainerWithoutItemPolicy

Fields

item

ItemPolicy

item policies

PolicyEntry

interface PolicyEntry{...}

Fields

PolicyBooleanEntry

interface PolicyBooleanEntry{...}

Fields

ItemPolicy

interface ItemPolicy{...}

Fields

get

PolicyEntry

determine who can get an item

listMy

PolicyEntry

determine who can list items created by me

listAll

PolicyEntry

determine who can list all items

create

PolicyEntry

determine who can create an item

update

PolicyEntry

determine who can update an item

delete

PolicyEntry

determine who can delete an item

StreamRoomState

interface StreamRoomState{...}

Fields

StreamRoom

interface StreamRoom{...}

Fields

contextId

string

streamRoomId

string

createDate

number

creator

string

lastModificationDate

number

lastModifier

string

users

string[]

managers

string[]

version

number

publicMeta

Uint8Array

privateMeta

Uint8Array

policy

ContainerPolicy

statusCode

number

state

StreamRoomState

emptyRoomTtl

number

StreamInfo

interface StreamInfo{...}

Fields

id

number

userId

string

dummy

boolean

tracks

TrackInfo[]

talking

boolean

TrackInfo

interface TrackInfo{...}

Fields

type

string

mindex

string

mid

string

disabled

boolean

codec

string

description

string

moderated

boolean

simulcast

boolean

svc

boolean

talking

boolean

StreamPublishResult

interface StreamPublishResult{...}

Fields

published

boolean

data

{ streamRoomId: string; stream: StreamInfo; userId: string; }

Error

interface Error{...}

Fields

code

number

error code

name

string

error name

scope

string

error scope

description

string

error description

full

string

all available data about the error

BIP39

interface BIP39{...}

Fields

mnemonic

string

BIP-39 mnemonic

entropy

Uint8Array

BIP-39 entropy

extKey

ExtKey

Ecc Key

VerificationRequest

interface VerificationRequest{...}

Fields

contextId

string

Id of the Context

senderId

string

Id of the sender

senderPubKey

string

Public key of the sender

date

number

The data creation date

bridgeIdentity

BridgeIdentity

Bridge Identity

BridgeIdentity

interface BridgeIdentity{...}

Fields

url

string

Bridge URL

pubKey

string

Bridge public Key

instanceId

string

Bridge instance Id given by PKI

Key

interface Key{...}

Fields

keyId

string

key

Uint8Array

type

number

StreamSubscription

interface StreamSubscription{...}

Fields

streamId

number

streamTrackId

string

StreamSubscriber

interface StreamSubscriber{...}

Fields

userId

string

subscriptions

StreamSubscription[]

publishedStream

StreamInfo

TurnCredentials

interface TurnCredentials{...}

Fields

url

string

Bridge URL

username

string

password

string

expirationTime

number

RemoteStreamListener

interface RemoteStreamListener{...}

Fields

streamRoomId

string

streamId

number

onRemoteStreamTrack

(event: RTCTrackEvent) => void

onRemoteData

(data: Uint8Array, statusCode: number) => void

PKIVerificationOptions

interface PKIVerificationOptions{...}

Fields

bridgePubKey

string

Bridge public key

bridgeInstanceId

string

Bridge instance Id given by PKI

ConnectionEventType

ConnectionEventType = string string

Fields

ConnectionEventSelectorType

ConnectionEventSelectorType = string string

Fields

StoreEventType

StoreEventType = string string

Fields

StoreEventSelectorType

StoreEventSelectorType = string string

Fields

ThreadEventType

ThreadEventType = string string

Fields

ThreadEventSelectorType

ThreadEventSelectorType = string string

Fields

InboxEventType

InboxEventType = string string

Fields

InboxEventSelectorType

InboxEventSelectorType = string string

Fields

KvdbEventType

KvdbEventType = string string

Fields

KvdbEventSelectorType

KvdbEventSelectorType = string string

Fields

EventsEventSelectorType

EventsEventSelectorType = string string

Fields

StreamEventType

StreamEventType = string string

Fields

StreamRoomMemberEventData

interface StreamRoomMemberEventData{...}

Fields

streamRoomId

string

userId

string

StreamRoomReofferEventData

interface StreamRoomReofferEventData{...}

Fields

streamRoomId

string

jsep

{ type: "offer"; sdp: string }

StreamSubscriptionRef

interface StreamSubscriptionRef{...}

Fields

streamId

number

streamTrackId

string

StreamSubscribedEventData

interface StreamSubscribedEventData{...}

Fields

streamRoomId

string

userId

string

subscriptions

StreamSubscriptionRef[]

StreamUpdatedEventData

interface StreamUpdatedEventData{...}

Fields

streamRoomId

string

streamId

number

userId

string

tracksAdded

TrackInfo[]

tracksRemoved

TrackInfo[]

tracksModified

{ before: TrackInfo; after: TrackInfo }[]

StreamPublishedEventData

interface StreamPublishedEventData{...}

Fields

streamRoomId

string

userId

string

stream

StreamInfo

StreamUnpublishedEventData

interface StreamUnpublishedEventData{...}

Fields

streamRoomId

string

userId

string

streamId

number

StreamEventSelectorType

StreamEventSelectorType = string string

Fields

CollectionItemChange

CollectionItemChange = string string

Fields

CollectionChangedEventData

CollectionChangedEventData = string string

Fields

We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.

Types | PrivMX Docs