twilio 3.76.1 → 3.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -183,7 +183,7 @@ interface MessageListInstance {
183
183
  * @property persistentAction - Rich actions for Channels Messages.
184
184
  * @property provideFeedback - Whether to confirm delivery of the message
185
185
  * @property scheduleType - Pass the value `fixed` to schedule a message at a fixed time.
186
- * @property sendAsMms - If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media
186
+ * @property sendAsMms - If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
187
187
  * @property sendAt - The time that Twilio will send the message. Must be in ISO 8601 format.
188
188
  * @property smartEncoded - Whether to detect Unicode characters that have a similar GSM-7 character and replace them
189
189
  * @property statusCallback - The URL we should call to send status information to your application
@@ -88,7 +88,7 @@ MessageList = function MessageList(version, accountSid) {
88
88
  * @param {Date} [opts.sendAt] -
89
89
  * The time that Twilio will send the message. Must be in ISO 8601 format.
90
90
  * @param {boolean} [opts.sendAsMms] -
91
- * If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media
91
+ * If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
92
92
  * @param {string} [opts.from] - The phone number that initiated the message
93
93
  * @param {string} [opts.messagingServiceSid] -
94
94
  * The SID of the Messaging Service you want to associate with the message.
@@ -220,12 +220,14 @@ interface AddressConfigurationListInstanceCreateOptions {
220
220
  * If no pageSize is defined but a limit is defined,
221
221
  * each() will attempt to read the limit with the most efficient
222
222
  * page size, i.e. min(limit, 1000)
223
+ * @property type - The type of address configuration.
223
224
  */
224
225
  interface AddressConfigurationListInstanceEachOptions {
225
226
  callback?: (item: AddressConfigurationInstance, done: (err?: Error) => void) => void;
226
227
  done?: Function;
227
228
  limit?: number;
228
229
  pageSize?: number;
230
+ type?: string;
229
231
  }
230
232
 
231
233
  /**
@@ -241,10 +243,12 @@ interface AddressConfigurationListInstanceEachOptions {
241
243
  * If no page_size is defined but a limit is defined,
242
244
  * list() will attempt to read the limit with the most
243
245
  * efficient page size, i.e. min(limit, 1000)
246
+ * @property type - The type of address configuration.
244
247
  */
245
248
  interface AddressConfigurationListInstanceOptions {
246
249
  limit?: number;
247
250
  pageSize?: number;
251
+ type?: string;
248
252
  }
249
253
 
250
254
  /**
@@ -253,11 +257,13 @@ interface AddressConfigurationListInstanceOptions {
253
257
  * @property pageNumber - Page Number, this value is simply for client state
254
258
  * @property pageSize - Number of records to return, defaults to 50
255
259
  * @property pageToken - PageToken provided by the API
260
+ * @property type - The type of address configuration.
256
261
  */
257
262
  interface AddressConfigurationListInstancePageOptions {
258
263
  pageNumber?: number;
259
264
  pageSize?: number;
260
265
  pageToken?: string;
266
+ type?: string;
261
267
  }
262
268
 
263
269
  interface AddressConfigurationPayload extends AddressConfigurationResource, Page.TwilioResponsePayload {
@@ -68,6 +68,7 @@ AddressConfigurationList = function AddressConfigurationList(version) {
68
68
  * @memberof Twilio.Conversations.V1.AddressConfigurationList#
69
69
  *
70
70
  * @param {object} [opts] - Options for request
71
+ * @param {string} [opts.type] - The type of address configuration.
71
72
  * @param {number} [opts.limit] -
72
73
  * Upper limit for the number of records to return.
73
74
  * each() guarantees never to return more than limit.
@@ -157,6 +158,7 @@ AddressConfigurationList = function AddressConfigurationList(version) {
157
158
  * @memberof Twilio.Conversations.V1.AddressConfigurationList#
158
159
  *
159
160
  * @param {object} [opts] - Options for request
161
+ * @param {string} [opts.type] - The type of address configuration.
160
162
  * @param {number} [opts.limit] -
161
163
  * Upper limit for the number of records to return.
162
164
  * list() guarantees never to return more than limit.
@@ -217,6 +219,7 @@ AddressConfigurationList = function AddressConfigurationList(version) {
217
219
  * @memberof Twilio.Conversations.V1.AddressConfigurationList#
218
220
  *
219
221
  * @param {object} [opts] - Options for request
222
+ * @param {string} [opts.type] - The type of address configuration.
220
223
  * @param {string} [opts.pageToken] - PageToken provided by the API
221
224
  * @param {number} [opts.pageNumber] -
222
225
  * Page Number, this value is simply for client state
@@ -235,6 +238,7 @@ AddressConfigurationList = function AddressConfigurationList(version) {
235
238
 
236
239
  var deferred = Q.defer();
237
240
  var data = values.of({
241
+ 'Type': _.get(opts, 'type'),
238
242
  'PageToken': opts.pageToken,
239
243
  'Page': opts.pageNumber,
240
244
  'PageSize': opts.pageSize
@@ -27,13 +27,19 @@ interface EsimProfileListInstance {
27
27
  * @param sid - sid of instance
28
28
  */
29
29
  (sid: string): EsimProfileContext;
30
+ /**
31
+ * create a EsimProfileInstance
32
+ *
33
+ * @param callback - Callback to handle processed record
34
+ */
35
+ create(callback?: (error: Error | null, item: EsimProfileInstance) => any): Promise<EsimProfileInstance>;
30
36
  /**
31
37
  * create a EsimProfileInstance
32
38
  *
33
39
  * @param opts - Options for request
34
40
  * @param callback - Callback to handle processed record
35
41
  */
36
- create(opts: EsimProfileListInstanceCreateOptions, callback?: (error: Error | null, item: EsimProfileInstance) => any): Promise<EsimProfileInstance>;
42
+ create(opts?: EsimProfileListInstanceCreateOptions, callback?: (error: Error | null, item: EsimProfileInstance) => any): Promise<EsimProfileInstance>;
37
43
  /**
38
44
  * Streams EsimProfileInstance records from the API.
39
45
  *
@@ -152,7 +158,7 @@ interface EsimProfileListInstance {
152
158
  interface EsimProfileListInstanceCreateOptions {
153
159
  callbackMethod?: string;
154
160
  callbackUrl?: string;
155
- eid: string;
161
+ eid?: string;
156
162
  }
157
163
 
158
164
  /**
@@ -60,31 +60,30 @@ EsimProfileList = function EsimProfileList(version) {
60
60
  * @function create
61
61
  * @memberof Twilio.Supersim.V1.EsimProfileList#
62
62
  *
63
- * @param {object} opts - Options for request
64
- * @param {string} opts.eid -
65
- * Identifier of the eUICC that will claim the eSIM Profile
63
+ * @param {object} [opts] - Options for request
66
64
  * @param {string} [opts.callbackUrl] -
67
65
  * The URL we should call after we have sent when the status of the eSIM Profile changes
68
66
  * @param {string} [opts.callbackMethod] -
69
67
  * The HTTP method we should use to call callback_url
68
+ * @param {string} [opts.eid] -
69
+ * Identifier of the eUICC that will claim the eSIM Profile
70
70
  * @param {function} [callback] - Callback to handle processed record
71
71
  *
72
72
  * @returns {Promise} Resolves to processed EsimProfileInstance
73
73
  */
74
74
  /* jshint ignore:end */
75
75
  EsimProfileListInstance.create = function create(opts, callback) {
76
- if (_.isUndefined(opts)) {
77
- throw new Error('Required parameter "opts" missing.');
78
- }
79
- if (_.isUndefined(opts['eid'])) {
80
- throw new Error('Required parameter "opts[\'eid\']" missing.');
76
+ if (_.isFunction(opts)) {
77
+ callback = opts;
78
+ opts = {};
81
79
  }
80
+ opts = opts || {};
82
81
 
83
82
  var deferred = Q.defer();
84
83
  var data = values.of({
85
- 'Eid': _.get(opts, 'eid'),
86
84
  'CallbackUrl': _.get(opts, 'callbackUrl'),
87
- 'CallbackMethod': _.get(opts, 'callbackMethod')
85
+ 'CallbackMethod': _.get(opts, 'callbackMethod'),
86
+ 'Eid': _.get(opts, 'eid')
88
87
  });
89
88
 
90
89
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -239,8 +239,10 @@ interface UsageRecordPayload extends UsageRecordResource, Page.TwilioResponsePay
239
239
 
240
240
  interface UsageRecordResource {
241
241
  account_sid: string;
242
+ billed_unit: string;
242
243
  data_download: number;
243
244
  data_total: number;
245
+ data_total_billed: number;
244
246
  data_upload: number;
245
247
  fleet_sid: string;
246
248
  iso_country: string;
@@ -266,8 +268,10 @@ declare class UsageRecordInstance extends SerializableClass {
266
268
  constructor(version: V1, payload: UsageRecordPayload);
267
269
 
268
270
  accountSid: string;
271
+ billedUnit: string;
269
272
  dataDownload: number;
270
273
  dataTotal: number;
274
+ dataTotalBilled: number;
271
275
  dataUpload: number;
272
276
  fleetSid: string;
273
277
  isoCountry: string;
@@ -468,6 +468,10 @@ UsageRecordPage.prototype[util.inspect.custom] = function inspect(depth,
468
468
  * @property {number} dataDownload -
469
469
  * Total data downloaded in bytes, aggregated by the query parameters.
470
470
  * @property {number} dataTotal - Total of data_upload and data_download.
471
+ * @property {number} dataTotalBilled -
472
+ * Total amount in the `billed_unit` that was charged for the data uploaded or downloaded.
473
+ * @property {string} billedUnit -
474
+ * The currency in which the billed amounts are measured, specified in the 3 letter ISO 4127 format (e.g. `USD`, `EUR`, `JPY`).
471
475
  *
472
476
  * @param {V1} version - Version of the resource
473
477
  * @param {UsageRecordPayload} payload - The instance payload
@@ -486,6 +490,8 @@ UsageRecordInstance = function UsageRecordInstance(version, payload) {
486
490
  this.dataUpload = deserialize.integer(payload.data_upload); // jshint ignore:line
487
491
  this.dataDownload = deserialize.integer(payload.data_download); // jshint ignore:line
488
492
  this.dataTotal = deserialize.integer(payload.data_total); // jshint ignore:line
493
+ this.dataTotalBilled = deserialize.decimal(payload.data_total_billed); // jshint ignore:line
494
+ this.billedUnit = payload.billed_unit; // jshint ignore:line
489
495
 
490
496
  // Context
491
497
  this._context = undefined;
@@ -44,7 +44,7 @@ declare function ServiceList(version: V2): ServiceListInstance;
44
44
  * @property psd2Enabled - Whether to pass PSD2 transaction parameters when starting a verification
45
45
  * @property push.apnCredentialSid - Optional. Set APN Credential for this service.
46
46
  * @property push.fcmCredentialSid - Optional. Set FCM Credential for this service.
47
- * @property push.includeDate - Optional. Include the date in the Challenge's reponse. Default: true
47
+ * @property push.includeDate - Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
48
48
  * @property skipSmsToLandlines - Whether to skip sending SMS verifications to landlines
49
49
  * @property totp.codeLength - Optional. Number of digits for generated TOTP codes
50
50
  * @property totp.issuer - Optional. Set TOTP Issuer for this service.
@@ -209,7 +209,7 @@ interface ServiceListInstance {
209
209
  * @property psd2Enabled - Whether to pass PSD2 transaction parameters when starting a verification
210
210
  * @property push.apnCredentialSid - Optional. Set APN Credential for this service.
211
211
  * @property push.fcmCredentialSid - Optional. Set FCM Credential for this service.
212
- * @property push.includeDate - Optional. Include the date in the Challenge's reponse. Default: true
212
+ * @property push.includeDate - Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
213
213
  * @property skipSmsToLandlines - Whether to skip sending SMS verifications to landlines
214
214
  * @property totp.codeLength - Optional. Number of digits for generated TOTP codes
215
215
  * @property totp.issuer - Optional. Set TOTP Issuer for this service.
@@ -87,7 +87,7 @@ ServiceList = function ServiceList(version) {
87
87
  * @param {boolean} [opts.customCodeEnabled] -
88
88
  * Whether to allow sending verifications with a custom code.
89
89
  * @param {boolean} [opts.push.includeDate] -
90
- * Optional. Include the date in the Challenge's reponse. Default: true
90
+ * Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
91
91
  * @param {string} [opts.push.apnCredentialSid] -
92
92
  * Optional. Set APN Credential for this service.
93
93
  * @param {string} [opts.push.fcmCredentialSid] -
@@ -636,7 +636,7 @@ ServiceInstance.prototype.remove = function remove(callback) {
636
636
  * @param {boolean} [opts.customCodeEnabled] -
637
637
  * Whether to allow sending verifications with a custom code.
638
638
  * @param {boolean} [opts.push.includeDate] -
639
- * Optional. Include the date in the Challenge's reponse. Default: true
639
+ * Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
640
640
  * @param {string} [opts.push.apnCredentialSid] -
641
641
  * Optional. Set APN Credential for this service.
642
642
  * @param {string} [opts.push.fcmCredentialSid] -
@@ -915,7 +915,7 @@ ServiceContext.prototype.remove = function remove(callback) {
915
915
  * @param {boolean} [opts.customCodeEnabled] -
916
916
  * Whether to allow sending verifications with a custom code.
917
917
  * @param {boolean} [opts.push.includeDate] -
918
- * Optional. Include the date in the Challenge's reponse. Default: true
918
+ * Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.
919
919
  * @param {string} [opts.push.apnCredentialSid] -
920
920
  * Optional. Set APN Credential for this service.
921
921
  * @param {string} [opts.push.fcmCredentialSid] -
@@ -170,6 +170,7 @@ interface RoomListInstance {
170
170
  * @property audioOnly - Indicates whether the room will only contain audio track participants for group rooms.
171
171
  * @property emptyRoomTimeout - Configures the time a room will remain active after last participant leaves.
172
172
  * @property enableTurn - Enable Twilio's Network Traversal TURN service
173
+ * @property largeRoom - Indicates whether this is a large room.
173
174
  * @property maxParticipantDuration - The maximum number of seconds a Participant can be connected to the room
174
175
  * @property maxParticipants - The maximum number of concurrent Participants allowed in the room
175
176
  * @property mediaRegion - The region for the media server in Group Rooms
@@ -186,6 +187,7 @@ interface RoomListInstanceCreateOptions {
186
187
  audioOnly?: boolean;
187
188
  emptyRoomTimeout?: number;
188
189
  enableTurn?: boolean;
190
+ largeRoom?: boolean;
189
191
  maxParticipantDuration?: number;
190
192
  maxParticipants?: number;
191
193
  mediaRegion?: string;
@@ -292,6 +294,7 @@ interface RoomResource {
292
294
  empty_room_timeout: number;
293
295
  enable_turn: boolean;
294
296
  end_time: Date;
297
+ large_room: boolean;
295
298
  links: string;
296
299
  max_concurrent_published_tracks: number;
297
300
  max_participant_duration: number;
@@ -370,6 +373,7 @@ declare class RoomInstance extends SerializableClass {
370
373
  * @param callback - Callback to handle processed record
371
374
  */
372
375
  fetch(callback?: (error: Error | null, items: RoomInstance) => any): Promise<RoomInstance>;
376
+ largeRoom: boolean;
373
377
  links: string;
374
378
  maxConcurrentPublishedTracks: number;
375
379
  maxParticipantDuration: number;
@@ -88,6 +88,7 @@ RoomList = function RoomList(version) {
88
88
  * Configures the time a room will remain active after last participant leaves.
89
89
  * @param {number} [opts.unusedRoomTimeout] -
90
90
  * Configures the time a room will remain active when no one joins.
91
+ * @param {boolean} [opts.largeRoom] - Indicates whether this is a large room.
91
92
  * @param {function} [callback] - Callback to handle processed record
92
93
  *
93
94
  * @returns {Promise} Resolves to processed RoomInstance
@@ -115,7 +116,8 @@ RoomList = function RoomList(version) {
115
116
  'AudioOnly': serialize.bool(_.get(opts, 'audioOnly')),
116
117
  'MaxParticipantDuration': _.get(opts, 'maxParticipantDuration'),
117
118
  'EmptyRoomTimeout': _.get(opts, 'emptyRoomTimeout'),
118
- 'UnusedRoomTimeout': _.get(opts, 'unusedRoomTimeout')
119
+ 'UnusedRoomTimeout': _.get(opts, 'unusedRoomTimeout'),
120
+ 'LargeRoom': serialize.bool(_.get(opts, 'largeRoom'))
119
121
  });
120
122
 
121
123
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -543,6 +545,7 @@ RoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {
543
545
  * The time a room will remain active after last participant leaves.
544
546
  * @property {number} unusedRoomTimeout -
545
547
  * The time a room will remain active when no one joins.
548
+ * @property {boolean} largeRoom - Indicates if this is a large room.
546
549
  * @property {string} url - The absolute URL of the resource
547
550
  * @property {string} links - The URLs of related resources
548
551
  *
@@ -576,6 +579,7 @@ RoomInstance = function RoomInstance(version, payload, sid) {
576
579
  this.audioOnly = payload.audio_only; // jshint ignore:line
577
580
  this.emptyRoomTimeout = deserialize.integer(payload.empty_room_timeout); // jshint ignore:line
578
581
  this.unusedRoomTimeout = deserialize.integer(payload.unused_room_timeout); // jshint ignore:line
582
+ this.largeRoom = payload.large_room; // jshint ignore:line
579
583
  this.url = payload.url; // jshint ignore:line
580
584
  this.links = payload.links; // jshint ignore:line
581
585
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "3.76.1",
4
+ "version": "3.77.0",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {