Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/lib/messages-uri"

Index

Variables

CONTACT_PATTERN

CONTACT_PATTERN: RegExp = /^\/v1\/users\/([^/]+)\/contacts\/([^/]+)$/

CONVERSATION_PATTERN

CONVERSATION_PATTERN: RegExp = /^\/v1\/users\/([^/]+)\/conversations\/([^/]+)$/

DEFAULT_ENDPOINT

DEFAULT_ENDPOINT: string = "SELF"

DEFAULT_USER

DEFAULT_USER: string = "ME"

MESSAGES_PATTERN

MESSAGES_PATTERN: RegExp = /^\/v1\/users\/([^/]+)\/conversations\/([^/]+)\/messages$/

MESSAGE_PATTERN

MESSAGE_PATTERN: RegExp = /^\/v1\/users\/([^/]+)\/conversations\/([^/]+)\/messages\/([^/]+)$/

Functions

buildConversation

  • buildConversation(user: string, conversation: string): string[]

buildConversations

  • buildConversations(user: string): string[]

buildEndpoint

  • buildEndpoint(user: string, endpoint: string): string[]

buildEndpointMessagingService

  • buildEndpointMessagingService(user: string, endpoint: string): string[]

buildEndpointPresenceDocs

  • buildEndpointPresenceDocs(user: string, endpoint: string): string[]

buildEndpoints

  • buildEndpoints(user: string): string[]

buildMessages

  • buildMessages(user: string, conversation: string): string[]

buildObject

  • buildObject(objectId: string): string[]

buildObjectContent

  • buildObjectContent(objectId: string, content: string): string[]

buildObjectView

  • buildObjectView(objectId: string, view: string): string[]

buildObjects

  • buildObjects(): string[]

buildPoll

  • buildPoll(user: string, endpoint: string, subscription: number): string[]

buildSubscription

  • buildSubscription(user: string, endpoint: string, subscription: number): string[]

buildSubscriptions

  • buildSubscriptions(user: string, endpoint: string): string[]

buildThread

  • buildThread(thread: string): string[]

buildThreads

  • buildThreads(): string[]

buildUser

  • buildUser(user: string): string[]

buildUserMessagingService

  • buildUserMessagingService(user: string): string[]

buildUserPresenceDocs

  • buildUserPresenceDocs(user: string): string[]

buildUsers

  • buildUsers(): string[]

buildV1

  • buildV1(): string[]

conversation

  • conversation(host: string, user: string, conversationId: string): string

conversations

  • conversations(host: string, user: string): string

endpoint

  • endpoint(host: string, userId?: string, endpointId?: string): string
  • Parameters

    • host: string
    • Default value userId: string = DEFAULT_USER
    • Default value endpointId: string = DEFAULT_ENDPOINT

    Returns string

endpointMessagingService

  • endpointMessagingService(host: string, user?: string, endpoint?: string): string
  • Parameters

    • host: string
    • Default value user: string = DEFAULT_USER
    • Default value endpoint: string = DEFAULT_ENDPOINT

    Returns string

endpoints

  • endpoints(host: string, userId?: string): string
  • Build the URI for the endpoints of a user.

    Template: https://{host}/v1/users/{userId}/endpoints

    Parameters

    • host: string

      Hostname of the messages server.

    • Default value userId: string = DEFAULT_USER

      Id of the user. Default: "ME".

    Returns string

    Formatted URI.

get

  • get(host: string, path: string): string

getOrigin

  • getOrigin(host: string): string

joinPath

  • joinPath(parts: string[]): string

messages

  • messages(host: string, user: string, conversationId: string): string

object

  • object(host: string, objectId: string): string

objectContent

  • objectContent(host: string, objectId: string, content: string): string

objectView

  • objectView(host: string, objectId: string, view: string): string

objects

  • objects(host: string): string

parseContact

parseConversation

parseMessage

poll

  • poll(host: string, userId?: string, endpointId?: string, subscriptionId?: number): string
  • Parameters

    • host: string
    • Default value userId: string = DEFAULT_USER
    • Default value endpointId: string = DEFAULT_ENDPOINT
    • Default value subscriptionId: number = 0

    Returns string

subscriptions

  • subscriptions(host: string, userId?: string, endpointId?: string): string

thread

  • thread(host: string, threadId: string): string

user

  • user(host: string, userId?: string): string

userMessagingService

  • userMessagingService(host: string, user?: string): string

users

  • users(host: string): string

Generated using TypeDoc