twilio 5.3.5 → 5.3.7

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.
Files changed (31) hide show
  1. package/README.md +21 -0
  2. package/lib/base/BaseTwilio.d.ts +27 -1
  3. package/lib/base/BaseTwilio.js +18 -0
  4. package/lib/base/RequestClient.d.ts +1 -0
  5. package/lib/base/RequestClient.js +10 -10
  6. package/lib/rest/Preview.d.ts +0 -5
  7. package/lib/rest/Preview.js +0 -7
  8. package/lib/rest/api/v2010/account/call/transcription.d.ts +2 -0
  9. package/lib/rest/api/v2010/account/call/transcription.js +2 -0
  10. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
  11. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
  12. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
  13. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
  14. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
  15. package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
  16. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
  17. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
  18. package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
  19. package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
  20. package/lib/rest/api/v2010/account/usage.d.ts +1 -1
  21. package/lib/rest/content/v1/content.d.ts +1 -1
  22. package/lib/rest/conversations/v1/conversationWithParticipants.d.ts +1 -1
  23. package/lib/rest/conversations/v1/service/conversationWithParticipants.d.ts +1 -1
  24. package/lib/rest/insights/v1/conference.d.ts +1 -1
  25. package/lib/rest/insights/v1/room/participant.d.ts +2 -2
  26. package/lib/rest/insights/v1/room.d.ts +2 -2
  27. package/lib/rest/numbers/v2/hostedNumberOrder.d.ts +65 -1
  28. package/lib/rest/numbers/v2/hostedNumberOrder.js +41 -0
  29. package/lib/twiml/VoiceResponse.d.ts +186 -0
  30. package/lib/twiml/VoiceResponse.js +81 -0
  31. package/package.json +1 -1
@@ -178,6 +178,7 @@ declare namespace VoiceResponse {
178
178
  type ConversationRecord = "do-not-record" | "record-from-answer" | "record-from-ringing" | "record-from-answer-dual" | "record-from-ringing-dual" | "true" | "false";
179
179
  type ConversationRecordingEvent = "in-progress" | "completed" | "absent";
180
180
  type ConversationTrim = "trim-silence" | "do-not-trim";
181
+ type DialEvents = "call-progress-event";
181
182
  type DialRecord = "do-not-record" | "record-from-answer" | "record-from-ringing" | "record-from-answer-dual" | "record-from-ringing-dual";
182
183
  type DialRecordingEvent = "in-progress" | "completed" | "absent";
183
184
  type DialRecordingTrack = "both" | "inbound" | "outbound";
@@ -234,6 +235,8 @@ declare namespace VoiceResponse {
234
235
  answerOnBridge?: boolean;
235
236
  /** callerId - Caller ID to display */
236
237
  callerId?: string;
238
+ /** events - Subscription to events */
239
+ events?: DialEvents;
237
240
  /** hangupOnStar - Hangup call on star press */
238
241
  hangupOnStar?: boolean;
239
242
  /** method - Action URL method */
@@ -535,6 +538,8 @@ declare namespace VoiceResponse {
535
538
  hints?: string;
536
539
  /** inboundTrackLabel - Friendly name given to the Inbound Track */
537
540
  inboundTrackLabel?: string;
541
+ /** intelligenceService - The SID or the unique name of the Intelligence Service to be used */
542
+ intelligenceService?: string;
538
543
  /** languageCode - Language Code used by the transcription engine */
539
544
  languageCode?: string;
540
545
  /** name - Friendly name given to the Transcription */
@@ -634,6 +639,8 @@ declare namespace VoiceResponse {
634
639
  hints?: string;
635
640
  /** inboundTrackLabel - Friendly name given to the Inbound Track */
636
641
  inboundTrackLabel?: string;
642
+ /** intelligenceService - The SID or the unique name of the Intelligence Service to be used */
643
+ intelligenceService?: string;
637
644
  /** languageCode - Language Code used by the transcription engine */
638
645
  languageCode?: string;
639
646
  /** name - Friendly name given to the Transcription */
@@ -1456,6 +1463,128 @@ declare namespace VoiceResponse {
1456
1463
  /** url - TwiML URL */
1457
1464
  url?: string;
1458
1465
  }
1466
+ /**
1467
+ * Attributes to pass to conversationRelay
1468
+ */
1469
+ export interface ConversationRelayAttributes {
1470
+ /** debug - Whether debugging on the session is enabled */
1471
+ debug?: boolean;
1472
+ /** dtmfDetection - Whether DTMF tones should be detected and reported in speech transcription */
1473
+ dtmfDetection?: boolean;
1474
+ /** interruptByDtmf - Whether DTMF tone can interrupt the play of text-to-speech */
1475
+ interruptByDtmf?: boolean;
1476
+ /** interruptible - Whether caller's speaking can interrupt the play of text-to-speech */
1477
+ interruptible?: boolean;
1478
+ /** language - Language to be used for both text-to-speech and transcription */
1479
+ language?: string;
1480
+ /** partialPrompts - Whether partial prompts should be reported to WebSocket server before the caller finishes speaking */
1481
+ partialPrompts?: boolean;
1482
+ /** profanityFilter - Whether profanities should be filtered out of the speech transcription */
1483
+ profanityFilter?: boolean;
1484
+ /** speechModel - Speech model to be used for transcription */
1485
+ speechModel?: string;
1486
+ /** transcriptionLanguage - Language to be used for transcription */
1487
+ transcriptionLanguage?: string;
1488
+ /** transcriptionProvider - Provider to be used for transcription */
1489
+ transcriptionProvider?: string;
1490
+ /** ttsLanguage - Language to be used for text-to-speech */
1491
+ ttsLanguage?: string;
1492
+ /** ttsProvider - Provider to be used for text-to-speech */
1493
+ ttsProvider?: string;
1494
+ /** url - URL of the remote service where the session is connected to */
1495
+ url?: string;
1496
+ /** voice - Voice to be used for text-to-speech */
1497
+ voice?: string;
1498
+ /** welcomeGreeting - The sentence to be played automatically when the session is connected */
1499
+ welcomeGreeting?: string;
1500
+ /** welcomeGreetingInterruptible - Whether caller's speaking can interrupt the welcome greeting */
1501
+ welcomeGreetingInterruptible?: boolean;
1502
+ }
1503
+ /**
1504
+ * Attributes to pass to assistant
1505
+ */
1506
+ export interface AssistantAttributes {
1507
+ /** debug - Whether debugging on the session is enabled */
1508
+ debug?: boolean;
1509
+ /** dtmfDetection - Whether DTMF tones should be detected and reported in speech transcription */
1510
+ dtmfDetection?: boolean;
1511
+ /** id - The assistant ID of the AI Assistant */
1512
+ id?: string;
1513
+ /** interruptByDtmf - Whether DTMF tone can interrupt the play of text-to-speech */
1514
+ interruptByDtmf?: boolean;
1515
+ /** interruptible - Whether caller's speaking can interrupt the play of text-to-speech */
1516
+ interruptible?: boolean;
1517
+ /** language - Language to be used for both text-to-speech and transcription */
1518
+ language?: string;
1519
+ /** partialPrompts - Whether partial prompts should be reported to WebSocket server before the caller finishes speaking */
1520
+ partialPrompts?: boolean;
1521
+ /** profanityFilter - Whether profanities should be filtered out of the speech transcription */
1522
+ profanityFilter?: boolean;
1523
+ /** speechModel - Speech model to be used for transcription */
1524
+ speechModel?: string;
1525
+ /** transcriptionLanguage - Language to be used for transcription */
1526
+ transcriptionLanguage?: string;
1527
+ /** transcriptionProvider - Provider to be used for transcription */
1528
+ transcriptionProvider?: string;
1529
+ /** ttsLanguage - Language to be used for text-to-speech */
1530
+ ttsLanguage?: string;
1531
+ /** ttsProvider - Provider to be used for text-to-speech */
1532
+ ttsProvider?: string;
1533
+ /** voice - Voice to be used for text-to-speech */
1534
+ voice?: string;
1535
+ /** welcomeGreeting - The sentence to be played automatically when the session is connected */
1536
+ welcomeGreeting?: string;
1537
+ /** welcomeGreetingInterruptible - Whether caller's speaking can interrupt the welcome greeting */
1538
+ welcomeGreetingInterruptible?: boolean;
1539
+ }
1540
+ /**
1541
+ * Attributes to pass to language
1542
+ */
1543
+ export interface LanguageAttributes {
1544
+ /** code - Language code of this language setting is for */
1545
+ code?: string;
1546
+ /** speechModel - Speech model to be used for transcription of this language */
1547
+ speechModel?: string;
1548
+ /** transcriptionProvider - Provider to be used for transcription of this language */
1549
+ transcriptionProvider?: string;
1550
+ /** ttsProvider - Provider to be used for text-to-speech of this language */
1551
+ ttsProvider?: string;
1552
+ /** voice - Voice to be used for text-to-speech of this language */
1553
+ voice?: string;
1554
+ }
1555
+ /**
1556
+ * Attributes to pass to parameter
1557
+ */
1558
+ export interface ParameterAttributes {
1559
+ /** name - The name of the custom parameter */
1560
+ name?: string;
1561
+ /** value - The value of the custom parameter */
1562
+ value?: string;
1563
+ }
1564
+ /**
1565
+ * Attributes to pass to language
1566
+ */
1567
+ export interface LanguageAttributes {
1568
+ /** code - Language code of this language setting is for */
1569
+ code?: string;
1570
+ /** speechModel - Speech model to be used for transcription of this language */
1571
+ speechModel?: string;
1572
+ /** transcriptionProvider - Provider to be used for transcription of this language */
1573
+ transcriptionProvider?: string;
1574
+ /** ttsProvider - Provider to be used for text-to-speech of this language */
1575
+ ttsProvider?: string;
1576
+ /** voice - Voice to be used for text-to-speech of this language */
1577
+ voice?: string;
1578
+ }
1579
+ /**
1580
+ * Attributes to pass to parameter
1581
+ */
1582
+ export interface ParameterAttributes {
1583
+ /** name - The name of the custom parameter */
1584
+ name?: string;
1585
+ /** value - The value of the custom parameter */
1586
+ value?: string;
1587
+ }
1459
1588
  /**
1460
1589
  * Attributes to pass to config
1461
1590
  */
@@ -1502,6 +1631,25 @@ declare namespace VoiceResponse {
1502
1631
  */
1503
1632
  constructor(applicationSid: XMLElement);
1504
1633
  }
1634
+ export class Assistant extends TwiML {
1635
+ assistant: XMLElement;
1636
+ /**
1637
+ * <Assistant> TwiML Noun
1638
+ */
1639
+ constructor(assistant: XMLElement);
1640
+ /**
1641
+ * <Language> TwiML Noun
1642
+ *
1643
+ * @param attributes - TwiML attributes
1644
+ */
1645
+ language(attributes?: VoiceResponse.LanguageAttributes): VoiceResponse.Language;
1646
+ /**
1647
+ * <Parameter> TwiML Noun
1648
+ *
1649
+ * @param attributes - TwiML attributes
1650
+ */
1651
+ parameter(attributes?: VoiceResponse.ParameterAttributes): VoiceResponse.Parameter;
1652
+ }
1505
1653
  export class Autopilot extends TwiML {
1506
1654
  autopilot: XMLElement;
1507
1655
  /**
@@ -1550,6 +1698,12 @@ declare namespace VoiceResponse {
1550
1698
  * <Connect> TwiML Verb
1551
1699
  */
1552
1700
  constructor(connect: XMLElement);
1701
+ /**
1702
+ * <Assistant> TwiML Noun
1703
+ *
1704
+ * @param attributes - TwiML attributes
1705
+ */
1706
+ assistant(attributes?: VoiceResponse.AssistantAttributes): VoiceResponse.Assistant;
1553
1707
  /**
1554
1708
  * <Autopilot> TwiML Noun
1555
1709
  *
@@ -1564,6 +1718,12 @@ declare namespace VoiceResponse {
1564
1718
  * @param attributes - TwiML attributes
1565
1719
  */
1566
1720
  conversation(attributes?: VoiceResponse.ConversationAttributes): VoiceResponse.Conversation;
1721
+ /**
1722
+ * <ConversationRelay> TwiML Noun
1723
+ *
1724
+ * @param attributes - TwiML attributes
1725
+ */
1726
+ conversationRelay(attributes?: VoiceResponse.ConversationRelayAttributes): VoiceResponse.ConversationRelay;
1567
1727
  /**
1568
1728
  * <Room> TwiML Noun
1569
1729
  *
@@ -1592,6 +1752,25 @@ declare namespace VoiceResponse {
1592
1752
  */
1593
1753
  constructor(conversation: XMLElement);
1594
1754
  }
1755
+ export class ConversationRelay extends TwiML {
1756
+ conversationRelay: XMLElement;
1757
+ /**
1758
+ * <ConversationRelay> TwiML Noun
1759
+ */
1760
+ constructor(conversationRelay: XMLElement);
1761
+ /**
1762
+ * <Language> TwiML Noun
1763
+ *
1764
+ * @param attributes - TwiML attributes
1765
+ */
1766
+ language(attributes?: VoiceResponse.LanguageAttributes): VoiceResponse.Language;
1767
+ /**
1768
+ * <Parameter> TwiML Noun
1769
+ *
1770
+ * @param attributes - TwiML attributes
1771
+ */
1772
+ parameter(attributes?: VoiceResponse.ParameterAttributes): VoiceResponse.Parameter;
1773
+ }
1595
1774
  export class Dial extends TwiML {
1596
1775
  dial: XMLElement;
1597
1776
  /**
@@ -1726,6 +1905,13 @@ declare namespace VoiceResponse {
1726
1905
  */
1727
1906
  constructor(identity: XMLElement);
1728
1907
  }
1908
+ export class Language extends TwiML {
1909
+ language: XMLElement;
1910
+ /**
1911
+ * <Language> TwiML Noun
1912
+ */
1913
+ constructor(language: XMLElement);
1914
+ }
1729
1915
  export class Leave extends TwiML {
1730
1916
  leave: XMLElement;
1731
1917
  /**
@@ -233,6 +233,33 @@ class VoiceResponse extends TwiML_1.default {
233
233
  }
234
234
  }
235
235
  VoiceResponse.ApplicationSid = ApplicationSid;
236
+ class Assistant extends TwiML_1.default {
237
+ /**
238
+ * <Assistant> TwiML Noun
239
+ */
240
+ constructor(assistant) {
241
+ super();
242
+ this.assistant = assistant;
243
+ this._propertyName = "assistant";
244
+ }
245
+ /**
246
+ * <Language> TwiML Noun
247
+ *
248
+ * @param attributes - TwiML attributes
249
+ */
250
+ language(attributes) {
251
+ return new VoiceResponse.Language(this.assistant.ele("Language", attributes));
252
+ }
253
+ /**
254
+ * <Parameter> TwiML Noun
255
+ *
256
+ * @param attributes - TwiML attributes
257
+ */
258
+ parameter(attributes) {
259
+ return new VoiceResponse.Parameter(this.assistant.ele("Parameter", attributes));
260
+ }
261
+ }
262
+ VoiceResponse.Assistant = Assistant;
236
263
  class Autopilot extends TwiML_1.default {
237
264
  /**
238
265
  * <Autopilot> TwiML Noun
@@ -301,6 +328,14 @@ class VoiceResponse extends TwiML_1.default {
301
328
  this.connect = connect;
302
329
  this._propertyName = "connect";
303
330
  }
331
+ /**
332
+ * <Assistant> TwiML Noun
333
+ *
334
+ * @param attributes - TwiML attributes
335
+ */
336
+ assistant(attributes) {
337
+ return new VoiceResponse.Assistant(this.connect.ele("Assistant", attributes));
338
+ }
304
339
  autopilot(attributes, name) {
305
340
  if (typeof attributes === "string") {
306
341
  name = attributes;
@@ -316,6 +351,14 @@ class VoiceResponse extends TwiML_1.default {
316
351
  conversation(attributes) {
317
352
  return new VoiceResponse.Conversation(this.connect.ele("Conversation", attributes));
318
353
  }
354
+ /**
355
+ * <ConversationRelay> TwiML Noun
356
+ *
357
+ * @param attributes - TwiML attributes
358
+ */
359
+ conversationRelay(attributes) {
360
+ return new VoiceResponse.ConversationRelay(this.connect.ele("ConversationRelay", attributes));
361
+ }
319
362
  room(attributes, name) {
320
363
  if (typeof attributes === "string") {
321
364
  name = attributes;
@@ -352,6 +395,33 @@ class VoiceResponse extends TwiML_1.default {
352
395
  }
353
396
  }
354
397
  VoiceResponse.Conversation = Conversation;
398
+ class ConversationRelay extends TwiML_1.default {
399
+ /**
400
+ * <ConversationRelay> TwiML Noun
401
+ */
402
+ constructor(conversationRelay) {
403
+ super();
404
+ this.conversationRelay = conversationRelay;
405
+ this._propertyName = "conversationRelay";
406
+ }
407
+ /**
408
+ * <Language> TwiML Noun
409
+ *
410
+ * @param attributes - TwiML attributes
411
+ */
412
+ language(attributes) {
413
+ return new VoiceResponse.Language(this.conversationRelay.ele("Language", attributes));
414
+ }
415
+ /**
416
+ * <Parameter> TwiML Noun
417
+ *
418
+ * @param attributes - TwiML attributes
419
+ */
420
+ parameter(attributes) {
421
+ return new VoiceResponse.Parameter(this.conversationRelay.ele("Parameter", attributes));
422
+ }
423
+ }
424
+ VoiceResponse.ConversationRelay = ConversationRelay;
355
425
  class Dial extends TwiML_1.default {
356
426
  /**
357
427
  * <Dial> TwiML Verb
@@ -504,6 +574,17 @@ class VoiceResponse extends TwiML_1.default {
504
574
  }
505
575
  }
506
576
  VoiceResponse.Identity = Identity;
577
+ class Language extends TwiML_1.default {
578
+ /**
579
+ * <Language> TwiML Noun
580
+ */
581
+ constructor(language) {
582
+ super();
583
+ this.language = language;
584
+ this._propertyName = "language";
585
+ }
586
+ }
587
+ VoiceResponse.Language = Language;
507
588
  class Leave extends TwiML_1.default {
508
589
  /**
509
590
  * <Leave> TwiML Verb
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "5.3.5",
4
+ "version": "5.3.7",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {