src/api/BridgesAPI.js
/**
   * POST /bridges/{bridgeId}
   *
   * Create a new bridge or update an existing one. This bridge persists
   * until it has been shut down, or Asterisk has been shut down.
   *
   * *API available since Asterisk 12.2*
   *
   * @param {object} params
   * @param {string} params.bridgeId The unique identifier for the bridge.
   * @param {string|Array.<string>} [params.type] The attributes to set on the
   *  bridge that determine how the bridge mixes media between its
   *  participants. Possible attributes are 'mixing', 'holding', 'dtmf_events',
   *  and 'proxy_media'. 'dtmf_events' and 'proxy_media' are only valid when
   *  also supplied with 'mixing'. 'holding' and 'mixing' are mutually
   *  exclusive.
   * @param {string} [params.name] A name to give to the bridge being created.
   * @returns {Promise.<Bridge>} Resolves to the newly created bridge.
   */
POST /bridges/{bridgeId}
Create a new bridge or update an existing one. This bridge persists
until it has been shut down, or Asterisk has been shut down.

*API available since Asterisk 12.2

@param {object} params
@param {string} params.bridgeId The unique identifier for the bridge.
@param {string|Array.} [params.type] The attributes to set on the
bridge that determine how the bridge mixes media between its
participants.
POST / bridges / { bridgeId } Create a new bridge or update an existing one . This bridge persists until it has been shut down or Asterisk has been shut down . * API available since Asterisk 12 . 2 @param { object } params @param { string } params . bridgeId The unique identifier for the bridge . @param { string|Array . } [ params . type ] The attributes to set on the bridge that determine how the bridge mixes media between its participants .
createOrUpdate(params = {}) {
    const { type, name, bridgeId } = params;
    const id = encodeURIComponent(bridgeId);
    return this._request({
      method: "POST",
      url: `${this._baseUrl}/bridges/${id}`,
      params: {
        name,
        type: [].concat(type).join(","),
      },
    });
  }
createOrUpdate ( params = { } ) { const { type , name , bridgeId } = params ; const id = encodeURIComponent ( bridgeId ) ; return this . _request ( { method : "POST" , url : ` ${ this . _baseUrl } ${ id } ` , params : { name , type : [ ] . concat ( type ) . join ( "," ) , } , } ) ; }
POST /bridges/{bridgeId}
 Create a new bridge or update an existing one.
POST / bridges / { bridgeId } Create a new bridge or update an existing one .