twilio 5.0.0 → 5.0.1

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.
@@ -0,0 +1,4 @@
1
+ import OauthBase from "./OauthBase";
2
+ declare class Oauth extends OauthBase {
3
+ }
4
+ export = Oauth;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const OauthBase_1 = __importDefault(require("./OauthBase"));
6
+ class Oauth extends OauthBase_1.default {
7
+ }
8
+ module.exports = Oauth;
@@ -0,0 +1,13 @@
1
+ import Domain from "../base/Domain";
2
+ import V1 from "./oauth/V1";
3
+ declare class OauthBase extends Domain {
4
+ _v1?: V1;
5
+ /**
6
+ * Initialize oauth domain
7
+ *
8
+ * @param twilio - The twilio client
9
+ */
10
+ constructor(twilio: any);
11
+ get v1(): V1;
12
+ }
13
+ export = OauthBase;
@@ -0,0 +1,31 @@
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("./oauth/V1"));
17
+ class OauthBase extends Domain_1.default {
18
+ /**
19
+ * Initialize oauth domain
20
+ *
21
+ * @param twilio - The twilio client
22
+ */
23
+ constructor(twilio) {
24
+ super(twilio, "https://oauth.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 = OauthBase;
@@ -19,6 +19,7 @@ import Microvisor from "./Microvisor";
19
19
  import Monitor from "./Monitor";
20
20
  import Notify from "./Notify";
21
21
  import Numbers from "./Numbers";
22
+ import Oauth from "./Oauth";
22
23
  import Preview from "./Preview";
23
24
  import Pricing from "./Pricing";
24
25
  import Proxy from "./Proxy";
@@ -102,6 +103,8 @@ declare class Twilio extends Client {
102
103
  _notify?: Notify;
103
104
  /** (Twilio.Numbers) - numbers domain */
104
105
  _numbers?: Numbers;
106
+ /** (Twilio.Oauth) - oauth domain */
107
+ _oauth?: Oauth;
105
108
  /** (Twilio.Preview) - preview domain */
106
109
  _preview?: Preview;
107
110
  /** (Twilio.Pricing) - pricing domain */
@@ -184,6 +187,8 @@ declare class Twilio extends Client {
184
187
  get notify(): Notify;
185
188
  /** Getter for (Twilio.Numbers) domain */
186
189
  get numbers(): Numbers;
190
+ /** Getter for (Twilio.Oauth) domain */
191
+ get oauth(): Oauth;
187
192
  /** Getter for (Twilio.Preview) domain */
188
193
  get preview(): Preview;
189
194
  /** Getter for (Twilio.Pricing) domain */
@@ -52,6 +52,7 @@ class Twilio extends BaseTwilio_1.Client {
52
52
  this.monitor;
53
53
  this.notify;
54
54
  this.numbers;
55
+ this.oauth;
55
56
  this.preview;
56
57
  this.pricing;
57
58
  this.proxy;
@@ -157,6 +158,10 @@ class Twilio extends BaseTwilio_1.Client {
157
158
  get numbers() {
158
159
  return this._numbers ?? (this._numbers = new (require("./Numbers"))(this));
159
160
  }
161
+ /** Getter for (Twilio.Oauth) domain */
162
+ get oauth() {
163
+ return this._oauth ?? (this._oauth = new (require("./Oauth"))(this));
164
+ }
160
165
  /** Getter for (Twilio.Preview) domain */
161
166
  get preview() {
162
167
  return this._preview ?? (this._preview = new (require("./Preview"))(this));
@@ -126,8 +126,16 @@ export interface CallListInstanceEachOptions {
126
126
  status?: CallStatus;
127
127
  /** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
128
128
  startTime?: Date;
129
+ /** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
130
+ startTimeBefore?: Date;
131
+ /** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
132
+ startTimeAfter?: Date;
129
133
  /** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
130
134
  endTime?: Date;
135
+ /** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
136
+ endTimeBefore?: Date;
137
+ /** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
138
+ endTimeAfter?: Date;
131
139
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
132
140
  pageSize?: number;
133
141
  /** Function to process each record. If this and a positional callback are passed, this one will be used */
@@ -151,8 +159,16 @@ export interface CallListInstanceOptions {
151
159
  status?: CallStatus;
152
160
  /** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
153
161
  startTime?: Date;
162
+ /** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
163
+ startTimeBefore?: Date;
164
+ /** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
165
+ startTimeAfter?: Date;
154
166
  /** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
155
167
  endTime?: Date;
168
+ /** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
169
+ endTimeBefore?: Date;
170
+ /** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
171
+ endTimeAfter?: Date;
156
172
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
157
173
  pageSize?: number;
158
174
  /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
@@ -172,8 +188,16 @@ export interface CallListInstancePageOptions {
172
188
  status?: CallStatus;
173
189
  /** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
174
190
  startTime?: Date;
191
+ /** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
192
+ startTimeBefore?: Date;
193
+ /** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
194
+ startTimeAfter?: Date;
175
195
  /** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
176
196
  endTime?: Date;
197
+ /** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
198
+ endTimeBefore?: Date;
199
+ /** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
200
+ endTimeAfter?: Date;
177
201
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
178
202
  pageSize?: number;
179
203
  /** Page Number, this value is simply for client state */
@@ -436,8 +436,16 @@ function CallListInstance(version, accountSid) {
436
436
  data["Status"] = params["status"];
437
437
  if (params["startTime"] !== undefined)
438
438
  data["StartTime"] = serialize.iso8601DateTime(params["startTime"]);
439
+ if (params["startTimeBefore"] !== undefined)
440
+ data["StartTime<"] = serialize.iso8601DateTime(params["startTimeBefore"]);
441
+ if (params["startTimeAfter"] !== undefined)
442
+ data["StartTime>"] = serialize.iso8601DateTime(params["startTimeAfter"]);
439
443
  if (params["endTime"] !== undefined)
440
444
  data["EndTime"] = serialize.iso8601DateTime(params["endTime"]);
445
+ if (params["endTimeBefore"] !== undefined)
446
+ data["EndTime<"] = serialize.iso8601DateTime(params["endTimeBefore"]);
447
+ if (params["endTimeAfter"] !== undefined)
448
+ data["EndTime>"] = serialize.iso8601DateTime(params["endTimeAfter"]);
441
449
  if (params["pageSize"] !== undefined)
442
450
  data["PageSize"] = params["pageSize"];
443
451
  if (params.pageNumber !== undefined)
@@ -25,8 +25,16 @@ export interface ConferenceContextUpdateOptions {
25
25
  export interface ConferenceListInstanceEachOptions {
26
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`. */
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`. */
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`. */
31
+ dateCreatedAfter?: Date;
28
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`. */
29
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`. */
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`. */
37
+ dateUpdatedAfter?: Date;
30
38
  /** The string that identifies the Conference resources to read. */
31
39
  friendlyName?: string;
32
40
  /** The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. */
@@ -46,8 +54,16 @@ export interface ConferenceListInstanceEachOptions {
46
54
  export interface ConferenceListInstanceOptions {
47
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`. */
48
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`. */
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`. */
60
+ dateCreatedAfter?: Date;
49
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`. */
50
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`. */
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`. */
66
+ dateUpdatedAfter?: Date;
51
67
  /** The string that identifies the Conference resources to read. */
52
68
  friendlyName?: string;
53
69
  /** The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. */
@@ -63,8 +79,16 @@ export interface ConferenceListInstanceOptions {
63
79
  export interface ConferenceListInstancePageOptions {
64
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`. */
65
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`. */
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`. */
85
+ dateCreatedAfter?: Date;
66
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`. */
67
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`. */
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`. */
91
+ dateUpdatedAfter?: Date;
68
92
  /** The string that identifies the Conference resources to read. */
69
93
  friendlyName?: string;
70
94
  /** The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. */
@@ -195,8 +195,16 @@ function ConferenceListInstance(version, accountSid) {
195
195
  let data = {};
196
196
  if (params["dateCreated"] !== undefined)
197
197
  data["DateCreated"] = serialize.iso8601Date(params["dateCreated"]);
198
+ if (params["dateCreatedBefore"] !== undefined)
199
+ data["DateCreated<"] = serialize.iso8601Date(params["dateCreatedBefore"]);
200
+ if (params["dateCreatedAfter"] !== undefined)
201
+ data["DateCreated>"] = serialize.iso8601Date(params["dateCreatedAfter"]);
198
202
  if (params["dateUpdated"] !== undefined)
199
203
  data["DateUpdated"] = serialize.iso8601Date(params["dateUpdated"]);
204
+ if (params["dateUpdatedBefore"] !== undefined)
205
+ data["DateUpdated<"] = serialize.iso8601Date(params["dateUpdatedBefore"]);
206
+ if (params["dateUpdatedAfter"] !== undefined)
207
+ data["DateUpdated>"] = serialize.iso8601Date(params["dateUpdatedAfter"]);
200
208
  if (params["friendlyName"] !== undefined)
201
209
  data["FriendlyName"] = params["friendlyName"];
202
210
  if (params["status"] !== undefined)
@@ -82,6 +82,10 @@ export interface MessageListInstanceEachOptions {
82
82
  from?: string;
83
83
  /** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
84
84
  dateSent?: Date;
85
+ /** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
86
+ dateSentBefore?: Date;
87
+ /** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
88
+ dateSentAfter?: Date;
85
89
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
86
90
  pageSize?: number;
87
91
  /** Function to process each record. If this and a positional callback are passed, this one will be used */
@@ -101,6 +105,10 @@ export interface MessageListInstanceOptions {
101
105
  from?: string;
102
106
  /** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
103
107
  dateSent?: Date;
108
+ /** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
109
+ dateSentBefore?: Date;
110
+ /** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
111
+ dateSentAfter?: Date;
104
112
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
105
113
  pageSize?: number;
106
114
  /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
@@ -116,6 +124,10 @@ export interface MessageListInstancePageOptions {
116
124
  from?: string;
117
125
  /** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
118
126
  dateSent?: Date;
127
+ /** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
128
+ dateSentBefore?: Date;
129
+ /** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
130
+ dateSentAfter?: Date;
119
131
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
120
132
  pageSize?: number;
121
133
  /** Page Number, this value is simply for client state */
@@ -297,6 +297,10 @@ function MessageListInstance(version, accountSid) {
297
297
  data["From"] = params["from"];
298
298
  if (params["dateSent"] !== undefined)
299
299
  data["DateSent"] = serialize.iso8601DateTime(params["dateSent"]);
300
+ if (params["dateSentBefore"] !== undefined)
301
+ data["DateSent<"] = serialize.iso8601DateTime(params["dateSentBefore"]);
302
+ if (params["dateSentAfter"] !== undefined)
303
+ data["DateSent>"] = serialize.iso8601DateTime(params["dateSentAfter"]);
300
304
  if (params["pageSize"] !== undefined)
301
305
  data["PageSize"] = params["pageSize"];
302
306
  if (params.pageNumber !== undefined)
@@ -26,6 +26,14 @@ export declare class CardAction {
26
26
  "id"?: string;
27
27
  }
28
28
  export type CardActionType = "URL" | "PHONE_NUMBER" | "QUICK_REPLY";
29
+ export declare class CatalogItem {
30
+ "id"?: string;
31
+ "sectionTitle"?: string;
32
+ "name"?: string;
33
+ "mediaUrl"?: string;
34
+ "price"?: number;
35
+ "description"?: string;
36
+ }
29
37
  /**
30
38
  * Content creation request body
31
39
  */
@@ -73,6 +81,17 @@ export declare class TwilioCard {
73
81
  "media"?: Array<string>;
74
82
  "actions"?: Array<CardAction>;
75
83
  }
84
+ /**
85
+ * twilio/catalog type lets recipients view list of catalog products, ask questions about products, order products.
86
+ */
87
+ export declare class TwilioCatalog {
88
+ "title"?: string;
89
+ "body": string;
90
+ "subtitle"?: string;
91
+ "id"?: string;
92
+ "items"?: Array<CatalogItem>;
93
+ "dynamicItems"?: string;
94
+ }
76
95
  /**
77
96
  * twilio/list-picker includes a menu of up to 10 options, which offers a simple way for users to make a selection.
78
97
  */
@@ -120,6 +139,7 @@ export declare class Types {
120
139
  "twilioCallToAction"?: TwilioCallToAction | null;
121
140
  "twilioQuickReply"?: TwilioQuickReply | null;
122
141
  "twilioCard"?: TwilioCard | null;
142
+ "twilioCatalog"?: TwilioCatalog | null;
123
143
  "whatsappCard"?: WhatsappCard | null;
124
144
  "whatsappAuthentication"?: WhatsappAuthentication | null;
125
145
  }
@@ -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.ContentPage = exports.ContentListInstance = exports.ContentInstance = exports.ContentContextImpl = exports.WhatsappCard = exports.WhatsappAuthentication = exports.Types = exports.TwilioText = exports.TwilioQuickReply = exports.TwilioMedia = exports.TwilioLocation = exports.TwilioListPicker = exports.TwilioCard = exports.TwilioCallToAction = exports.QuickReplyAction = exports.ListItem = exports.ContentCreateRequest = exports.CardAction = exports.CallToActionAction = exports.AuthenticationAction = void 0;
19
+ exports.ContentPage = exports.ContentListInstance = exports.ContentInstance = exports.ContentContextImpl = exports.WhatsappCard = exports.WhatsappAuthentication = exports.Types = exports.TwilioText = exports.TwilioQuickReply = exports.TwilioMedia = exports.TwilioLocation = exports.TwilioListPicker = exports.TwilioCatalog = exports.TwilioCard = exports.TwilioCallToAction = exports.QuickReplyAction = exports.ListItem = exports.ContentCreateRequest = exports.CatalogItem = exports.CardAction = exports.CallToActionAction = exports.AuthenticationAction = void 0;
20
20
  const util_1 = require("util");
21
21
  const Page_1 = __importDefault(require("../../../base/Page"));
22
22
  const deserialize = require("../../../base/deserialize");
@@ -33,6 +33,9 @@ exports.CallToActionAction = CallToActionAction;
33
33
  class CardAction {
34
34
  }
35
35
  exports.CardAction = CardAction;
36
+ class CatalogItem {
37
+ }
38
+ exports.CatalogItem = CatalogItem;
36
39
  /**
37
40
  * Content creation request body
38
41
  */
@@ -57,6 +60,12 @@ exports.TwilioCallToAction = TwilioCallToAction;
57
60
  class TwilioCard {
58
61
  }
59
62
  exports.TwilioCard = TwilioCard;
63
+ /**
64
+ * twilio/catalog type lets recipients view list of catalog products, ask questions about products, order products.
65
+ */
66
+ class TwilioCatalog {
67
+ }
68
+ exports.TwilioCatalog = TwilioCatalog;
60
69
  /**
61
70
  * twilio/list-picker includes a menu of up to 10 options, which offers a simple way for users to make a selection.
62
71
  */
@@ -65,6 +65,10 @@ export interface BundleListInstanceEachOptions {
65
65
  sortDirection?: BundleSortDirection;
66
66
  /** Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. */
67
67
  validUntilDate?: Date;
68
+ /** Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. */
69
+ validUntilDateBefore?: Date;
70
+ /** Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. */
71
+ validUntilDateAfter?: Date;
68
72
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
69
73
  pageSize?: number;
70
74
  /** Function to process each record. If this and a positional callback are passed, this one will be used */
@@ -96,6 +100,10 @@ export interface BundleListInstanceOptions {
96
100
  sortDirection?: BundleSortDirection;
97
101
  /** Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. */
98
102
  validUntilDate?: Date;
103
+ /** Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. */
104
+ validUntilDateBefore?: Date;
105
+ /** Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. */
106
+ validUntilDateAfter?: Date;
99
107
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
100
108
  pageSize?: number;
101
109
  /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
@@ -123,6 +131,10 @@ export interface BundleListInstancePageOptions {
123
131
  sortDirection?: BundleSortDirection;
124
132
  /** Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. */
125
133
  validUntilDate?: Date;
134
+ /** Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. */
135
+ validUntilDateBefore?: Date;
136
+ /** Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. */
137
+ validUntilDateAfter?: Date;
126
138
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
127
139
  pageSize?: number;
128
140
  /** Page Number, this value is simply for client state */
@@ -287,6 +287,10 @@ function BundleListInstance(version) {
287
287
  data["SortDirection"] = params["sortDirection"];
288
288
  if (params["validUntilDate"] !== undefined)
289
289
  data["ValidUntilDate"] = serialize.iso8601DateTime(params["validUntilDate"]);
290
+ if (params["validUntilDateBefore"] !== undefined)
291
+ data["ValidUntilDate<"] = serialize.iso8601DateTime(params["validUntilDateBefore"]);
292
+ if (params["validUntilDateAfter"] !== undefined)
293
+ data["ValidUntilDate>"] = serialize.iso8601DateTime(params["validUntilDateAfter"]);
290
294
  if (params["pageSize"] !== undefined)
291
295
  data["PageSize"] = params["pageSize"];
292
296
  if (params.pageNumber !== undefined)
@@ -0,0 +1,20 @@
1
+ import OauthBase from "../OauthBase";
2
+ import Version from "../../base/Version";
3
+ import { AuthorizeListInstance } from "./v1/authorize";
4
+ import { TokenListInstance } from "./v1/token";
5
+ export default class V1 extends Version {
6
+ /**
7
+ * Initialize the V1 version of Oauth
8
+ *
9
+ * @param domain - The Twilio (Twilio.Oauth) domain
10
+ */
11
+ constructor(domain: OauthBase);
12
+ /** authorize - { Twilio.Oauth.V1.AuthorizeListInstance } resource */
13
+ protected _authorize?: AuthorizeListInstance;
14
+ /** token - { Twilio.Oauth.V1.TokenListInstance } resource */
15
+ protected _token?: TokenListInstance;
16
+ /** Getter for authorize resource */
17
+ get authorize(): AuthorizeListInstance;
18
+ /** Getter for token resource */
19
+ get token(): TokenListInstance;
20
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Oauth
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ const Version_1 = __importDefault(require("../../base/Version"));
20
+ const authorize_1 = require("./v1/authorize");
21
+ const token_1 = require("./v1/token");
22
+ class V1 extends Version_1.default {
23
+ /**
24
+ * Initialize the V1 version of Oauth
25
+ *
26
+ * @param domain - The Twilio (Twilio.Oauth) domain
27
+ */
28
+ constructor(domain) {
29
+ super(domain, "v1");
30
+ }
31
+ /** Getter for authorize resource */
32
+ get authorize() {
33
+ this._authorize = this._authorize || (0, authorize_1.AuthorizeListInstance)(this);
34
+ return this._authorize;
35
+ }
36
+ /** Getter for token resource */
37
+ get token() {
38
+ this._token = this._token || (0, token_1.TokenListInstance)(this);
39
+ return this._token;
40
+ }
41
+ }
42
+ exports.default = V1;
@@ -0,0 +1,69 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ /**
5
+ * Options to pass to fetch a AuthorizeInstance
6
+ */
7
+ export interface AuthorizeListInstanceFetchOptions {
8
+ /** Response Type */
9
+ responseType?: string;
10
+ /** The Client Identifier */
11
+ clientId?: string;
12
+ /** The url to which response will be redirected to */
13
+ redirectUri?: string;
14
+ /** The scope of the access request */
15
+ scope?: string;
16
+ /** An opaque value which can be used to maintain state between the request and callback */
17
+ state?: string;
18
+ }
19
+ export interface AuthorizeSolution {
20
+ }
21
+ export interface AuthorizeListInstance {
22
+ _version: V1;
23
+ _solution: AuthorizeSolution;
24
+ _uri: string;
25
+ /**
26
+ * Fetch a AuthorizeInstance
27
+ *
28
+ * @param callback - Callback to handle processed record
29
+ *
30
+ * @returns Resolves to processed AuthorizeInstance
31
+ */
32
+ fetch(callback?: (error: Error | null, item?: AuthorizeInstance) => any): Promise<AuthorizeInstance>;
33
+ /**
34
+ * Fetch a AuthorizeInstance
35
+ *
36
+ * @param params - Parameter for request
37
+ * @param callback - Callback to handle processed record
38
+ *
39
+ * @returns Resolves to processed AuthorizeInstance
40
+ */
41
+ fetch(params: AuthorizeListInstanceFetchOptions, callback?: (error: Error | null, item?: AuthorizeInstance) => any): Promise<AuthorizeInstance>;
42
+ /**
43
+ * Provide a user-friendly representation
44
+ */
45
+ toJSON(): any;
46
+ [inspect.custom](_depth: any, options: InspectOptions): any;
47
+ }
48
+ export declare function AuthorizeListInstance(version: V1): AuthorizeListInstance;
49
+ interface AuthorizeResource {
50
+ redirect_to: string;
51
+ }
52
+ export declare class AuthorizeInstance {
53
+ protected _version: V1;
54
+ constructor(_version: V1, payload: AuthorizeResource);
55
+ /**
56
+ * The callback URL
57
+ */
58
+ redirectTo: string;
59
+ /**
60
+ * Provide a user-friendly representation
61
+ *
62
+ * @returns Object
63
+ */
64
+ toJSON(): {
65
+ redirectTo: string;
66
+ };
67
+ [inspect.custom](_depth: any, options: InspectOptions): string;
68
+ }
69
+ export {};
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Oauth
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.AuthorizeInstance = exports.AuthorizeListInstance = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ function AuthorizeListInstance(version) {
21
+ const instance = {};
22
+ instance._version = version;
23
+ instance._solution = {};
24
+ instance._uri = `/authorize`;
25
+ instance.fetch = function fetch(params, callback) {
26
+ if (params instanceof Function) {
27
+ callback = params;
28
+ params = {};
29
+ }
30
+ else {
31
+ params = params || {};
32
+ }
33
+ let data = {};
34
+ if (params["responseType"] !== undefined)
35
+ data["ResponseType"] = params["responseType"];
36
+ if (params["clientId"] !== undefined)
37
+ data["ClientId"] = params["clientId"];
38
+ if (params["redirectUri"] !== undefined)
39
+ data["RedirectUri"] = params["redirectUri"];
40
+ if (params["scope"] !== undefined)
41
+ data["Scope"] = params["scope"];
42
+ if (params["state"] !== undefined)
43
+ data["State"] = params["state"];
44
+ const headers = {};
45
+ let operationVersion = version, operationPromise = operationVersion.fetch({
46
+ uri: instance._uri,
47
+ method: "get",
48
+ params: data,
49
+ headers,
50
+ });
51
+ operationPromise = operationPromise.then((payload) => new AuthorizeInstance(operationVersion, payload));
52
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
53
+ return operationPromise;
54
+ };
55
+ instance.toJSON = function toJSON() {
56
+ return instance._solution;
57
+ };
58
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
59
+ return (0, util_1.inspect)(instance.toJSON(), options);
60
+ };
61
+ return instance;
62
+ }
63
+ exports.AuthorizeListInstance = AuthorizeListInstance;
64
+ class AuthorizeInstance {
65
+ constructor(_version, payload) {
66
+ this._version = _version;
67
+ this.redirectTo = payload.redirect_to;
68
+ }
69
+ /**
70
+ * Provide a user-friendly representation
71
+ *
72
+ * @returns Object
73
+ */
74
+ toJSON() {
75
+ return {
76
+ redirectTo: this.redirectTo,
77
+ };
78
+ }
79
+ [util_1.inspect.custom](_depth, options) {
80
+ return (0, util_1.inspect)(this.toJSON(), options);
81
+ }
82
+ }
83
+ exports.AuthorizeInstance = AuthorizeInstance;
@@ -0,0 +1,84 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ /**
5
+ * Options to pass to create a TokenInstance
6
+ */
7
+ export interface TokenListInstanceCreateOptions {
8
+ /** Grant type is a credential representing resource owner\\\'s authorization which can be used by client to obtain access token. */
9
+ grantType: string;
10
+ /** A 34 character string that uniquely identifies this OAuth App. */
11
+ clientId: string;
12
+ /** The credential for confidential OAuth App. */
13
+ clientSecret: string;
14
+ /** JWT token related to the authorization code grant type. */
15
+ code?: string;
16
+ /** The redirect uri */
17
+ redirectUri?: string;
18
+ /** The targeted audience uri */
19
+ audience?: string;
20
+ }
21
+ export interface TokenSolution {
22
+ }
23
+ export interface TokenListInstance {
24
+ _version: V1;
25
+ _solution: TokenSolution;
26
+ _uri: string;
27
+ /**
28
+ * Create a TokenInstance
29
+ *
30
+ * @param params - Parameter for request
31
+ * @param callback - Callback to handle processed record
32
+ *
33
+ * @returns Resolves to processed TokenInstance
34
+ */
35
+ create(params: TokenListInstanceCreateOptions, callback?: (error: Error | null, item?: TokenInstance) => any): Promise<TokenInstance>;
36
+ /**
37
+ * Provide a user-friendly representation
38
+ */
39
+ toJSON(): any;
40
+ [inspect.custom](_depth: any, options: InspectOptions): any;
41
+ }
42
+ export declare function TokenListInstance(version: V1): TokenListInstance;
43
+ interface TokenResource {
44
+ access_token: string;
45
+ refresh_token: string;
46
+ id_token: string;
47
+ token_type: string;
48
+ expires_in: Date;
49
+ }
50
+ export declare class TokenInstance {
51
+ protected _version: V1;
52
+ constructor(_version: V1, payload: TokenResource);
53
+ /**
54
+ * Token which carries the necessary information to access a Twilio resource directly.
55
+ */
56
+ accessToken: string;
57
+ /**
58
+ * Token which carries the information necessary to get a new access token.
59
+ */
60
+ refreshToken: string;
61
+ /**
62
+ * Token which carries the information necessary of user profile.
63
+ */
64
+ idToken: string;
65
+ /**
66
+ * Token type
67
+ */
68
+ tokenType: string;
69
+ expiresIn: Date;
70
+ /**
71
+ * Provide a user-friendly representation
72
+ *
73
+ * @returns Object
74
+ */
75
+ toJSON(): {
76
+ accessToken: string;
77
+ refreshToken: string;
78
+ idToken: string;
79
+ tokenType: string;
80
+ expiresIn: Date;
81
+ };
82
+ [inspect.custom](_depth: any, options: InspectOptions): string;
83
+ }
84
+ export {};
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Oauth
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.TokenInstance = exports.TokenListInstance = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ function TokenListInstance(version) {
21
+ const instance = {};
22
+ instance._version = version;
23
+ instance._solution = {};
24
+ instance._uri = `/token`;
25
+ instance.create = function create(params, callback) {
26
+ if (params === null || params === undefined) {
27
+ throw new Error('Required parameter "params" missing.');
28
+ }
29
+ if (params["grantType"] === null || params["grantType"] === undefined) {
30
+ throw new Error("Required parameter \"params['grantType']\" missing.");
31
+ }
32
+ if (params["clientId"] === null || params["clientId"] === undefined) {
33
+ throw new Error("Required parameter \"params['clientId']\" missing.");
34
+ }
35
+ if (params["clientSecret"] === null ||
36
+ params["clientSecret"] === undefined) {
37
+ throw new Error("Required parameter \"params['clientSecret']\" missing.");
38
+ }
39
+ let data = {};
40
+ data["GrantType"] = params["grantType"];
41
+ data["ClientId"] = params["clientId"];
42
+ data["ClientSecret"] = params["clientSecret"];
43
+ if (params["code"] !== undefined)
44
+ data["Code"] = params["code"];
45
+ if (params["redirectUri"] !== undefined)
46
+ data["RedirectUri"] = params["redirectUri"];
47
+ if (params["audience"] !== undefined)
48
+ data["Audience"] = params["audience"];
49
+ const headers = {};
50
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
51
+ let operationVersion = version, operationPromise = operationVersion.create({
52
+ uri: instance._uri,
53
+ method: "post",
54
+ data,
55
+ headers,
56
+ });
57
+ operationPromise = operationPromise.then((payload) => new TokenInstance(operationVersion, payload));
58
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
59
+ return operationPromise;
60
+ };
61
+ instance.toJSON = function toJSON() {
62
+ return instance._solution;
63
+ };
64
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
65
+ return (0, util_1.inspect)(instance.toJSON(), options);
66
+ };
67
+ return instance;
68
+ }
69
+ exports.TokenListInstance = TokenListInstance;
70
+ class TokenInstance {
71
+ constructor(_version, payload) {
72
+ this._version = _version;
73
+ this.accessToken = payload.access_token;
74
+ this.refreshToken = payload.refresh_token;
75
+ this.idToken = payload.id_token;
76
+ this.tokenType = payload.token_type;
77
+ this.expiresIn = deserialize.iso8601DateTime(payload.expires_in);
78
+ }
79
+ /**
80
+ * Provide a user-friendly representation
81
+ *
82
+ * @returns Object
83
+ */
84
+ toJSON() {
85
+ return {
86
+ accessToken: this.accessToken,
87
+ refreshToken: this.refreshToken,
88
+ idToken: this.idToken,
89
+ tokenType: this.tokenType,
90
+ expiresIn: this.expiresIn,
91
+ };
92
+ }
93
+ [util_1.inspect.custom](_depth, options) {
94
+ return (0, util_1.inspect)(this.toJSON(), options);
95
+ }
96
+ }
97
+ exports.TokenInstance = TokenInstance;
@@ -14,6 +14,8 @@ export interface CustomerProfilesEntityAssignmentsListInstanceCreateOptions {
14
14
  * Options to pass to each
15
15
  */
16
16
  export interface CustomerProfilesEntityAssignmentsListInstanceEachOptions {
17
+ /** A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document. */
18
+ objectType?: string;
17
19
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
18
20
  pageSize?: number;
19
21
  /** Function to process each record. If this and a positional callback are passed, this one will be used */
@@ -27,6 +29,8 @@ export interface CustomerProfilesEntityAssignmentsListInstanceEachOptions {
27
29
  * Options to pass to list
28
30
  */
29
31
  export interface CustomerProfilesEntityAssignmentsListInstanceOptions {
32
+ /** A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document. */
33
+ objectType?: string;
30
34
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
31
35
  pageSize?: number;
32
36
  /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
@@ -36,6 +40,8 @@ export interface CustomerProfilesEntityAssignmentsListInstanceOptions {
36
40
  * Options to pass to page
37
41
  */
38
42
  export interface CustomerProfilesEntityAssignmentsListInstancePageOptions {
43
+ /** A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document. */
44
+ objectType?: string;
39
45
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
40
46
  pageSize?: number;
41
47
  /** Page Number, this value is simply for client state */
@@ -164,6 +164,8 @@ function CustomerProfilesEntityAssignmentsListInstance(version, customerProfileS
164
164
  params = params || {};
165
165
  }
166
166
  let data = {};
167
+ if (params["objectType"] !== undefined)
168
+ data["ObjectType"] = params["objectType"];
167
169
  if (params["pageSize"] !== undefined)
168
170
  data["PageSize"] = params["pageSize"];
169
171
  if (params.pageNumber !== undefined)
@@ -14,6 +14,8 @@ export interface TrustProductsEntityAssignmentsListInstanceCreateOptions {
14
14
  * Options to pass to each
15
15
  */
16
16
  export interface TrustProductsEntityAssignmentsListInstanceEachOptions {
17
+ /** A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document. */
18
+ objectType?: string;
17
19
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
18
20
  pageSize?: number;
19
21
  /** Function to process each record. If this and a positional callback are passed, this one will be used */
@@ -27,6 +29,8 @@ export interface TrustProductsEntityAssignmentsListInstanceEachOptions {
27
29
  * Options to pass to list
28
30
  */
29
31
  export interface TrustProductsEntityAssignmentsListInstanceOptions {
32
+ /** A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document. */
33
+ objectType?: string;
30
34
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
31
35
  pageSize?: number;
32
36
  /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
@@ -36,6 +40,8 @@ export interface TrustProductsEntityAssignmentsListInstanceOptions {
36
40
  * Options to pass to page
37
41
  */
38
42
  export interface TrustProductsEntityAssignmentsListInstancePageOptions {
43
+ /** A string to filter the results by (EndUserType or SupportingDocumentType) machine-name. This is useful when you want to retrieve the entity-assignment of a specific end-user or supporting document. */
44
+ objectType?: string;
39
45
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
40
46
  pageSize?: number;
41
47
  /** Page Number, this value is simply for client state */
@@ -164,6 +164,8 @@ function TrustProductsEntityAssignmentsListInstance(version, trustProductSid) {
164
164
  params = params || {};
165
165
  }
166
166
  let data = {};
167
+ if (params["objectType"] !== undefined)
168
+ data["ObjectType"] = params["objectType"];
167
169
  if (params["pageSize"] !== undefined)
168
170
  data["PageSize"] = params["pageSize"];
169
171
  if (params.pageNumber !== undefined)
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.0",
4
+ "version": "5.0.1",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {