nexmo_api_specification 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module NexmoApiSpecification
2
- VERSION = '0.10.0'.freeze
2
+ VERSION = '0.11.0'.freeze
3
3
  end
@@ -0,0 +1,469 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "title": "NCCO Schema",
4
+ "definitions": {
5
+ "endpoint": {
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/definitions/endpoint-phone"
9
+ },
10
+ {
11
+ "$ref": "#/definitions/endpoint-websocket"
12
+ },
13
+ {
14
+ "$ref": "#/definitions/endpoint-sip"
15
+ }
16
+ ]
17
+ },
18
+ "endpoint-base": {
19
+ "required": [
20
+ "type"
21
+ ]
22
+ },
23
+ "endpoint-phone": {
24
+ "allOf": [
25
+ {
26
+ "$ref": "#/definitions/endpoint-base"
27
+ },
28
+ {
29
+ "properties": {
30
+ "type": {
31
+ "enum": [
32
+ "phone"
33
+ ]
34
+ },
35
+ "number": {
36
+ "type": "string",
37
+ "minLength": 10,
38
+ "maxLength": 15,
39
+ "pattern": "^[0-9]+$"
40
+ },
41
+ "dtmfAnswer": {
42
+ "type": "string",
43
+ "pattern": "^[0-9#\\*p]*$"
44
+ }
45
+ },
46
+ "required": [
47
+ "number"
48
+ ]
49
+ }
50
+ ]
51
+ },
52
+ "endpoint-websocket": {
53
+ "allOf": [
54
+ {
55
+ "$ref": "#/definitions/endpoint-base"
56
+ },
57
+ {
58
+ "properties": {
59
+ "type": {
60
+ "enum": [
61
+ "websocket"
62
+ ]
63
+ },
64
+ "uri": {
65
+ "type": "string",
66
+ "format": "uri",
67
+ "pattern": "^wss?:"
68
+ },
69
+ "content-type": {
70
+ "type": "string"
71
+ },
72
+ "headers": {
73
+ "type": "object"
74
+ }
75
+ },
76
+ "required": [
77
+ "uri"
78
+ ]
79
+ }
80
+ ]
81
+ },
82
+ "endpoint-sip": {
83
+ "allOf": [
84
+ {
85
+ "$ref": "#/definitions/endpoint-base"
86
+ },
87
+ {
88
+ "properties": {
89
+ "type": {
90
+ "enum": [
91
+ "sip"
92
+ ]
93
+ },
94
+ "uri": {
95
+ "type": "string",
96
+ "format": "uri",
97
+ "pattern": "^sips?:"
98
+ }
99
+ },
100
+ "required": [
101
+ "uri"
102
+ ]
103
+ }
104
+ ]
105
+ },
106
+ "ncco": {
107
+ "oneOf": [
108
+ {
109
+ "$ref": "#/definitions/ncco-connect"
110
+ },
111
+ {
112
+ "$ref": "#/definitions/ncco-conversation"
113
+ },
114
+ {
115
+ "$ref": "#/definitions/ncco-input"
116
+ },
117
+ {
118
+ "$ref": "#/definitions/ncco-record"
119
+ },
120
+ {
121
+ "$ref": "#/definitions/ncco-stream"
122
+ },
123
+ {
124
+ "$ref": "#/definitions/ncco-talk"
125
+ }
126
+ ]
127
+ },
128
+ "ncco-base": {
129
+ "required": [
130
+ "action"
131
+ ]
132
+ },
133
+ "ncco-connect": {
134
+ "allOf": [
135
+ {
136
+ "$ref": "#/definitions/ncco-base"
137
+ },
138
+ {
139
+ "properties": {
140
+ "action": {
141
+ "enum": [
142
+ "connect"
143
+ ]
144
+ },
145
+ "endpoint": {
146
+ "type": "array",
147
+ "items": {
148
+ "$ref": "#/definitions/endpoint"
149
+ }
150
+ },
151
+ "from": {
152
+ "type": "string",
153
+ "pattern": "^[0-9]+$"
154
+ },
155
+ "eventType": {
156
+ "type": "string",
157
+ "enum": [
158
+ "synchronous"
159
+ ]
160
+ },
161
+ "timeout": {
162
+ "type": "number",
163
+ "minimum": 0
164
+ },
165
+ "limit": {
166
+ "type": "number",
167
+ "minimum": 0,
168
+ "maximum": 7200
169
+ },
170
+ "machineDetection": {
171
+ "type": "string",
172
+ "enum": [
173
+ "continue",
174
+ "hangup"
175
+ ]
176
+ },
177
+ "eventUrl": {
178
+ "type": "array",
179
+ "items": {
180
+ "format": "uri",
181
+ "pattern": "^https?://"
182
+ }
183
+ },
184
+ "eventMethod": {
185
+ "type": "string",
186
+ "enum": [
187
+ "GET",
188
+ "POST"
189
+ ]
190
+ }
191
+ },
192
+ "required": [
193
+ "endpoint"
194
+ ]
195
+ }
196
+ ]
197
+ },
198
+ "ncco-conversation": {
199
+ "allOf": [
200
+ {
201
+ "$ref": "#/definitions/ncco-base"
202
+ },
203
+ {
204
+ "properties": {
205
+ "action": {
206
+ "enum": [
207
+ "conversation"
208
+ ]
209
+ },
210
+ "musicOnHoldUrl": {
211
+ "type": "string",
212
+ "format": "uri",
213
+ "pattern": "^https?://"
214
+ },
215
+ "startOnEnter": {
216
+ "type": "boolean"
217
+ },
218
+ "endOnExit": {
219
+ "type": "boolean"
220
+ },
221
+ "record": {
222
+ "type": "boolean"
223
+ },
224
+ "eventUrl": {
225
+ "type": "array",
226
+ "items": {
227
+ "format": "uri",
228
+ "pattern": "^https?://"
229
+ }
230
+ },
231
+ "eventMethod": {
232
+ "type": "string",
233
+ "enum": [
234
+ "GET",
235
+ "POST"
236
+ ]
237
+ }
238
+ },
239
+ "required": [
240
+ "name"
241
+ ]
242
+ }
243
+ ]
244
+ },
245
+ "ncco-input": {
246
+ "allOf": [
247
+ {
248
+ "$ref": "#/definitions/ncco-base"
249
+ },
250
+ {
251
+ "properties": {
252
+ "action": {
253
+ "enum": [
254
+ "input"
255
+ ]
256
+ },
257
+ "timeOut": {
258
+ "type": "number",
259
+ "minimum": 0
260
+ },
261
+ "maxDigits": {
262
+ "minimum": 0,
263
+ "maximum": 20
264
+ },
265
+ "submitOnHash": {
266
+ "type": "boolean"
267
+ },
268
+ "eventUrl": {
269
+ "type": "array",
270
+ "items": {
271
+ "format": "uri",
272
+ "pattern": "^https?://"
273
+ }
274
+ },
275
+ "eventMethod": {
276
+ "type": "string",
277
+ "enum": [
278
+ "GET",
279
+ "POST"
280
+ ]
281
+ }
282
+ }
283
+ }
284
+ ]
285
+ },
286
+ "ncco-record": {
287
+ "allOf": [
288
+ {
289
+ "$ref": "#/definitions/ncco-base"
290
+ },
291
+ {
292
+ "properties": {
293
+ "action": {
294
+ "enum": [
295
+ "record"
296
+ ]
297
+ },
298
+ "format": {
299
+ "enum": [
300
+ "mp3",
301
+ "wav"
302
+ ]
303
+ },
304
+ "endOnSilence": {
305
+ "type": "integer",
306
+ "minimum": 3,
307
+ "maximum": 10
308
+ },
309
+ "endOnKey": {
310
+ "type": "string",
311
+ "pattern": "^[0-9#\\*]$"
312
+ },
313
+ "timeOut": {
314
+ "type": "integer",
315
+ "minimum": 3,
316
+ "maximum": 7200
317
+ },
318
+ "beepStart": {
319
+ "type": "boolean"
320
+ },
321
+ "eventUrl": {
322
+ "type": "array",
323
+ "items": {
324
+ "format": "uri",
325
+ "pattern": "^https?://"
326
+ }
327
+ },
328
+ "eventMethod": {
329
+ "type": "string",
330
+ "enum": [
331
+ "POST",
332
+ "GET"
333
+ ]
334
+ }
335
+ }
336
+ }
337
+ ]
338
+ },
339
+ "ncco-stream": {
340
+ "allOf": [
341
+ {
342
+ "$ref": "#/definitions/ncco-base"
343
+ },
344
+ {
345
+ "properties": {
346
+ "action": {
347
+ "enum": [
348
+ "stream"
349
+ ]
350
+ },
351
+ "streamUrl": {
352
+ "type": "array",
353
+ "items": {
354
+ "format": "uri",
355
+ "pattern": "^https?://"
356
+ }
357
+ },
358
+ "level": {
359
+ "type": "number",
360
+ "minimum": -1,
361
+ "maximum": 1
362
+ },
363
+ "bargeIn": {
364
+ "type": "boolean"
365
+ },
366
+ "loop": {
367
+ "type": "number",
368
+ "minimum": 0
369
+ }
370
+ },
371
+ "required": [
372
+ "streamUrl"
373
+ ]
374
+ }
375
+ ]
376
+ },
377
+ "ncco-talk": {
378
+ "allOf": [
379
+ {
380
+ "$ref": "#/definitions/ncco-base"
381
+ },
382
+ {
383
+ "properties": {
384
+ "action": {
385
+ "enum": [
386
+ "talk"
387
+ ]
388
+ },
389
+ "text": {
390
+ "type": "string",
391
+ "maxLength": 1500
392
+ },
393
+ "bargeIn": {
394
+ "type": "boolean"
395
+ },
396
+ "loop": {
397
+ "type": "integer",
398
+ "minimum": 0
399
+ },
400
+ "voiceName": {
401
+ "$ref": "#/definitions/voices"
402
+ }
403
+ },
404
+ "required": [
405
+ "text"
406
+ ]
407
+ }
408
+ ]
409
+ },
410
+ "voices": {
411
+ "enum": [
412
+ "Agnieszka",
413
+ "Amy",
414
+ "Astrid",
415
+ "Brian",
416
+ "Carla",
417
+ "Carmen",
418
+ "Celine",
419
+ "Chantal",
420
+ "Chipmunk",
421
+ "Conchita",
422
+ "Cristiano",
423
+ "Dora",
424
+ "Emma",
425
+ "Enrique",
426
+ "Eric",
427
+ "Ewa",
428
+ "Filiz",
429
+ "Geraint",
430
+ "Giorgio",
431
+ "Gwyneth",
432
+ "Hans",
433
+ "Ines",
434
+ "Ivy",
435
+ "Jacek",
436
+ "Jan",
437
+ "Jennifer",
438
+ "Joey",
439
+ "Justin",
440
+ "Karl",
441
+ "Kendra",
442
+ "Kimberly",
443
+ "Liv",
444
+ "Lotte",
445
+ "Mads",
446
+ "Maja",
447
+ "Marlene",
448
+ "Mathieu",
449
+ "Maxim",
450
+ "Miguel",
451
+ "Naja",
452
+ "Nicole",
453
+ "Penelope",
454
+ "Raveena",
455
+ "Ricardo",
456
+ "Ruben",
457
+ "Russell",
458
+ "Salli",
459
+ "Tatyana",
460
+ "Vitoria"
461
+ ]
462
+ }
463
+ },
464
+ "type": "array",
465
+ "items": {
466
+ "$ref": "#/definitions/ncco"
467
+ },
468
+ "minItems": 1
469
+ }