twilio 5.3.6 → 5.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,6 +41,8 @@ export interface TranscriptionListInstanceCreateOptions {
41
41
  hints?: string;
42
42
  /** The provider will add punctuation to recognition result */
43
43
  enableAutomaticPunctuation?: boolean;
44
+ /** The SID or the unique name of the [IntelligentService](https://www.twilio.com/docs/voice/intelligence/api/service-resource) to process the transcription. */
45
+ intelligenceService?: string;
44
46
  }
45
47
  export interface TranscriptionContext {
46
48
  /**
@@ -159,6 +159,8 @@ function TranscriptionListInstance(version, accountSid, callSid) {
159
159
  data["Hints"] = params["hints"];
160
160
  if (params["enableAutomaticPunctuation"] !== undefined)
161
161
  data["EnableAutomaticPunctuation"] = serialize.bool(params["enableAutomaticPunctuation"]);
162
+ if (params["intelligenceService"] !== undefined)
163
+ data["IntelligenceService"] = params["intelligenceService"];
162
164
  const headers = {};
163
165
  headers["Content-Type"] = "application/x-www-form-urlencoded";
164
166
  let operationVersion = version, operationPromise = operationVersion.create({
@@ -7,8 +7,8 @@ import { PortingPortInPhoneNumberListInstance } from "./v1/portingPortInPhoneNum
7
7
  import { PortingPortabilityListInstance } from "./v1/portingPortability";
8
8
  import { PortingWebhookConfigurationListInstance } from "./v1/portingWebhookConfiguration";
9
9
  import { PortingWebhookConfigurationDeleteListInstance } from "./v1/portingWebhookConfigurationDelete";
10
+ import { PortingWebhookConfigurationFetchListInstance } from "./v1/portingWebhookConfigurationFetch";
10
11
  import { SigningRequestConfigurationListInstance } from "./v1/signingRequestConfiguration";
11
- import { WebhookListInstance } from "./v1/webhook";
12
12
  export default class V1 extends Version {
13
13
  /**
14
14
  * Initialize the V1 version of Numbers
@@ -30,10 +30,10 @@ export default class V1 extends Version {
30
30
  protected _portingWebhookConfigurations?: PortingWebhookConfigurationListInstance;
31
31
  /** portingWebhookConfigurationsDelete - { Twilio.Numbers.V1.PortingWebhookConfigurationDeleteListInstance } resource */
32
32
  protected _portingWebhookConfigurationsDelete?: PortingWebhookConfigurationDeleteListInstance;
33
+ /** portingWebhookConfigurationFetch - { Twilio.Numbers.V1.PortingWebhookConfigurationFetchListInstance } resource */
34
+ protected _portingWebhookConfigurationFetch?: PortingWebhookConfigurationFetchListInstance;
33
35
  /** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */
34
36
  protected _signingRequestConfigurations?: SigningRequestConfigurationListInstance;
35
- /** webhook - { Twilio.Numbers.V1.WebhookListInstance } resource */
36
- protected _webhook?: WebhookListInstance;
37
37
  /** Getter for bulkEligibilities resource */
38
38
  get bulkEligibilities(): BulkEligibilityListInstance;
39
39
  /** Getter for eligibilities resource */
@@ -48,8 +48,8 @@ export default class V1 extends Version {
48
48
  get portingWebhookConfigurations(): PortingWebhookConfigurationListInstance;
49
49
  /** Getter for portingWebhookConfigurationsDelete resource */
50
50
  get portingWebhookConfigurationsDelete(): PortingWebhookConfigurationDeleteListInstance;
51
+ /** Getter for portingWebhookConfigurationFetch resource */
52
+ get portingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchListInstance;
51
53
  /** Getter for signingRequestConfigurations resource */
52
54
  get signingRequestConfigurations(): SigningRequestConfigurationListInstance;
53
- /** Getter for webhook resource */
54
- get webhook(): WebhookListInstance;
55
55
  }
@@ -24,8 +24,8 @@ const portingPortInPhoneNumber_1 = require("./v1/portingPortInPhoneNumber");
24
24
  const portingPortability_1 = require("./v1/portingPortability");
25
25
  const portingWebhookConfiguration_1 = require("./v1/portingWebhookConfiguration");
26
26
  const portingWebhookConfigurationDelete_1 = require("./v1/portingWebhookConfigurationDelete");
27
+ const portingWebhookConfigurationFetch_1 = require("./v1/portingWebhookConfigurationFetch");
27
28
  const signingRequestConfiguration_1 = require("./v1/signingRequestConfiguration");
28
- const webhook_1 = require("./v1/webhook");
29
29
  class V1 extends Version_1.default {
30
30
  /**
31
31
  * Initialize the V1 version of Numbers
@@ -79,6 +79,13 @@ class V1 extends Version_1.default {
79
79
  (0, portingWebhookConfigurationDelete_1.PortingWebhookConfigurationDeleteListInstance)(this);
80
80
  return this._portingWebhookConfigurationsDelete;
81
81
  }
82
+ /** Getter for portingWebhookConfigurationFetch resource */
83
+ get portingWebhookConfigurationFetch() {
84
+ this._portingWebhookConfigurationFetch =
85
+ this._portingWebhookConfigurationFetch ||
86
+ (0, portingWebhookConfigurationFetch_1.PortingWebhookConfigurationFetchListInstance)(this);
87
+ return this._portingWebhookConfigurationFetch;
88
+ }
82
89
  /** Getter for signingRequestConfigurations resource */
83
90
  get signingRequestConfigurations() {
84
91
  this._signingRequestConfigurations =
@@ -86,10 +93,5 @@ class V1 extends Version_1.default {
86
93
  (0, signingRequestConfiguration_1.SigningRequestConfigurationListInstance)(this);
87
94
  return this._signingRequestConfigurations;
88
95
  }
89
- /** Getter for webhook resource */
90
- get webhook() {
91
- this._webhook = this._webhook || (0, webhook_1.WebhookListInstance)(this);
92
- return this._webhook;
93
- }
94
96
  }
95
97
  exports.default = V1;
@@ -1,28 +1,28 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V1 from "../V1";
4
- export interface WebhookSolution {
4
+ export interface PortingWebhookConfigurationFetchSolution {
5
5
  }
6
- export interface WebhookListInstance {
6
+ export interface PortingWebhookConfigurationFetchListInstance {
7
7
  _version: V1;
8
- _solution: WebhookSolution;
8
+ _solution: PortingWebhookConfigurationFetchSolution;
9
9
  _uri: string;
10
10
  /**
11
- * Fetch a WebhookInstance
11
+ * Fetch a PortingWebhookConfigurationFetchInstance
12
12
  *
13
13
  * @param callback - Callback to handle processed record
14
14
  *
15
- * @returns Resolves to processed WebhookInstance
15
+ * @returns Resolves to processed PortingWebhookConfigurationFetchInstance
16
16
  */
17
- fetch(callback?: (error: Error | null, item?: WebhookInstance) => any): Promise<WebhookInstance>;
17
+ fetch(callback?: (error: Error | null, item?: PortingWebhookConfigurationFetchInstance) => any): Promise<PortingWebhookConfigurationFetchInstance>;
18
18
  /**
19
19
  * Provide a user-friendly representation
20
20
  */
21
21
  toJSON(): any;
22
22
  [inspect.custom](_depth: any, options: InspectOptions): any;
23
23
  }
24
- export declare function WebhookListInstance(version: V1): WebhookListInstance;
25
- interface WebhookResource {
24
+ export declare function PortingWebhookConfigurationFetchListInstance(version: V1): PortingWebhookConfigurationFetchListInstance;
25
+ interface PortingWebhookConfigurationFetchResource {
26
26
  url: string;
27
27
  port_in_target_url: string;
28
28
  port_out_target_url: string;
@@ -30,9 +30,9 @@ interface WebhookResource {
30
30
  port_in_target_date_created: Date;
31
31
  port_out_target_date_created: Date;
32
32
  }
33
- export declare class WebhookInstance {
33
+ export declare class PortingWebhookConfigurationFetchInstance {
34
34
  protected _version: V1;
35
- constructor(_version: V1, payload: WebhookResource);
35
+ constructor(_version: V1, payload: PortingWebhookConfigurationFetchResource);
36
36
  /**
37
37
  * The URL of the webhook configuration request
38
38
  */
@@ -13,11 +13,11 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.WebhookInstance = exports.WebhookListInstance = void 0;
16
+ exports.PortingWebhookConfigurationFetchInstance = exports.PortingWebhookConfigurationFetchListInstance = void 0;
17
17
  const util_1 = require("util");
18
18
  const deserialize = require("../../../base/deserialize");
19
19
  const serialize = require("../../../base/serialize");
20
- function WebhookListInstance(version) {
20
+ function PortingWebhookConfigurationFetchListInstance(version) {
21
21
  const instance = {};
22
22
  instance._version = version;
23
23
  instance._solution = {};
@@ -27,7 +27,7 @@ function WebhookListInstance(version) {
27
27
  uri: instance._uri,
28
28
  method: "get",
29
29
  });
30
- operationPromise = operationPromise.then((payload) => new WebhookInstance(operationVersion, payload));
30
+ operationPromise = operationPromise.then((payload) => new PortingWebhookConfigurationFetchInstance(operationVersion, payload));
31
31
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
32
32
  return operationPromise;
33
33
  };
@@ -39,8 +39,8 @@ function WebhookListInstance(version) {
39
39
  };
40
40
  return instance;
41
41
  }
42
- exports.WebhookListInstance = WebhookListInstance;
43
- class WebhookInstance {
42
+ exports.PortingWebhookConfigurationFetchListInstance = PortingWebhookConfigurationFetchListInstance;
43
+ class PortingWebhookConfigurationFetchInstance {
44
44
  constructor(_version, payload) {
45
45
  this._version = _version;
46
46
  this.url = payload.url;
@@ -69,4 +69,4 @@ class WebhookInstance {
69
69
  return (0, util_1.inspect)(this.toJSON(), options);
70
70
  }
71
71
  }
72
- exports.WebhookInstance = WebhookInstance;
72
+ exports.PortingWebhookConfigurationFetchInstance = PortingWebhookConfigurationFetchInstance;
@@ -4,7 +4,19 @@ import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V2 from "../V2";
6
6
  import { PhoneNumberCapabilities } from "../../../interfaces";
7
- export type HostedNumberOrderStatus = "received" | "verified" | "pending-loa" | "carrier-processing" | "completed" | "failed" | "action-required";
7
+ export type HostedNumberOrderStatus = "received" | "pending-verification" | "verified" | "pending-loa" | "carrier-processing" | "completed" | "failed" | "action-required";
8
+ export type HostedNumberOrderVerificationType = "phone-call";
9
+ /**
10
+ * Options to pass to update a HostedNumberOrderInstance
11
+ */
12
+ export interface HostedNumberOrderContextUpdateOptions {
13
+ /** */
14
+ status: HostedNumberOrderStatus;
15
+ /** The number of seconds to wait before initiating the ownership verification call. Can be a value between 0 and 60, inclusive. */
16
+ verificationCallDelay?: number;
17
+ /** The numerical extension to dial when making the ownership verification call. */
18
+ verificationCallExtension?: string;
19
+ }
8
20
  /**
9
21
  * Options to pass to create a HostedNumberOrderInstance
10
22
  */
@@ -122,6 +134,15 @@ export interface HostedNumberOrderContext {
122
134
  * @returns Resolves to processed HostedNumberOrderInstance
123
135
  */
124
136
  fetch(callback?: (error: Error | null, item?: HostedNumberOrderInstance) => any): Promise<HostedNumberOrderInstance>;
137
+ /**
138
+ * Update a HostedNumberOrderInstance
139
+ *
140
+ * @param params - Parameter for request
141
+ * @param callback - Callback to handle processed record
142
+ *
143
+ * @returns Resolves to processed HostedNumberOrderInstance
144
+ */
145
+ update(params: HostedNumberOrderContextUpdateOptions, callback?: (error: Error | null, item?: HostedNumberOrderInstance) => any): Promise<HostedNumberOrderInstance>;
125
146
  /**
126
147
  * Provide a user-friendly representation
127
148
  */
@@ -138,6 +159,7 @@ export declare class HostedNumberOrderContextImpl implements HostedNumberOrderCo
138
159
  constructor(_version: V2, sid: string);
139
160
  remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
140
161
  fetch(callback?: (error: Error | null, item?: HostedNumberOrderInstance) => any): Promise<HostedNumberOrderInstance>;
162
+ update(params: HostedNumberOrderContextUpdateOptions, callback?: (error: Error | null, item?: HostedNumberOrderInstance) => any): Promise<HostedNumberOrderInstance>;
141
163
  /**
142
164
  * Provide a user-friendly representation
143
165
  *
@@ -169,6 +191,12 @@ interface HostedNumberOrderResource {
169
191
  contact_phone_number: string;
170
192
  bulk_hosting_request_sid: string;
171
193
  next_step: string;
194
+ verification_attempts: number;
195
+ verification_call_sids: Array<string>;
196
+ verification_call_delay: number;
197
+ verification_call_extension: string;
198
+ verification_code: string;
199
+ verification_type: HostedNumberOrderVerificationType;
172
200
  }
173
201
  export declare class HostedNumberOrderInstance {
174
202
  protected _version: V2;
@@ -245,6 +273,27 @@ export declare class HostedNumberOrderInstance {
245
273
  * The next step you need to take to complete the hosted number order and request it successfully.
246
274
  */
247
275
  nextStep: string;
276
+ /**
277
+ * The number of attempts made to verify ownership via a call for the hosted phone number.
278
+ */
279
+ verificationAttempts: number;
280
+ /**
281
+ * The Call SIDs that identify the calls placed to verify ownership.
282
+ */
283
+ verificationCallSids: Array<string>;
284
+ /**
285
+ * The number of seconds to wait before initiating the ownership verification call. Can be a value between 0 and 60, inclusive.
286
+ */
287
+ verificationCallDelay: number;
288
+ /**
289
+ * The numerical extension to dial when making the ownership verification call.
290
+ */
291
+ verificationCallExtension: string;
292
+ /**
293
+ * The digits the user must pass in the ownership verification call.
294
+ */
295
+ verificationCode: string;
296
+ verificationType: HostedNumberOrderVerificationType;
248
297
  private get _proxy();
249
298
  /**
250
299
  * Remove a HostedNumberOrderInstance
@@ -262,6 +311,15 @@ export declare class HostedNumberOrderInstance {
262
311
  * @returns Resolves to processed HostedNumberOrderInstance
263
312
  */
264
313
  fetch(callback?: (error: Error | null, item?: HostedNumberOrderInstance) => any): Promise<HostedNumberOrderInstance>;
314
+ /**
315
+ * Update a HostedNumberOrderInstance
316
+ *
317
+ * @param params - Parameter for request
318
+ * @param callback - Callback to handle processed record
319
+ *
320
+ * @returns Resolves to processed HostedNumberOrderInstance
321
+ */
322
+ update(params: HostedNumberOrderContextUpdateOptions, callback?: (error: Error | null, item?: HostedNumberOrderInstance) => any): Promise<HostedNumberOrderInstance>;
265
323
  /**
266
324
  * Provide a user-friendly representation
267
325
  *
@@ -287,6 +345,12 @@ export declare class HostedNumberOrderInstance {
287
345
  contactPhoneNumber: string;
288
346
  bulkHostingRequestSid: string;
289
347
  nextStep: string;
348
+ verificationAttempts: number;
349
+ verificationCallSids: string[];
350
+ verificationCallDelay: number;
351
+ verificationCallExtension: string;
352
+ verificationCode: string;
353
+ verificationType: "phone-call";
290
354
  };
291
355
  [inspect.custom](_depth: any, options: InspectOptions): string;
292
356
  }
@@ -50,6 +50,32 @@ class HostedNumberOrderContextImpl {
50
50
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
51
51
  return operationPromise;
52
52
  }
53
+ update(params, callback) {
54
+ if (params === null || params === undefined) {
55
+ throw new Error('Required parameter "params" missing.');
56
+ }
57
+ if (params["status"] === null || params["status"] === undefined) {
58
+ throw new Error("Required parameter \"params['status']\" missing.");
59
+ }
60
+ let data = {};
61
+ data["Status"] = params["status"];
62
+ if (params["verificationCallDelay"] !== undefined)
63
+ data["VerificationCallDelay"] = params["verificationCallDelay"];
64
+ if (params["verificationCallExtension"] !== undefined)
65
+ data["VerificationCallExtension"] = params["verificationCallExtension"];
66
+ const headers = {};
67
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
68
+ const instance = this;
69
+ let operationVersion = instance._version, operationPromise = operationVersion.update({
70
+ uri: instance._uri,
71
+ method: "post",
72
+ data,
73
+ headers,
74
+ });
75
+ operationPromise = operationPromise.then((payload) => new HostedNumberOrderInstance(operationVersion, payload, instance._solution.sid));
76
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
77
+ return operationPromise;
78
+ }
53
79
  /**
54
80
  * Provide a user-friendly representation
55
81
  *
@@ -85,6 +111,12 @@ class HostedNumberOrderInstance {
85
111
  this.contactPhoneNumber = payload.contact_phone_number;
86
112
  this.bulkHostingRequestSid = payload.bulk_hosting_request_sid;
87
113
  this.nextStep = payload.next_step;
114
+ this.verificationAttempts = deserialize.integer(payload.verification_attempts);
115
+ this.verificationCallSids = payload.verification_call_sids;
116
+ this.verificationCallDelay = deserialize.integer(payload.verification_call_delay);
117
+ this.verificationCallExtension = payload.verification_call_extension;
118
+ this.verificationCode = payload.verification_code;
119
+ this.verificationType = payload.verification_type;
88
120
  this._solution = { sid: sid || this.sid };
89
121
  }
90
122
  get _proxy() {
@@ -113,6 +145,9 @@ class HostedNumberOrderInstance {
113
145
  fetch(callback) {
114
146
  return this._proxy.fetch(callback);
115
147
  }
148
+ update(params, callback) {
149
+ return this._proxy.update(params, callback);
150
+ }
116
151
  /**
117
152
  * Provide a user-friendly representation
118
153
  *
@@ -139,6 +174,12 @@ class HostedNumberOrderInstance {
139
174
  contactPhoneNumber: this.contactPhoneNumber,
140
175
  bulkHostingRequestSid: this.bulkHostingRequestSid,
141
176
  nextStep: this.nextStep,
177
+ verificationAttempts: this.verificationAttempts,
178
+ verificationCallSids: this.verificationCallSids,
179
+ verificationCallDelay: this.verificationCallDelay,
180
+ verificationCallExtension: this.verificationCallExtension,
181
+ verificationCode: this.verificationCode,
182
+ verificationType: this.verificationType,
142
183
  };
143
184
  }
144
185
  [util_1.inspect.custom](_depth, options) {
@@ -178,6 +178,7 @@ declare namespace VoiceResponse {
178
178
  type ConversationRecord = "do-not-record" | "record-from-answer" | "record-from-ringing" | "record-from-answer-dual" | "record-from-ringing-dual" | "true" | "false";
179
179
  type ConversationRecordingEvent = "in-progress" | "completed" | "absent";
180
180
  type ConversationTrim = "trim-silence" | "do-not-trim";
181
+ type DialEvents = "call-progress-event";
181
182
  type DialRecord = "do-not-record" | "record-from-answer" | "record-from-ringing" | "record-from-answer-dual" | "record-from-ringing-dual";
182
183
  type DialRecordingEvent = "in-progress" | "completed" | "absent";
183
184
  type DialRecordingTrack = "both" | "inbound" | "outbound";
@@ -234,6 +235,8 @@ declare namespace VoiceResponse {
234
235
  answerOnBridge?: boolean;
235
236
  /** callerId - Caller ID to display */
236
237
  callerId?: string;
238
+ /** events - Subscription to events */
239
+ events?: DialEvents;
237
240
  /** hangupOnStar - Hangup call on star press */
238
241
  hangupOnStar?: boolean;
239
242
  /** method - Action URL method */
@@ -535,6 +538,8 @@ declare namespace VoiceResponse {
535
538
  hints?: string;
536
539
  /** inboundTrackLabel - Friendly name given to the Inbound Track */
537
540
  inboundTrackLabel?: string;
541
+ /** intelligenceService - The SID or the unique name of the Intelligence Service to be used */
542
+ intelligenceService?: string;
538
543
  /** languageCode - Language Code used by the transcription engine */
539
544
  languageCode?: string;
540
545
  /** name - Friendly name given to the Transcription */
@@ -634,6 +639,8 @@ declare namespace VoiceResponse {
634
639
  hints?: string;
635
640
  /** inboundTrackLabel - Friendly name given to the Inbound Track */
636
641
  inboundTrackLabel?: string;
642
+ /** intelligenceService - The SID or the unique name of the Intelligence Service to be used */
643
+ intelligenceService?: string;
637
644
  /** languageCode - Language Code used by the transcription engine */
638
645
  languageCode?: string;
639
646
  /** name - Friendly name given to the Transcription */
@@ -1456,6 +1463,128 @@ declare namespace VoiceResponse {
1456
1463
  /** url - TwiML URL */
1457
1464
  url?: string;
1458
1465
  }
1466
+ /**
1467
+ * Attributes to pass to conversationRelay
1468
+ */
1469
+ export interface ConversationRelayAttributes {
1470
+ /** debug - Whether debugging on the session is enabled */
1471
+ debug?: boolean;
1472
+ /** dtmfDetection - Whether DTMF tones should be detected and reported in speech transcription */
1473
+ dtmfDetection?: boolean;
1474
+ /** interruptByDtmf - Whether DTMF tone can interrupt the play of text-to-speech */
1475
+ interruptByDtmf?: boolean;
1476
+ /** interruptible - Whether caller's speaking can interrupt the play of text-to-speech */
1477
+ interruptible?: boolean;
1478
+ /** language - Language to be used for both text-to-speech and transcription */
1479
+ language?: string;
1480
+ /** partialPrompts - Whether partial prompts should be reported to WebSocket server before the caller finishes speaking */
1481
+ partialPrompts?: boolean;
1482
+ /** profanityFilter - Whether profanities should be filtered out of the speech transcription */
1483
+ profanityFilter?: boolean;
1484
+ /** speechModel - Speech model to be used for transcription */
1485
+ speechModel?: string;
1486
+ /** transcriptionLanguage - Language to be used for transcription */
1487
+ transcriptionLanguage?: string;
1488
+ /** transcriptionProvider - Provider to be used for transcription */
1489
+ transcriptionProvider?: string;
1490
+ /** ttsLanguage - Language to be used for text-to-speech */
1491
+ ttsLanguage?: string;
1492
+ /** ttsProvider - Provider to be used for text-to-speech */
1493
+ ttsProvider?: string;
1494
+ /** url - URL of the remote service where the session is connected to */
1495
+ url?: string;
1496
+ /** voice - Voice to be used for text-to-speech */
1497
+ voice?: string;
1498
+ /** welcomeGreeting - The sentence to be played automatically when the session is connected */
1499
+ welcomeGreeting?: string;
1500
+ /** welcomeGreetingInterruptible - Whether caller's speaking can interrupt the welcome greeting */
1501
+ welcomeGreetingInterruptible?: boolean;
1502
+ }
1503
+ /**
1504
+ * Attributes to pass to assistant
1505
+ */
1506
+ export interface AssistantAttributes {
1507
+ /** debug - Whether debugging on the session is enabled */
1508
+ debug?: boolean;
1509
+ /** dtmfDetection - Whether DTMF tones should be detected and reported in speech transcription */
1510
+ dtmfDetection?: boolean;
1511
+ /** id - The assistant ID of the AI Assistant */
1512
+ id?: string;
1513
+ /** interruptByDtmf - Whether DTMF tone can interrupt the play of text-to-speech */
1514
+ interruptByDtmf?: boolean;
1515
+ /** interruptible - Whether caller's speaking can interrupt the play of text-to-speech */
1516
+ interruptible?: boolean;
1517
+ /** language - Language to be used for both text-to-speech and transcription */
1518
+ language?: string;
1519
+ /** partialPrompts - Whether partial prompts should be reported to WebSocket server before the caller finishes speaking */
1520
+ partialPrompts?: boolean;
1521
+ /** profanityFilter - Whether profanities should be filtered out of the speech transcription */
1522
+ profanityFilter?: boolean;
1523
+ /** speechModel - Speech model to be used for transcription */
1524
+ speechModel?: string;
1525
+ /** transcriptionLanguage - Language to be used for transcription */
1526
+ transcriptionLanguage?: string;
1527
+ /** transcriptionProvider - Provider to be used for transcription */
1528
+ transcriptionProvider?: string;
1529
+ /** ttsLanguage - Language to be used for text-to-speech */
1530
+ ttsLanguage?: string;
1531
+ /** ttsProvider - Provider to be used for text-to-speech */
1532
+ ttsProvider?: string;
1533
+ /** voice - Voice to be used for text-to-speech */
1534
+ voice?: string;
1535
+ /** welcomeGreeting - The sentence to be played automatically when the session is connected */
1536
+ welcomeGreeting?: string;
1537
+ /** welcomeGreetingInterruptible - Whether caller's speaking can interrupt the welcome greeting */
1538
+ welcomeGreetingInterruptible?: boolean;
1539
+ }
1540
+ /**
1541
+ * Attributes to pass to language
1542
+ */
1543
+ export interface LanguageAttributes {
1544
+ /** code - Language code of this language setting is for */
1545
+ code?: string;
1546
+ /** speechModel - Speech model to be used for transcription of this language */
1547
+ speechModel?: string;
1548
+ /** transcriptionProvider - Provider to be used for transcription of this language */
1549
+ transcriptionProvider?: string;
1550
+ /** ttsProvider - Provider to be used for text-to-speech of this language */
1551
+ ttsProvider?: string;
1552
+ /** voice - Voice to be used for text-to-speech of this language */
1553
+ voice?: string;
1554
+ }
1555
+ /**
1556
+ * Attributes to pass to parameter
1557
+ */
1558
+ export interface ParameterAttributes {
1559
+ /** name - The name of the custom parameter */
1560
+ name?: string;
1561
+ /** value - The value of the custom parameter */
1562
+ value?: string;
1563
+ }
1564
+ /**
1565
+ * Attributes to pass to language
1566
+ */
1567
+ export interface LanguageAttributes {
1568
+ /** code - Language code of this language setting is for */
1569
+ code?: string;
1570
+ /** speechModel - Speech model to be used for transcription of this language */
1571
+ speechModel?: string;
1572
+ /** transcriptionProvider - Provider to be used for transcription of this language */
1573
+ transcriptionProvider?: string;
1574
+ /** ttsProvider - Provider to be used for text-to-speech of this language */
1575
+ ttsProvider?: string;
1576
+ /** voice - Voice to be used for text-to-speech of this language */
1577
+ voice?: string;
1578
+ }
1579
+ /**
1580
+ * Attributes to pass to parameter
1581
+ */
1582
+ export interface ParameterAttributes {
1583
+ /** name - The name of the custom parameter */
1584
+ name?: string;
1585
+ /** value - The value of the custom parameter */
1586
+ value?: string;
1587
+ }
1459
1588
  /**
1460
1589
  * Attributes to pass to config
1461
1590
  */
@@ -1502,6 +1631,25 @@ declare namespace VoiceResponse {
1502
1631
  */
1503
1632
  constructor(applicationSid: XMLElement);
1504
1633
  }
1634
+ export class Assistant extends TwiML {
1635
+ assistant: XMLElement;
1636
+ /**
1637
+ * <Assistant> TwiML Noun
1638
+ */
1639
+ constructor(assistant: XMLElement);
1640
+ /**
1641
+ * <Language> TwiML Noun
1642
+ *
1643
+ * @param attributes - TwiML attributes
1644
+ */
1645
+ language(attributes?: VoiceResponse.LanguageAttributes): VoiceResponse.Language;
1646
+ /**
1647
+ * <Parameter> TwiML Noun
1648
+ *
1649
+ * @param attributes - TwiML attributes
1650
+ */
1651
+ parameter(attributes?: VoiceResponse.ParameterAttributes): VoiceResponse.Parameter;
1652
+ }
1505
1653
  export class Autopilot extends TwiML {
1506
1654
  autopilot: XMLElement;
1507
1655
  /**
@@ -1550,6 +1698,12 @@ declare namespace VoiceResponse {
1550
1698
  * <Connect> TwiML Verb
1551
1699
  */
1552
1700
  constructor(connect: XMLElement);
1701
+ /**
1702
+ * <Assistant> TwiML Noun
1703
+ *
1704
+ * @param attributes - TwiML attributes
1705
+ */
1706
+ assistant(attributes?: VoiceResponse.AssistantAttributes): VoiceResponse.Assistant;
1553
1707
  /**
1554
1708
  * <Autopilot> TwiML Noun
1555
1709
  *
@@ -1564,6 +1718,12 @@ declare namespace VoiceResponse {
1564
1718
  * @param attributes - TwiML attributes
1565
1719
  */
1566
1720
  conversation(attributes?: VoiceResponse.ConversationAttributes): VoiceResponse.Conversation;
1721
+ /**
1722
+ * <ConversationRelay> TwiML Noun
1723
+ *
1724
+ * @param attributes - TwiML attributes
1725
+ */
1726
+ conversationRelay(attributes?: VoiceResponse.ConversationRelayAttributes): VoiceResponse.ConversationRelay;
1567
1727
  /**
1568
1728
  * <Room> TwiML Noun
1569
1729
  *
@@ -1592,6 +1752,25 @@ declare namespace VoiceResponse {
1592
1752
  */
1593
1753
  constructor(conversation: XMLElement);
1594
1754
  }
1755
+ export class ConversationRelay extends TwiML {
1756
+ conversationRelay: XMLElement;
1757
+ /**
1758
+ * <ConversationRelay> TwiML Noun
1759
+ */
1760
+ constructor(conversationRelay: XMLElement);
1761
+ /**
1762
+ * <Language> TwiML Noun
1763
+ *
1764
+ * @param attributes - TwiML attributes
1765
+ */
1766
+ language(attributes?: VoiceResponse.LanguageAttributes): VoiceResponse.Language;
1767
+ /**
1768
+ * <Parameter> TwiML Noun
1769
+ *
1770
+ * @param attributes - TwiML attributes
1771
+ */
1772
+ parameter(attributes?: VoiceResponse.ParameterAttributes): VoiceResponse.Parameter;
1773
+ }
1595
1774
  export class Dial extends TwiML {
1596
1775
  dial: XMLElement;
1597
1776
  /**
@@ -1726,6 +1905,13 @@ declare namespace VoiceResponse {
1726
1905
  */
1727
1906
  constructor(identity: XMLElement);
1728
1907
  }
1908
+ export class Language extends TwiML {
1909
+ language: XMLElement;
1910
+ /**
1911
+ * <Language> TwiML Noun
1912
+ */
1913
+ constructor(language: XMLElement);
1914
+ }
1729
1915
  export class Leave extends TwiML {
1730
1916
  leave: XMLElement;
1731
1917
  /**
@@ -233,6 +233,33 @@ class VoiceResponse extends TwiML_1.default {
233
233
  }
234
234
  }
235
235
  VoiceResponse.ApplicationSid = ApplicationSid;
236
+ class Assistant extends TwiML_1.default {
237
+ /**
238
+ * <Assistant> TwiML Noun
239
+ */
240
+ constructor(assistant) {
241
+ super();
242
+ this.assistant = assistant;
243
+ this._propertyName = "assistant";
244
+ }
245
+ /**
246
+ * <Language> TwiML Noun
247
+ *
248
+ * @param attributes - TwiML attributes
249
+ */
250
+ language(attributes) {
251
+ return new VoiceResponse.Language(this.assistant.ele("Language", attributes));
252
+ }
253
+ /**
254
+ * <Parameter> TwiML Noun
255
+ *
256
+ * @param attributes - TwiML attributes
257
+ */
258
+ parameter(attributes) {
259
+ return new VoiceResponse.Parameter(this.assistant.ele("Parameter", attributes));
260
+ }
261
+ }
262
+ VoiceResponse.Assistant = Assistant;
236
263
  class Autopilot extends TwiML_1.default {
237
264
  /**
238
265
  * <Autopilot> TwiML Noun
@@ -301,6 +328,14 @@ class VoiceResponse extends TwiML_1.default {
301
328
  this.connect = connect;
302
329
  this._propertyName = "connect";
303
330
  }
331
+ /**
332
+ * <Assistant> TwiML Noun
333
+ *
334
+ * @param attributes - TwiML attributes
335
+ */
336
+ assistant(attributes) {
337
+ return new VoiceResponse.Assistant(this.connect.ele("Assistant", attributes));
338
+ }
304
339
  autopilot(attributes, name) {
305
340
  if (typeof attributes === "string") {
306
341
  name = attributes;
@@ -316,6 +351,14 @@ class VoiceResponse extends TwiML_1.default {
316
351
  conversation(attributes) {
317
352
  return new VoiceResponse.Conversation(this.connect.ele("Conversation", attributes));
318
353
  }
354
+ /**
355
+ * <ConversationRelay> TwiML Noun
356
+ *
357
+ * @param attributes - TwiML attributes
358
+ */
359
+ conversationRelay(attributes) {
360
+ return new VoiceResponse.ConversationRelay(this.connect.ele("ConversationRelay", attributes));
361
+ }
319
362
  room(attributes, name) {
320
363
  if (typeof attributes === "string") {
321
364
  name = attributes;
@@ -352,6 +395,33 @@ class VoiceResponse extends TwiML_1.default {
352
395
  }
353
396
  }
354
397
  VoiceResponse.Conversation = Conversation;
398
+ class ConversationRelay extends TwiML_1.default {
399
+ /**
400
+ * <ConversationRelay> TwiML Noun
401
+ */
402
+ constructor(conversationRelay) {
403
+ super();
404
+ this.conversationRelay = conversationRelay;
405
+ this._propertyName = "conversationRelay";
406
+ }
407
+ /**
408
+ * <Language> TwiML Noun
409
+ *
410
+ * @param attributes - TwiML attributes
411
+ */
412
+ language(attributes) {
413
+ return new VoiceResponse.Language(this.conversationRelay.ele("Language", attributes));
414
+ }
415
+ /**
416
+ * <Parameter> TwiML Noun
417
+ *
418
+ * @param attributes - TwiML attributes
419
+ */
420
+ parameter(attributes) {
421
+ return new VoiceResponse.Parameter(this.conversationRelay.ele("Parameter", attributes));
422
+ }
423
+ }
424
+ VoiceResponse.ConversationRelay = ConversationRelay;
355
425
  class Dial extends TwiML_1.default {
356
426
  /**
357
427
  * <Dial> TwiML Verb
@@ -504,6 +574,17 @@ class VoiceResponse extends TwiML_1.default {
504
574
  }
505
575
  }
506
576
  VoiceResponse.Identity = Identity;
577
+ class Language extends TwiML_1.default {
578
+ /**
579
+ * <Language> TwiML Noun
580
+ */
581
+ constructor(language) {
582
+ super();
583
+ this.language = language;
584
+ this._propertyName = "language";
585
+ }
586
+ }
587
+ VoiceResponse.Language = Language;
507
588
  class Leave extends TwiML_1.default {
508
589
  /**
509
590
  * <Leave> TwiML Verb
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "5.3.6",
4
+ "version": "5.3.7",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {