twilio 3.69.0 → 3.70.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.
- package/CHANGES.md +21 -0
- package/lib/jwt/AccessToken.d.ts +16 -0
- package/lib/jwt/AccessToken.js +20 -0
- package/lib/rest/Media.d.ts +28 -0
- package/lib/rest/Media.js +64 -0
- package/lib/rest/Twilio.d.ts +2 -0
- package/lib/rest/Twilio.js +14 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +5 -1
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +3 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +5 -1
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +3 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +5 -1
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +3 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +5 -1
- package/lib/rest/api/v2010/account/incomingPhoneNumber.js +3 -0
- package/lib/rest/media/V1.d.ts +28 -0
- package/lib/rest/media/V1.js +59 -0
- package/lib/rest/media/v1/mediaProcessor.d.ts +355 -0
- package/lib/rest/media/v1/mediaProcessor.js +702 -0
- package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +162 -0
- package/lib/rest/media/v1/playerStreamer/playbackGrant.js +384 -0
- package/lib/rest/media/v1/playerStreamer.d.ts +366 -0
- package/lib/rest/media/v1/playerStreamer.js +729 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +286 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +521 -0
- package/lib/rest/messaging/v1/brandRegistration.d.ts +14 -1
- package/lib/rest/messaging/v1/brandRegistration.js +36 -0
- package/lib/rest/messaging/v1/service.d.ts +8 -0
- package/lib/rest/messaging/v1/service.js +14 -0
- package/lib/rest/video/v1/room.d.ts +4 -0
- package/lib/rest/video/v1/room.js +7 -1
- package/package.json +2 -2
|
@@ -49,6 +49,7 @@ declare function ServiceList(version: V1): ServiceListInstance;
|
|
|
49
49
|
* @property stickySender - Whether to enable Sticky Sender on the Service instance
|
|
50
50
|
* @property synchronousValidation - Reserved
|
|
51
51
|
* @property useInboundWebhookOnNumber - If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.
|
|
52
|
+
* @property usecase - A string describing the scenario in which the Messaging Service will be used
|
|
52
53
|
* @property validityPeriod - How long, in seconds, messages sent from the Service are valid
|
|
53
54
|
*/
|
|
54
55
|
interface ServiceInstanceUpdateOptions {
|
|
@@ -66,6 +67,7 @@ interface ServiceInstanceUpdateOptions {
|
|
|
66
67
|
stickySender?: boolean;
|
|
67
68
|
synchronousValidation?: boolean;
|
|
68
69
|
useInboundWebhookOnNumber?: boolean;
|
|
70
|
+
usecase?: string;
|
|
69
71
|
validityPeriod?: number;
|
|
70
72
|
}
|
|
71
73
|
|
|
@@ -206,6 +208,7 @@ interface ServiceListInstance {
|
|
|
206
208
|
* @property stickySender - Whether to enable Sticky Sender on the Service instance
|
|
207
209
|
* @property synchronousValidation - Reserved
|
|
208
210
|
* @property useInboundWebhookOnNumber - If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.
|
|
211
|
+
* @property usecase - A string describing the scenario in which the Messaging Service will be used
|
|
209
212
|
* @property validityPeriod - How long, in seconds, messages sent from the Service are valid
|
|
210
213
|
*/
|
|
211
214
|
interface ServiceListInstanceCreateOptions {
|
|
@@ -223,6 +226,7 @@ interface ServiceListInstanceCreateOptions {
|
|
|
223
226
|
stickySender?: boolean;
|
|
224
227
|
synchronousValidation?: boolean;
|
|
225
228
|
useInboundWebhookOnNumber?: boolean;
|
|
229
|
+
usecase?: string;
|
|
226
230
|
validityPeriod?: number;
|
|
227
231
|
}
|
|
228
232
|
|
|
@@ -306,7 +310,9 @@ interface ServiceResource {
|
|
|
306
310
|
sticky_sender: boolean;
|
|
307
311
|
synchronous_validation: boolean;
|
|
308
312
|
url: string;
|
|
313
|
+
us_app_to_person_registered: boolean;
|
|
309
314
|
use_inbound_webhook_on_number: boolean;
|
|
315
|
+
usecase: string;
|
|
310
316
|
validity_period: number;
|
|
311
317
|
}
|
|
312
318
|
|
|
@@ -441,11 +447,13 @@ declare class ServiceInstance extends SerializableClass {
|
|
|
441
447
|
* Access the usAppToPerson
|
|
442
448
|
*/
|
|
443
449
|
usAppToPerson(): UsAppToPersonListInstance;
|
|
450
|
+
usAppToPersonRegistered: boolean;
|
|
444
451
|
/**
|
|
445
452
|
* Access the usAppToPersonUsecases
|
|
446
453
|
*/
|
|
447
454
|
usAppToPersonUsecases(): UsAppToPersonUsecaseListInstance;
|
|
448
455
|
useInboundWebhookOnNumber: boolean;
|
|
456
|
+
usecase: string;
|
|
449
457
|
validityPeriod: number;
|
|
450
458
|
}
|
|
451
459
|
|
|
@@ -93,6 +93,8 @@ ServiceList = function ServiceList(version) {
|
|
|
93
93
|
* @param {number} [opts.validityPeriod] -
|
|
94
94
|
* How long, in seconds, messages sent from the Service are valid
|
|
95
95
|
* @param {boolean} [opts.synchronousValidation] - Reserved
|
|
96
|
+
* @param {string} [opts.usecase] -
|
|
97
|
+
* A string describing the scenario in which the Messaging Service will be used
|
|
96
98
|
* @param {boolean} [opts.useInboundWebhookOnNumber] -
|
|
97
99
|
* If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.
|
|
98
100
|
* @param {function} [callback] - Callback to handle processed record
|
|
@@ -124,6 +126,7 @@ ServiceList = function ServiceList(version) {
|
|
|
124
126
|
'AreaCodeGeomatch': serialize.bool(_.get(opts, 'areaCodeGeomatch')),
|
|
125
127
|
'ValidityPeriod': _.get(opts, 'validityPeriod'),
|
|
126
128
|
'SynchronousValidation': serialize.bool(_.get(opts, 'synchronousValidation')),
|
|
129
|
+
'Usecase': _.get(opts, 'usecase'),
|
|
127
130
|
'UseInboundWebhookOnNumber': serialize.bool(_.get(opts, 'useInboundWebhookOnNumber'))
|
|
128
131
|
});
|
|
129
132
|
|
|
@@ -533,6 +536,10 @@ ServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
533
536
|
* How long, in seconds, messages sent from the Service are valid
|
|
534
537
|
* @property {string} url - The absolute URL of the Service resource
|
|
535
538
|
* @property {string} links - The absolute URLs of related resources
|
|
539
|
+
* @property {string} usecase -
|
|
540
|
+
* A string describing the scenario in which the Messaging Service will be used
|
|
541
|
+
* @property {boolean} usAppToPersonRegistered -
|
|
542
|
+
* Whether US A2P campaign is registered for this Service.
|
|
536
543
|
* @property {boolean} useInboundWebhookOnNumber -
|
|
537
544
|
* If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.
|
|
538
545
|
*
|
|
@@ -565,6 +572,8 @@ ServiceInstance = function ServiceInstance(version, payload, sid) {
|
|
|
565
572
|
this.validityPeriod = deserialize.integer(payload.validity_period); // jshint ignore:line
|
|
566
573
|
this.url = payload.url; // jshint ignore:line
|
|
567
574
|
this.links = payload.links; // jshint ignore:line
|
|
575
|
+
this.usecase = payload.usecase; // jshint ignore:line
|
|
576
|
+
this.usAppToPersonRegistered = payload.us_app_to_person_registered; // jshint ignore:line
|
|
568
577
|
this.useInboundWebhookOnNumber = payload.use_inbound_webhook_on_number; // jshint ignore:line
|
|
569
578
|
|
|
570
579
|
// Context
|
|
@@ -616,6 +625,8 @@ Object.defineProperty(ServiceInstance.prototype,
|
|
|
616
625
|
* @param {number} [opts.validityPeriod] -
|
|
617
626
|
* How long, in seconds, messages sent from the Service are valid
|
|
618
627
|
* @param {boolean} [opts.synchronousValidation] - Reserved
|
|
628
|
+
* @param {string} [opts.usecase] -
|
|
629
|
+
* A string describing the scenario in which the Messaging Service will be used
|
|
619
630
|
* @param {boolean} [opts.useInboundWebhookOnNumber] -
|
|
620
631
|
* If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.
|
|
621
632
|
* @param {function} [callback] - Callback to handle processed record
|
|
@@ -828,6 +839,8 @@ ServiceContext = function ServiceContext(version, sid) {
|
|
|
828
839
|
* @param {number} [opts.validityPeriod] -
|
|
829
840
|
* How long, in seconds, messages sent from the Service are valid
|
|
830
841
|
* @param {boolean} [opts.synchronousValidation] - Reserved
|
|
842
|
+
* @param {string} [opts.usecase] -
|
|
843
|
+
* A string describing the scenario in which the Messaging Service will be used
|
|
831
844
|
* @param {boolean} [opts.useInboundWebhookOnNumber] -
|
|
832
845
|
* If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.
|
|
833
846
|
* @param {function} [callback] - Callback to handle processed record
|
|
@@ -858,6 +871,7 @@ ServiceContext.prototype.update = function update(opts, callback) {
|
|
|
858
871
|
'AreaCodeGeomatch': serialize.bool(_.get(opts, 'areaCodeGeomatch')),
|
|
859
872
|
'ValidityPeriod': _.get(opts, 'validityPeriod'),
|
|
860
873
|
'SynchronousValidation': serialize.bool(_.get(opts, 'synchronousValidation')),
|
|
874
|
+
'Usecase': _.get(opts, 'usecase'),
|
|
861
875
|
'UseInboundWebhookOnNumber': serialize.bool(_.get(opts, 'useInboundWebhookOnNumber'))
|
|
862
876
|
});
|
|
863
877
|
|
|
@@ -167,6 +167,7 @@ interface RoomListInstance {
|
|
|
167
167
|
/**
|
|
168
168
|
* Options to pass to create
|
|
169
169
|
*
|
|
170
|
+
* @property audioOnly - Indicates whether the room will only contain audio track participants for group rooms.
|
|
170
171
|
* @property enableTurn - Enable Twilio's Network Traversal TURN service
|
|
171
172
|
* @property maxParticipants - The maximum number of concurrent Participants allowed in the room
|
|
172
173
|
* @property mediaRegion - The region for the media server in Group Rooms
|
|
@@ -179,6 +180,7 @@ interface RoomListInstance {
|
|
|
179
180
|
* @property videoCodecs - An array of the video codecs that are supported when publishing a track in the room
|
|
180
181
|
*/
|
|
181
182
|
interface RoomListInstanceCreateOptions {
|
|
183
|
+
audioOnly?: boolean;
|
|
182
184
|
enableTurn?: boolean;
|
|
183
185
|
maxParticipants?: number;
|
|
184
186
|
mediaRegion?: string;
|
|
@@ -277,6 +279,7 @@ interface RoomPayload extends RoomResource, Page.TwilioResponsePayload {
|
|
|
277
279
|
|
|
278
280
|
interface RoomResource {
|
|
279
281
|
account_sid: string;
|
|
282
|
+
audio_only: boolean;
|
|
280
283
|
date_created: Date;
|
|
281
284
|
date_updated: Date;
|
|
282
285
|
duration: number;
|
|
@@ -345,6 +348,7 @@ declare class RoomInstance extends SerializableClass {
|
|
|
345
348
|
|
|
346
349
|
private _proxy: RoomContext;
|
|
347
350
|
accountSid: string;
|
|
351
|
+
audioOnly: boolean;
|
|
348
352
|
dateCreated: Date;
|
|
349
353
|
dateUpdated: Date;
|
|
350
354
|
duration: number;
|
|
@@ -80,6 +80,8 @@ RoomList = function RoomList(version) {
|
|
|
80
80
|
* @param {string} [opts.mediaRegion] -
|
|
81
81
|
* The region for the media server in Group Rooms
|
|
82
82
|
* @param {object} [opts.recordingRules] - A collection of Recording Rules
|
|
83
|
+
* @param {boolean} [opts.audioOnly] -
|
|
84
|
+
* Indicates whether the room will only contain audio track participants for group rooms.
|
|
83
85
|
* @param {function} [callback] - Callback to handle processed record
|
|
84
86
|
*
|
|
85
87
|
* @returns {Promise} Resolves to processed RoomInstance
|
|
@@ -103,7 +105,8 @@ RoomList = function RoomList(version) {
|
|
|
103
105
|
'RecordParticipantsOnConnect': serialize.bool(_.get(opts, 'recordParticipantsOnConnect')),
|
|
104
106
|
'VideoCodecs': serialize.map(_.get(opts, 'videoCodecs'), function(e) { return e; }),
|
|
105
107
|
'MediaRegion': _.get(opts, 'mediaRegion'),
|
|
106
|
-
'RecordingRules': serialize.object(_.get(opts, 'recordingRules'))
|
|
108
|
+
'RecordingRules': serialize.object(_.get(opts, 'recordingRules')),
|
|
109
|
+
'AudioOnly': serialize.bool(_.get(opts, 'audioOnly'))
|
|
107
110
|
});
|
|
108
111
|
|
|
109
112
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -521,6 +524,8 @@ RoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
521
524
|
* @property {room.video_codec} videoCodecs -
|
|
522
525
|
* An array of the video codecs that are supported when publishing a track in the room
|
|
523
526
|
* @property {string} mediaRegion - The region for the media server in Group Rooms
|
|
527
|
+
* @property {boolean} audioOnly -
|
|
528
|
+
* Indicates whether the room will only contain audio track participants for group rooms.
|
|
524
529
|
* @property {string} url - The absolute URL of the resource
|
|
525
530
|
* @property {string} links - The URLs of related resources
|
|
526
531
|
*
|
|
@@ -550,6 +555,7 @@ RoomInstance = function RoomInstance(version, payload, sid) {
|
|
|
550
555
|
this.recordParticipantsOnConnect = payload.record_participants_on_connect; // jshint ignore:line
|
|
551
556
|
this.videoCodecs = payload.video_codecs; // jshint ignore:line
|
|
552
557
|
this.mediaRegion = payload.media_region; // jshint ignore:line
|
|
558
|
+
this.audioOnly = payload.audio_only; // jshint ignore:line
|
|
553
559
|
this.url = payload.url; // jshint ignore:line
|
|
554
560
|
this.links = payload.links; // jshint ignore:line
|
|
555
561
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twilio",
|
|
3
3
|
"description": "A Twilio helper library",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.70.0",
|
|
5
5
|
"author": "API Team <api@twilio.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/twilio/twilio-node.git"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"axios": "^0.21.
|
|
23
|
+
"axios": "^0.21.4",
|
|
24
24
|
"dayjs": "^1.8.29",
|
|
25
25
|
"https-proxy-agent": "^5.0.0",
|
|
26
26
|
"jsonwebtoken": "^8.5.1",
|