twilio 5.0.2 → 5.0.4

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.
package/README.md CHANGED
@@ -22,6 +22,7 @@ This library supports the following Node.js implementations:
22
22
  - Node.js 14
23
23
  - Node.js 16
24
24
  - Node.js 18
25
+ - Node.js LTS (20)
25
26
 
26
27
  TypeScript is supported for TypeScript version 2.9 and above.
27
28
 
@@ -5,7 +5,7 @@ export type PaymentBankAccountType = "consumer-checking" | "consumer-savings" |
5
5
  export type PaymentCapture = "payment-card-number" | "expiration-date" | "security-code" | "postal-code" | "bank-routing-number" | "bank-account-number";
6
6
  export type PaymentPaymentMethod = "credit-card" | "ach-debit";
7
7
  export type PaymentStatus = "complete" | "cancel";
8
- export type PaymentTokenType = "one-time" | "reusable";
8
+ export type PaymentTokenType = "one-time" | "reusable" | "payment-method";
9
9
  /**
10
10
  * Options to pass to update a PaymentInstance
11
11
  */
@@ -15,15 +15,15 @@ export interface StreamContextUpdateOptions {
15
15
  * Options to pass to create a StreamInstance
16
16
  */
17
17
  export interface StreamListInstanceCreateOptions {
18
- /** Relative or absolute url where WebSocket connection will be established. */
18
+ /** Relative or absolute URL where WebSocket connection will be established. */
19
19
  url: string;
20
- /** The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. */
20
+ /** The user-specified name of this Stream, if one was given when the Stream was created. This can be used to stop the Stream. */
21
21
  name?: string;
22
22
  /** */
23
23
  track?: StreamTrack;
24
- /** Absolute URL of the status callback. */
24
+ /** Absolute URL to which Twilio sends status callback HTTP requests. */
25
25
  statusCallback?: string;
26
- /** The http method for the status_callback (one of GET, POST). */
26
+ /** The HTTP method Twilio uses when sending `status_callback` requests. Possible values are `GET` and `POST`. Default is `POST`. */
27
27
  statusCallbackMethod?: string;
28
28
  /** Parameter name */
29
29
  "parameter1.name"?: string;
@@ -484,7 +484,7 @@ export declare class StreamInstance {
484
484
  */
485
485
  callSid: string;
486
486
  /**
487
- * The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream.
487
+ * The user-specified name of this Stream, if one was given when the Stream was created. This can be used to stop the Stream.
488
488
  */
489
489
  name: string;
490
490
  status: StreamStatus;
@@ -23,17 +23,17 @@ export interface ConferenceContextUpdateOptions {
23
23
  * Options to pass to each
24
24
  */
25
25
  export interface ConferenceListInstanceEachOptions {
26
- /** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
26
+ /** Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date. */
27
27
  dateCreated?: Date;
28
- /** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
28
+ /** Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date. */
29
29
  dateCreatedBefore?: Date;
30
- /** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
30
+ /** Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date. */
31
31
  dateCreatedAfter?: Date;
32
- /** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
32
+ /** Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date. */
33
33
  dateUpdated?: Date;
34
- /** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
34
+ /** Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date. */
35
35
  dateUpdatedBefore?: Date;
36
- /** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
36
+ /** Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date. */
37
37
  dateUpdatedAfter?: Date;
38
38
  /** The string that identifies the Conference resources to read. */
39
39
  friendlyName?: string;
@@ -52,17 +52,17 @@ export interface ConferenceListInstanceEachOptions {
52
52
  * Options to pass to list
53
53
  */
54
54
  export interface ConferenceListInstanceOptions {
55
- /** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
55
+ /** Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date. */
56
56
  dateCreated?: Date;
57
- /** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
57
+ /** Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date. */
58
58
  dateCreatedBefore?: Date;
59
- /** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
59
+ /** Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date. */
60
60
  dateCreatedAfter?: Date;
61
- /** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
61
+ /** Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date. */
62
62
  dateUpdated?: Date;
63
- /** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
63
+ /** Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date. */
64
64
  dateUpdatedBefore?: Date;
65
- /** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
65
+ /** Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date. */
66
66
  dateUpdatedAfter?: Date;
67
67
  /** The string that identifies the Conference resources to read. */
68
68
  friendlyName?: string;
@@ -77,17 +77,17 @@ export interface ConferenceListInstanceOptions {
77
77
  * Options to pass to page
78
78
  */
79
79
  export interface ConferenceListInstancePageOptions {
80
- /** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
80
+ /** Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date. */
81
81
  dateCreated?: Date;
82
- /** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
82
+ /** Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date. */
83
83
  dateCreatedBefore?: Date;
84
- /** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
84
+ /** Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date. */
85
85
  dateCreatedAfter?: Date;
86
- /** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
86
+ /** Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date. */
87
87
  dateUpdated?: Date;
88
- /** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
88
+ /** Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date. */
89
89
  dateUpdatedBefore?: Date;
90
- /** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
90
+ /** Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date. */
91
91
  dateUpdatedAfter?: Date;
92
92
  /** The string that identifies the Conference resources to read. */
93
93
  friendlyName?: string;
@@ -184,11 +184,11 @@ export declare class ConferenceInstance {
184
184
  */
185
185
  accountSid: string;
186
186
  /**
187
- * The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
187
+ * The date and time in UTC that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
188
188
  */
189
189
  dateCreated: Date;
190
190
  /**
191
- * The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
191
+ * The date and time in UTC that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
192
192
  */
193
193
  dateUpdated: Date;
194
194
  /**
@@ -196,7 +196,7 @@ export declare class ConferenceInstance {
196
196
  */
197
197
  apiVersion: string;
198
198
  /**
199
- * A string that you assigned to describe this conference room. Maxiumum length is 128 characters.
199
+ * A string that you assigned to describe this conference room. Maximum length is 128 characters.
200
200
  */
201
201
  friendlyName: string;
202
202
  /**
@@ -204,7 +204,7 @@ export declare class ConferenceInstance {
204
204
  */
205
205
  region: string;
206
206
  /**
207
- * The unique string that that we created to identify this Conference resource.
207
+ * The unique, Twilio-provided string used to identify this Conference resource.
208
208
  */
209
209
  sid: string;
210
210
  status: ConferenceStatus;
@@ -77,9 +77,9 @@ export interface ConversationListInstanceCreateOptions {
77
77
  * Options to pass to each
78
78
  */
79
79
  export interface ConversationListInstanceEachOptions {
80
- /** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
80
+ /** Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
81
81
  startDate?: string;
82
- /** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
82
+ /** Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
83
83
  endDate?: string;
84
84
  /** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
85
85
  state?: ConversationState;
@@ -96,9 +96,9 @@ export interface ConversationListInstanceEachOptions {
96
96
  * Options to pass to list
97
97
  */
98
98
  export interface ConversationListInstanceOptions {
99
- /** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
99
+ /** Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
100
100
  startDate?: string;
101
- /** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
101
+ /** Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
102
102
  endDate?: string;
103
103
  /** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
104
104
  state?: ConversationState;
@@ -111,9 +111,9 @@ export interface ConversationListInstanceOptions {
111
111
  * Options to pass to page
112
112
  */
113
113
  export interface ConversationListInstancePageOptions {
114
- /** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
114
+ /** Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
115
115
  startDate?: string;
116
- /** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
116
+ /** Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. */
117
117
  endDate?: string;
118
118
  /** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
119
119
  state?: ConversationState;
@@ -1,5 +1,6 @@
1
1
  import FlexApiBase from "../FlexApiBase";
2
2
  import Version from "../../base/Version";
3
+ import { FlexUserListInstance } from "./v2/flexUser";
3
4
  import { WebChannelsListInstance } from "./v2/webChannels";
4
5
  export default class V2 extends Version {
5
6
  /**
@@ -8,8 +9,12 @@ export default class V2 extends Version {
8
9
  * @param domain - The Twilio (Twilio.FlexApi) domain
9
10
  */
10
11
  constructor(domain: FlexApiBase);
12
+ /** flexUser - { Twilio.FlexApi.V2.FlexUserListInstance } resource */
13
+ protected _flexUser?: FlexUserListInstance;
11
14
  /** webChannels - { Twilio.FlexApi.V2.WebChannelsListInstance } resource */
12
15
  protected _webChannels?: WebChannelsListInstance;
16
+ /** Getter for flexUser resource */
17
+ get flexUser(): FlexUserListInstance;
13
18
  /** Getter for webChannels resource */
14
19
  get webChannels(): WebChannelsListInstance;
15
20
  }
@@ -17,6 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  const Version_1 = __importDefault(require("../../base/Version"));
20
+ const flexUser_1 = require("./v2/flexUser");
20
21
  const webChannels_1 = require("./v2/webChannels");
21
22
  class V2 extends Version_1.default {
22
23
  /**
@@ -27,6 +28,11 @@ class V2 extends Version_1.default {
27
28
  constructor(domain) {
28
29
  super(domain, "v2");
29
30
  }
31
+ /** Getter for flexUser resource */
32
+ get flexUser() {
33
+ this._flexUser = this._flexUser || (0, flexUser_1.FlexUserListInstance)(this);
34
+ return this._flexUser;
35
+ }
30
36
  /** Getter for webChannels resource */
31
37
  get webChannels() {
32
38
  this._webChannels = this._webChannels || (0, webChannels_1.WebChannelsListInstance)(this);
@@ -24,6 +24,10 @@ export interface PluginVersionsListInstanceCreateOptions {
24
24
  changelog?: string;
25
25
  /** Whether this Flex Plugin Version requires authorization. */
26
26
  private?: boolean;
27
+ /** The version of Flex Plugins CLI used to create this plugin */
28
+ cliVersion?: string;
29
+ /** The validation status of the plugin, indicating whether it has been validated */
30
+ validateStatus?: string;
27
31
  }
28
32
  /**
29
33
  * Options to pass to each
@@ -146,6 +146,10 @@ function PluginVersionsListInstance(version, pluginSid) {
146
146
  data["Changelog"] = params["changelog"];
147
147
  if (params["private"] !== undefined)
148
148
  data["Private"] = serialize.bool(params["private"]);
149
+ if (params["cliVersion"] !== undefined)
150
+ data["CliVersion"] = params["cliVersion"];
151
+ if (params["validateStatus"] !== undefined)
152
+ data["ValidateStatus"] = params["validateStatus"];
149
153
  const headers = {};
150
154
  headers["Content-Type"] = "application/x-www-form-urlencoded";
151
155
  if (params["flexMetadata"] !== undefined)
@@ -34,10 +34,6 @@ export interface PluginListInstanceCreateOptions {
34
34
  friendlyName?: string;
35
35
  /** A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long */
36
36
  description?: string;
37
- /** The version of Flex Plugins CLI used to create this plugin */
38
- cliVersion?: string;
39
- /** The validation status of the plugin, indicating whether it has been validated */
40
- validateStatus?: string;
41
37
  }
42
38
  /**
43
39
  * Options to pass to each
@@ -179,10 +179,6 @@ function PluginListInstance(version) {
179
179
  data["FriendlyName"] = params["friendlyName"];
180
180
  if (params["description"] !== undefined)
181
181
  data["Description"] = params["description"];
182
- if (params["cliVersion"] !== undefined)
183
- data["CliVersion"] = params["cliVersion"];
184
- if (params["validateStatus"] !== undefined)
185
- data["ValidateStatus"] = params["validateStatus"];
186
182
  const headers = {};
187
183
  headers["Content-Type"] = "application/x-www-form-urlencoded";
188
184
  if (params["flexMetadata"] !== undefined)
@@ -0,0 +1,170 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V2 from "../V2";
4
+ export interface FlexUserContext {
5
+ /**
6
+ * Fetch a FlexUserInstance
7
+ *
8
+ * @param callback - Callback to handle processed record
9
+ *
10
+ * @returns Resolves to processed FlexUserInstance
11
+ */
12
+ fetch(callback?: (error: Error | null, item?: FlexUserInstance) => any): Promise<FlexUserInstance>;
13
+ /**
14
+ * Provide a user-friendly representation
15
+ */
16
+ toJSON(): any;
17
+ [inspect.custom](_depth: any, options: InspectOptions): any;
18
+ }
19
+ export interface FlexUserContextSolution {
20
+ instanceSid: string;
21
+ flexUserSid: string;
22
+ }
23
+ export declare class FlexUserContextImpl implements FlexUserContext {
24
+ protected _version: V2;
25
+ protected _solution: FlexUserContextSolution;
26
+ protected _uri: string;
27
+ constructor(_version: V2, instanceSid: string, flexUserSid: string);
28
+ fetch(callback?: (error: Error | null, item?: FlexUserInstance) => any): Promise<FlexUserInstance>;
29
+ /**
30
+ * Provide a user-friendly representation
31
+ *
32
+ * @returns Object
33
+ */
34
+ toJSON(): FlexUserContextSolution;
35
+ [inspect.custom](_depth: any, options: InspectOptions): string;
36
+ }
37
+ interface FlexUserResource {
38
+ account_sid: string;
39
+ instance_sid: string;
40
+ user_sid: string;
41
+ flex_user_sid: string;
42
+ worker_sid: string;
43
+ workspace_sid: string;
44
+ flex_team_sid: string;
45
+ first_name: string;
46
+ last_name: string;
47
+ username: string;
48
+ email: string;
49
+ friendly_name: string;
50
+ created_date: Date;
51
+ updated_date: Date;
52
+ version: number;
53
+ url: string;
54
+ }
55
+ export declare class FlexUserInstance {
56
+ protected _version: V2;
57
+ protected _solution: FlexUserContextSolution;
58
+ protected _context?: FlexUserContext;
59
+ constructor(_version: V2, payload: FlexUserResource, instanceSid?: string, flexUserSid?: string);
60
+ /**
61
+ * The unique SID of the account that created the resource.
62
+ */
63
+ accountSid: string;
64
+ /**
65
+ * The unique ID created by Twilio to identify a Flex instance.
66
+ */
67
+ instanceSid: string;
68
+ /**
69
+ * The unique SID identifier of the Twilio Unified User.
70
+ */
71
+ userSid: string;
72
+ /**
73
+ * The unique SID identifier of the Flex User.
74
+ */
75
+ flexUserSid: string;
76
+ /**
77
+ * The unique SID identifier of the worker.
78
+ */
79
+ workerSid: string;
80
+ /**
81
+ * The unique SID identifier of the workspace.
82
+ */
83
+ workspaceSid: string;
84
+ /**
85
+ * The unique SID identifier of the Flex Team.
86
+ */
87
+ flexTeamSid: string;
88
+ /**
89
+ * First name of the User.
90
+ */
91
+ firstName: string;
92
+ /**
93
+ * Last name of the User.
94
+ */
95
+ lastName: string;
96
+ /**
97
+ * Username of the User.
98
+ */
99
+ username: string;
100
+ /**
101
+ * Email of the User.
102
+ */
103
+ email: string;
104
+ /**
105
+ * Friendly name of the User.
106
+ */
107
+ friendlyName: string;
108
+ /**
109
+ * The date that this user was created, given in ISO 8601 format.
110
+ */
111
+ createdDate: Date;
112
+ /**
113
+ * The date that this user was updated, given in ISO 8601 format.
114
+ */
115
+ updatedDate: Date;
116
+ /**
117
+ * The current version of the user.
118
+ */
119
+ version: number;
120
+ url: string;
121
+ private get _proxy();
122
+ /**
123
+ * Fetch a FlexUserInstance
124
+ *
125
+ * @param callback - Callback to handle processed record
126
+ *
127
+ * @returns Resolves to processed FlexUserInstance
128
+ */
129
+ fetch(callback?: (error: Error | null, item?: FlexUserInstance) => any): Promise<FlexUserInstance>;
130
+ /**
131
+ * Provide a user-friendly representation
132
+ *
133
+ * @returns Object
134
+ */
135
+ toJSON(): {
136
+ accountSid: string;
137
+ instanceSid: string;
138
+ userSid: string;
139
+ flexUserSid: string;
140
+ workerSid: string;
141
+ workspaceSid: string;
142
+ flexTeamSid: string;
143
+ firstName: string;
144
+ lastName: string;
145
+ username: string;
146
+ email: string;
147
+ friendlyName: string;
148
+ createdDate: Date;
149
+ updatedDate: Date;
150
+ version: number;
151
+ url: string;
152
+ };
153
+ [inspect.custom](_depth: any, options: InspectOptions): string;
154
+ }
155
+ export interface FlexUserSolution {
156
+ }
157
+ export interface FlexUserListInstance {
158
+ _version: V2;
159
+ _solution: FlexUserSolution;
160
+ _uri: string;
161
+ (instanceSid: string, flexUserSid: string): FlexUserContext;
162
+ get(instanceSid: string, flexUserSid: string): FlexUserContext;
163
+ /**
164
+ * Provide a user-friendly representation
165
+ */
166
+ toJSON(): any;
167
+ [inspect.custom](_depth: any, options: InspectOptions): any;
168
+ }
169
+ export declare function FlexUserListInstance(version: V2): FlexUserListInstance;
170
+ export {};
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Flex
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.FlexUserListInstance = exports.FlexUserInstance = exports.FlexUserContextImpl = 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 FlexUserContextImpl {
22
+ constructor(_version, instanceSid, flexUserSid) {
23
+ this._version = _version;
24
+ if (!(0, utility_1.isValidPathParam)(instanceSid)) {
25
+ throw new Error("Parameter 'instanceSid' is not valid.");
26
+ }
27
+ if (!(0, utility_1.isValidPathParam)(flexUserSid)) {
28
+ throw new Error("Parameter 'flexUserSid' is not valid.");
29
+ }
30
+ this._solution = { instanceSid, flexUserSid };
31
+ this._uri = `/Instances/${instanceSid}/Users/${flexUserSid}`;
32
+ }
33
+ fetch(callback) {
34
+ const instance = this;
35
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
36
+ uri: instance._uri,
37
+ method: "get",
38
+ });
39
+ operationPromise = operationPromise.then((payload) => new FlexUserInstance(operationVersion, payload, instance._solution.instanceSid, instance._solution.flexUserSid));
40
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
41
+ return operationPromise;
42
+ }
43
+ /**
44
+ * Provide a user-friendly representation
45
+ *
46
+ * @returns Object
47
+ */
48
+ toJSON() {
49
+ return this._solution;
50
+ }
51
+ [util_1.inspect.custom](_depth, options) {
52
+ return (0, util_1.inspect)(this.toJSON(), options);
53
+ }
54
+ }
55
+ exports.FlexUserContextImpl = FlexUserContextImpl;
56
+ class FlexUserInstance {
57
+ constructor(_version, payload, instanceSid, flexUserSid) {
58
+ this._version = _version;
59
+ this.accountSid = payload.account_sid;
60
+ this.instanceSid = payload.instance_sid;
61
+ this.userSid = payload.user_sid;
62
+ this.flexUserSid = payload.flex_user_sid;
63
+ this.workerSid = payload.worker_sid;
64
+ this.workspaceSid = payload.workspace_sid;
65
+ this.flexTeamSid = payload.flex_team_sid;
66
+ this.firstName = payload.first_name;
67
+ this.lastName = payload.last_name;
68
+ this.username = payload.username;
69
+ this.email = payload.email;
70
+ this.friendlyName = payload.friendly_name;
71
+ this.createdDate = deserialize.iso8601DateTime(payload.created_date);
72
+ this.updatedDate = deserialize.iso8601DateTime(payload.updated_date);
73
+ this.version = deserialize.integer(payload.version);
74
+ this.url = payload.url;
75
+ this._solution = {
76
+ instanceSid: instanceSid || this.instanceSid,
77
+ flexUserSid: flexUserSid || this.flexUserSid,
78
+ };
79
+ }
80
+ get _proxy() {
81
+ this._context =
82
+ this._context ||
83
+ new FlexUserContextImpl(this._version, this._solution.instanceSid, this._solution.flexUserSid);
84
+ return this._context;
85
+ }
86
+ /**
87
+ * Fetch a FlexUserInstance
88
+ *
89
+ * @param callback - Callback to handle processed record
90
+ *
91
+ * @returns Resolves to processed FlexUserInstance
92
+ */
93
+ fetch(callback) {
94
+ return this._proxy.fetch(callback);
95
+ }
96
+ /**
97
+ * Provide a user-friendly representation
98
+ *
99
+ * @returns Object
100
+ */
101
+ toJSON() {
102
+ return {
103
+ accountSid: this.accountSid,
104
+ instanceSid: this.instanceSid,
105
+ userSid: this.userSid,
106
+ flexUserSid: this.flexUserSid,
107
+ workerSid: this.workerSid,
108
+ workspaceSid: this.workspaceSid,
109
+ flexTeamSid: this.flexTeamSid,
110
+ firstName: this.firstName,
111
+ lastName: this.lastName,
112
+ username: this.username,
113
+ email: this.email,
114
+ friendlyName: this.friendlyName,
115
+ createdDate: this.createdDate,
116
+ updatedDate: this.updatedDate,
117
+ version: this.version,
118
+ url: this.url,
119
+ };
120
+ }
121
+ [util_1.inspect.custom](_depth, options) {
122
+ return (0, util_1.inspect)(this.toJSON(), options);
123
+ }
124
+ }
125
+ exports.FlexUserInstance = FlexUserInstance;
126
+ function FlexUserListInstance(version) {
127
+ const instance = ((instanceSid, flexUserSid) => instance.get(instanceSid, flexUserSid));
128
+ instance.get = function get(instanceSid, flexUserSid) {
129
+ return new FlexUserContextImpl(version, instanceSid, flexUserSid);
130
+ };
131
+ instance._version = version;
132
+ instance._solution = {};
133
+ instance._uri = ``;
134
+ instance.toJSON = function toJSON() {
135
+ return instance._solution;
136
+ };
137
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
138
+ return (0, util_1.inspect)(instance.toJSON(), options);
139
+ };
140
+ return instance;
141
+ }
142
+ exports.FlexUserListInstance = FlexUserListInstance;
@@ -7,6 +7,8 @@ import V2 from "../V2";
7
7
  export interface WebChannelsListInstanceCreateOptions {
8
8
  /** The SID of the Conversations Address. See [Address Configuration Resource](https://www.twilio.com/docs/conversations/api/address-configuration-resource) for configuration details. When a conversation is created on the Flex backend, the callback URL will be set to the corresponding Studio Flow SID or webhook URL in your address configuration. */
9
9
  addressSid: string;
10
+ /** The Ui-Version HTTP request header */
11
+ uiVersion?: string;
10
12
  /** The Conversation\\\'s friendly name. See the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) for an example. */
11
13
  chatFriendlyName?: string;
12
14
  /** The Conversation participant\\\'s friendly name. See the [Conversation Participant Resource](https://www.twilio.com/docs/conversations/api/conversation-participant-resource) for an example. */