twilio 5.0.4 → 5.1.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 (71) hide show
  1. package/lib/rest/ContentBase.d.ts +3 -0
  2. package/lib/rest/ContentBase.js +5 -0
  3. package/lib/rest/Twilio.d.ts +0 -5
  4. package/lib/rest/Twilio.js +0 -6
  5. package/lib/rest/api/v2010/account/message.d.ts +1 -1
  6. package/lib/rest/content/V2.d.ts +20 -0
  7. package/lib/rest/content/V2.js +43 -0
  8. package/lib/rest/content/v2/content.d.ts +196 -0
  9. package/lib/rest/content/v2/content.js +136 -0
  10. package/lib/rest/content/v2/contentAndApprovals.d.ts +190 -0
  11. package/lib/rest/content/v2/contentAndApprovals.js +134 -0
  12. package/lib/rest/flexApi/v1/interaction.d.ts +1 -1
  13. package/lib/rest/flexApi/v1/interaction.js +2 -4
  14. package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +4 -1
  15. package/lib/rest/flexApi/v1/plugin/pluginVersions.js +2 -0
  16. package/lib/rest/intelligence/V2.d.ts +30 -0
  17. package/lib/rest/intelligence/V2.js +40 -0
  18. package/lib/rest/intelligence/v2/customOperator.d.ts +330 -0
  19. package/lib/rest/intelligence/v2/customOperator.js +279 -0
  20. package/lib/rest/intelligence/v2/operator.d.ts +263 -0
  21. package/lib/rest/intelligence/v2/operator.js +197 -0
  22. package/lib/rest/intelligence/v2/operatorAttachment.d.ts +112 -0
  23. package/lib/rest/intelligence/v2/operatorAttachment.js +135 -0
  24. package/lib/rest/intelligence/v2/operatorAttachments.d.ts +94 -0
  25. package/lib/rest/intelligence/v2/operatorAttachments.js +110 -0
  26. package/lib/rest/intelligence/v2/operatorType.d.ts +259 -0
  27. package/lib/rest/intelligence/v2/operatorType.js +197 -0
  28. package/lib/rest/intelligence/v2/prebuiltOperator.d.ts +263 -0
  29. package/lib/rest/intelligence/v2/prebuiltOperator.js +197 -0
  30. package/lib/rest/intelligence/v2/service.d.ts +8 -4
  31. package/lib/rest/intelligence/v2/service.js +3 -2
  32. package/lib/rest/messaging/v1/service.d.ts +0 -6
  33. package/lib/rest/messaging/v1/service.js +0 -2
  34. package/lib/rest/numbers/V1.d.ts +15 -10
  35. package/lib/rest/numbers/V1.js +24 -15
  36. package/lib/rest/numbers/v1/portingPortIn.d.ts +74 -0
  37. package/lib/rest/numbers/v1/portingPortIn.js +38 -0
  38. package/lib/rest/numbers/v1/portingPortInPhoneNumber.d.ts +124 -0
  39. package/lib/rest/numbers/v1/portingPortInPhoneNumber.js +87 -1
  40. package/lib/rest/numbers/v1/portingWebhookConfiguration.d.ts +79 -0
  41. package/lib/rest/{previewMessaging/v1/broadcast.js → numbers/v1/portingWebhookConfiguration.js} +19 -32
  42. package/lib/rest/numbers/v1/portingWebhookConfigurationDelete.d.ts +51 -0
  43. package/lib/rest/numbers/v1/portingWebhookConfigurationDelete.js +68 -0
  44. package/lib/rest/numbers/v1/portingWebhookConfigurationFetch.d.ts +75 -0
  45. package/lib/rest/numbers/v1/portingWebhookConfigurationFetch.js +72 -0
  46. package/lib/rest/taskrouter/v1/workspace/task.d.ts +24 -0
  47. package/lib/rest/taskrouter/v1/workspace/task.js +12 -0
  48. package/lib/rest/trusthub/v1/complianceTollfreeInquiries.d.ts +2 -0
  49. package/lib/rest/trusthub/v1/complianceTollfreeInquiries.js +2 -0
  50. package/lib/rest/trusthub/v1/customerProfiles.d.ts +6 -0
  51. package/lib/rest/trusthub/v1/customerProfiles.js +2 -0
  52. package/lib/rest/trusthub/v1/trustProducts.d.ts +6 -0
  53. package/lib/rest/trusthub/v1/trustProducts.js +2 -0
  54. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  55. package/lib/rest/verify/v2/service/verificationCheck.d.ts +1 -1
  56. package/lib/rest/verify/v2/service.d.ts +1 -1
  57. package/lib/webhooks/webhooks.js +4 -5
  58. package/package.json +1 -1
  59. package/lib/rest/PreviewMessaging.d.ts +0 -9
  60. package/lib/rest/PreviewMessaging.js +0 -15
  61. package/lib/rest/PreviewMessagingBase.d.ts +0 -13
  62. package/lib/rest/PreviewMessagingBase.js +0 -31
  63. package/lib/rest/numbers/v1/portingBulkPortability.d.ts +0 -120
  64. package/lib/rest/numbers/v1/portingBulkPortability.js +0 -136
  65. package/lib/rest/numbers/v1/portingPortInFetch.d.ts +0 -142
  66. package/lib/rest/numbers/v1/portingPortInFetch.js +0 -128
  67. package/lib/rest/previewMessaging/V1.d.ts +0 -20
  68. package/lib/rest/previewMessaging/V1.js +0 -42
  69. package/lib/rest/previewMessaging/v1/broadcast.d.ts +0 -108
  70. package/lib/rest/previewMessaging/v1/message.d.ts +0 -178
  71. package/lib/rest/previewMessaging/v1/message.js +0 -91
@@ -0,0 +1,51 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ export type PortingWebhookConfigurationDeleteWebhookType = "PORT_IN" | "PORT_OUT";
5
+ export interface PortingWebhookConfigurationDeleteContext {
6
+ /**
7
+ * Remove a PortingWebhookConfigurationDeleteInstance
8
+ *
9
+ * @param callback - Callback to handle processed record
10
+ *
11
+ * @returns Resolves to processed boolean
12
+ */
13
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
14
+ /**
15
+ * Provide a user-friendly representation
16
+ */
17
+ toJSON(): any;
18
+ [inspect.custom](_depth: any, options: InspectOptions): any;
19
+ }
20
+ export interface PortingWebhookConfigurationDeleteContextSolution {
21
+ webhookType: PortingWebhookConfigurationDeleteWebhookType;
22
+ }
23
+ export declare class PortingWebhookConfigurationDeleteContextImpl implements PortingWebhookConfigurationDeleteContext {
24
+ protected _version: V1;
25
+ protected _solution: PortingWebhookConfigurationDeleteContextSolution;
26
+ protected _uri: string;
27
+ constructor(_version: V1, webhookType: PortingWebhookConfigurationDeleteWebhookType);
28
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
29
+ /**
30
+ * Provide a user-friendly representation
31
+ *
32
+ * @returns Object
33
+ */
34
+ toJSON(): PortingWebhookConfigurationDeleteContextSolution;
35
+ [inspect.custom](_depth: any, options: InspectOptions): string;
36
+ }
37
+ export interface PortingWebhookConfigurationDeleteSolution {
38
+ }
39
+ export interface PortingWebhookConfigurationDeleteListInstance {
40
+ _version: V1;
41
+ _solution: PortingWebhookConfigurationDeleteSolution;
42
+ _uri: string;
43
+ (webhookType: PortingWebhookConfigurationDeleteWebhookType): PortingWebhookConfigurationDeleteContext;
44
+ get(webhookType: PortingWebhookConfigurationDeleteWebhookType): PortingWebhookConfigurationDeleteContext;
45
+ /**
46
+ * Provide a user-friendly representation
47
+ */
48
+ toJSON(): any;
49
+ [inspect.custom](_depth: any, options: InspectOptions): any;
50
+ }
51
+ export declare function PortingWebhookConfigurationDeleteListInstance(version: V1): PortingWebhookConfigurationDeleteListInstance;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Numbers
9
+ * This is the public Twilio REST API.
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PortingWebhookConfigurationDeleteListInstance = exports.PortingWebhookConfigurationDeleteContextImpl = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ const utility_1 = require("../../../base/utility");
21
+ class PortingWebhookConfigurationDeleteContextImpl {
22
+ constructor(_version, webhookType) {
23
+ this._version = _version;
24
+ if (!(0, utility_1.isValidPathParam)(webhookType)) {
25
+ throw new Error("Parameter 'webhookType' is not valid.");
26
+ }
27
+ this._solution = { webhookType };
28
+ this._uri = `/Porting/Configuration/Webhook/${webhookType}`;
29
+ }
30
+ remove(callback) {
31
+ const instance = this;
32
+ let operationVersion = instance._version, operationPromise = operationVersion.remove({
33
+ uri: instance._uri,
34
+ method: "delete",
35
+ });
36
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
37
+ return operationPromise;
38
+ }
39
+ /**
40
+ * Provide a user-friendly representation
41
+ *
42
+ * @returns Object
43
+ */
44
+ toJSON() {
45
+ return this._solution;
46
+ }
47
+ [util_1.inspect.custom](_depth, options) {
48
+ return (0, util_1.inspect)(this.toJSON(), options);
49
+ }
50
+ }
51
+ exports.PortingWebhookConfigurationDeleteContextImpl = PortingWebhookConfigurationDeleteContextImpl;
52
+ function PortingWebhookConfigurationDeleteListInstance(version) {
53
+ const instance = ((webhookType) => instance.get(webhookType));
54
+ instance.get = function get(webhookType) {
55
+ return new PortingWebhookConfigurationDeleteContextImpl(version, webhookType);
56
+ };
57
+ instance._version = version;
58
+ instance._solution = {};
59
+ instance._uri = ``;
60
+ instance.toJSON = function toJSON() {
61
+ return instance._solution;
62
+ };
63
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
64
+ return (0, util_1.inspect)(instance.toJSON(), options);
65
+ };
66
+ return instance;
67
+ }
68
+ exports.PortingWebhookConfigurationDeleteListInstance = PortingWebhookConfigurationDeleteListInstance;
@@ -0,0 +1,75 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ export interface PortingWebhookConfigurationFetchSolution {
5
+ }
6
+ export interface PortingWebhookConfigurationFetchListInstance {
7
+ _version: V1;
8
+ _solution: PortingWebhookConfigurationFetchSolution;
9
+ _uri: string;
10
+ /**
11
+ * Fetch a PortingWebhookConfigurationFetchInstance
12
+ *
13
+ * @param callback - Callback to handle processed record
14
+ *
15
+ * @returns Resolves to processed PortingWebhookConfigurationFetchInstance
16
+ */
17
+ fetch(callback?: (error: Error | null, item?: PortingWebhookConfigurationFetchInstance) => any): Promise<PortingWebhookConfigurationFetchInstance>;
18
+ /**
19
+ * Provide a user-friendly representation
20
+ */
21
+ toJSON(): any;
22
+ [inspect.custom](_depth: any, options: InspectOptions): any;
23
+ }
24
+ export declare function PortingWebhookConfigurationFetchListInstance(version: V1): PortingWebhookConfigurationFetchListInstance;
25
+ interface PortingWebhookConfigurationFetchResource {
26
+ url: string;
27
+ port_in_target_url: string;
28
+ port_out_target_url: string;
29
+ notifications_of: Array<string>;
30
+ port_in_target_date_created: Date;
31
+ port_out_target_date_created: Date;
32
+ }
33
+ export declare class PortingWebhookConfigurationFetchInstance {
34
+ protected _version: V1;
35
+ constructor(_version: V1, payload: PortingWebhookConfigurationFetchResource);
36
+ /**
37
+ * The URL of the webhook configuration request
38
+ */
39
+ url: string;
40
+ /**
41
+ * Webhook URL to send a request when a port in request or port in phone number event happens
42
+ */
43
+ portInTargetUrl: string;
44
+ /**
45
+ * Webhook URL to send a request when a port out phone number event happens
46
+ */
47
+ portOutTargetUrl: string;
48
+ /**
49
+ * List of notification events to send a request to the webhook URL
50
+ */
51
+ notificationsOf: Array<string>;
52
+ /**
53
+ * Creation date for the port in webhook configuration
54
+ */
55
+ portInTargetDateCreated: Date;
56
+ /**
57
+ * Creation date for the port out webhook configuration
58
+ */
59
+ portOutTargetDateCreated: Date;
60
+ /**
61
+ * Provide a user-friendly representation
62
+ *
63
+ * @returns Object
64
+ */
65
+ toJSON(): {
66
+ url: string;
67
+ portInTargetUrl: string;
68
+ portOutTargetUrl: string;
69
+ notificationsOf: string[];
70
+ portInTargetDateCreated: Date;
71
+ portOutTargetDateCreated: Date;
72
+ };
73
+ [inspect.custom](_depth: any, options: InspectOptions): string;
74
+ }
75
+ export {};
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Numbers
9
+ * This is the public Twilio REST API.
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PortingWebhookConfigurationFetchInstance = exports.PortingWebhookConfigurationFetchListInstance = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ function PortingWebhookConfigurationFetchListInstance(version) {
21
+ const instance = {};
22
+ instance._version = version;
23
+ instance._solution = {};
24
+ instance._uri = `/Porting/Configuration/Webhook`;
25
+ instance.fetch = function fetch(callback) {
26
+ let operationVersion = version, operationPromise = operationVersion.fetch({
27
+ uri: instance._uri,
28
+ method: "get",
29
+ });
30
+ operationPromise = operationPromise.then((payload) => new PortingWebhookConfigurationFetchInstance(operationVersion, payload));
31
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
32
+ return operationPromise;
33
+ };
34
+ instance.toJSON = function toJSON() {
35
+ return instance._solution;
36
+ };
37
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
38
+ return (0, util_1.inspect)(instance.toJSON(), options);
39
+ };
40
+ return instance;
41
+ }
42
+ exports.PortingWebhookConfigurationFetchListInstance = PortingWebhookConfigurationFetchListInstance;
43
+ class PortingWebhookConfigurationFetchInstance {
44
+ constructor(_version, payload) {
45
+ this._version = _version;
46
+ this.url = payload.url;
47
+ this.portInTargetUrl = payload.port_in_target_url;
48
+ this.portOutTargetUrl = payload.port_out_target_url;
49
+ this.notificationsOf = payload.notifications_of;
50
+ this.portInTargetDateCreated = deserialize.iso8601DateTime(payload.port_in_target_date_created);
51
+ this.portOutTargetDateCreated = deserialize.iso8601DateTime(payload.port_out_target_date_created);
52
+ }
53
+ /**
54
+ * Provide a user-friendly representation
55
+ *
56
+ * @returns Object
57
+ */
58
+ toJSON() {
59
+ return {
60
+ url: this.url,
61
+ portInTargetUrl: this.portInTargetUrl,
62
+ portOutTargetUrl: this.portOutTargetUrl,
63
+ notificationsOf: this.notificationsOf,
64
+ portInTargetDateCreated: this.portInTargetDateCreated,
65
+ portOutTargetDateCreated: this.portOutTargetDateCreated,
66
+ };
67
+ }
68
+ [util_1.inspect.custom](_depth, options) {
69
+ return (0, util_1.inspect)(this.toJSON(), options);
70
+ }
71
+ }
72
+ exports.PortingWebhookConfigurationFetchInstance = PortingWebhookConfigurationFetchInstance;
@@ -47,6 +47,12 @@ export interface TaskListInstanceCreateOptions {
47
47
  attributes?: string;
48
48
  /** The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can\\\'t be in the future. */
49
49
  virtualStartTime?: Date;
50
+ /** A SID of a Worker, Queue, or Workflow to route a Task to */
51
+ routingTarget?: string;
52
+ /** A boolean indicating if a new task should respect a worker\\\'s capacity during assignment */
53
+ ignoreCapacity?: string;
54
+ /** The SID of the TaskQueue in which the Task belongs */
55
+ taskQueueSid?: string;
50
56
  }
