@fonoster/voice 0.7.10 → 0.7.12
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.
- package/dist/VoiceResponse.d.ts +17 -1
- package/dist/VoiceResponse.js +18 -0
- package/package.json +3 -3
package/dist/VoiceResponse.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DialOptions, GatherOptions, GatherResponse, MuteOptions, PlayOptions, PlayResponse, PlaybackControlAction, RecordOptions, RecordResponse, SayOptions, SayResponse, StreamGatherOptions, StreamOptions, VerbResponse, VoiceRequest, VoiceSessionStreamServer } from "@fonoster/common";
|
|
1
|
+
import { DialOptions, GatherOptions, GatherResponse, MuteOptions, PlayOptions, PlayResponse, PlaybackControlAction, RecordOptions, RecordResponse, SayOptions, SayResponse, StreamEvent, StreamGatherOptions, StreamOptions, VerbResponse, VoiceRequest, VoiceSessionStreamServer } from "@fonoster/common";
|
|
2
2
|
import { DialStatusStream, Stream, StreamGatherStream } from "./verbs";
|
|
3
3
|
/**
|
|
4
4
|
* @classdesc Use the VoiceResponse object, to construct advance Interactive
|
|
@@ -228,5 +228,21 @@ declare class VoiceResponse {
|
|
|
228
228
|
* }
|
|
229
229
|
*/
|
|
230
230
|
unmute(options?: MuteOptions): Promise<void>;
|
|
231
|
+
/**
|
|
232
|
+
* Register a listener for the given event.
|
|
233
|
+
*
|
|
234
|
+
* @param {StreamEvent} event - The event to listen for
|
|
235
|
+
* @param {Function} listener - The callback function
|
|
236
|
+
* @example
|
|
237
|
+
*
|
|
238
|
+
* async function handler (request, response) {
|
|
239
|
+
* ...
|
|
240
|
+
*
|
|
241
|
+
* response.on(StreamEvent.END, () => {
|
|
242
|
+
* console.log("Call ended");
|
|
243
|
+
* });
|
|
244
|
+
* }
|
|
245
|
+
*/
|
|
246
|
+
on(event: StreamEvent, listener: (...args: unknown[]) => void): void;
|
|
231
247
|
}
|
|
232
248
|
export { VoiceResponse };
|
package/dist/VoiceResponse.js
CHANGED
|
@@ -380,5 +380,23 @@ class VoiceResponse {
|
|
|
380
380
|
});
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
|
+
/**
|
|
384
|
+
* Register a listener for the given event.
|
|
385
|
+
*
|
|
386
|
+
* @param {StreamEvent} event - The event to listen for
|
|
387
|
+
* @param {Function} listener - The callback function
|
|
388
|
+
* @example
|
|
389
|
+
*
|
|
390
|
+
* async function handler (request, response) {
|
|
391
|
+
* ...
|
|
392
|
+
*
|
|
393
|
+
* response.on(StreamEvent.END, () => {
|
|
394
|
+
* console.log("Call ended");
|
|
395
|
+
* });
|
|
396
|
+
* }
|
|
397
|
+
*/
|
|
398
|
+
on(event, listener) {
|
|
399
|
+
this.voice.on(event, listener);
|
|
400
|
+
}
|
|
383
401
|
}
|
|
384
402
|
exports.VoiceResponse = VoiceResponse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/voice",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.12",
|
|
4
4
|
"description": "Voice Server for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"fonoster": "./dist/index.js"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@fonoster/common": "^0.7.
|
|
24
|
+
"@fonoster/common": "^0.7.11",
|
|
25
25
|
"@fonoster/logger": "^0.7.10",
|
|
26
26
|
"@grpc/grpc-js": "~1.10.6",
|
|
27
27
|
"deepmerge": "^4.3.1",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"bugs": {
|
|
44
44
|
"url": "https://github.com/fonoster/fonoster/issues"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "264fb6d971bad1d823554e93ed7c088318307184"
|
|
47
47
|
}
|