twilio 5.13.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +2 -4
  2. package/lib/rest/InsightsBase.d.ts +3 -0
  3. package/lib/rest/InsightsBase.js +5 -0
  4. package/lib/rest/MessagingBase.d.ts +3 -0
  5. package/lib/rest/MessagingBase.js +5 -0
  6. package/lib/rest/api/v2010/account/call/transcription.d.ts +2 -0
  7. package/lib/rest/api/v2010/account/call/transcription.js +4 -0
  8. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  9. package/lib/rest/api/v2010/account/message.js +4 -0
  10. package/lib/rest/flexApi/V1.d.ts +0 -5
  11. package/lib/rest/flexApi/V1.js +0 -7
  12. package/lib/rest/iam/V1.d.ts +3 -0
  13. package/lib/rest/iam/V1.js +5 -0
  14. package/lib/rest/iam/v1/rolePermission.d.ts +225 -0
  15. package/lib/rest/iam/v1/rolePermission.js +181 -0
  16. package/lib/rest/insights/V2.d.ts +21 -0
  17. package/lib/rest/insights/V2.js +46 -0
  18. package/lib/rest/insights/v2/inbound.d.ts +436 -0
  19. package/lib/rest/insights/v2/inbound.js +342 -0
  20. package/lib/rest/insights/v2/outbound.d.ts +529 -0
  21. package/lib/rest/insights/v2/outbound.js +392 -0
  22. package/lib/rest/insights/v2/report.d.ts +783 -0
  23. package/lib/rest/insights/v2/report.js +550 -0
  24. package/lib/rest/messaging/V3.d.ts +15 -0
  25. package/lib/rest/messaging/V3.js +37 -0
  26. package/lib/rest/messaging/v2/channelsSender.d.ts +4 -0
  27. package/lib/rest/messaging/v2/channelsSender.js +1 -0
  28. package/lib/rest/messaging/v3/typingIndicator.d.ts +90 -0
  29. package/lib/rest/messaging/v3/typingIndicator.js +114 -0
  30. package/lib/rest/numbers/V1.d.ts +8 -0
  31. package/lib/rest/numbers/V1.js +12 -0
  32. package/lib/rest/numbers/v1/embeddedSession.d.ts +84 -0
  33. package/lib/rest/numbers/v1/embeddedSession.js +115 -0
  34. package/lib/rest/numbers/v1/senderIdRegistration.d.ts +181 -0
  35. package/lib/rest/numbers/v1/senderIdRegistration.js +146 -0
  36. package/lib/rest/numbers/v2/application.d.ts +191 -4
  37. package/lib/rest/numbers/v2/application.js +176 -3
  38. package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +1 -1
  39. package/lib/rest/numbers/v3/hostedNumberOrder.js +2 -1
  40. package/lib/rest/previewIam/versionless/organization/user.d.ts +65 -0
  41. package/lib/rest/previewIam/versionless/organization/user.js +72 -1
  42. package/lib/rest/studio/v2/flow/execution.d.ts +24 -0
  43. package/lib/rest/studio/v2/flow/execution.js +10 -0
  44. package/lib/rest/studio/v2/flow/flowRevision.d.ts +6 -0
  45. package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
  46. package/lib/rest/studio/v2/flow.d.ts +6 -0
  47. package/lib/rest/studio/v2/flow.js +2 -0
  48. package/lib/rest/verify/v2/service/approveChallenge.d.ts +6 -6
  49. package/lib/rest/verify/v2/service/approveChallenge.js +2 -2
  50. package/lib/rest/verify/v2/service/newChallenge.d.ts +6 -6
  51. package/lib/rest/verify/v2/service/newChallenge.js +2 -2
  52. package/lib/rest/verify/v2/service/verification.d.ts +2 -2
  53. package/lib/rest/video/v1/room.d.ts +4 -1
  54. package/lib/twiml/VoiceResponse.d.ts +10 -0
  55. package/package.json +2 -2
  56. package/lib/rest/flexApi/v1/createFlexInstance.d.ts +0 -165
  57. package/lib/rest/flexApi/v1/createFlexInstance.js +0 -165
@@ -57,6 +57,20 @@ export declare class ScimName {
57
57
  "familyName"?: string;
58
58
  constructor(payload: any);
59
59
  }
60
+ export declare class ScimPatchOperation {
61
+ /**
62
+ * The operation to perform
63
+ */
64
+ "op"?: string;
65
+ "path"?: string;
66
+ "value"?: Record<string, object>;
67
+ constructor(payload: any);
68
+ }
69
+ export declare class ScimPatchRequest {
70
+ "schemas"?: Array<string>;
71
+ "operations"?: Array<ScimPatchOperation>;
72
+ constructor(payload: any);
73
+ }
60
74
  export declare class ScimUser {
61
75
  /**
62
76
  * Unique Twilio user sid
@@ -118,6 +132,15 @@ export declare class ScimUser {
118
132
  "moreInfo"?: string;
119
133
  constructor(payload: any);
120
134
  }
135
+ /**
136
+ * Options to pass to patch a UserInstance
137
+ */
138
+ export interface UserContextPatchOptions {
139
+ /** */
140
+ scimPatchRequest: ScimPatchRequest;
141
+ /** */
142
+ ifMatch?: string;
143
+ }
121
144
  /**
122
145
  * Options to pass to update a UserInstance
123
146
  */
@@ -200,6 +223,26 @@ export interface UserContext {
200
223
  * @returns Resolves to processed UserInstance with HTTP metadata
201
224
  */
202
225
  fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<UserInstance>) => any): Promise<ApiResponse<UserInstance>>;
226
+ /**
227
+ * Patch a UserInstance
228
+ *
229
+ * @param params - Body for request
230
+ * @param headers - header params for request
231
+ * @param callback - Callback to handle processed record
232
+ *
233
+ * @returns Resolves to processed UserInstance
234
+ */
235
+ patch(params: ScimPatchRequest, headers?: any, callback?: (error: Error | null, item?: UserInstance) => any): Promise<UserInstance>;
236
+ /**
237
+ * Patch a UserInstance and return HTTP info
238
+ *
239
+ * @param params - Body for request
240
+ * @param headers - header params for request
241
+ * @param callback - Callback to handle processed record
242
+ *
243
+ * @returns Resolves to processed UserInstance with HTTP metadata
244
+ */
245
+ patchWithHttpInfo(params: ScimPatchRequest, headers?: any, callback?: (error: Error | null, item?: ApiResponse<UserInstance>) => any): Promise<ApiResponse<UserInstance>>;
203
246
  /**
204
247
  * Update a UserInstance
205
248
  *
@@ -239,6 +282,8 @@ export declare class UserContextImpl implements UserContext {
239
282
  removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<boolean>) => any): Promise<ApiResponse<boolean>>;
240
283
  fetch(callback?: (error: Error | null, item?: UserInstance) => any): Promise<UserInstance>;
241
284
  fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<UserInstance>) => any): Promise<ApiResponse<UserInstance>>;
285
+ patch(params: ScimPatchRequest, headers?: any, callback?: (error: Error | null, item?: UserInstance) => any): Promise<UserInstance>;
286
+ patchWithHttpInfo(params: ScimPatchRequest, headers?: any, callback?: (error: Error | null, item?: ApiResponse<UserInstance>) => any): Promise<ApiResponse<UserInstance>>;
242
287
  update(params: ScimUser, headers?: any, callback?: (error: Error | null, item?: UserInstance) => any): Promise<UserInstance>;
243
288
  updateWithHttpInfo(params: ScimUser, headers?: any, callback?: (error: Error | null, item?: ApiResponse<UserInstance>) => any): Promise<ApiResponse<UserInstance>>;
244
289
  /**
@@ -366,6 +411,26 @@ export declare class UserInstance {
366
411
  * @returns Resolves to processed UserInstance with HTTP metadata
367
412
  */
368
413
  fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<UserInstance>) => any): Promise<ApiResponse<UserInstance>>;
414
+ /**
415
+ * Patch a UserInstance
416
+ *
417
+ * @param params - Body for request
418
+ * @param headers - header params for request
419
+ * @param callback - Callback to handle processed record
420
+ *
421
+ * @returns Resolves to processed UserInstance
422
+ */
423
+ patch(params: ScimPatchRequest, headers?: any, callback?: (error: Error | null, item?: UserInstance) => any): Promise<UserInstance>;
424
+ /**
425
+ * Patch a UserInstance and return HTTP info
426
+ *
427
+ * @param params - Body for request
428
+ * @param headers - header params for request
429
+ * @param callback - Callback to handle processed record
430
+ *
431
+ * @returns Resolves to processed UserInstance with HTTP metadata
432
+ */
433
+ patchWithHttpInfo(params: ScimPatchRequest, headers?: any, callback?: (error: Error | null, item?: ApiResponse<UserInstance>) => any): Promise<ApiResponse<UserInstance>>;
369
434
  /**
370
435
  * Update a UserInstance
371
436
  *
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.UserPage = exports.UserInstance = exports.UserContextImpl = exports.ScimUser = exports.ScimName = exports.ScimMeta = exports.ScimEmailAddress = void 0;
19
+ exports.UserPage = exports.UserInstance = exports.UserContextImpl = exports.ScimUser = exports.ScimPatchRequest = exports.ScimPatchOperation = exports.ScimName = exports.ScimMeta = exports.ScimEmailAddress = void 0;
20
20
  exports.UserListInstance = UserListInstance;
21
21
  const util_1 = require("util");
22
22
  const Page_1 = __importDefault(require("../../../../base/Page"));
@@ -56,6 +56,21 @@ class ScimName {
56
56
  }
57
57
  }
58
58
  exports.ScimName = ScimName;
59
+ class ScimPatchOperation {
60
+ constructor(payload) {
61
+ this.op = payload["op"];
62
+ this.path = payload["path"];
63
+ this.value = payload["value"];
64
+ }
65
+ }
66
+ exports.ScimPatchOperation = ScimPatchOperation;
67
+ class ScimPatchRequest {
68
+ constructor(payload) {
69
+ this.schemas = payload["schemas"];
70
+ this.operations = payload["Operations"];
71
+ }
72
+ }
73
+ exports.ScimPatchRequest = ScimPatchRequest;
59
74
  class ScimUser {
60
75
  constructor(payload) {
61
76
  this.id = payload["id"];
@@ -146,6 +161,56 @@ class UserContextImpl {
146
161
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
147
162
  return operationPromise;
148
163
  }
164
+ patch(params, headers, callback) {
165
+ if (params === null || params === undefined) {
166
+ throw new Error('Required parameter "params" missing.');
167
+ }
168
+ let data = {};
169
+ data = params;
170
+ if (headers === null || headers === undefined) {
171
+ headers = {};
172
+ }
173
+ headers["Content-Type"] = "application/json";
174
+ headers["Accept"] = "application/scim+json";
175
+ const instance = this;
176
+ let operationVersion = instance._version, operationPromise = operationVersion.patch({
177
+ uri: instance._uri,
178
+ method: "patch",
179
+ data,
180
+ headers,
181
+ });
182
+ operationPromise = operationPromise.then((payload) => new UserInstance(operationVersion, payload, instance._solution.organizationSid, instance._solution.id));
183
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
184
+ return operationPromise;
185
+ }
186
+ patchWithHttpInfo(params, headers, callback) {
187
+ if (params === null || params === undefined) {
188
+ throw new Error('Required parameter "params" missing.');
189
+ }
190
+ let data = {};
191
+ data = params;
192
+ if (headers === null || headers === undefined) {
193
+ headers = {};
194
+ }
195
+ headers["Content-Type"] = "application/json";
196
+ headers["Accept"] = "application/scim+json";
197
+ const instance = this;
198
+ let operationVersion = instance._version;
199
+ // CREATE, FETCH, UPDATE operations
200
+ let operationPromise = operationVersion
201
+ .patchWithResponseInfo({
202
+ uri: instance._uri,
203
+ method: "patch",
204
+ data,
205
+ headers,
206
+ })
207
+ .then((response) => ({
208
+ ...response,
209
+ body: new UserInstance(operationVersion, response.body, instance._solution.organizationSid, instance._solution.id),
210
+ }));
211
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
212
+ return operationPromise;
213
+ }
149
214
  update(params, headers, callback) {
150
215
  if (params === null || params === undefined) {
151
216
  throw new Error('Required parameter "params" missing.');
@@ -285,6 +350,12 @@ class UserInstance {
285
350
  fetchWithHttpInfo(callback) {
286
351
  return this._proxy.fetchWithHttpInfo(callback);
287
352
  }
353
+ patch(params, callback) {
354
+ return this._proxy.patch(params, callback);
355
+ }
356
+ patchWithHttpInfo(params, callback) {
357
+ return this._proxy.patchWithHttpInfo(params, callback);
358
+ }
288
359
  update(params, callback) {
289
360
  return this._proxy.update(params, callback);
290
361
  }
@@ -31,6 +31,8 @@ export interface ExecutionListInstanceCreateOptions {
31
31
  * Options to pass to each
32
32
  */
33
33
  export interface ExecutionListInstanceEachOptions {
34
+ /** Only show Execution resources with the given status. Can be: `active` or `ended`. */
35
+ status?: ExecutionStatus;
34
36
  /** Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. */
35
37
  dateCreatedFrom?: Date;
36
38
  /** Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. */
@@ -48,6 +50,8 @@ export interface ExecutionListInstanceEachOptions {
48
50
  * Options to pass to list
49
51
  */
50
52
  export interface ExecutionListInstanceOptions {
53
+ /** Only show Execution resources with the given status. Can be: `active` or `ended`. */
54
+ status?: ExecutionStatus;
51
55
  /** Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. */
52
56
  dateCreatedFrom?: Date;
53
57
  /** Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. */
@@ -61,6 +65,8 @@ export interface ExecutionListInstanceOptions {
61
65
  * Options to pass to page
62
66
  */
63
67
  export interface ExecutionListInstancePageOptions {
68
+ /** Only show Execution resources with the given status. Can be: `active` or `ended`. */
69
+ status?: ExecutionStatus;
64
70
  /** Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. */
65
71
  dateCreatedFrom?: Date;
66
72
  /** Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. */
@@ -166,10 +172,13 @@ interface ExecutionResource {
166
172
  account_sid: string;
167
173
  flow_sid: string;
168
174
  contact_channel_address: string;
175
+ contact_sid: string;
176
+ flow_version: number;
169
177
  context: any;
170
178
  status: ExecutionStatus;
171
179
  date_created: Date;
172
180
  date_updated: Date;
181
+ initiated_by: string;
173
182
  url: string;
174
183
  links: Record<string, string>;
175
184
  }
@@ -194,6 +203,14 @@ export declare class ExecutionInstance {
194
203
  * The phone number, SIP address or Client identifier that triggered the Execution. Phone numbers are in E.164 format (e.g. +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`.
195
204
  */
196
205
  contactChannelAddress: string;
206
+ /**
207
+ * The SID of the Contact.
208
+ */
209
+ contactSid: string;
210
+ /**
211
+ * The Flow version number at the time of Execution creation.
212
+ */
213
+ flowVersion: number;
197
214
  /**
198
215
  * The current state of the Flow\'s Execution. As a flow executes, we save its state in this context. We save data that your widgets can access as variables in configuration fields or in text areas as variable substitution.
199
216
  */
@@ -207,6 +224,10 @@ export declare class ExecutionInstance {
207
224
  * The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
208
225
  */
209
226
  dateUpdated: Date;
227
+ /**
228
+ * The SID or identifier that triggered this Execution. For example, a Call SID if triggered by an incoming call, a Message SID if triggered by an incoming message, a Request SID if triggered by a REST API request, and so on.
229
+ */
230
+ initiatedBy: string;
210
231
  /**
211
232
  * The absolute URL of the resource.
212
233
  */
@@ -284,10 +305,13 @@ export declare class ExecutionInstance {
284
305
  accountSid: string;
285
306
  flowSid: string;
286
307
  contactChannelAddress: string;
308
+ contactSid: string;
309
+ flowVersion: number;
287
310
  context: any;
288
311
  status: ExecutionStatus;
289
312
  dateCreated: Date;
290
313
  dateUpdated: Date;
314
+ initiatedBy: string;
291
315
  url: string;
292
316
  links: Record<string, string>;
293
317
  };
@@ -178,10 +178,13 @@ class ExecutionInstance {
178
178
  this.accountSid = payload.account_sid;
179
179
  this.flowSid = payload.flow_sid;
180
180
  this.contactChannelAddress = payload.contact_channel_address;
181
+ this.contactSid = payload.contact_sid;
182
+ this.flowVersion = deserialize.integer(payload.flow_version);
181
183
  this.context = payload.context;
182
184
  this.status = payload.status;
183
185
  this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
184
186
  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
187
+ this.initiatedBy = payload.initiated_by;
185
188
  this.url = payload.url;
186
189
  this.links = payload.links;
187
190
  this._solution = { flowSid, sid: sid || this.sid };
@@ -261,10 +264,13 @@ class ExecutionInstance {
261
264
  accountSid: this.accountSid,
262
265
  flowSid: this.flowSid,
263
266
  contactChannelAddress: this.contactChannelAddress,
267
+ contactSid: this.contactSid,
268
+ flowVersion: this.flowVersion,
264
269
  context: this.context,
265
270
  status: this.status,
266
271
  dateCreated: this.dateCreated,
267
272
  dateUpdated: this.dateUpdated,
273
+ initiatedBy: this.initiatedBy,
268
274
  url: this.url,
269
275
  links: this.links,
270
276
  };
@@ -356,6 +362,8 @@ function ExecutionListInstance(version, flowSid) {
356
362
  params = params || {};
357
363
  }
358
364
  let data = {};
365
+ if (params["status"] !== undefined)
366
+ data["status"] = params["status"];
359
367
  if (params["dateCreatedFrom"] !== undefined)
360
368
  data["DateCreatedFrom"] = serialize.iso8601DateTime(params["dateCreatedFrom"]);
361
369
  if (params["dateCreatedTo"] !== undefined)
@@ -398,6 +406,8 @@ function ExecutionListInstance(version, flowSid) {
398
406
  params = params || {};
399
407
  }
400
408
  let data = {};
409
+ if (params["status"] !== undefined)
410
+ data["status"] = params["status"];
401
411
  if (params["dateCreatedFrom"] !== undefined)
402
412
  data["DateCreatedFrom"] = serialize.iso8601DateTime(params["dateCreatedFrom"]);
403
413
  if (params["dateCreatedTo"] !== undefined)
@@ -88,6 +88,7 @@ interface FlowRevisionPayload extends TwilioResponsePayload {
88
88
  interface FlowRevisionResource {
89
89
  sid: string;
90
90
  account_sid: string;
91
+ author_sid: string;
91
92
  friendly_name: string;
92
93
  definition: any;
93
94
  status: FlowRevisionStatus;
@@ -112,6 +113,10 @@ export declare class FlowRevisionInstance {
112
113
  * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flow resource.
113
114
  */
114
115
  accountSid: string;
116
+ /**
117
+ * The SID of the User that created or last updated the Flow.
118
+ */
119
+ authorSid: string;
115
120
  /**
116
121
  * The string that you assigned to describe the Flow.
117
122
  */
@@ -174,6 +179,7 @@ export declare class FlowRevisionInstance {
174
179
  toJSON(): {
175
180
  sid: string;
176
181
  accountSid: string;
182
+ authorSid: string;
177
183
  friendlyName: string;
178
184
  definition: any;
179
185
  status: FlowRevisionStatus;
@@ -85,6 +85,7 @@ class FlowRevisionInstance {
85
85
  this._version = _version;
86
86
  this.sid = payload.sid;
87
87
  this.accountSid = payload.account_sid;
88
+ this.authorSid = payload.author_sid;
88
89
  this.friendlyName = payload.friendly_name;
89
90
  this.definition = payload.definition;
90
91
  this.status = payload.status;
@@ -132,6 +133,7 @@ class FlowRevisionInstance {
132
133
  return {
133
134
  sid: this.sid,
134
135
  accountSid: this.accountSid,
136
+ authorSid: this.authorSid,
135
137
  friendlyName: this.friendlyName,
136
138
  definition: this.definition,
137
139
  status: this.status,
@@ -163,6 +163,7 @@ interface FlowPayload extends TwilioResponsePayload {
163
163
  interface FlowResource {
164
164
  sid: string;
165
165
  account_sid: string;
166
+ author_sid: string;
166
167
  friendly_name: string;
167
168
  definition: any;
168
169
  status: FlowStatus;
@@ -190,6 +191,10 @@ export declare class FlowInstance {
190
191
  * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flow resource.
191
192
  */
192
193
  accountSid: string;
194
+ /**
195
+ * The SID of the User that created or last updated the Flow.
196
+ */
197
+ authorSid: string;
193
198
  /**
194
199
  * The string that you assigned to describe the Flow.
195
200
  */
@@ -307,6 +312,7 @@ export declare class FlowInstance {
307
312
  toJSON(): {
308
313
  sid: string;
309
314
  accountSid: string;
315
+ authorSid: string;
310
316
  friendlyName: string;
311
317
  definition: any;
312
318
  status: FlowStatus;
@@ -192,6 +192,7 @@ class FlowInstance {
192
192
  this._version = _version;
193
193
  this.sid = payload.sid;
194
194
  this.accountSid = payload.account_sid;
195
+ this.authorSid = payload.author_sid;
195
196
  this.friendlyName = payload.friendly_name;
196
197
  this.definition = payload.definition;
197
198
  this.status = payload.status;
@@ -285,6 +286,7 @@ class FlowInstance {
285
286
  return {
286
287
  sid: this.sid,
287
288
  accountSid: this.accountSid,
289
+ authorSid: this.authorSid,
288
290
  friendlyName: this.friendlyName,
289
291
  definition: this.definition,
290
292
  status: this.status,
@@ -85,7 +85,6 @@ export interface ApproveChallengeListInstance {
85
85
  }
86
86
  export declare function ApproveChallengeListInstance(version: V2, serviceSid: string): ApproveChallengeListInstance;
87
87
  interface ApproveChallengeResource {
88
- options: Record<string, object>;
89
88
  sid: string;
90
89
  account_sid: string;
91
90
  service_sid: string;
@@ -104,14 +103,11 @@ interface ApproveChallengeResource {
104
103
  factor_type: string;
105
104
  url: string;
106
105
  links: Record<string, string>;
106
+ options: Record<string, object>;
107
107
  }
108
108
  export declare class ApproveChallengeInstance {
109
109
  protected _version: V2;
110
110
  constructor(_version: V2, payload: ApproveChallengeResource, serviceSid: string);
111
- /**
112
- * An object that contains challenge options. Currently only used for `passkeys`.
113
- */
114
- options: Record<string, object>;
115
111
  /**
116
112
  * A 34 character string that uniquely identifies this Challenge.
117
113
  */
@@ -184,13 +180,16 @@ export declare class ApproveChallengeInstance {
184
180
  * Contains a dictionary of URL links to nested resources of this Challenge.
185
181
  */
186
182
  links: Record<string, string>;
183
+ /**
184
+ * An object that contains challenge options. Currently only used for `passkeys`.
185
+ */
186
+ options: Record<string, object>;
187
187
  /**
188
188
  * Provide a user-friendly representation
189
189
  *
190
190
  * @returns Object
191
191
  */
192
192
  toJSON(): {
193
- options: Record<string, object>;
194
193
  sid: string;
195
194
  accountSid: string;
196
195
  serviceSid: string;
@@ -209,6 +208,7 @@ export declare class ApproveChallengeInstance {
209
208
  factorType: string;
210
209
  url: string;
211
210
  links: Record<string, string>;
211
+ options: Record<string, object>;
212
212
  };
213
213
  [inspect.custom](_depth: any, options: InspectOptions): string;
214
214
  }
@@ -108,7 +108,6 @@ function ApproveChallengeListInstance(version, serviceSid) {
108
108
  class ApproveChallengeInstance {
109
109
  constructor(_version, payload, serviceSid) {
110
110
  this._version = _version;
111
- this.options = payload.options;
112
111
  this.sid = payload.sid;
113
112
  this.accountSid = payload.account_sid;
114
113
  this.serviceSid = payload.service_sid;
@@ -127,6 +126,7 @@ class ApproveChallengeInstance {
127
126
  this.factorType = payload.factor_type;
128
127
  this.url = payload.url;
129
128
  this.links = payload.links;
129
+ this.options = payload.options;
130
130
  }
131
131
  /**
132
132
  * Provide a user-friendly representation
@@ -135,7 +135,6 @@ class ApproveChallengeInstance {
135
135
  */
136
136
  toJSON() {
137
137
  return {
138
- options: this.options,
139
138
  sid: this.sid,
140
139
  accountSid: this.accountSid,
141
140
  serviceSid: this.serviceSid,
@@ -154,6 +153,7 @@ class ApproveChallengeInstance {
154
153
  factorType: this.factorType,
155
154
  url: this.url,
156
155
  links: this.links,
156
+ options: this.options,
157
157
  };
158
158
  }
159
159
  [util_1.inspect.custom](_depth, options) {
@@ -59,7 +59,6 @@ export declare class NewChallengeContextImpl implements NewChallengeContext {
59
59
  [inspect.custom](_depth: any, options: InspectOptions): string;
60
60
  }
61
61
  interface NewChallengeResource {
62
- options: Record<string, object>;
63
62
  sid: string;
64
63
  account_sid: string;
65
64
  service_sid: string;
@@ -78,16 +77,13 @@ interface NewChallengeResource {
78
77
  factor_type: string;
79
78
  url: string;
80
79
  links: Record<string, string>;
80
+ options: Record<string, object>;
81
81
  }
82
82
  export declare class NewChallengeInstance {
83
83
  protected _version: V2;
84
84
  protected _solution: NewChallengeContextSolution;
85
85
  protected _context?: NewChallengeContext;
86
86
  constructor(_version: V2, payload: NewChallengeResource, serviceSid: string);
87
- /**
88
- * An object that contains challenge options. Currently only used for `passkeys`.
89
- */
90
- options: Record<string, object>;
91
87
  /**
92
88
  * A 34 character string that uniquely identifies this Challenge.
93
89
  */
@@ -160,6 +156,10 @@ export declare class NewChallengeInstance {
160
156
  * Contains a dictionary of URL links to nested resources of this Challenge.
161
157
  */
162
158
  links: Record<string, string>;
159
+ /**
160
+ * An object that contains challenge options. Currently only used for `passkeys`.
161
+ */
162
+ options: Record<string, object>;
163
163
  private get _proxy();
164
164
  /**
165
165
  * Create a NewChallengeInstance
@@ -187,7 +187,6 @@ export declare class NewChallengeInstance {
187
187
  * @returns Object
188
188
  */
189
189
  toJSON(): {
190
- options: Record<string, object>;
191
190
  sid: string;
192
191
  accountSid: string;
193
192
  serviceSid: string;
@@ -206,6 +205,7 @@ export declare class NewChallengeInstance {
206
205
  factorType: string;
207
206
  url: string;
208
207
  links: Record<string, string>;
208
+ options: Record<string, object>;
209
209
  };
210
210
  [inspect.custom](_depth: any, options: InspectOptions): string;
211
211
  }
@@ -101,7 +101,6 @@ exports.NewChallengeContextImpl = NewChallengeContextImpl;
101
101
  class NewChallengeInstance {
102
102
  constructor(_version, payload, serviceSid) {
103
103
  this._version = _version;
104
- this.options = payload.options;
105
104
  this.sid = payload.sid;
106
105
  this.accountSid = payload.account_sid;
107
106
  this.serviceSid = payload.service_sid;
@@ -120,6 +119,7 @@ class NewChallengeInstance {
120
119
  this.factorType = payload.factor_type;
121
120
  this.url = payload.url;
122
121
  this.links = payload.links;
122
+ this.options = payload.options;
123
123
  this._solution = { serviceSid };
124
124
  }
125
125
  get _proxy() {
@@ -141,7 +141,6 @@ class NewChallengeInstance {
141
141
  */
142
142
  toJSON() {
143
143
  return {
144
- options: this.options,
145
144
  sid: this.sid,
146
145
  accountSid: this.accountSid,
147
146
  serviceSid: this.serviceSid,
@@ -160,6 +159,7 @@ class NewChallengeInstance {
160
159
  factorType: this.factorType,
161
160
  url: this.url,
162
161
  links: this.links,
162
+ options: this.options,
163
163
  };
164
164
  }
165
165
  [util_1.inspect.custom](_depth, options) {
@@ -30,7 +30,7 @@ export interface VerificationListInstanceCreateOptions {
30
30
  channel: string;
31
31
  /** A custom user defined friendly name that overwrites the existing one in the verification message */
32
32
  customFriendlyName?: string;
33
- /** The text of a custom message to use for the verification. */
33
+ /** The text of a custom message to use for the verification [DEPRECATED]. */
34
34
  customMessage?: string;
35
35
  /** The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). */
36
36
  sendDigits?: string;
@@ -58,7 +58,7 @@ export interface VerificationListInstanceCreateOptions {
58
58
  enableSnaClientToken?: boolean;
59
59
  /** */
60
60
  riskCheck?: VerificationRiskCheck;
61
- /** A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length. */
61
+ /** A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The tags will also be included as part of the verification and message status event type payloads. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length. **This value should not contain PII.** */
62
62
  tags?: string;
63
63
  }
64
64
  export interface VerificationContext {
@@ -8,7 +8,10 @@ import { RecordingRulesListInstance } from "./room/recordingRules";
8
8
  import { RoomRecordingListInstance } from "./room/roomRecording";
9
9
  import { TranscriptionsListInstance } from "./room/transcriptions";
10
10
  export type RoomRoomStatus = "in-progress" | "completed" | "failed";
11
- export type RoomRoomType = "go" | "peer-to-peer" | "group" | "group-small";
11
+ /**
12
+ * Type of room. Use `group` for new implementations. `go`, `peer-to-peer`, and `group-small` are deprecated.
13
+ */
14
+ export type RoomRoomType = "group" | "go" | "peer-to-peer" | "group-small";
12
15
  export type RoomVideoCodec = "VP8" | "H264";
13
16
  /**
14
17
  * Options to pass to update a RoomInstance
@@ -1526,14 +1526,22 @@ declare namespace VoiceResponse {
1526
1526
  * Attributes to pass to conversationRelay
1527
1527
  */
1528
1528
  export interface ConversationRelayAttributes {
1529
+ /** backgroundnoisereduction - This parameters enables background noise filtering on the audio stream before it reaches the STT engine, improving transcription accuracy in noisy environments */
1530
+ backgroundnoisereduction?: string;
1529
1531
  /** debug - Multiple debug options to be used for troubleshooting */
1530
1532
  debug?: string;
1533
+ /** deepgramsmartformat - This parameter enables Deepgram's smart formatting feature, which automatically applies punctuation, capitalization, and formatting (e.g. numbers, dates, currency) to transcripts */
1534
+ deepgramsmartformat?: string;
1531
1535
  /** dtmfDetection - Whether DTMF tones should be detected and reported in speech transcription */
1532
1536
  dtmfDetection?: boolean;
1533
1537
  /** elevenlabsTextNormalization - When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature */
1534
1538
  elevenlabsTextNormalization?: string;
1539
+ /** events - This parameter allows you to enable event subscriptions */
1540
+ events?: string;
1535
1541
  /** hints - Phrases to help better accuracy in speech recognition of these pharases */
1536
1542
  hints?: string;
1543
+ /** ignorebackchannel - This parameter brief caller acknowledgments (e.g. "yeah", "uh-huh") are ignored and will not interrupt the agent while it is speaking. */
1544
+ ignorebackchannel?: string;
1537
1545
  /** intelligenceService - The Conversational Intelligence Service id or unique name to be used for the session */
1538
1546
  intelligenceService?: string;
1539
1547
  /** interruptSensitivity - Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high */
@@ -1552,6 +1560,8 @@ declare namespace VoiceResponse {
1552
1560
  reportInputDuringAgentSpeech?: boolean;
1553
1561
  /** speechModel - Speech model to be used for transcription */
1554
1562
  speechModel?: string;
1563
+ /** speechtimeout - Set the duration of silence that indicates the end of speech */
1564
+ speechtimeout?: string;
1555
1565
  /** transcriptionLanguage - Language to be used for transcription */
1556
1566
  transcriptionLanguage?: string;
1557
1567
  /** transcriptionProvider - Provider to be used for transcription */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "5.13.0",
4
+ "version": "6.0.0",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {
@@ -71,7 +71,7 @@
71
71
  "main": "./lib",
72
72
  "types": "./index.d.ts",
73
73
  "engines": {
74
- "node": ">=14.0"
74
+ "node": ">=20.0.0"
75
75
  },
76
76
  "license": "MIT"
77
77
  }