51
57
  /**
52
58
  * Options to pass to each
@@ -66,6 +72,8 @@ export interface TaskListInstanceEachOptions {
66
72
  taskQueueName?: string;
67
73
  /** The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. */
68
74
  evaluateTaskAttributes?: string;
75
+ /** A SID of a Worker, Queue, or Workflow to route a Task to */
76
+ routingTarget?: string;
69
77
  /** How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. */
70
78
  ordering?: string;
71
79
  /** Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons. */
@@ -97,6 +105,8 @@ export interface TaskListInstanceOptions {
97
105
  taskQueueName?: string;
98
106
  /** The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. */
99
107
  evaluateTaskAttributes?: string;
108
+ /** A SID of a Worker, Queue, or Workflow to route a Task to */
109
+ routingTarget?: string;
100
110
  /** How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. */
101
111
  ordering?: string;
102
112
  /** Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons. */
@@ -124,6 +134,8 @@ export interface TaskListInstancePageOptions {
124
134
  taskQueueName?: string;
125
135
  /** The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. */
126
136
  evaluateTaskAttributes?: string;
137
+ /** A SID of a Worker, Queue, or Workflow to route a Task to */
138
+ routingTarget?: string;
127
139
  /** How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. */
128
140
  ordering?: string;
129
141
  /** Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons. */
@@ -233,6 +245,8 @@ interface TaskResource {
233
245
  url: string;
234
246
  links: Record<string, string>;
235
247
  virtual_start_time: Date;
248
+ ignore_capacity: boolean;
249
+ routing_target: string;
236
250
  }
237
251
  export declare class TaskInstance {
238
252
  protected _version: V1;
@@ -324,6 +338,14 @@ export declare class TaskInstance {
324
338
  * The date and time in GMT indicating the ordering for routing of the Task specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
325
339
  */
326
340
  virtualStartTime: Date;
341
+ /**
342
+ * A boolean indicating if a new task should respect a worker\'s capacity during assignment
343
+ */
344
+ ignoreCapacity: boolean;
345
+ /**
346
+ * A SID of a Worker, Queue, or Workflow to route a Task to
347
+ */
348
+ routingTarget: string;
327
349
  private get _proxy();
328
350
  /**
329
351
  * Remove a TaskInstance
@@ -399,6 +421,8 @@ export declare class TaskInstance {
399
421
  url: string;
400
422
  links: Record<string, string>;
401
423
  virtualStartTime: Date;
424
+ ignoreCapacity: boolean;
425
+ routingTarget: string;
402
426
  };
403
427
  [inspect.custom](_depth: any, options: InspectOptions): string;
404
428
  }
@@ -147,6 +147,8 @@ class TaskInstance {
147
147
  this.url = payload.url;
148
148
  this.links = payload.links;
149
149
  this.virtualStartTime = deserialize.iso8601DateTime(payload.virtual_start_time);
150
+ this.ignoreCapacity = payload.ignore_capacity;
151
+ this.routingTarget = payload.routing_target;
150
152
  this._solution = { workspaceSid, sid: sid || this.sid };
151
153
  }
152
154
  get _proxy() {
@@ -206,6 +208,8 @@ class TaskInstance {
206
208
  url: this.url,
207
209
  links: this.links,
208
210
  virtualStartTime: this.virtualStartTime,
211
+ ignoreCapacity: this.ignoreCapacity,
212
+ routingTarget: this.routingTarget,
209
213
  };
210
214
  }
211
215
  [util_1.inspect.custom](_depth, options) {
@@ -245,6 +249,12 @@ function TaskListInstance(version, workspaceSid) {
245
249
  data["Attributes"] = params["attributes"];
246
250
  if (params["virtualStartTime"] !== undefined)
247
251
  data["VirtualStartTime"] = serialize.iso8601DateTime(params["virtualStartTime"]);
252
+ if (params["routingTarget"] !== undefined)
253
+ data["RoutingTarget"] = params["routingTarget"];
254
+ if (params["ignoreCapacity"] !== undefined)
255
+ data["IgnoreCapacity"] = params["ignoreCapacity"];
256
+ if (params["taskQueueSid"] !== undefined)
257
+ data["TaskQueueSid"] = params["taskQueueSid"];
248
258
  const headers = {};
249
259
  headers["Content-Type"] = "application/x-www-form-urlencoded";
250
260
  let operationVersion = version, operationPromise = operationVersion.create({
@@ -280,6 +290,8 @@ function TaskListInstance(version, workspaceSid) {
280
290
  data["TaskQueueName"] = params["taskQueueName"];
281
291
  if (params["evaluateTaskAttributes"] !== undefined)
282
292
  data["EvaluateTaskAttributes"] = params["evaluateTaskAttributes"];
293
+ if (params["routingTarget"] !== undefined)
294
+ data["RoutingTarget"] = params["routingTarget"];
283
295
  if (params["ordering"] !== undefined)
284
296
  data["Ordering"] = params["ordering"];
285
297
  if (params["hasAddons"] !== undefined)
@@ -48,6 +48,8 @@ export interface ComplianceTollfreeInquiriesListInstanceCreateOptions {
48
48
  businessContactEmail?: string;
49
49
  /** The phone number of the contact for the business or organization using the Tollfree number. */
50
50
  businessContactPhone?: string;
51
+ /** Theme id for styling the inquiry form. */
52
+ themeSetId?: string;
51
53
  }
52
54
  export interface ComplianceTollfreeInquiriesSolution {
53
55
  }
@@ -76,6 +76,8 @@ function ComplianceTollfreeInquiriesListInstance(version) {
76
76
  data["BusinessContactEmail"] = params["businessContactEmail"];
77
77
  if (params["businessContactPhone"] !== undefined)
78
78
  data["BusinessContactPhone"] = params["businessContactPhone"];
79
+ if (params["themeSetId"] !== undefined)
80
+ data["ThemeSetId"] = params["themeSetId"];
79
81
  const headers = {};
80
82
  headers["Content-Type"] = "application/x-www-form-urlencoded";
81
83
  let operationVersion = version, operationPromise = operationVersion.create({
@@ -168,6 +168,7 @@ interface CustomerProfilesResource {
168
168
  date_updated: Date;
169
169
  url: string;
170
170
  links: Record<string, string>;
171
+ errors: Array<any>;
171
172
  }
172
173
  export declare class CustomerProfilesInstance {
173
174
  protected _version: V1;
@@ -219,6 +220,10 @@ export declare class CustomerProfilesInstance {
219
220
  * The URLs of the Assigned Items of the Customer-Profile resource.
220
221
  */
221
222
  links: Record<string, string>;
223
+ /**
224
+ * The error codes associated with the rejection of the Customer-Profile.
225
+ */
226
+ errors: Array<any>;
222
227
  private get _proxy();
223
228
  /**
224
229
  * Remove a CustomerProfilesInstance
@@ -283,6 +288,7 @@ export declare class CustomerProfilesInstance {
283
288
  dateUpdated: Date;
284
289
  url: string;
285
290
  links: Record<string, string>;
291
+ errors: any[];
286
292
  };
287
293
  [inspect.custom](_depth: any, options: InspectOptions): string;
288
294
  }
@@ -129,6 +129,7 @@ class CustomerProfilesInstance {
129
129
  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
130
130
  this.url = payload.url;
131
131
  this.links = payload.links;
132
+ this.errors = payload.errors;
132
133
  this._solution = { sid: sid || this.sid };
133
134
  }
134
135
  get _proxy() {
@@ -197,6 +198,7 @@ class CustomerProfilesInstance {
197
198
  dateUpdated: this.dateUpdated,
198
199
  url: this.url,
199
200
  links: this.links,
201
+ errors: this.errors,
200
202
  };
201
203
  }
202
204
  [util_1.inspect.custom](_depth, options) {
@@ -168,6 +168,7 @@ interface TrustProductsResource {
168
168
  date_updated: Date;
169
169
  url: string;
170
170
  links: Record<string, string>;
171
+ errors: Array<any>;
171
172
  }
172
173
  export declare class TrustProductsInstance {
173
174
  protected _version: V1;
@@ -219,6 +220,10 @@ export declare class TrustProductsInstance {
219
220
  * The URLs of the Assigned Items of the Trust Product resource.
220
221
  */
221
222
  links: Record<string, string>;
223
+ /**
224
+ * The error codes associated with the rejection of the Trust Product.
225
+ */
226
+ errors: Array<any>;
222
227
  private get _proxy();
223
228
  /**
224
229
  * Remove a TrustProductsInstance
@@ -283,6 +288,7 @@ export declare class TrustProductsInstance {
283
288
  dateUpdated: Date;
284
289
  url: string;
285
290
  links: Record<string, string>;
291
+ errors: any[];
286
292
  };
287
293
  [inspect.custom](_depth: any, options: InspectOptions): string;
288
294
  }
@@ -129,6 +129,7 @@ class TrustProductsInstance {
129
129
  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
130
130
  this.url = payload.url;
131
131
  this.links = payload.links;
132
+ this.errors = payload.errors;
132
133
  this._solution = { sid: sid || this.sid };
133
134
  }
134
135
  get _proxy() {
@@ -197,6 +198,7 @@ class TrustProductsInstance {
197
198
  dateUpdated: this.dateUpdated,
198
199
  url: this.url,
199
200
  links: this.links,
201
+ errors: this.errors,
200
202
  };
201
203
  }
202
204
  [util_1.inspect.custom](_depth, options) {
@@ -133,7 +133,7 @@ export declare class VerificationInstance {
133
133
  to: string;
134
134
  channel: VerificationChannel;
135
135
  /**
136
- * The status of the verification. One of: `pending`, `approved`, or `canceled`
136
+ * The status of the verification. Can be: `pending`, `approved`, `canceled`, `max_attempts_reached`, `deleted`, `failed` or `expired`.
137
137
  */
138
138
  status: string;
139
139
  /**
@@ -83,7 +83,7 @@ export declare class VerificationCheckInstance {
83
83
  to: string;
84
84
  channel: VerificationCheckChannel;
85
85
  /**
86
- * The status of the verification. Can be: `pending`, `approved`, or `canceled`.
86
+ * The status of the verification. Can be: `pending`, `approved`, `canceled`, `max_attempts_reached`, `deleted`, `failed` or `expired`.
87
87
  */
88
88
  status: string;
89
89
  /**
@@ -252,7 +252,7 @@ export declare class ServiceInstance {
252
252
  */
253
253
  accountSid: string;
254
254
  /**
255
- * The string that you assigned to describe the verification service. It can be up to 32 characters long. **This value should not contain PII.**
255
+ * The name that appears in the body of your verification messages. It can be up to 30 characters long and can include letters, numbers, spaces, dashes, underscores. Phone numbers, special characters or links are NOT allowed. **This value should not contain PII.**
256
256
  */
257
257
  friendlyName: string;
258
258
  /**
@@ -234,11 +234,10 @@ function webhook(opts, authToken) {
234
234
  options = authToken;
235
235
  }
236
236
  }
237
- if (!options) {
238
- options = {
239
- validate: true,
240
- };
241
- }
237
+ if (!options)
238
+ options = {};
239
+ if (options.validate == undefined)
240
+ options.validate = true;
242
241
  // Process arguments
243
242
  var tokenString;
244
243
  for (var i = 0, l = arguments.length; i < l; i++) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "5.0.4",
4
+ "version": "5.1.0",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {
@@ -1,9 +0,0 @@
1
- import PreviewMessagingBase from "./PreviewMessagingBase";
2
- import { MessageListInstance } from "./previewMessaging/v1/message";
3
- declare class PreviewMessaging extends PreviewMessagingBase {
4
- /**
5
- * @deprecated - Use v1.messages; instead
6
- */
7
- get messages(): MessageListInstance;
8
- }
9
- export = PreviewMessaging;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const PreviewMessagingBase_1 = __importDefault(require("./PreviewMessagingBase"));
6
- class PreviewMessaging extends PreviewMessagingBase_1.default {
7
- /**
8
- * @deprecated - Use v1.messages; instead
9
- */
10
- get messages() {
11
- console.warn("messages is deprecated. Use v1.messages; instead.");
12
- return this.v1.messages;
13
- }
14
- }
15
- module.exports = PreviewMessaging;
@@ -1,13 +0,0 @@
1
- import Domain from "../base/Domain";
2
- import V1 from "./previewMessaging/V1";
3
- declare class PreviewMessagingBase extends Domain {
4
- _v1?: V1;
5
- /**
6
- * Initialize previewMessaging domain
7
- *
8
- * @param twilio - The twilio client
9
- */
10
- constructor(twilio: any);
11
- get v1(): V1;
12
- }
13
- export = PreviewMessagingBase;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- /*
3
- * This code was generated by
4
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator.
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- var __importDefault = (this && this.__importDefault) || function (mod) {
13
- return (mod && mod.__esModule) ? mod : { "default": mod };
14
- };
15
- const Domain_1 = __importDefault(require("../base/Domain"));
16
- const V1_1 = __importDefault(require("./previewMessaging/V1"));
17
- class PreviewMessagingBase extends Domain_1.default {
18
- /**
19
- * Initialize previewMessaging domain
20
- *
21
- * @param twilio - The twilio client
22
- */
23
- constructor(twilio) {
24
- super(twilio, "https://preview.messaging.twilio.com");
25
- }
26
- get v1() {
27
- this._v1 = this._v1 || new V1_1.default(this);
28
- return this._v1;
29
- }
30
- }
31
- module.exports = PreviewMessagingBase;