diff --git a/lib/twiml/VoiceResponse.d.ts b/lib/twiml/VoiceResponse.d.ts index 23f100385d..249989a03f 100644 --- a/lib/twiml/VoiceResponse.d.ts +++ b/lib/twiml/VoiceResponse.d.ts @@ -205,6 +205,14 @@ declare namespace VoiceResponse { type ConferenceTrim = 'trim-silence'|'do-not-trim'; + type ConversationEvent = 'call-initiated'|'call-ringing'|'call-answered'|'call-completed'; + + type ConversationRecord = 'do-not-record'|'record-from-answer'|'record-from-ringing'|'record-from-answer-dual'|'record-from-ringing-dual'|'true'|'false'; + + type ConversationRecordingEvent = 'in-progress'|'completed'|'absent'; + + type ConversationTrim = 'trim-silence'|'do-not-trim'; + type DialRecord = 'do-not-record'|'record-from-answer'|'record-from-ringing'|'record-from-answer-dual'|'record-from-ringing-dual'; type DialRecordingEvent = 'in-progress'|'completed'|'absent'; @@ -249,9 +257,9 @@ declare namespace VoiceResponse { type RejectReason = 'rejected'|'busy'; - type SayLanguage = 'arb'|'ca-ES'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-CA'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-NZ'|'en-ZA'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fi-FI'|'fr-CA'|'fr-FR'|'hi-IN'|'is-IS'|'it-IT'|'ja-JP'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'|'zh-CN'|'zh-HK'|'zh-TW'; + type SayLanguage = 'arb'|'ca-ES'|'cy-GB'|'da-DK'|'de-DE'|'de-AT'|'en-AU'|'en-CA'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-NZ'|'en-ZA'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fi-FI'|'fr-CA'|'fr-FR'|'hi-IN'|'is-IS'|'it-IT'|'ja-JP'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'|'zh-CN'|'zh-HK'|'zh-TW'; - type SayVoice = 'man'|'woman'|'alice'|'Polly.Aditi'|'Polly.Amy'|'Polly.Astrid'|'Polly.Bianca'|'Polly.Brian'|'Polly.Camila'|'Polly.Carla'|'Polly.Carmen'|'Polly.Celine'|'Polly.Chantal'|'Polly.Conchita'|'Polly.Cristiano'|'Polly.Dora'|'Polly.Emma'|'Polly.Enrique'|'Polly.Ewa'|'Polly.Filiz'|'Polly.Geraint'|'Polly.Giorgio'|'Polly.Gwyneth'|'Polly.Hans'|'Polly.Ines'|'Polly.Ivy'|'Polly.Jacek'|'Polly.Jan'|'Polly.Joanna'|'Polly.Joey'|'Polly.Justin'|'Polly.Karl'|'Polly.Kendra'|'Polly.Kimberly'|'Polly.Lea'|'Polly.Liv'|'Polly.Lotte'|'Polly.Lucia'|'Polly.Lupe'|'Polly.Mads'|'Polly.Maja'|'Polly.Marlene'|'Polly.Mathieu'|'Polly.Matthew'|'Polly.Maxim'|'Polly.Mia'|'Polly.Miguel'|'Polly.Mizuki'|'Polly.Naja'|'Polly.Nicole'|'Polly.Penelope'|'Polly.Raveena'|'Polly.Ricardo'|'Polly.Ruben'|'Polly.Russell'|'Polly.Salli'|'Polly.Seoyeon'|'Polly.Takumi'|'Polly.Tatyana'|'Polly.Vicki'|'Polly.Vitoria'|'Polly.Zeina'|'Polly.Zhiyu'|'Polly.Amy-Neural'|'Polly.Emma-Neural'|'Polly.Brian-Neural'|'Polly.Salli-Neural'|'Polly.Ivy-Neural'|'Polly.Joanna-Neural'|'Polly.Kendra-Neural'|'Polly.Kimberly-Neural'|'Polly.Joey-Neural'|'Polly.Justin-Neural'|'Polly.Matthew-Neural'|'Polly.Camila-Neural'|'Polly.Lupe-Neural'|'Polly.Olivia-Neural'|'Polly.Kevin-Neural'|'Polly.Aria-Neural'|'Polly.Ayanda-Neural'|'Polly.Gabrielle-Neural'|'Polly.Lea-Neural'|'Polly.Vicki-Neural'|'Polly.Bianca-Neural'|'Polly.Takumi-Neural'|'Polly.Seoyeon-Neural'|'Polly.Lucia-Neural'; + type SayVoice = 'man'|'woman'|'alice'|'Polly.Aditi'|'Polly.Amy'|'Polly.Astrid'|'Polly.Bianca'|'Polly.Brian'|'Polly.Camila'|'Polly.Carla'|'Polly.Carmen'|'Polly.Celine'|'Polly.Chantal'|'Polly.Conchita'|'Polly.Cristiano'|'Polly.Dora'|'Polly.Emma'|'Polly.Enrique'|'Polly.Ewa'|'Polly.Filiz'|'Polly.Geraint'|'Polly.Giorgio'|'Polly.Gwyneth'|'Polly.Hans'|'Polly.Ines'|'Polly.Ivy'|'Polly.Jacek'|'Polly.Jan'|'Polly.Joanna'|'Polly.Joey'|'Polly.Justin'|'Polly.Karl'|'Polly.Kendra'|'Polly.Kimberly'|'Polly.Lea'|'Polly.Liv'|'Polly.Lotte'|'Polly.Lucia'|'Polly.Lupe'|'Polly.Mads'|'Polly.Maja'|'Polly.Marlene'|'Polly.Mathieu'|'Polly.Matthew'|'Polly.Maxim'|'Polly.Mia'|'Polly.Miguel'|'Polly.Mizuki'|'Polly.Naja'|'Polly.Nicole'|'Polly.Penelope'|'Polly.Raveena'|'Polly.Ricardo'|'Polly.Ruben'|'Polly.Russell'|'Polly.Salli'|'Polly.Seoyeon'|'Polly.Takumi'|'Polly.Tatyana'|'Polly.Vicki'|'Polly.Vitoria'|'Polly.Zeina'|'Polly.Zhiyu'|'Polly.Amy-Neural'|'Polly.Aria-Neural'|'Polly.Arlet-Neural'|'Polly.Arthur-Neural'|'Polly.Ayanda-Neural'|'Polly.Bianca-Neural'|'Polly.Brian-Neural'|'Polly.Camila-Neural'|'Polly.Daniel-Neural'|'Polly.Emma-Neural'|'Polly.Gabrielle-Neural'|'Polly.Hannah-Neural'|'Polly.Ines-Neural'|'Polly.Ivy-Neural'|'Polly.Joanna-Neural'|'Polly.Joey-Neural'|'Polly.Justin-Neural'|'Polly.Kajal-Neural'|'Polly.Kendra-Neural'|'Polly.Kevin-Neural'|'Polly.Kimberly-Neural'|'Polly.Lea-Neural'|'Polly.Liam-Neural'|'Polly.Lucia-Neural'|'Polly.Lupe-Neural'|'Polly.Matthew-Neural'|'Polly.Mia-Neural'|'Polly.Olivia-Neural'|'Polly.Pedro-Neural'|'Polly.Salli-Neural'|'Polly.Seoyeon-Neural'|'Polly.Takumi-Neural'|'Polly.Vicki-Neural'|'Polly.Vitoria-Neural'; type SipEvent = 'initiated'|'ringing'|'answered'|'completed'; @@ -261,7 +269,7 @@ declare namespace VoiceResponse { type SsmlEmphasisLevel = 'strong'|'moderate'|'reduced'; - type SsmlLangXmlLang = 'da-DK'|'nl-NL'|'en-AU'|'en-GB'|'en-IN'|'en-US'|'en-GB-WLS'|'fr-FR'|'fr-CA'|'de-DE'|'is-IS'|'it-IT'|'ja-JP'|'ko-KR'|'nb-NO'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'es-ES'|'es-US'|'sv-SE'|'tr-TR'|'cy-GB'; + type SsmlLangXmlLang = 'arb'|'ca-ES'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'de-AT'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-NZ'|'en-US'|'en-ZA'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'hi-IN'|'is-IS'|'it-IT'|'ja-JP'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'; type SsmlPhonemeAlphabet = 'ipa'|'x-sampa'; @@ -337,6 +345,17 @@ declare namespace VoiceResponse { waitUrl?: string; } + /** + * Options to pass to config + * + * @property name - The name of the custom config + * @property value - The value of the custom config + */ + export interface ConfigAttributes { + name?: string; + value?: string; + } + /** * Options to pass to connect * @@ -348,6 +367,37 @@ declare namespace VoiceResponse { method?: string; } + /** + * Options to pass to conversation + * + * @property inboundAutocreation - Inbound autocreation + * @property inboundTimeout - Inbound timeout + * @property record - Record + * @property recordingStatusCallback - Recording status callback URL + * @property recordingStatusCallbackEvent - Recording status callback events + * @property recordingStatusCallbackMethod - Recording status callback URL method + * @property routingAssignmentTimeout - Routing assignment timeout + * @property serviceInstanceSid - Service instance Sid + * @property statusCallback - Status callback URL + * @property statusCallbackEvent - Events to call status callback URL + * @property statusCallbackMethod - Status callback URL method + * @property trim - Trim + */ + export interface ConversationAttributes { + inboundAutocreation?: boolean; + inboundTimeout?: number; + record?: ConversationRecord; + recordingStatusCallback?: string; + recordingStatusCallbackEvent?: ConversationRecordingEvent[]; + recordingStatusCallbackMethod?: string; + routingAssignmentTimeout?: number; + serviceInstanceSid?: string; + statusCallback?: string; + statusCallbackEvent?: ConversationEvent[]; + statusCallbackMethod?: string; + trim?: ConversationTrim; + } + /** * Options to pass to dial * @@ -393,6 +443,7 @@ declare namespace VoiceResponse { * Options to pass to enqueue * * @property action - Action URL + * @property maxQueueSize - Maximum size of queue * @property method - Action URL method * @property waitUrl - Wait URL * @property waitUrlMethod - Wait URL method @@ -400,6 +451,7 @@ declare namespace VoiceResponse { */ export interface EnqueueAttributes { action?: string; + maxQueueSize?: number; method?: string; waitUrl?: string; waitUrlMethod?: string; @@ -646,7 +698,7 @@ declare namespace VoiceResponse { /** * Options to pass to say * - * @property language - Message langauge + * @property language - Message language * @property loop - Times to loop message * @property voice - Voice to use */ @@ -837,12 +889,14 @@ declare namespace VoiceResponse { * @property language - Language to be used by Dialogflow to transcribe speech * @property sentimentAnalysis - Whether sentiment analysis needs to be enabled or not * @property statusCallback - URL to post status callbacks from Twilio + * @property statusCallbackMethod - HTTP method to use when requesting the status callback URL */ export interface VirtualAgentAttributes { connectorName?: string; language?: string; sentimentAnalysis?: boolean; statusCallback?: string; + statusCallbackMethod?: string; } @@ -885,6 +939,12 @@ declare namespace VoiceResponse { * @param name - Autopilot assistant sid or unique name */ autopilot(attributes: object, name: string): void; + /** + * TwiML Noun + * + * @param attributes - TwiML attributes + */ + conversation(attributes?: VoiceResponse.ConversationAttributes): void; /** * TwiML Noun * @@ -909,7 +969,7 @@ declare namespace VoiceResponse { * * @param attributes - TwiML attributes */ - virtualAgent(attributes?: VoiceResponse.VirtualAgentAttributes): void; + virtualAgent(attributes?: VoiceResponse.VirtualAgentAttributes): VoiceResponse.VirtualAgent; } @@ -1107,19 +1167,6 @@ declare namespace VoiceResponse { class Refer { - /** - * TwiML Noun used in - * - * @param sipUrl - SIP URL - */ - referSip(sipUrl: string): void; - /** - * TwiML Noun used in - * - * @param attributes - TwiML attributes - * @param sipUrl - SIP URL - */ - referSip(attributes: object, sipUrl: string): void; /** * TwiML Noun used in * @@ -1236,128 +1283,118 @@ declare namespace VoiceResponse { */ sayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; /** - * Adding a Pause in + * Pronouncing Acronyms and Abbreviations in + * + * @param words - Words to be substituted + */ + sub(words: string): void; + /** + * Pronouncing Acronyms and Abbreviations in * * @param attributes - TwiML attributes + * @param words - Words to be substituted */ - ssmlBreak(attributes?: VoiceResponse.SsmlBreakAttributes): void; + sub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; /** - * Emphasizing Words in + * Improving Pronunciation by Specifying Parts of Speech in * - * @param words - Words to emphasize + * @param words - Words to speak */ - ssmlEmphasis(words: string): VoiceResponse.SsmlEmphasis; + w(words: string): VoiceResponse.SsmlW; /** - * Emphasizing Words in + * Improving Pronunciation by Specifying Parts of Speech in * * @param attributes - TwiML attributes - * @param words - Words to emphasize + * @param words - Words to speak */ - ssmlEmphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; + w(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; + } + + + class Siprec { + /** - * Specifying Another Language for Specific Words in + * TwiML Noun * - * @param words - Words to speak + * @param attributes - TwiML attributes */ - ssmlLang(words: string): VoiceResponse.SsmlLang; + parameter(attributes?: VoiceResponse.ParameterAttributes): void; + } + + + class SsmlEmphasis { + /** - * Specifying Another Language for Specific Words in + * Adding a Pause in * * @param attributes - TwiML attributes - * @param words - Words to speak */ - ssmlLang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; + break_(attributes?: VoiceResponse.SsmlBreakAttributes): void; /** - * Adding a Pause Between Paragraphs in + * Emphasizing Words in * - * @param words - Words to speak + * @param words - Words to emphasize */ - ssmlP(words: string): VoiceResponse.SsmlP; + emphasis(words: string): VoiceResponse.SsmlEmphasis; /** - * Adding a Pause Between Paragraphs in + * Emphasizing Words in * * @param attributes - TwiML attributes - * @param words - Words to speak + * @param words - Words to emphasize */ - ssmlP(attributes: object, words: string): VoiceResponse.SsmlP; + emphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; /** - * Using Phonetic Pronunciation in + * Specifying Another Language for Specific Words in * * @param words - Words to speak */ - ssmlPhoneme(words: string): void; + lang(words: string): VoiceResponse.SsmlLang; /** - * Using Phonetic Pronunciation in + * Specifying Another Language for Specific Words in * * @param attributes - TwiML attributes * @param words - Words to speak */ - ssmlPhoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; + lang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; /** - * Controling Volume, Speaking Rate, and Pitch in + * Using Phonetic Pronunciation in * * @param words - Words to speak */ - ssmlProsody(words: string): VoiceResponse.SsmlProsody; + phoneme(words: string): void; /** - * Controling Volume, Speaking Rate, and Pitch in + * Using Phonetic Pronunciation in * * @param attributes - TwiML attributes * @param words - Words to speak */ - ssmlProsody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; + phoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; /** - * Adding A Pause Between Sentences in + * Controling Volume, Speaking Rate, and Pitch in * * @param words - Words to speak */ - ssmlS(words: string): VoiceResponse.SsmlS; + prosody(words: string): VoiceResponse.SsmlProsody; /** - * Adding A Pause Between Sentences in + * Controling Volume, Speaking Rate, and Pitch in * * @param attributes - TwiML attributes * @param words - Words to speak */ - ssmlS(attributes: object, words: string): VoiceResponse.SsmlS; + prosody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; /** * Controlling How Special Types of Words Are Spoken in * * @param words - Words to be interpreted */ - ssmlSayAs(words: string): void; + sayAs(words: string): void; /** * Controlling How Special Types of Words Are Spoken in * * @param attributes - TwiML attributes * @param words - Words to be interpreted */ - ssmlSayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param words - Words to be substituted - */ - ssmlSub(words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param attributes - TwiML attributes - * @param words - Words to be substituted - */ - ssmlSub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param words - Words to speak - */ - ssmlW(words: string): VoiceResponse.SsmlW; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlW(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; + sayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; /** * Pronouncing Acronyms and Abbreviations in * @@ -1387,18 +1424,7 @@ declare namespace VoiceResponse { } - class Siprec { - - /** - * TwiML Noun - * - * @param attributes - TwiML attributes - */ - parameter(attributes?: VoiceResponse.ParameterAttributes): void; - } - - - class SsmlEmphasis { + class SsmlLang { /** * Adding a Pause in @@ -1432,6 +1458,19 @@ declare namespace VoiceResponse { * @param words - Words to speak */ lang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; + /** + * Adding a Pause Between Paragraphs in + * + * @param words - Words to speak + */ + p(words: string): VoiceResponse.SsmlP; + /** + * Adding a Pause Between Paragraphs in + * + * @param attributes - TwiML attributes + * @param words - Words to speak + */ + p(attributes: object, words: string): VoiceResponse.SsmlP; /** * Using Phonetic Pronunciation in * @@ -1458,6 +1497,19 @@ declare namespace VoiceResponse { * @param words - Words to speak */ prosody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; + /** + * Adding A Pause Between Sentences in + * + * @param words - Words to speak + */ + s(words: string): VoiceResponse.SsmlS; + /** + * Adding A Pause Between Sentences in + * + * @param attributes - TwiML attributes + * @param words - Words to speak + */ + s(attributes: object, words: string): VoiceResponse.SsmlS; /** * Controlling How Special Types of Words Are Spoken in * @@ -1471,103 +1523,121 @@ declare namespace VoiceResponse { * @param words - Words to be interpreted */ sayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; + /** + * Pronouncing Acronyms and Abbreviations in + * + * @param words - Words to be substituted + */ + sub(words: string): void; + /** + * Pronouncing Acronyms and Abbreviations in + * + * @param attributes - TwiML attributes + * @param words - Words to be substituted + */ + sub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; + /** + * Improving Pronunciation by Specifying Parts of Speech in + * + * @param words - Words to speak + */ + w(words: string): VoiceResponse.SsmlW; + /** + * Improving Pronunciation by Specifying Parts of Speech in + * + * @param attributes - TwiML attributes + * @param words - Words to speak + */ + w(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; + } + + + class SsmlP { + /** * Adding a Pause in * * @param attributes - TwiML attributes */ - ssmlBreak(attributes?: VoiceResponse.SsmlBreakAttributes): void; + break_(attributes?: VoiceResponse.SsmlBreakAttributes): void; /** * Emphasizing Words in * * @param words - Words to emphasize */ - ssmlEmphasis(words: string): VoiceResponse.SsmlEmphasis; + emphasis(words: string): VoiceResponse.SsmlEmphasis; /** * Emphasizing Words in * * @param attributes - TwiML attributes * @param words - Words to emphasize */ - ssmlEmphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; + emphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; /** * Specifying Another Language for Specific Words in * * @param words - Words to speak */ - ssmlLang(words: string): VoiceResponse.SsmlLang; + lang(words: string): VoiceResponse.SsmlLang; /** * Specifying Another Language for Specific Words in * * @param attributes - TwiML attributes * @param words - Words to speak */ - ssmlLang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; + lang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; /** * Using Phonetic Pronunciation in * * @param words - Words to speak */ - ssmlPhoneme(words: string): void; + phoneme(words: string): void; /** * Using Phonetic Pronunciation in * * @param attributes - TwiML attributes * @param words - Words to speak */ - ssmlPhoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; + phoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; /** * Controling Volume, Speaking Rate, and Pitch in * * @param words - Words to speak */ - ssmlProsody(words: string): VoiceResponse.SsmlProsody; + prosody(words: string): VoiceResponse.SsmlProsody; /** * Controling Volume, Speaking Rate, and Pitch in * * @param attributes - TwiML attributes * @param words - Words to speak */ - ssmlProsody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param words - Words to be interpreted - */ - ssmlSayAs(words: string): void; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param attributes - TwiML attributes - * @param words - Words to be interpreted - */ - ssmlSayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; + prosody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; /** - * Pronouncing Acronyms and Abbreviations in + * Adding A Pause Between Sentences in * - * @param words - Words to be substituted + * @param words - Words to speak */ - ssmlSub(words: string): void; + s(words: string): VoiceResponse.SsmlS; /** - * Pronouncing Acronyms and Abbreviations in + * Adding A Pause Between Sentences in * * @param attributes - TwiML attributes - * @param words - Words to be substituted + * @param words - Words to speak */ - ssmlSub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; + s(attributes: object, words: string): VoiceResponse.SsmlS; /** - * Improving Pronunciation by Specifying Parts of Speech in + * Controlling How Special Types of Words Are Spoken in * - * @param words - Words to speak + * @param words - Words to be interpreted */ - ssmlW(words: string): VoiceResponse.SsmlW; + sayAs(words: string): void; /** - * Improving Pronunciation by Specifying Parts of Speech in + * Controlling How Special Types of Words Are Spoken in * * @param attributes - TwiML attributes - * @param words - Words to speak + * @param words - Words to be interpreted */ - ssmlW(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; + sayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; /** * Pronouncing Acronyms and Abbreviations in * @@ -1597,7 +1667,7 @@ declare namespace VoiceResponse { } - class SsmlLang { + class SsmlProsody { /** * Adding a Pause in @@ -1697,617 +1767,18 @@ declare namespace VoiceResponse { */ sayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; /** - * Adding a Pause in + * Pronouncing Acronyms and Abbreviations in * - * @param attributes - TwiML attributes + * @param words - Words to be substituted */ - ssmlBreak(attributes?: VoiceResponse.SsmlBreakAttributes): void; + sub(words: string): void; /** - * Emphasizing Words in + * Pronouncing Acronyms and Abbreviations in * - * @param words - Words to emphasize + * @param attributes - TwiML attributes + * @param words - Words to be substituted */ - ssmlEmphasis(words: string): VoiceResponse.SsmlEmphasis; - /** - * Emphasizing Words in - * - * @param attributes - TwiML attributes - * @param words - Words to emphasize - */ - ssmlEmphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; - /** - * Specifying Another Language for Specific Words in - * - * @param words - Words to speak - */ - ssmlLang(words: string): VoiceResponse.SsmlLang; - /** - * Specifying Another Language for Specific Words in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlLang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; - /** - * Adding a Pause Between Paragraphs in - * - * @param words - Words to speak - */ - ssmlP(words: string): VoiceResponse.SsmlP; - /** - * Adding a Pause Between Paragraphs in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlP(attributes: object, words: string): VoiceResponse.SsmlP; - /** - * Using Phonetic Pronunciation in - * - * @param words - Words to speak - */ - ssmlPhoneme(words: string): void; - /** - * Using Phonetic Pronunciation in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlPhoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param words - Words to speak - */ - ssmlProsody(words: string): VoiceResponse.SsmlProsody; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlProsody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; - /** - * Adding A Pause Between Sentences in - * - * @param words - Words to speak - */ - ssmlS(words: string): VoiceResponse.SsmlS; - /** - * Adding A Pause Between Sentences in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlS(attributes: object, words: string): VoiceResponse.SsmlS; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param words - Words to be interpreted - */ - ssmlSayAs(words: string): void; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param attributes - TwiML attributes - * @param words - Words to be interpreted - */ - ssmlSayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param words - Words to be substituted - */ - ssmlSub(words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param attributes - TwiML attributes - * @param words - Words to be substituted - */ - ssmlSub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param words - Words to speak - */ - ssmlW(words: string): VoiceResponse.SsmlW; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlW(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param words - Words to be substituted - */ - sub(words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param attributes - TwiML attributes - * @param words - Words to be substituted - */ - sub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param words - Words to speak - */ - w(words: string): VoiceResponse.SsmlW; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - w(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; - } - - - class SsmlP { - - /** - * Adding a Pause in - * - * @param attributes - TwiML attributes - */ - break_(attributes?: VoiceResponse.SsmlBreakAttributes): void; - /** - * Emphasizing Words in - * - * @param words - Words to emphasize - */ - emphasis(words: string): VoiceResponse.SsmlEmphasis; - /** - * Emphasizing Words in - * - * @param attributes - TwiML attributes - * @param words - Words to emphasize - */ - emphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; - /** - * Specifying Another Language for Specific Words in - * - * @param words - Words to speak - */ - lang(words: string): VoiceResponse.SsmlLang; - /** - * Specifying Another Language for Specific Words in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - lang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; - /** - * Using Phonetic Pronunciation in - * - * @param words - Words to speak - */ - phoneme(words: string): void; - /** - * Using Phonetic Pronunciation in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - phoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param words - Words to speak - */ - prosody(words: string): VoiceResponse.SsmlProsody; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - prosody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; - /** - * Adding A Pause Between Sentences in - * - * @param words - Words to speak - */ - s(words: string): VoiceResponse.SsmlS; - /** - * Adding A Pause Between Sentences in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - s(attributes: object, words: string): VoiceResponse.SsmlS; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param words - Words to be interpreted - */ - sayAs(words: string): void; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param attributes - TwiML attributes - * @param words - Words to be interpreted - */ - sayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Adding a Pause in - * - * @param attributes - TwiML attributes - */ - ssmlBreak(attributes?: VoiceResponse.SsmlBreakAttributes): void; - /** - * Emphasizing Words in - * - * @param words - Words to emphasize - */ - ssmlEmphasis(words: string): VoiceResponse.SsmlEmphasis; - /** - * Emphasizing Words in - * - * @param attributes - TwiML attributes - * @param words - Words to emphasize - */ - ssmlEmphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; - /** - * Specifying Another Language for Specific Words in - * - * @param words - Words to speak - */ - ssmlLang(words: string): VoiceResponse.SsmlLang; - /** - * Specifying Another Language for Specific Words in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlLang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; - /** - * Using Phonetic Pronunciation in - * - * @param words - Words to speak - */ - ssmlPhoneme(words: string): void; - /** - * Using Phonetic Pronunciation in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlPhoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param words - Words to speak - */ - ssmlProsody(words: string): VoiceResponse.SsmlProsody; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlProsody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; - /** - * Adding A Pause Between Sentences in - * - * @param words - Words to speak - */ - ssmlS(words: string): VoiceResponse.SsmlS; - /** - * Adding A Pause Between Sentences in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlS(attributes: object, words: string): VoiceResponse.SsmlS; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param words - Words to be interpreted - */ - ssmlSayAs(words: string): void; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param attributes - TwiML attributes - * @param words - Words to be interpreted - */ - ssmlSayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param words - Words to be substituted - */ - ssmlSub(words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param attributes - TwiML attributes - * @param words - Words to be substituted - */ - ssmlSub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param words - Words to speak - */ - ssmlW(words: string): VoiceResponse.SsmlW; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlW(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param words - Words to be substituted - */ - sub(words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param attributes - TwiML attributes - * @param words - Words to be substituted - */ - sub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param words - Words to speak - */ - w(words: string): VoiceResponse.SsmlW; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - w(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; - } - - - class SsmlProsody { - - /** - * Adding a Pause in - * - * @param attributes - TwiML attributes - */ - break_(attributes?: VoiceResponse.SsmlBreakAttributes): void; - /** - * Emphasizing Words in - * - * @param words - Words to emphasize - */ - emphasis(words: string): VoiceResponse.SsmlEmphasis; - /** - * Emphasizing Words in - * - * @param attributes - TwiML attributes - * @param words - Words to emphasize - */ - emphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; - /** - * Specifying Another Language for Specific Words in - * - * @param words - Words to speak - */ - lang(words: string): VoiceResponse.SsmlLang; - /** - * Specifying Another Language for Specific Words in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - lang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; - /** - * Adding a Pause Between Paragraphs in - * - * @param words - Words to speak - */ - p(words: string): VoiceResponse.SsmlP; - /** - * Adding a Pause Between Paragraphs in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - p(attributes: object, words: string): VoiceResponse.SsmlP; - /** - * Using Phonetic Pronunciation in - * - * @param words - Words to speak - */ - phoneme(words: string): void; - /** - * Using Phonetic Pronunciation in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - phoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param words - Words to speak - */ - prosody(words: string): VoiceResponse.SsmlProsody; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - prosody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; - /** - * Adding A Pause Between Sentences in - * - * @param words - Words to speak - */ - s(words: string): VoiceResponse.SsmlS; - /** - * Adding A Pause Between Sentences in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - s(attributes: object, words: string): VoiceResponse.SsmlS; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param words - Words to be interpreted - */ - sayAs(words: string): void; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param attributes - TwiML attributes - * @param words - Words to be interpreted - */ - sayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Adding a Pause in - * - * @param attributes - TwiML attributes - */ - ssmlBreak(attributes?: VoiceResponse.SsmlBreakAttributes): void; - /** - * Emphasizing Words in - * - * @param words - Words to emphasize - */ - ssmlEmphasis(words: string): VoiceResponse.SsmlEmphasis; - /** - * Emphasizing Words in - * - * @param attributes - TwiML attributes - * @param words - Words to emphasize - */ - ssmlEmphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; - /** - * Specifying Another Language for Specific Words in - * - * @param words - Words to speak - */ - ssmlLang(words: string): VoiceResponse.SsmlLang; - /** - * Specifying Another Language for Specific Words in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlLang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; - /** - * Adding a Pause Between Paragraphs in - * - * @param words - Words to speak - */ - ssmlP(words: string): VoiceResponse.SsmlP; - /** - * Adding a Pause Between Paragraphs in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlP(attributes: object, words: string): VoiceResponse.SsmlP; - /** - * Using Phonetic Pronunciation in - * - * @param words - Words to speak - */ - ssmlPhoneme(words: string): void; - /** - * Using Phonetic Pronunciation in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlPhoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param words - Words to speak - */ - ssmlProsody(words: string): VoiceResponse.SsmlProsody; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlProsody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; - /** - * Adding A Pause Between Sentences in - * - * @param words - Words to speak - */ - ssmlS(words: string): VoiceResponse.SsmlS; - /** - * Adding A Pause Between Sentences in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlS(attributes: object, words: string): VoiceResponse.SsmlS; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param words - Words to be interpreted - */ - ssmlSayAs(words: string): void; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param attributes - TwiML attributes - * @param words - Words to be interpreted - */ - ssmlSayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param words - Words to be substituted - */ - ssmlSub(words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param attributes - TwiML attributes - * @param words - Words to be substituted - */ - ssmlSub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param words - Words to speak - */ - ssmlW(words: string): VoiceResponse.SsmlW; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlW(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param words - Words to be substituted - */ - sub(words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param attributes - TwiML attributes - * @param words - Words to be substituted - */ - sub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; + sub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; /** * Improving Pronunciation by Specifying Parts of Speech in * @@ -2397,103 +1868,6 @@ declare namespace VoiceResponse { * @param words - Words to be interpreted */ sayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Adding a Pause in - * - * @param attributes - TwiML attributes - */ - ssmlBreak(attributes?: VoiceResponse.SsmlBreakAttributes): void; - /** - * Emphasizing Words in - * - * @param words - Words to emphasize - */ - ssmlEmphasis(words: string): VoiceResponse.SsmlEmphasis; - /** - * Emphasizing Words in - * - * @param attributes - TwiML attributes - * @param words - Words to emphasize - */ - ssmlEmphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; - /** - * Specifying Another Language for Specific Words in - * - * @param words - Words to speak - */ - ssmlLang(words: string): VoiceResponse.SsmlLang; - /** - * Specifying Another Language for Specific Words in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlLang(attributes: VoiceResponse.SsmlLangAttributes, words: string): VoiceResponse.SsmlLang; - /** - * Using Phonetic Pronunciation in - * - * @param words - Words to speak - */ - ssmlPhoneme(words: string): void; - /** - * Using Phonetic Pronunciation in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlPhoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param words - Words to speak - */ - ssmlProsody(words: string): VoiceResponse.SsmlProsody; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlProsody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param words - Words to be interpreted - */ - ssmlSayAs(words: string): void; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param attributes - TwiML attributes - * @param words - Words to be interpreted - */ - ssmlSayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param words - Words to be substituted - */ - ssmlSub(words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param attributes - TwiML attributes - * @param words - Words to be substituted - */ - ssmlSub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param words - Words to speak - */ - ssmlW(words: string): VoiceResponse.SsmlW; - /** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlW(attributes: VoiceResponse.SsmlWAttributes, words: string): VoiceResponse.SsmlW; /** * Pronouncing Acronyms and Abbreviations in * @@ -2583,77 +1957,6 @@ declare namespace VoiceResponse { * @param words - Words to be interpreted */ sayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Adding a Pause in - * - * @param attributes - TwiML attributes - */ - ssmlBreak(attributes?: VoiceResponse.SsmlBreakAttributes): void; - /** - * Emphasizing Words in - * - * @param words - Words to emphasize - */ - ssmlEmphasis(words: string): VoiceResponse.SsmlEmphasis; - /** - * Emphasizing Words in - * - * @param attributes - TwiML attributes - * @param words - Words to emphasize - */ - ssmlEmphasis(attributes: VoiceResponse.SsmlEmphasisAttributes, words: string): VoiceResponse.SsmlEmphasis; - /** - * Using Phonetic Pronunciation in - * - * @param words - Words to speak - */ - ssmlPhoneme(words: string): void; - /** - * Using Phonetic Pronunciation in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlPhoneme(attributes: VoiceResponse.SsmlPhonemeAttributes, words: string): void; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param words - Words to speak - */ - ssmlProsody(words: string): VoiceResponse.SsmlProsody; - /** - * Controling Volume, Speaking Rate, and Pitch in - * - * @param attributes - TwiML attributes - * @param words - Words to speak - */ - ssmlProsody(attributes: VoiceResponse.SsmlProsodyAttributes, words: string): VoiceResponse.SsmlProsody; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param words - Words to be interpreted - */ - ssmlSayAs(words: string): void; - /** - * Controlling How Special Types of Words Are Spoken in - * - * @param attributes - TwiML attributes - * @param words - Words to be interpreted - */ - ssmlSayAs(attributes: VoiceResponse.SsmlSayAsAttributes, words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param words - Words to be substituted - */ - ssmlSub(words: string): void; - /** - * Pronouncing Acronyms and Abbreviations in - * - * @param attributes - TwiML attributes - * @param words - Words to be substituted - */ - ssmlSub(attributes: VoiceResponse.SsmlSubAttributes, words: string): void; /** * Pronouncing Acronyms and Abbreviations in * @@ -2713,6 +2016,23 @@ declare namespace VoiceResponse { */ parameter(attributes?: VoiceResponse.ParameterAttributes): void; } + + + class VirtualAgent { + + /** + * TwiML Noun + * + * @param attributes - TwiML attributes + */ + config(attributes?: VoiceResponse.ConfigAttributes): void; + /** + * TwiML Noun + * + * @param attributes - TwiML attributes + */ + parameter(attributes?: VoiceResponse.ParameterAttributes): void; + } } export = VoiceResponse; diff --git a/lib/twiml/VoiceResponse.js b/lib/twiml/VoiceResponse.js index 73e1955af4..d6ce2f5d83 100644 --- a/lib/twiml/VoiceResponse.js +++ b/lib/twiml/VoiceResponse.js @@ -9,7 +9,6 @@ */ /* jshint ignore:end */ -var util = require('util'); /* jshint ignore:line */ var TwiML = require('./TwiML'); /* jshint ignore:line */ @@ -114,6 +113,7 @@ VoiceResponse.prototype.echo = function echo(attributes) { * * @param {object} [attributes] - TwiML attributes * @param {string} [attributes.action] - Action URL + * @param {number} [attributes.maxQueueSize] - Maximum size of queue * @param {string} [attributes.method] - Action URL method * @param {string} [attributes.waitUrl] - Wait URL * @param {string} [attributes.waitUrlMethod] - Wait URL method @@ -329,7 +329,7 @@ VoiceResponse.prototype.reject = function reject(attributes) { * @param {object} attributes - TwiML attributes * @param {say.voice} [attributes.voice] - Voice to use * @param {number} [attributes.loop] - Times to loop message - * @param {say.language} [attributes.language] - Message langauge + * @param {say.language} [attributes.language] - Message language * @param {string} message - Message to say * * @returns Say @@ -511,25 +511,6 @@ Refer.prototype.sip = function sip(attributes, sipUrl) { return new ReferSip(this.refer.ele('Sip', attributes, sipUrl)); }; -/* jshint ignore:start */ -/** - * TwiML Noun used in - * - * @function referSip - * @memberof Refer# - * @deprecated - Use sip() instead. - * - * @param {object} attributes - TwiML attributes - * @param {url} sipUrl - SIP URL - * - * @returns ReferSip - */ -/* jshint ignore:end */ -Refer.prototype.referSip = util.deprecate(function referSip(attributes, sipUrl) - { - return this.sip(attributes, sipUrl); -}, 'referSip() is deprecated. Use sip() instead.'); - /* jshint ignore:start */ /** @@ -792,7 +773,7 @@ Prompt.prototype.constructor = Prompt; * @param {object} attributes - TwiML attributes * @param {say.voice} [attributes.voice] - Voice to use * @param {number} [attributes.loop] - Times to loop message - * @param {say.language} [attributes.language] - Message langauge + * @param {say.language} [attributes.language] - Message language * @param {string} message - Message to say * * @returns Say @@ -912,27 +893,6 @@ Say.prototype.break_ = function break_(attributes) { return new SsmlBreak(this.say.ele('break', attributes)); }; -/* jshint ignore:start */ -/** - * Adding a Pause in - * - * @function ssmlBreak - * @memberof Say# - * @deprecated - Use break_() instead. - * - * @param {object} [attributes] - TwiML attributes - * @param {ssml_break.strength} [attributes.strength] - - * Set a pause based on strength - * @param {string} [attributes.time] - - * Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms - * - * @returns SsmlBreak - */ -/* jshint ignore:end */ -Say.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) { - return this.break_(attributes); -}, 'ssmlBreak() is deprecated. Use break_() instead.'); - /* jshint ignore:start */ /** * Emphasizing Words in @@ -951,26 +911,6 @@ Say.prototype.emphasis = function emphasis(attributes, words) { return new SsmlEmphasis(this.say.ele('emphasis', attributes, words)); }; -/* jshint ignore:start */ -/** - * Emphasizing Words in - * - * @function ssmlEmphasis - * @memberof Say# - * @deprecated - Use emphasis() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis - * @param {string} words - Words to emphasize - * - * @returns SsmlEmphasis - */ -/* jshint ignore:end */ -Say.prototype.ssmlEmphasis = util.deprecate(function ssmlEmphasis(attributes, - words) { - return this.emphasis(attributes, words); -}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.'); - /* jshint ignore:start */ /** * Specifying Another Language for Specific Words in @@ -989,25 +929,6 @@ Say.prototype.lang = function lang(attributes, words) { return new SsmlLang(this.say.ele('lang', attributes, words)); }; -/* jshint ignore:start */ -/** - * Specifying Another Language for Specific Words in - * - * @function ssmlLang - * @memberof Say# - * @deprecated - Use lang() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language - * @param {string} words - Words to speak - * - * @returns SsmlLang - */ -/* jshint ignore:end */ -Say.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, words) { - return this.lang(attributes, words); -}, 'ssmlLang() is deprecated. Use lang() instead.'); - /* jshint ignore:start */ /** * Adding a Pause Between Paragraphs in @@ -1025,24 +946,6 @@ Say.prototype.p = function p(attributes, words) { return new SsmlP(this.say.ele('p', attributes, words)); }; -/* jshint ignore:start */ -/** - * Adding a Pause Between Paragraphs in - * - * @function ssmlP - * @memberof Say# - * @deprecated - Use p() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} words - Words to speak - * - * @returns SsmlP - */ -/* jshint ignore:end */ -Say.prototype.ssmlP = util.deprecate(function ssmlP(attributes, words) { - return this.p(attributes, words); -}, 'ssmlP() is deprecated. Use p() instead.'); - /* jshint ignore:start */ /** * Using Phonetic Pronunciation in @@ -1064,29 +967,6 @@ Say.prototype.phoneme = function phoneme(attributes, words) { return new SsmlPhoneme(this.say.ele('phoneme', attributes, words)); }; -/* jshint ignore:start */ -/** - * Using Phonetic Pronunciation in - * - * @function ssmlPhoneme - * @memberof Say# - * @deprecated - Use phoneme() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_phoneme.alphabet} [attributes.alphabet] - - * Specify the phonetic alphabet - * @param {string} [attributes.ph] - - * Specifiy the phonetic symbols for pronunciation - * @param {string} words - Words to speak - * - * @returns SsmlPhoneme - */ -/* jshint ignore:end */ -Say.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes, - words) { - return this.phoneme(attributes, words); -}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.'); - /* jshint ignore:start */ /** * Controling Volume, Speaking Rate, and Pitch in @@ -1110,31 +990,6 @@ Say.prototype.prosody = function prosody(attributes, words) { return new SsmlProsody(this.say.ele('prosody', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controling Volume, Speaking Rate, and Pitch in - * - * @function ssmlProsody - * @memberof Say# - * @deprecated - Use prosody() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.volume] - - * Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB - * @param {string} [attributes.rate] - - * Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n% - * @param {string} [attributes.pitch] - - * Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n% - * @param {string} words - Words to speak - * - * @returns SsmlProsody - */ -/* jshint ignore:end */ -Say.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes, - words) { - return this.prosody(attributes, words); -}, 'ssmlProsody() is deprecated. Use prosody() instead.'); - /* jshint ignore:start */ /** * Adding A Pause Between Sentences in @@ -1152,24 +1007,6 @@ Say.prototype.s = function s(attributes, words) { return new SsmlS(this.say.ele('s', attributes, words)); }; -/* jshint ignore:start */ -/** - * Adding A Pause Between Sentences in - * - * @function ssmlS - * @memberof Say# - * @deprecated - Use s() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} words - Words to speak - * - * @returns SsmlS - */ -/* jshint ignore:end */ -Say.prototype.ssmlS = util.deprecate(function ssmlS(attributes, words) { - return this.s(attributes, words); -}, 'ssmlS() is deprecated. Use s() instead.'); - /* jshint ignore:start */ /** * Controlling How Special Types of Words Are Spoken in @@ -1191,28 +1028,6 @@ Say.prototype.sayAs = function sayAs(attributes, words) { return new SsmlSayAs(this.say.ele('say-as', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controlling How Special Types of Words Are Spoken in - * - * @function ssmlSayAs - * @memberof Say# - * @deprecated - Use sayAs() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_say_as.interpret_as} [attributes.interpret- - * as] - Specify the type of words are spoken - * @param {ssml_say_as.role} [attributes.role] - - * Specify the format of the date when interpret-as is set to date - * @param {string} words - Words to be interpreted - * - * @returns SsmlSayAs - */ -/* jshint ignore:end */ -Say.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, words) { - return this.sayAs(attributes, words); -}, 'ssmlSayAs() is deprecated. Use sayAs() instead.'); - /* jshint ignore:start */ /** * Pronouncing Acronyms and Abbreviations in @@ -1232,26 +1047,6 @@ Say.prototype.sub = function sub(attributes, words) { return new SsmlSub(this.say.ele('sub', attributes, words)); }; -/* jshint ignore:start */ -/** - * Pronouncing Acronyms and Abbreviations in - * - * @function ssmlSub - * @memberof Say# - * @deprecated - Use sub() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.alias] - - * Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation - * @param {string} words - Words to be substituted - * - * @returns SsmlSub - */ -/* jshint ignore:end */ -Say.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words) { - return this.sub(attributes, words); -}, 'ssmlSub() is deprecated. Use sub() instead.'); - /* jshint ignore:start */ /** * Improving Pronunciation by Specifying Parts of Speech in @@ -1271,26 +1066,6 @@ Say.prototype.w = function w(attributes, words) { return new SsmlW(this.say.ele('w', attributes, words)); }; -/* jshint ignore:start */ -/** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @function ssmlW - * @memberof Say# - * @deprecated - Use w() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.role] - - * Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning - * @param {string} words - Words to speak - * - * @returns SsmlW - */ -/* jshint ignore:end */ -Say.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) { - return this.w(attributes, words); -}, 'ssmlW() is deprecated. Use w() instead.'); - /* jshint ignore:start */ /** @@ -1330,27 +1105,6 @@ SsmlW.prototype.break_ = function break_(attributes) { return new SsmlBreak(this.w.ele('break', attributes)); }; -/* jshint ignore:start */ -/** - * Adding a Pause in - * - * @function ssmlBreak - * @memberof SsmlW# - * @deprecated - Use break_() instead. - * - * @param {object} [attributes] - TwiML attributes - * @param {ssml_break.strength} [attributes.strength] - - * Set a pause based on strength - * @param {string} [attributes.time] - - * Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms - * - * @returns SsmlBreak - */ -/* jshint ignore:end */ -SsmlW.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) { - return this.break_(attributes); -}, 'ssmlBreak() is deprecated. Use break_() instead.'); - /* jshint ignore:start */ /** * Emphasizing Words in @@ -1369,26 +1123,6 @@ SsmlW.prototype.emphasis = function emphasis(attributes, words) { return new SsmlEmphasis(this.w.ele('emphasis', attributes, words)); }; -/* jshint ignore:start */ -/** - * Emphasizing Words in - * - * @function ssmlEmphasis - * @memberof SsmlW# - * @deprecated - Use emphasis() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis - * @param {string} words - Words to emphasize - * - * @returns SsmlEmphasis - */ -/* jshint ignore:end */ -SsmlW.prototype.ssmlEmphasis = util.deprecate(function ssmlEmphasis(attributes, - words) { - return this.emphasis(attributes, words); -}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.'); - /* jshint ignore:start */ /** * Using Phonetic Pronunciation in @@ -1410,29 +1144,6 @@ SsmlW.prototype.phoneme = function phoneme(attributes, words) { return new SsmlPhoneme(this.w.ele('phoneme', attributes, words)); }; -/* jshint ignore:start */ -/** - * Using Phonetic Pronunciation in - * - * @function ssmlPhoneme - * @memberof SsmlW# - * @deprecated - Use phoneme() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_phoneme.alphabet} [attributes.alphabet] - - * Specify the phonetic alphabet - * @param {string} [attributes.ph] - - * Specifiy the phonetic symbols for pronunciation - * @param {string} words - Words to speak - * - * @returns SsmlPhoneme - */ -/* jshint ignore:end */ -SsmlW.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes, - words) { - return this.phoneme(attributes, words); -}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.'); - /* jshint ignore:start */ /** * Controling Volume, Speaking Rate, and Pitch in @@ -1456,31 +1167,6 @@ SsmlW.prototype.prosody = function prosody(attributes, words) { return new SsmlProsody(this.w.ele('prosody', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controling Volume, Speaking Rate, and Pitch in - * - * @function ssmlProsody - * @memberof SsmlW# - * @deprecated - Use prosody() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.volume] - - * Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB - * @param {string} [attributes.rate] - - * Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n% - * @param {string} [attributes.pitch] - - * Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n% - * @param {string} words - Words to speak - * - * @returns SsmlProsody - */ -/* jshint ignore:end */ -SsmlW.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes, - words) { - return this.prosody(attributes, words); -}, 'ssmlProsody() is deprecated. Use prosody() instead.'); - /* jshint ignore:start */ /** * Controlling How Special Types of Words Are Spoken in @@ -1502,29 +1188,6 @@ SsmlW.prototype.sayAs = function sayAs(attributes, words) { return new SsmlSayAs(this.w.ele('say-as', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controlling How Special Types of Words Are Spoken in - * - * @function ssmlSayAs - * @memberof SsmlW# - * @deprecated - Use sayAs() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_say_as.interpret_as} [attributes.interpret- - * as] - Specify the type of words are spoken - * @param {ssml_say_as.role} [attributes.role] - - * Specify the format of the date when interpret-as is set to date - * @param {string} words - Words to be interpreted - * - * @returns SsmlSayAs - */ -/* jshint ignore:end */ -SsmlW.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, words) - { - return this.sayAs(attributes, words); -}, 'ssmlSayAs() is deprecated. Use sayAs() instead.'); - /* jshint ignore:start */ /** * Pronouncing Acronyms and Abbreviations in @@ -1544,32 +1207,12 @@ SsmlW.prototype.sub = function sub(attributes, words) { return new SsmlSub(this.w.ele('sub', attributes, words)); }; + /* jshint ignore:start */ /** * Pronouncing Acronyms and Abbreviations in * - * @function ssmlSub - * @memberof SsmlW# - * @deprecated - Use sub() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.alias] - - * Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation - * @param {string} words - Words to be substituted - * - * @returns SsmlSub - */ -/* jshint ignore:end */ -SsmlW.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words) { - return this.sub(attributes, words); -}, 'ssmlSub() is deprecated. Use sub() instead.'); - - -/* jshint ignore:start */ -/** - * Pronouncing Acronyms and Abbreviations in - * - * @constructor SsmlSub + * @constructor SsmlSub * * @param {object} ssmlSub - Pronouncing Acronyms and Abbreviations in */ @@ -1640,28 +1283,6 @@ SsmlProsody.prototype.break_ = function break_(attributes) { return new SsmlBreak(this.prosody.ele('break', attributes)); }; -/* jshint ignore:start */ -/** - * Adding a Pause in - * - * @function ssmlBreak - * @memberof SsmlProsody# - * @deprecated - Use break_() instead. - * - * @param {object} [attributes] - TwiML attributes - * @param {ssml_break.strength} [attributes.strength] - - * Set a pause based on strength - * @param {string} [attributes.time] - - * Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms - * - * @returns SsmlBreak - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) - { - return this.break_(attributes); -}, 'ssmlBreak() is deprecated. Use break_() instead.'); - /* jshint ignore:start */ /** * Emphasizing Words in @@ -1680,26 +1301,6 @@ SsmlProsody.prototype.emphasis = function emphasis(attributes, words) { return new SsmlEmphasis(this.prosody.ele('emphasis', attributes, words)); }; -/* jshint ignore:start */ -/** - * Emphasizing Words in - * - * @function ssmlEmphasis - * @memberof SsmlProsody# - * @deprecated - Use emphasis() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis - * @param {string} words - Words to emphasize - * - * @returns SsmlEmphasis - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlEmphasis = util.deprecate(function - ssmlEmphasis(attributes, words) { - return this.emphasis(attributes, words); -}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.'); - /* jshint ignore:start */ /** * Specifying Another Language for Specific Words in @@ -1718,26 +1319,6 @@ SsmlProsody.prototype.lang = function lang(attributes, words) { return new SsmlLang(this.prosody.ele('lang', attributes, words)); }; -/* jshint ignore:start */ -/** - * Specifying Another Language for Specific Words in - * - * @function ssmlLang - * @memberof SsmlProsody# - * @deprecated - Use lang() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language - * @param {string} words - Words to speak - * - * @returns SsmlLang - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, - words) { - return this.lang(attributes, words); -}, 'ssmlLang() is deprecated. Use lang() instead.'); - /* jshint ignore:start */ /** * Adding a Pause Between Paragraphs in @@ -1755,24 +1336,6 @@ SsmlProsody.prototype.p = function p(attributes, words) { return new SsmlP(this.prosody.ele('p', attributes, words)); }; -/* jshint ignore:start */ -/** - * Adding a Pause Between Paragraphs in - * - * @function ssmlP - * @memberof SsmlProsody# - * @deprecated - Use p() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} words - Words to speak - * - * @returns SsmlP - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlP = util.deprecate(function ssmlP(attributes, words) { - return this.p(attributes, words); -}, 'ssmlP() is deprecated. Use p() instead.'); - /* jshint ignore:start */ /** * Using Phonetic Pronunciation in @@ -1794,29 +1357,6 @@ SsmlProsody.prototype.phoneme = function phoneme(attributes, words) { return new SsmlPhoneme(this.prosody.ele('phoneme', attributes, words)); }; -/* jshint ignore:start */ -/** - * Using Phonetic Pronunciation in - * - * @function ssmlPhoneme - * @memberof SsmlProsody# - * @deprecated - Use phoneme() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_phoneme.alphabet} [attributes.alphabet] - - * Specify the phonetic alphabet - * @param {string} [attributes.ph] - - * Specifiy the phonetic symbols for pronunciation - * @param {string} words - Words to speak - * - * @returns SsmlPhoneme - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlPhoneme = util.deprecate(function - ssmlPhoneme(attributes, words) { - return this.phoneme(attributes, words); -}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.'); - /* jshint ignore:start */ /** * Controling Volume, Speaking Rate, and Pitch in @@ -1840,31 +1380,6 @@ SsmlProsody.prototype.prosody = function prosody(attributes, words) { return new SsmlProsody(this.prosody.ele('prosody', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controling Volume, Speaking Rate, and Pitch in - * - * @function ssmlProsody - * @memberof SsmlProsody# - * @deprecated - Use prosody() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.volume] - - * Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB - * @param {string} [attributes.rate] - - * Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n% - * @param {string} [attributes.pitch] - - * Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n% - * @param {string} words - Words to speak - * - * @returns SsmlProsody - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlProsody = util.deprecate(function - ssmlProsody(attributes, words) { - return this.prosody(attributes, words); -}, 'ssmlProsody() is deprecated. Use prosody() instead.'); - /* jshint ignore:start */ /** * Adding A Pause Between Sentences in @@ -1882,24 +1397,6 @@ SsmlProsody.prototype.s = function s(attributes, words) { return new SsmlS(this.prosody.ele('s', attributes, words)); }; -/* jshint ignore:start */ -/** - * Adding A Pause Between Sentences in - * - * @function ssmlS - * @memberof SsmlProsody# - * @deprecated - Use s() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} words - Words to speak - * - * @returns SsmlS - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlS = util.deprecate(function ssmlS(attributes, words) { - return this.s(attributes, words); -}, 'ssmlS() is deprecated. Use s() instead.'); - /* jshint ignore:start */ /** * Controlling How Special Types of Words Are Spoken in @@ -1921,29 +1418,6 @@ SsmlProsody.prototype.sayAs = function sayAs(attributes, words) { return new SsmlSayAs(this.prosody.ele('say-as', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controlling How Special Types of Words Are Spoken in - * - * @function ssmlSayAs - * @memberof SsmlProsody# - * @deprecated - Use sayAs() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_say_as.interpret_as} [attributes.interpret- - * as] - Specify the type of words are spoken - * @param {ssml_say_as.role} [attributes.role] - - * Specify the format of the date when interpret-as is set to date - * @param {string} words - Words to be interpreted - * - * @returns SsmlSayAs - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, - words) { - return this.sayAs(attributes, words); -}, 'ssmlSayAs() is deprecated. Use sayAs() instead.'); - /* jshint ignore:start */ /** * Pronouncing Acronyms and Abbreviations in @@ -1963,27 +1437,6 @@ SsmlProsody.prototype.sub = function sub(attributes, words) { return new SsmlSub(this.prosody.ele('sub', attributes, words)); }; -/* jshint ignore:start */ -/** - * Pronouncing Acronyms and Abbreviations in - * - * @function ssmlSub - * @memberof SsmlProsody# - * @deprecated - Use sub() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.alias] - - * Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation - * @param {string} words - Words to be substituted - * - * @returns SsmlSub - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, - words) { - return this.sub(attributes, words); -}, 'ssmlSub() is deprecated. Use sub() instead.'); - /* jshint ignore:start */ /** * Improving Pronunciation by Specifying Parts of Speech in @@ -2003,26 +1456,6 @@ SsmlProsody.prototype.w = function w(attributes, words) { return new SsmlW(this.prosody.ele('w', attributes, words)); }; -/* jshint ignore:start */ -/** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @function ssmlW - * @memberof SsmlProsody# - * @deprecated - Use w() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.role] - - * Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning - * @param {string} words - Words to speak - * - * @returns SsmlW - */ -/* jshint ignore:end */ -SsmlProsody.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) { - return this.w(attributes, words); -}, 'ssmlW() is deprecated. Use w() instead.'); - /* jshint ignore:start */ /** @@ -2061,27 +1494,6 @@ SsmlS.prototype.break_ = function break_(attributes) { return new SsmlBreak(this.s.ele('break', attributes)); }; -/* jshint ignore:start */ -/** - * Adding a Pause in - * - * @function ssmlBreak - * @memberof SsmlS# - * @deprecated - Use break_() instead. - * - * @param {object} [attributes] - TwiML attributes - * @param {ssml_break.strength} [attributes.strength] - - * Set a pause based on strength - * @param {string} [attributes.time] - - * Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms - * - * @returns SsmlBreak - */ -/* jshint ignore:end */ -SsmlS.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) { - return this.break_(attributes); -}, 'ssmlBreak() is deprecated. Use break_() instead.'); - /* jshint ignore:start */ /** * Emphasizing Words in @@ -2100,26 +1512,6 @@ SsmlS.prototype.emphasis = function emphasis(attributes, words) { return new SsmlEmphasis(this.s.ele('emphasis', attributes, words)); }; -/* jshint ignore:start */ -/** - * Emphasizing Words in - * - * @function ssmlEmphasis - * @memberof SsmlS# - * @deprecated - Use emphasis() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis - * @param {string} words - Words to emphasize - * - * @returns SsmlEmphasis - */ -/* jshint ignore:end */ -SsmlS.prototype.ssmlEmphasis = util.deprecate(function ssmlEmphasis(attributes, - words) { - return this.emphasis(attributes, words); -}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.'); - /* jshint ignore:start */ /** * Specifying Another Language for Specific Words in @@ -2138,25 +1530,6 @@ SsmlS.prototype.lang = function lang(attributes, words) { return new SsmlLang(this.s.ele('lang', attributes, words)); }; -/* jshint ignore:start */ -/** - * Specifying Another Language for Specific Words in - * - * @function ssmlLang - * @memberof SsmlS# - * @deprecated - Use lang() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language - * @param {string} words - Words to speak - * - * @returns SsmlLang - */ -/* jshint ignore:end */ -SsmlS.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, words) { - return this.lang(attributes, words); -}, 'ssmlLang() is deprecated. Use lang() instead.'); - /* jshint ignore:start */ /** * Using Phonetic Pronunciation in @@ -2178,29 +1551,6 @@ SsmlS.prototype.phoneme = function phoneme(attributes, words) { return new SsmlPhoneme(this.s.ele('phoneme', attributes, words)); }; -/* jshint ignore:start */ -/** - * Using Phonetic Pronunciation in - * - * @function ssmlPhoneme - * @memberof SsmlS# - * @deprecated - Use phoneme() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_phoneme.alphabet} [attributes.alphabet] - - * Specify the phonetic alphabet - * @param {string} [attributes.ph] - - * Specifiy the phonetic symbols for pronunciation - * @param {string} words - Words to speak - * - * @returns SsmlPhoneme - */ -/* jshint ignore:end */ -SsmlS.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes, - words) { - return this.phoneme(attributes, words); -}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.'); - /* jshint ignore:start */ /** * Controling Volume, Speaking Rate, and Pitch in @@ -2224,31 +1574,6 @@ SsmlS.prototype.prosody = function prosody(attributes, words) { return new SsmlProsody(this.s.ele('prosody', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controling Volume, Speaking Rate, and Pitch in - * - * @function ssmlProsody - * @memberof SsmlS# - * @deprecated - Use prosody() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.volume] - - * Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB - * @param {string} [attributes.rate] - - * Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n% - * @param {string} [attributes.pitch] - - * Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n% - * @param {string} words - Words to speak - * - * @returns SsmlProsody - */ -/* jshint ignore:end */ -SsmlS.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes, - words) { - return this.prosody(attributes, words); -}, 'ssmlProsody() is deprecated. Use prosody() instead.'); - /* jshint ignore:start */ /** * Controlling How Special Types of Words Are Spoken in @@ -2272,38 +1597,15 @@ SsmlS.prototype.sayAs = function sayAs(attributes, words) { /* jshint ignore:start */ /** - * Controlling How Special Types of Words Are Spoken in + * Pronouncing Acronyms and Abbreviations in * - * @function ssmlSayAs + * @function sub * @memberof SsmlS# - * @deprecated - Use sayAs() instead. * * @param {object} attributes - TwiML attributes - * @param {ssml_say_as.interpret_as} [attributes.interpret- - * as] - Specify the type of words are spoken - * @param {ssml_say_as.role} [attributes.role] - - * Specify the format of the date when interpret-as is set to date - * @param {string} words - Words to be interpreted - * - * @returns SsmlSayAs - */ -/* jshint ignore:end */ -SsmlS.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, words) - { - return this.sayAs(attributes, words); -}, 'ssmlSayAs() is deprecated. Use sayAs() instead.'); - -/* jshint ignore:start */ -/** - * Pronouncing Acronyms and Abbreviations in - * - * @function sub - * @memberof SsmlS# - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.alias] - - * Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation - * @param {string} words - Words to be substituted + * @param {string} [attributes.alias] - + * Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation + * @param {string} words - Words to be substituted * * @returns SsmlSub */ @@ -2312,26 +1614,6 @@ SsmlS.prototype.sub = function sub(attributes, words) { return new SsmlSub(this.s.ele('sub', attributes, words)); }; -/* jshint ignore:start */ -/** - * Pronouncing Acronyms and Abbreviations in - * - * @function ssmlSub - * @memberof SsmlS# - * @deprecated - Use sub() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.alias] - - * Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation - * @param {string} words - Words to be substituted - * - * @returns SsmlSub - */ -/* jshint ignore:end */ -SsmlS.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words) { - return this.sub(attributes, words); -}, 'ssmlSub() is deprecated. Use sub() instead.'); - /* jshint ignore:start */ /** * Improving Pronunciation by Specifying Parts of Speech in @@ -2351,26 +1633,6 @@ SsmlS.prototype.w = function w(attributes, words) { return new SsmlW(this.s.ele('w', attributes, words)); }; -/* jshint ignore:start */ -/** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @function ssmlW - * @memberof SsmlS# - * @deprecated - Use w() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.role] - - * Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning - * @param {string} words - Words to speak - * - * @returns SsmlW - */ -/* jshint ignore:end */ -SsmlS.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) { - return this.w(attributes, words); -}, 'ssmlW() is deprecated. Use w() instead.'); - /* jshint ignore:start */ /** @@ -2428,27 +1690,6 @@ SsmlLang.prototype.break_ = function break_(attributes) { return new SsmlBreak(this.lang.ele('break', attributes)); }; -/* jshint ignore:start */ -/** - * Adding a Pause in - * - * @function ssmlBreak - * @memberof SsmlLang# - * @deprecated - Use break_() instead. - * - * @param {object} [attributes] - TwiML attributes - * @param {ssml_break.strength} [attributes.strength] - - * Set a pause based on strength - * @param {string} [attributes.time] - - * Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms - * - * @returns SsmlBreak - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) { - return this.break_(attributes); -}, 'ssmlBreak() is deprecated. Use break_() instead.'); - /* jshint ignore:start */ /** * Emphasizing Words in @@ -2467,26 +1708,6 @@ SsmlLang.prototype.emphasis = function emphasis(attributes, words) { return new SsmlEmphasis(this.lang.ele('emphasis', attributes, words)); }; -/* jshint ignore:start */ -/** - * Emphasizing Words in - * - * @function ssmlEmphasis - * @memberof SsmlLang# - * @deprecated - Use emphasis() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis - * @param {string} words - Words to emphasize - * - * @returns SsmlEmphasis - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlEmphasis = util.deprecate(function - ssmlEmphasis(attributes, words) { - return this.emphasis(attributes, words); -}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.'); - /* jshint ignore:start */ /** * Specifying Another Language for Specific Words in @@ -2505,26 +1726,6 @@ SsmlLang.prototype.lang = function lang(attributes, words) { return new SsmlLang(this.lang.ele('lang', attributes, words)); }; -/* jshint ignore:start */ -/** - * Specifying Another Language for Specific Words in - * - * @function ssmlLang - * @memberof SsmlLang# - * @deprecated - Use lang() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language - * @param {string} words - Words to speak - * - * @returns SsmlLang - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, - words) { - return this.lang(attributes, words); -}, 'ssmlLang() is deprecated. Use lang() instead.'); - /* jshint ignore:start */ /** * Adding a Pause Between Paragraphs in @@ -2542,24 +1743,6 @@ SsmlLang.prototype.p = function p(attributes, words) { return new SsmlP(this.lang.ele('p', attributes, words)); }; -/* jshint ignore:start */ -/** - * Adding a Pause Between Paragraphs in - * - * @function ssmlP - * @memberof SsmlLang# - * @deprecated - Use p() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} words - Words to speak - * - * @returns SsmlP - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlP = util.deprecate(function ssmlP(attributes, words) { - return this.p(attributes, words); -}, 'ssmlP() is deprecated. Use p() instead.'); - /* jshint ignore:start */ /** * Using Phonetic Pronunciation in @@ -2581,29 +1764,6 @@ SsmlLang.prototype.phoneme = function phoneme(attributes, words) { return new SsmlPhoneme(this.lang.ele('phoneme', attributes, words)); }; -/* jshint ignore:start */ -/** - * Using Phonetic Pronunciation in - * - * @function ssmlPhoneme - * @memberof SsmlLang# - * @deprecated - Use phoneme() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_phoneme.alphabet} [attributes.alphabet] - - * Specify the phonetic alphabet - * @param {string} [attributes.ph] - - * Specifiy the phonetic symbols for pronunciation - * @param {string} words - Words to speak - * - * @returns SsmlPhoneme - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes, - words) { - return this.phoneme(attributes, words); -}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.'); - /* jshint ignore:start */ /** * Controling Volume, Speaking Rate, and Pitch in @@ -2627,31 +1787,6 @@ SsmlLang.prototype.prosody = function prosody(attributes, words) { return new SsmlProsody(this.lang.ele('prosody', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controling Volume, Speaking Rate, and Pitch in - * - * @function ssmlProsody - * @memberof SsmlLang# - * @deprecated - Use prosody() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.volume] - - * Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB - * @param {string} [attributes.rate] - - * Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n% - * @param {string} [attributes.pitch] - - * Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n% - * @param {string} words - Words to speak - * - * @returns SsmlProsody - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes, - words) { - return this.prosody(attributes, words); -}, 'ssmlProsody() is deprecated. Use prosody() instead.'); - /* jshint ignore:start */ /** * Adding A Pause Between Sentences in @@ -2669,24 +1804,6 @@ SsmlLang.prototype.s = function s(attributes, words) { return new SsmlS(this.lang.ele('s', attributes, words)); }; -/* jshint ignore:start */ -/** - * Adding A Pause Between Sentences in - * - * @function ssmlS - * @memberof SsmlLang# - * @deprecated - Use s() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} words - Words to speak - * - * @returns SsmlS - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlS = util.deprecate(function ssmlS(attributes, words) { - return this.s(attributes, words); -}, 'ssmlS() is deprecated. Use s() instead.'); - /* jshint ignore:start */ /** * Controlling How Special Types of Words Are Spoken in @@ -2708,29 +1825,6 @@ SsmlLang.prototype.sayAs = function sayAs(attributes, words) { return new SsmlSayAs(this.lang.ele('say-as', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controlling How Special Types of Words Are Spoken in - * - * @function ssmlSayAs - * @memberof SsmlLang# - * @deprecated - Use sayAs() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_say_as.interpret_as} [attributes.interpret- - * as] - Specify the type of words are spoken - * @param {ssml_say_as.role} [attributes.role] - - * Specify the format of the date when interpret-as is set to date - * @param {string} words - Words to be interpreted - * - * @returns SsmlSayAs - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, - words) { - return this.sayAs(attributes, words); -}, 'ssmlSayAs() is deprecated. Use sayAs() instead.'); - /* jshint ignore:start */ /** * Pronouncing Acronyms and Abbreviations in @@ -2750,27 +1844,6 @@ SsmlLang.prototype.sub = function sub(attributes, words) { return new SsmlSub(this.lang.ele('sub', attributes, words)); }; -/* jshint ignore:start */ -/** - * Pronouncing Acronyms and Abbreviations in - * - * @function ssmlSub - * @memberof SsmlLang# - * @deprecated - Use sub() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.alias] - - * Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation - * @param {string} words - Words to be substituted - * - * @returns SsmlSub - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words) - { - return this.sub(attributes, words); -}, 'ssmlSub() is deprecated. Use sub() instead.'); - /* jshint ignore:start */ /** * Improving Pronunciation by Specifying Parts of Speech in @@ -2790,26 +1863,6 @@ SsmlLang.prototype.w = function w(attributes, words) { return new SsmlW(this.lang.ele('w', attributes, words)); }; -/* jshint ignore:start */ -/** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @function ssmlW - * @memberof SsmlLang# - * @deprecated - Use w() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.role] - - * Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning - * @param {string} words - Words to speak - * - * @returns SsmlW - */ -/* jshint ignore:end */ -SsmlLang.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) { - return this.w(attributes, words); -}, 'ssmlW() is deprecated. Use w() instead.'); - /* jshint ignore:start */ /** @@ -2848,27 +1901,6 @@ SsmlP.prototype.break_ = function break_(attributes) { return new SsmlBreak(this.p.ele('break', attributes)); }; -/* jshint ignore:start */ -/** - * Adding a Pause in - * - * @function ssmlBreak - * @memberof SsmlP# - * @deprecated - Use break_() instead. - * - * @param {object} [attributes] - TwiML attributes - * @param {ssml_break.strength} [attributes.strength] - - * Set a pause based on strength - * @param {string} [attributes.time] - - * Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms - * - * @returns SsmlBreak - */ -/* jshint ignore:end */ -SsmlP.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) { - return this.break_(attributes); -}, 'ssmlBreak() is deprecated. Use break_() instead.'); - /* jshint ignore:start */ /** * Emphasizing Words in @@ -2887,26 +1919,6 @@ SsmlP.prototype.emphasis = function emphasis(attributes, words) { return new SsmlEmphasis(this.p.ele('emphasis', attributes, words)); }; -/* jshint ignore:start */ -/** - * Emphasizing Words in - * - * @function ssmlEmphasis - * @memberof SsmlP# - * @deprecated - Use emphasis() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis - * @param {string} words - Words to emphasize - * - * @returns SsmlEmphasis - */ -/* jshint ignore:end */ -SsmlP.prototype.ssmlEmphasis = util.deprecate(function ssmlEmphasis(attributes, - words) { - return this.emphasis(attributes, words); -}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.'); - /* jshint ignore:start */ /** * Specifying Another Language for Specific Words in @@ -2925,25 +1937,6 @@ SsmlP.prototype.lang = function lang(attributes, words) { return new SsmlLang(this.p.ele('lang', attributes, words)); }; -/* jshint ignore:start */ -/** - * Specifying Another Language for Specific Words in - * - * @function ssmlLang - * @memberof SsmlP# - * @deprecated - Use lang() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language - * @param {string} words - Words to speak - * - * @returns SsmlLang - */ -/* jshint ignore:end */ -SsmlP.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, words) { - return this.lang(attributes, words); -}, 'ssmlLang() is deprecated. Use lang() instead.'); - /* jshint ignore:start */ /** * Using Phonetic Pronunciation in @@ -2962,62 +1955,15 @@ SsmlP.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, words) { */ /* jshint ignore:end */ SsmlP.prototype.phoneme = function phoneme(attributes, words) { - return new SsmlPhoneme(this.p.ele('phoneme', attributes, words)); -}; - -/* jshint ignore:start */ -/** - * Using Phonetic Pronunciation in - * - * @function ssmlPhoneme - * @memberof SsmlP# - * @deprecated - Use phoneme() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_phoneme.alphabet} [attributes.alphabet] - - * Specify the phonetic alphabet - * @param {string} [attributes.ph] - - * Specifiy the phonetic symbols for pronunciation - * @param {string} words - Words to speak - * - * @returns SsmlPhoneme - */ -/* jshint ignore:end */ -SsmlP.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes, - words) { - return this.phoneme(attributes, words); -}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.'); - -/* jshint ignore:start */ -/** - * Controling Volume, Speaking Rate, and Pitch in - * - * @function prosody - * @memberof SsmlP# - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.volume] - - * Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB - * @param {string} [attributes.rate] - - * Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n% - * @param {string} [attributes.pitch] - - * Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n% - * @param {string} words - Words to speak - * - * @returns SsmlProsody - */ -/* jshint ignore:end */ -SsmlP.prototype.prosody = function prosody(attributes, words) { - return new SsmlProsody(this.p.ele('prosody', attributes, words)); + return new SsmlPhoneme(this.p.ele('phoneme', attributes, words)); }; /* jshint ignore:start */ /** * Controling Volume, Speaking Rate, and Pitch in * - * @function ssmlProsody + * @function prosody * @memberof SsmlP# - * @deprecated - Use prosody() instead. * * @param {object} attributes - TwiML attributes * @param {string} [attributes.volume] - @@ -3031,10 +1977,9 @@ SsmlP.prototype.prosody = function prosody(attributes, words) { * @returns SsmlProsody */ /* jshint ignore:end */ -SsmlP.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes, - words) { - return this.prosody(attributes, words); -}, 'ssmlProsody() is deprecated. Use prosody() instead.'); +SsmlP.prototype.prosody = function prosody(attributes, words) { + return new SsmlProsody(this.p.ele('prosody', attributes, words)); +}; /* jshint ignore:start */ /** @@ -3053,24 +1998,6 @@ SsmlP.prototype.s = function s(attributes, words) { return new SsmlS(this.p.ele('s', attributes, words)); }; -/* jshint ignore:start */ -/** - * Adding A Pause Between Sentences in - * - * @function ssmlS - * @memberof SsmlP# - * @deprecated - Use s() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} words - Words to speak - * - * @returns SsmlS - */ -/* jshint ignore:end */ -SsmlP.prototype.ssmlS = util.deprecate(function ssmlS(attributes, words) { - return this.s(attributes, words); -}, 'ssmlS() is deprecated. Use s() instead.'); - /* jshint ignore:start */ /** * Controlling How Special Types of Words Are Spoken in @@ -3092,29 +2019,6 @@ SsmlP.prototype.sayAs = function sayAs(attributes, words) { return new SsmlSayAs(this.p.ele('say-as', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controlling How Special Types of Words Are Spoken in - * - * @function ssmlSayAs - * @memberof SsmlP# - * @deprecated - Use sayAs() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_say_as.interpret_as} [attributes.interpret- - * as] - Specify the type of words are spoken - * @param {ssml_say_as.role} [attributes.role] - - * Specify the format of the date when interpret-as is set to date - * @param {string} words - Words to be interpreted - * - * @returns SsmlSayAs - */ -/* jshint ignore:end */ -SsmlP.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, words) - { - return this.sayAs(attributes, words); -}, 'ssmlSayAs() is deprecated. Use sayAs() instead.'); - /* jshint ignore:start */ /** * Pronouncing Acronyms and Abbreviations in @@ -3134,26 +2038,6 @@ SsmlP.prototype.sub = function sub(attributes, words) { return new SsmlSub(this.p.ele('sub', attributes, words)); }; -/* jshint ignore:start */ -/** - * Pronouncing Acronyms and Abbreviations in - * - * @function ssmlSub - * @memberof SsmlP# - * @deprecated - Use sub() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.alias] - - * Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation - * @param {string} words - Words to be substituted - * - * @returns SsmlSub - */ -/* jshint ignore:end */ -SsmlP.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words) { - return this.sub(attributes, words); -}, 'ssmlSub() is deprecated. Use sub() instead.'); - /* jshint ignore:start */ /** * Improving Pronunciation by Specifying Parts of Speech in @@ -3173,26 +2057,6 @@ SsmlP.prototype.w = function w(attributes, words) { return new SsmlW(this.p.ele('w', attributes, words)); }; -/* jshint ignore:start */ -/** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @function ssmlW - * @memberof SsmlP# - * @deprecated - Use w() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.role] - - * Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning - * @param {string} words - Words to speak - * - * @returns SsmlW - */ -/* jshint ignore:end */ -SsmlP.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) { - return this.w(attributes, words); -}, 'ssmlW() is deprecated. Use w() instead.'); - /* jshint ignore:start */ /** @@ -3231,28 +2095,6 @@ SsmlEmphasis.prototype.break_ = function break_(attributes) { return new SsmlBreak(this.emphasis.ele('break', attributes)); }; -/* jshint ignore:start */ -/** - * Adding a Pause in - * - * @function ssmlBreak - * @memberof SsmlEmphasis# - * @deprecated - Use break_() instead. - * - * @param {object} [attributes] - TwiML attributes - * @param {ssml_break.strength} [attributes.strength] - - * Set a pause based on strength - * @param {string} [attributes.time] - - * Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms - * - * @returns SsmlBreak - */ -/* jshint ignore:end */ -SsmlEmphasis.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) - { - return this.break_(attributes); -}, 'ssmlBreak() is deprecated. Use break_() instead.'); - /* jshint ignore:start */ /** * Emphasizing Words in @@ -3271,26 +2113,6 @@ SsmlEmphasis.prototype.emphasis = function emphasis(attributes, words) { return new SsmlEmphasis(this.emphasis.ele('emphasis', attributes, words)); }; -/* jshint ignore:start */ -/** - * Emphasizing Words in - * - * @function ssmlEmphasis - * @memberof SsmlEmphasis# - * @deprecated - Use emphasis() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis - * @param {string} words - Words to emphasize - * - * @returns SsmlEmphasis - */ -/* jshint ignore:end */ -SsmlEmphasis.prototype.ssmlEmphasis = util.deprecate(function - ssmlEmphasis(attributes, words) { - return this.emphasis(attributes, words); -}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.'); - /* jshint ignore:start */ /** * Specifying Another Language for Specific Words in @@ -3309,26 +2131,6 @@ SsmlEmphasis.prototype.lang = function lang(attributes, words) { return new SsmlLang(this.emphasis.ele('lang', attributes, words)); }; -/* jshint ignore:start */ -/** - * Specifying Another Language for Specific Words in - * - * @function ssmlLang - * @memberof SsmlEmphasis# - * @deprecated - Use lang() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language - * @param {string} words - Words to speak - * - * @returns SsmlLang - */ -/* jshint ignore:end */ -SsmlEmphasis.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, - words) { - return this.lang(attributes, words); -}, 'ssmlLang() is deprecated. Use lang() instead.'); - /* jshint ignore:start */ /** * Using Phonetic Pronunciation in @@ -3350,29 +2152,6 @@ SsmlEmphasis.prototype.phoneme = function phoneme(attributes, words) { return new SsmlPhoneme(this.emphasis.ele('phoneme', attributes, words)); }; -/* jshint ignore:start */ -/** - * Using Phonetic Pronunciation in - * - * @function ssmlPhoneme - * @memberof SsmlEmphasis# - * @deprecated - Use phoneme() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_phoneme.alphabet} [attributes.alphabet] - - * Specify the phonetic alphabet - * @param {string} [attributes.ph] - - * Specifiy the phonetic symbols for pronunciation - * @param {string} words - Words to speak - * - * @returns SsmlPhoneme - */ -/* jshint ignore:end */ -SsmlEmphasis.prototype.ssmlPhoneme = util.deprecate(function - ssmlPhoneme(attributes, words) { - return this.phoneme(attributes, words); -}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.'); - /* jshint ignore:start */ /** * Controling Volume, Speaking Rate, and Pitch in @@ -3396,31 +2175,6 @@ SsmlEmphasis.prototype.prosody = function prosody(attributes, words) { return new SsmlProsody(this.emphasis.ele('prosody', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controling Volume, Speaking Rate, and Pitch in - * - * @function ssmlProsody - * @memberof SsmlEmphasis# - * @deprecated - Use prosody() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.volume] - - * Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB - * @param {string} [attributes.rate] - - * Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n% - * @param {string} [attributes.pitch] - - * Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n% - * @param {string} words - Words to speak - * - * @returns SsmlProsody - */ -/* jshint ignore:end */ -SsmlEmphasis.prototype.ssmlProsody = util.deprecate(function - ssmlProsody(attributes, words) { - return this.prosody(attributes, words); -}, 'ssmlProsody() is deprecated. Use prosody() instead.'); - /* jshint ignore:start */ /** * Controlling How Special Types of Words Are Spoken in @@ -3442,29 +2196,6 @@ SsmlEmphasis.prototype.sayAs = function sayAs(attributes, words) { return new SsmlSayAs(this.emphasis.ele('say-as', attributes, words)); }; -/* jshint ignore:start */ -/** - * Controlling How Special Types of Words Are Spoken in - * - * @function ssmlSayAs - * @memberof SsmlEmphasis# - * @deprecated - Use sayAs() instead. - * - * @param {object} attributes - TwiML attributes - * @param {ssml_say_as.interpret_as} [attributes.interpret- - * as] - Specify the type of words are spoken - * @param {ssml_say_as.role} [attributes.role] - - * Specify the format of the date when interpret-as is set to date - * @param {string} words - Words to be interpreted - * - * @returns SsmlSayAs - */ -/* jshint ignore:end */ -SsmlEmphasis.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, - words) { - return this.sayAs(attributes, words); -}, 'ssmlSayAs() is deprecated. Use sayAs() instead.'); - /* jshint ignore:start */ /** * Pronouncing Acronyms and Abbreviations in @@ -3484,27 +2215,6 @@ SsmlEmphasis.prototype.sub = function sub(attributes, words) { return new SsmlSub(this.emphasis.ele('sub', attributes, words)); }; -/* jshint ignore:start */ -/** - * Pronouncing Acronyms and Abbreviations in - * - * @function ssmlSub - * @memberof SsmlEmphasis# - * @deprecated - Use sub() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.alias] - - * Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation - * @param {string} words - Words to be substituted - * - * @returns SsmlSub - */ -/* jshint ignore:end */ -SsmlEmphasis.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, - words) { - return this.sub(attributes, words); -}, 'ssmlSub() is deprecated. Use sub() instead.'); - /* jshint ignore:start */ /** * Improving Pronunciation by Specifying Parts of Speech in @@ -3524,27 +2234,6 @@ SsmlEmphasis.prototype.w = function w(attributes, words) { return new SsmlW(this.emphasis.ele('w', attributes, words)); }; -/* jshint ignore:start */ -/** - * Improving Pronunciation by Specifying Parts of Speech in - * - * @function ssmlW - * @memberof SsmlEmphasis# - * @deprecated - Use w() instead. - * - * @param {object} attributes - TwiML attributes - * @param {string} [attributes.role] - - * Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning - * @param {string} words - Words to speak - * - * @returns SsmlW - */ -/* jshint ignore:end */ -SsmlEmphasis.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) - { - return this.w(attributes, words); -}, 'ssmlW() is deprecated. Use w() instead.'); - /* jshint ignore:start */ /** @@ -3773,7 +2462,7 @@ Gather.prototype.constructor = Gather; * @param {object} attributes - TwiML attributes * @param {say.voice} [attributes.voice] - Voice to use * @param {number} [attributes.loop] - Times to loop message - * @param {say.language} [attributes.language] - Message langauge + * @param {say.language} [attributes.language] - Message language * @param {string} message - Message to say * * @returns Say @@ -4302,6 +2991,8 @@ Connect.prototype.stream = function stream(attributes) { * Whether sentiment analysis needs to be enabled or not * @param {string} [attributes.statusCallback] - * URL to post status callbacks from Twilio + * @param {string} [attributes.statusCallbackMethod] - + * HTTP method to use when requesting the status callback URL * * @returns VirtualAgent */ @@ -4310,6 +3001,57 @@ Connect.prototype.virtualAgent = function virtualAgent(attributes) { return new VirtualAgent(this.connect.ele('VirtualAgent', attributes)); }; +/* jshint ignore:start */ +/** + * TwiML Noun + * + * @function conversation + * @memberof Connect# + * + * @param {object} [attributes] - TwiML attributes + * @param {string} [attributes.serviceInstanceSid] - Service instance Sid + * @param {boolean} [attributes.inboundAutocreation] - Inbound autocreation + * @param {number} [attributes.routingAssignmentTimeout] - + * Routing assignment timeout + * @param {number} [attributes.inboundTimeout] - Inbound timeout + * @param {conversation.record} [attributes.record] - Record + * @param {conversation.trim} [attributes.trim] - Trim + * @param {string} [attributes.recordingStatusCallback] - + * Recording status callback URL + * @param {string} [attributes.recordingStatusCallbackMethod] - + * Recording status callback URL method + * @param {conversation.recording_event} [attributes.recordingStatusCallbackEvent] - + * Recording status callback events + * @param {string} [attributes.statusCallback] - Status callback URL + * @param {string} [attributes.statusCallbackMethod] - Status callback URL method + * @param {conversation.event} [attributes.statusCallbackEvent] - + * Events to call status callback URL + * + * @returns Conversation + */ +/* jshint ignore:end */ +Connect.prototype.conversation = function conversation(attributes) { + return new Conversation(this.connect.ele('Conversation', attributes)); +}; + + +/* jshint ignore:start */ +/** + * TwiML Noun + * + * @constructor Conversation + * + * @param {object} conversation - TwiML Noun + */ +/* jshint ignore:end */ +function Conversation(conversation) { + this.conversation = conversation; + this._propertyName = 'conversation'; +} + +Conversation.prototype = Object.create(TwiML.prototype); +Conversation.prototype.constructor = Conversation; + /* jshint ignore:start */ /** @@ -4328,6 +3070,60 @@ function VirtualAgent(virtualAgent) { VirtualAgent.prototype = Object.create(TwiML.prototype); VirtualAgent.prototype.constructor = VirtualAgent; +/* jshint ignore:start */ +/** + * TwiML Noun + * + * @function config + * @memberof VirtualAgent# + * + * @param {object} [attributes] - TwiML attributes + * @param {string} [attributes.name] - The name of the custom config + * @param {string} [attributes.value] - The value of the custom config + * + * @returns Config + */ +/* jshint ignore:end */ +VirtualAgent.prototype.config = function config(attributes) { + return new Config(this.virtual_agent.ele('Config', attributes)); +}; + +/* jshint ignore:start */ +/** + * TwiML Noun + * + * @function parameter + * @memberof VirtualAgent# + * + * @param {object} [attributes] - TwiML attributes + * @param {string} [attributes.name] - The name of the custom parameter + * @param {string} [attributes.value] - The value of the custom parameter + * + * @returns Parameter + */ +/* jshint ignore:end */ +VirtualAgent.prototype.parameter = function parameter(attributes) { + return new Parameter(this.virtual_agent.ele('Parameter', attributes)); +}; + + +/* jshint ignore:start */ +/** + * TwiML Noun + * + * @constructor Config + * + * @param {object} config - TwiML Noun + */ +/* jshint ignore:end */ +function Config(config) { + this.config = config; + this._propertyName = 'config'; +} + +Config.prototype = Object.create(TwiML.prototype); +Config.prototype.constructor = Config; + /* jshint ignore:start */ /** diff --git a/spec/unit/twiml/VoiceResponse.spec.js b/spec/unit/twiml/VoiceResponse.spec.js index 0bde01dccb..7ff3c4c44a 100644 --- a/spec/unit/twiml/VoiceResponse.spec.js +++ b/spec/unit/twiml/VoiceResponse.spec.js @@ -216,25 +216,16 @@ describe('create voice response TwiML', function() { it('should render attributes with dashes', function() { var actual = new VoiceResponse(); - actual.say().ssmlSayAs({'interpret-as': 'spell-out', role: 'yymmdd'}, 'Words to speak'); + actual.say().sayAs({'interpret-as': 'spell-out', role: 'yymmdd'}, 'Words to speak'); expect(actual.toString()).toEqual('Words to speak'); }); it('should render namespaced attributes', function() { var actual = new VoiceResponse(); - actual.say().ssmlLang({'xml:lang': 'fr-FR'}, 'Bonjour!'); + actual.say().lang({'xml:lang': 'fr-FR'}, 'Bonjour!'); expect(actual.toString()).toEqual('Bonjour!'); }); - it('should render deprecated methods', function() { - var legacy = new VoiceResponse(); - legacy.refer().referSip('foo'); - - var renamed = new VoiceResponse(); - renamed.refer().sip('foo'); - - expect(legacy.toString()).toEqual(renamed.toString()); - }); });