@ipcom/asterisk-ari 0.0.66 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -890,6 +890,7 @@ var ChannelInstance = class extends import_events2.EventEmitter {
890
890
  this.client = client;
891
891
  this.baseClient = baseClient;
892
892
  this.channelId = channelId;
893
+ this.id = channelId || `channel-${Date.now()}`;
893
894
  this.baseClient.onWebSocketEvent((event) => {
894
895
  if (this.isChannelEvent(event) && event.channel?.id === this.channelId) {
895
896
  this.emit(event.type, event);
@@ -897,6 +898,8 @@ var ChannelInstance = class extends import_events2.EventEmitter {
897
898
  });
898
899
  }
899
900
  channelData = null;
901
+ id;
902
+ // ID do canal
900
903
  /**
901
904
  * Verifica se o evento possui a propriedade `channel`.
902
905
  * @param event Evento recebido.
@@ -925,12 +928,6 @@ var ChannelInstance = class extends import_events2.EventEmitter {
925
928
  super.off(event, callback);
926
929
  return this;
927
930
  }
928
- /**
929
- * Getter para o ID do canal.
930
- */
931
- get id() {
932
- return this.channelId;
933
- }
934
931
  async answer() {
935
932
  await this.baseClient.post(`/channels/${this.id}/answer`);
936
933
  }