@fonoster/common 0.16.8 → 0.17.0
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/LICENSE +2 -2
- package/dist/protos/voice.proto +26 -23
- package/dist/voice/Play.d.ts +1 -1
- package/dist/voice/Record.d.ts +1 -1
- package/dist/voice/StopSay.d.ts +2 -4
- package/dist/voice/Stream.d.ts +1 -1
- package/dist/voice/Verb.d.ts +2 -2
- package/dist/voice/voice.d.ts +2 -1
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2026 Fonoster Inc
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/dist/protos/voice.proto
CHANGED
|
@@ -48,7 +48,10 @@ message CreateSessionRequest {
|
|
|
48
48
|
string caller_number = 6;
|
|
49
49
|
|
|
50
50
|
// The session ID generated by the Media Server
|
|
51
|
-
string
|
|
51
|
+
string media_session_ref = 7;
|
|
52
|
+
|
|
53
|
+
// The call reference identifier
|
|
54
|
+
string call_ref = 11;
|
|
52
55
|
|
|
53
56
|
// Use this token to validate the provenance of the request
|
|
54
57
|
// If the app_ref is provided, the token must include the app_ref as a claim
|
|
@@ -68,18 +71,18 @@ message CreateSessionRequest {
|
|
|
68
71
|
|
|
69
72
|
// Common request for verbs
|
|
70
73
|
message VerbRequest {
|
|
71
|
-
string
|
|
74
|
+
string media_session_ref = 1;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
// Common response for verbs
|
|
75
78
|
message VerbResponse {
|
|
76
|
-
string
|
|
79
|
+
string media_session_ref = 1;
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
// Request to play a sound
|
|
80
83
|
message PlayRequest {
|
|
81
84
|
// The session reference generated by the Media Server
|
|
82
|
-
string
|
|
85
|
+
string media_session_ref = 1;
|
|
83
86
|
|
|
84
87
|
// The URL of the sound to play
|
|
85
88
|
string url = 2;
|
|
@@ -88,7 +91,7 @@ message PlayRequest {
|
|
|
88
91
|
// Request to play a sound
|
|
89
92
|
message PlayResponse {
|
|
90
93
|
// The session reference generated by the Media Server
|
|
91
|
-
string
|
|
94
|
+
string media_session_ref = 1;
|
|
92
95
|
|
|
93
96
|
// The playback reference generated by the Media Server
|
|
94
97
|
string playback_ref = 2;
|
|
@@ -97,7 +100,7 @@ message PlayResponse {
|
|
|
97
100
|
// The request message for the PlaybackControl method
|
|
98
101
|
message PlaybackControlRequest {
|
|
99
102
|
// The session reference generated by the Media Server
|
|
100
|
-
string
|
|
103
|
+
string media_session_ref = 1;
|
|
101
104
|
|
|
102
105
|
// The playback reference generated by the Media Server
|
|
103
106
|
string playback_ref = 2;
|
|
@@ -116,7 +119,7 @@ message PlaybackControlRequest {
|
|
|
116
119
|
// PlayDtmfRequest is the request message for the PlayDtmf method
|
|
117
120
|
message PlayDtmfRequest {
|
|
118
121
|
// The session reference generated by the Media Server
|
|
119
|
-
string
|
|
122
|
+
string media_session_ref = 1;
|
|
120
123
|
|
|
121
124
|
// The digits to play
|
|
122
125
|
string digits = 2;
|
|
@@ -125,7 +128,7 @@ message PlayDtmfRequest {
|
|
|
125
128
|
// Request to mute or unmute the call
|
|
126
129
|
message MuteRequest {
|
|
127
130
|
// The session reference generated by the Media Server
|
|
128
|
-
string
|
|
131
|
+
string media_session_ref = 1;
|
|
129
132
|
|
|
130
133
|
// The direction to mute
|
|
131
134
|
enum MuteDirection {
|
|
@@ -139,7 +142,7 @@ message MuteRequest {
|
|
|
139
142
|
// Request to gather speech or DTMF
|
|
140
143
|
message GatherRequest {
|
|
141
144
|
// The session reference generated by the Media Server
|
|
142
|
-
string
|
|
145
|
+
string media_session_ref = 1;
|
|
143
146
|
|
|
144
147
|
// The source of the gather
|
|
145
148
|
enum GatherSource {
|
|
@@ -162,7 +165,7 @@ message GatherRequest {
|
|
|
162
165
|
// Response to a gather request
|
|
163
166
|
message GatherResponse {
|
|
164
167
|
// The session reference generated by the Media Server
|
|
165
|
-
string
|
|
168
|
+
string media_session_ref = 1;
|
|
166
169
|
|
|
167
170
|
// The gathered speech or digits
|
|
168
171
|
oneof content {
|
|
@@ -175,7 +178,7 @@ message GatherResponse {
|
|
|
175
178
|
// RecordRequest is the request message to initiate a recording
|
|
176
179
|
message RecordRequest {
|
|
177
180
|
// The session reference generated by the Media Server
|
|
178
|
-
string
|
|
181
|
+
string media_session_ref = 1;
|
|
179
182
|
|
|
180
183
|
// The maximum duration of the recording in seconds
|
|
181
184
|
int32 max_duration = 2;
|
|
@@ -193,7 +196,7 @@ message RecordRequest {
|
|
|
193
196
|
// Response to a record request
|
|
194
197
|
message RecordResponse {
|
|
195
198
|
// The session reference generated by the Media Server
|
|
196
|
-
string
|
|
199
|
+
string media_session_ref = 1;
|
|
197
200
|
|
|
198
201
|
// The name of the recording
|
|
199
202
|
string name = 2;
|
|
@@ -211,7 +214,7 @@ message RecordResponse {
|
|
|
211
214
|
// Request to say a text
|
|
212
215
|
message SayRequest {
|
|
213
216
|
// The session reference generated by the Media Server
|
|
214
|
-
string
|
|
217
|
+
string media_session_ref = 1;
|
|
215
218
|
|
|
216
219
|
// The text to say
|
|
217
220
|
string text = 2;
|
|
@@ -225,13 +228,13 @@ message SayRequest {
|
|
|
225
228
|
|
|
226
229
|
message StopSayRequest {
|
|
227
230
|
// The session reference generated by the Media Server
|
|
228
|
-
string
|
|
231
|
+
string media_session_ref = 1;
|
|
229
232
|
}
|
|
230
233
|
|
|
231
234
|
// Dial request message
|
|
232
235
|
message DialRequest {
|
|
233
236
|
// The session reference generated by the Media Server
|
|
234
|
-
string
|
|
237
|
+
string media_session_ref = 1;
|
|
235
238
|
|
|
236
239
|
// The number to dial
|
|
237
240
|
string destination = 2;
|
|
@@ -254,7 +257,7 @@ message DialRequest {
|
|
|
254
257
|
// Dial status message
|
|
255
258
|
message DialStatus {
|
|
256
259
|
// The session reference generated by the Media Server
|
|
257
|
-
string
|
|
260
|
+
string media_session_ref = 1;
|
|
258
261
|
|
|
259
262
|
// The status of the dial
|
|
260
263
|
enum Status {
|
|
@@ -273,7 +276,7 @@ message DialStatus {
|
|
|
273
276
|
// Request to start an audio stream
|
|
274
277
|
message StartStreamRequest {
|
|
275
278
|
// The session reference generated by the Media Server
|
|
276
|
-
string
|
|
279
|
+
string media_session_ref = 1;
|
|
277
280
|
|
|
278
281
|
// The direction of the stream
|
|
279
282
|
enum StreamDirection {
|
|
@@ -293,7 +296,7 @@ message StartStreamRequest {
|
|
|
293
296
|
// Response to a start stream request
|
|
294
297
|
message StartStreamResponse {
|
|
295
298
|
// The session reference generated by the Media Server
|
|
296
|
-
string
|
|
299
|
+
string media_session_ref = 1;
|
|
297
300
|
|
|
298
301
|
// The stream reference generated by the Media Server
|
|
299
302
|
string stream_ref = 2;
|
|
@@ -302,7 +305,7 @@ message StartStreamResponse {
|
|
|
302
305
|
// Request to stop an audio stream
|
|
303
306
|
message StopStreamRequest {
|
|
304
307
|
// The session reference generated by the Media Server
|
|
305
|
-
string
|
|
308
|
+
string media_session_ref = 1;
|
|
306
309
|
|
|
307
310
|
// The stream reference generated by the Media Server
|
|
308
311
|
string stream_ref = 2;
|
|
@@ -311,7 +314,7 @@ message StopStreamRequest {
|
|
|
311
314
|
// Message for the bidirectional streams
|
|
312
315
|
message StreamPayload {
|
|
313
316
|
// The session reference generated by the Media Server
|
|
314
|
-
string
|
|
317
|
+
string media_session_ref = 1;
|
|
315
318
|
|
|
316
319
|
// The stream reference generated by the Media Server
|
|
317
320
|
string stream_ref = 2;
|
|
@@ -338,7 +341,7 @@ message StreamPayload {
|
|
|
338
341
|
// Request for Stream Gather
|
|
339
342
|
message StartStreamGatherRequest {
|
|
340
343
|
// The session reference generated by the Media Server
|
|
341
|
-
string
|
|
344
|
+
string media_session_ref = 1;
|
|
342
345
|
|
|
343
346
|
// The source of the gather
|
|
344
347
|
enum StreamGatherSource {
|
|
@@ -352,13 +355,13 @@ message StartStreamGatherRequest {
|
|
|
352
355
|
// Request to stop a Stream Gather
|
|
353
356
|
message StopStreamGatherRequest {
|
|
354
357
|
// The session reference generated by the Media Server
|
|
355
|
-
string
|
|
358
|
+
string media_session_ref = 1;
|
|
356
359
|
}
|
|
357
360
|
|
|
358
361
|
// Response to Stream Gather request
|
|
359
362
|
message StreamGatherPayload {
|
|
360
363
|
// The session reference generated by the Media Server
|
|
361
|
-
string
|
|
364
|
+
string media_session_ref = 1;
|
|
362
365
|
|
|
363
366
|
// The gathered speech or a single digit
|
|
364
367
|
oneof content {
|
package/dist/voice/Play.d.ts
CHANGED
package/dist/voice/Record.d.ts
CHANGED
package/dist/voice/StopSay.d.ts
CHANGED
|
@@ -17,10 +17,8 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
import { VerbRequest } from "./Verb";
|
|
20
|
-
type StopSayRequest = VerbRequest
|
|
21
|
-
sessionRef: string;
|
|
22
|
-
};
|
|
20
|
+
type StopSayRequest = VerbRequest;
|
|
23
21
|
type StopSayResponse = {
|
|
24
|
-
|
|
22
|
+
mediaSessionRef: string;
|
|
25
23
|
};
|
|
26
24
|
export { StopSayRequest, StopSayResponse };
|
package/dist/voice/Stream.d.ts
CHANGED
package/dist/voice/Verb.d.ts
CHANGED
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
import { VoiceClientConfig } from "./voice";
|
|
20
20
|
type VoiceRequest = VoiceClientConfig;
|
|
21
21
|
type VerbRequest = {
|
|
22
|
-
|
|
22
|
+
mediaSessionRef: string;
|
|
23
23
|
};
|
|
24
24
|
type VerbResponse = {
|
|
25
|
-
|
|
25
|
+
mediaSessionRef: string;
|
|
26
26
|
};
|
|
27
27
|
export { VerbRequest, VerbResponse, VoiceRequest };
|
package/dist/voice/voice.d.ts
CHANGED
|
@@ -80,7 +80,8 @@ type VoiceClientConfig = {
|
|
|
80
80
|
ingressNumber: string;
|
|
81
81
|
callerName: string;
|
|
82
82
|
callerNumber: string;
|
|
83
|
-
|
|
83
|
+
mediaSessionRef: string;
|
|
84
|
+
callRef: string;
|
|
84
85
|
sessionToken: string;
|
|
85
86
|
callDirection: CallDirection;
|
|
86
87
|
metadata?: Record<string, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Common library for Fonoster projects",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"clean": "rimraf ./dist node_modules tsconfig.tsbuildinfo"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@fonoster/logger": "^0.
|
|
21
|
+
"@fonoster/logger": "^0.17.0",
|
|
22
22
|
"@grpc/grpc-js": "~1.10.11",
|
|
23
23
|
"@grpc/proto-loader": "^0.7.15",
|
|
24
24
|
"@influxdata/influxdb-client": "^1.35.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/nodemailer": "^6.4.21"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "4d1a9afaec6f294184386e009d1a4e292fb3583b"
|
|
53
53
|
}
|