@ipcom/asterisk-ari 0.0.52 → 0.0.54

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.
@@ -1358,18 +1358,15 @@ var PlaybackInstance = class extends import_events3.EventEmitter {
1358
1358
  if (!this.playbackId) {
1359
1359
  throw new Error("Nenhum playback associado para controlar.");
1360
1360
  }
1361
- await this.baseClient.post(`/playbacks/${this.id}/control`, {
1362
- operation
1363
- });
1361
+ await this.baseClient.post(
1362
+ `/playbacks/${this.id}/control?operation=${operation}`
1363
+ );
1364
1364
  }
1365
- /**
1366
- * Encerra o playback.
1367
- */
1368
1365
  async stop() {
1369
1366
  if (!this.playbackId) {
1370
1367
  throw new Error("Nenhum playback associado para encerrar.");
1371
1368
  }
1372
- await this.baseClient.post(`/playbacks/${this.id}/stop`);
1369
+ await this.baseClient.delete(`/playbacks/${this.playbackId}`);
1373
1370
  this.emit("PlaybackStopped", this.playbackData);
1374
1371
  }
1375
1372
  /**
@@ -1457,9 +1454,9 @@ var Playbacks = class extends import_events3.EventEmitter {
1457
1454
  * @returns A promise that resolves when the control operation is successfully executed.
1458
1455
  */
1459
1456
  async control(playbackId, operation) {
1460
- await this.client.post(`/playbacks/${playbackId}/control`, {
1461
- operation
1462
- });
1457
+ await this.client.post(
1458
+ `/playbacks/${playbackId}/control?operation=${operation}`
1459
+ );
1463
1460
  }
1464
1461
  /**
1465
1462
  * Stops a specific playback.
@@ -1468,7 +1465,7 @@ var Playbacks = class extends import_events3.EventEmitter {
1468
1465
  * @returns A promise that resolves when the playback is successfully stopped.
1469
1466
  */
1470
1467
  async stop(playbackId) {
1471
- await this.client.post(`/playbacks/${playbackId}/stop`);
1468
+ await this.client.delete(`/playbacks/${playbackId}`);
1472
1469
  }
1473
1470
  /**
1474
1471
  * Registers a listener for playback events.