Options
All
  • Public
  • Public/Protected
  • All
Menu
class
classdesc

Handles all api calls related to discussions

extends

apiControllerBase

Hierarchy

  • apiControllerBase
    • discussionController

Index

Constructors

constructor

  • Returns discussionController

Properties

Protected request

request: any

Protected resHeaders

resHeaders: any[] = []

Methods

Protected badRequest

  • badRequest(message: string, args?: Array<any>): Promise<Object>
  • Parameters

    • message: string
    • Optional args: Array<any>

    Returns Promise<Object>

broadcast

  • broadcast(data: any): void
  • Parameters

    • data: any

    Returns void

broadcastAll

  • broadcastAll(data: any): void
  • Parameters

    • data: any

    Returns void

broadcastToSockets

  • broadcastToSockets(sockets: Array<string>, data: any): void
  • Parameters

    • sockets: Array<string>
    • data: any

    Returns void

Protected businessException

  • businessException(message: string, args?: Array<any>): Promise<Object>
  • Parameters

    • message: string
    • Optional args: Array<any>

    Returns Promise<Object>

Protected created

  • created(createdData?: object, args?: Array<any>): Promise<Object>
  • Parameters

    • Optional createdData: object
    • Optional args: Array<any>

    Returns Promise<Object>

Protected download

  • download(paths: string): Promise<Object>
  • Parameters

    • paths: string

    Returns Promise<Object>

emit

  • emit(data: any): void
  • Parameters

    • data: any

    Returns void

emitToGroup

  • emitToGroup(groupId: any, data: any): void
  • Parameters

    • groupId: any
    • data: any

    Returns void

Protected emitToRequest

  • emitToRequest(data: any): void
  • Parameters

    • data: any

    Returns void

getChats

  • getChats($params: any): Promise<Object>
  • function

    getChats

    description

    Download a conversation

    description

    An entire conversation amongst two users or a group of users can be downloaded. Whenever the user clicks on 'download a chat' option, the entire conversation is stored in a csv formmated file and downloaded to your system.

    Parameters

    • $params: any

    Returns Promise<Object>

    Conversation in a csv format file

getReadmessages

  • getReadmessages($params: any): Promise<Object>
  • function

    getReadmessages

    description

    Whenever the user hovers over the tick icon of a message, the api is hit and it gives the user the list of all other users' usernames and also displays at what time a user has read the particular message.

    Parameters

    • $params: any

    Returns Promise<Object>

    Returns all the username(s) of user(s) who have read a particular message

getUpload

  • getUpload($params: any): Promise<Object>
  • function

    getUpload

    description

    We have the provision of sending document(s). This api allows you to download a particular document. Whenever user clicks on the document, it is downloaded.

    Parameters

    • $params: any

    Returns Promise<Object>

Protected html

  • html(dom: string): Promise<Object>
  • Parameters

    • dom: string

    Returns Promise<Object>

Protected log

  • log(message: string): void
  • Parameters

    • message: string

    Returns void

postReadmessages

  • postReadmessages($user: any, $data: any): Promise<Object>
  • function

    postReadmessages

    description

    Whenever a user scrolls over a message, the api marks that message as read by that user.

    Parameters

    • $user: any

      User details

    • $data: any

      Array of messages to be marked as read

    Returns Promise<Object>

postUnsetUnreadMsgscount

  • postUnsetUnreadMsgscount($user: any, $data: any): Promise<Object>
  • function

    postUnsetUnreadMsgscount

    description

    Whenever the application opens up a user might have unread messages in a conversation group. On clicking on that particular group this api sets all unread messages as read messages.

    Parameters

    • $user: any

      User details

    • $data: any

      ID of the conversation whose unread messages are to be set to read

    Returns Promise<Object>

postUpload

  • postUpload($files: any, $data: any): Promise<Object>
  • function

    postUpload

    description

    Uploads a document

    Parameters

    • $files: any

      File information to be sent

    • $data: any

      Consists of conversation details in which the file is sent and user information who sent it

    Returns Promise<Object>

    Name of the file sent

Protected redirect

  • redirect(paths: string): Promise<Object>
  • Parameters

    • paths: string

    Returns Promise<Object>

Protected success

  • success(successData?: object, args?: Array<any>): Promise<Object>
  • Parameters

    • Optional successData: object
    • Optional args: Array<any>

    Returns Promise<Object>

Protected unAuthenticated

  • unAuthenticated(message: string, args?: Array<any>): Promise<Object>
  • Parameters

    • message: string
    • Optional args: Array<any>

    Returns Promise<Object>

Protected unAuthorized

  • unAuthorized(message: string, args?: Array<any>): Promise<Object>
  • Parameters

    • message: string
    • Optional args: Array<any>

    Returns Promise<Object>

Static getControllerName

  • getControllerName(name: string): string
  • Parameters

    • name: string

    Returns string

Static parseMultiPart

  • parseMultiPart(isUpload: any, req: any, targetInstance: any): Promise<Object>
  • Parameters

    • isUpload: any
    • req: any
    • targetInstance: any

    Returns Promise<Object>

Static runMultipartCleanUp

  • runMultipartCleanUp(files: any): void
  • Parameters

    • files: any

    Returns void

Generated using TypeDoc