API Docs for: 2.6
Show:

controller_caller_note Class

Module: caller_note

Provides the caller note functionalities.

Methods

deleteCallerNote

(
  • id
  • cb
)

Delete the caller note.

Parameters:

  • id String

    The unique identifier of the caller note

  • cb Function

    The callback function

getAllUserHistoryInterval

(
  • data
  • cb
)

Gets the history of the caller note created by all users into the interval time. It can be possible to filter the results.

Parameters:

  • data Object
    • from String

      The starting date of the interval in the YYYYMMDD format (e.g. 20130521)

    • to String

      The ending date of the interval in the YYYYMMDD format (e.g. 20130528)

    • [filter] String optional

      The filter to be used

  • cb Function

    The callback function

getAllValidCallerNotesByNum

(
  • number
  • cb
)

Gets all the public and private caller notes for the specified number that hasn't expired.

Parameters:

  • number String

    The phone number used to search the associated caller note

  • cb Function

    The callback function

getCallerNote

(
  • id
  • cb
)

Returns the caller note.

Parameters:

  • id String

    The caller note identifier in the caller note database

  • cb Function

    The callback function

getHistoryInterval

(
  • data
  • cb
)

Get the history of the caller note created by the user into the interval time. It can be possible to filter the results.

Parameters:

  • data Object
    • username String

      The username involved in the research

    • from String

      The starting date of the interval in the YYYYMMDD format (e.g. 20130521)

    • to String

      The ending date of the interval in the YYYYMMDD format (e.g. 20130528)

    • [filter] String optional

      The filter to be used

  • cb Function

    The callback function

modifyCallerNote

(
  • data
  • cb
)

Modify the caller note.

Parameters:

  • data Object
    • id String

      The unique identifier of the caller note

    • [number] String optional

      The caller/called number that is associated with the note

    • [text] String optional

      The text of the note

    • [reservation] String optional

      The reservation option. If the creator has booked the callback from the expressed number

    • [visibility] String optional

      It can be "private" or "public"

    • [expirationDate] String optional

      It's the expiration date of the note. It must use the YYYYMMDD format, e.g. to express the date of "12 june 2013" you must use "20130612"

    • [expirationTime] String optional

      It's the expiration time of the note. It must use the HHmmss format, e.g. to express the time of "21:00:45" you must use "210045"

  • cb Function

    The callback function

newCallerNote

(
  • data
  • cb
)

New caller note is created and saved.

Parameters:

  • data Object
    • number String

      The caller/called number that is associated with the note

    • creator String

      The creator of the caller note

    • text String

      The text of the note

    • reservation String

      The reservation option. If the creator has booked the callback from the expressed number

    • visibility String

      It can be "private" or "public"

    • expirationDate String

      It's the expiration date of the note. It must use the YYYYMMDD format, e.g. to express the date of "12 june 2013" you must use "20130612"

    • expirationTime String

      It's the expiration time of the note. It must use the HHmmss format, e.g. to express the time of "21:00:45" you must use "210045"

  • cb Function

    The callback function

save

(
  • data
  • cb
)

Save the the caller note data into the database using dbconn module.

Parameters:

  • data Object
    • number String

      The caller/called number that is associated with the note

    • creator String

      The creator of the caller note

    • text String

      The text of the note

    • reservation String

      The reservation option. If the creator has booked the callback from the expressed number

    • visibility String

      It can be "private" or "public"

    • expirationDate String

      It's the expiration date of the note. It must use the YYYYMMDD format, e.g. to express the date of "12 june 2013" you must use "20130612"

    • expirationTime String

      It's the expiration time of the note. It must use the HHmmss format, e.g. to express the time of "21:00:45" you must use "210045"

  • cb Function

    The callback function

setDbconn

(
  • dbConnMod
)

Set the module to be used for database functionalities.

Parameters:

  • dbConnMod Object

    The dbconn module.

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

Properties

dbconn

Object private

The dbconn module.

IDLOG

String private final

The module identifier used by the logger.

Default: [controller_caller_note]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console