Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Application

Hierarchy

Index

Properties

bridge_ids

bridge_ids: string | string[]

Ids for bridges subscribed to.

channel_ids

channel_ids: string | string[]

Ids for channels subscribed to.

device_names

device_names: string | string[]

Names of the devices subscribed to.

endpoint_ids

endpoint_ids: string | string[]

{tech}/{resource} for endpoints subscribed to.

events_allowed

events_allowed: IndexableObject | IndexableObject[]

Event types sent to the application.

events_disallowed

events_disallowed: IndexableObject | IndexableObject[]

Event types not sent to the application.

name

name: string

Name of this application.

Methods

addListener

filter

  • Filter application events types. Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated: "allowed" - Specifies an allowed list of event types "disallowed" - Specifies a disallowed list of event types Further, each of those keys value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value: "type" - The type name of the event to filter The value must be the string name (case sensitive) of the event type that needs filtering. For example: { "allowed": [ { "type": "StasisStart" }, { "type": "StasisEnd" } ] } As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent. The following rules apply: * If the body is empty, both the allowed and disallowed filters are set empty. * If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty). * If only one list type is given then only that type is set. The other type is not updated. * An empty "allowed" list means all events are allowed. * An empty "disallowed" list means no events are disallowed. * Disallowed events take precedence over allowed events if the event type is specified in both lists.

    Parameters

    Returns void

  • Filter application events types. Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated: "allowed" - Specifies an allowed list of event types "disallowed" - Specifies a disallowed list of event types Further, each of those keys value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value: "type" - The type name of the event to filter The value must be the string name (case sensitive) of the event type that needs filtering. For example: { "allowed": [ { "type": "StasisStart" }, { "type": "StasisEnd" } ] } As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent. The following rules apply: * If the body is empty, both the allowed and disallowed filters are set empty. * If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty). * If only one list type is given then only that type is set. The other type is not updated. * An empty "allowed" list means all events are allowed. * An empty "disallowed" list means no events are disallowed. * Disallowed events take precedence over allowed events if the event type is specified in both lists.

    Parameters

    Returns void

  • Filter application events types. Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated: "allowed" - Specifies an allowed list of event types "disallowed" - Specifies a disallowed list of event types Further, each of those keys value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value: "type" - The type name of the event to filter The value must be the string name (case sensitive) of the event type that needs filtering. For example: { "allowed": [ { "type": "StasisStart" }, { "type": "StasisEnd" } ] } As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent. The following rules apply: * If the body is empty, both the allowed and disallowed filters are set empty. * If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty). * If only one list type is given then only that type is set. The other type is not updated. * An empty "allowed" list means all events are allowed. * An empty "disallowed" list means no events are disallowed. * Disallowed events take precedence over allowed events if the event type is specified in both lists.

    Parameters

    Returns Promise<Application>

get

  • Get details of an application.

    Parameters

    Returns void

  • Get details of an application.

    Returns Promise<Application>

list

  • List all applications.

    Parameters

    • callback: (err: Error, applications: Application[]) => void
        • Parameters

          Returns void

    Returns void

  • List all applications.

    Returns Promise<Application[]>

on

once

removeAllListeners

removeListener

  • removeListener(event: AnyEventType, handler: (...args: any[]) => void): void
  • Removes the event listener for the specified event type.

    Parameters

    • event: AnyEventType

      The event type.

    • handler: (...args: any[]) => void

      The event listener function.

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

subscribe

  • subscribe(params: { eventSource: string | string[] }, callback: (err: Error, application: Application) => void): void
  • subscribe(params: { eventSource: string | string[] }): Promise<Application>
  • Subscribe an application to a event source. Returns the state of the application after the subscriptions have changed.

    Parameters

    • params: { eventSource: string | string[] }
      • eventSource: string | string[]

        URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}.

    • callback: (err: Error, application: Application) => void

    Returns void

  • Subscribe an application to a event source. Returns the state of the application after the subscriptions have changed.

    Parameters

    • params: { eventSource: string | string[] }
      • eventSource: string | string[]

        URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}.

    Returns Promise<Application>

unsubscribe

  • unsubscribe(params: { eventSource: string | string[] }, callback: (err: Error, application: Application) => void): void
  • unsubscribe(params: { eventSource: string | string[] }): Promise<Application>
  • Unsubscribe an application from an event source. Returns the state of the application after the subscriptions have changed.

    Parameters

    • params: { eventSource: string | string[] }
      • eventSource: string | string[]

        URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}.

    • callback: (err: Error, application: Application) => void

    Returns void

  • Unsubscribe an application from an event source. Returns the state of the application after the subscriptions have changed.

    Parameters

    • params: { eventSource: string | string[] }
      • eventSource: string | string[]

        URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}.

    Returns Promise<Application>

Generated using TypeDoc