twilio 3.70.0 → 3.72.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 +100 -0
- package/README.md +1 -1
- package/lib/jwt/ClientCapability.d.ts +1 -1
- package/lib/rest/Insights.d.ts +2 -0
- package/lib/rest/Insights.js +8 -0
- package/lib/rest/Supersim.d.ts +2 -0
- package/lib/rest/Supersim.js +8 -0
- package/lib/rest/Voice.d.ts +2 -0
- package/lib/rest/Voice.js +9 -0
- package/lib/rest/api/v2010/account/call.d.ts +1 -1
- package/lib/rest/api/v2010/account/call.js +1 -1
- package/lib/rest/api/v2010/account/message.d.ts +2 -0
- package/lib/rest/api/v2010/account/message.js +4 -1
- package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +172 -0
- package/lib/rest/conversations/v1/service/configuration/webhook.js +400 -0
- package/lib/rest/conversations/v1/service/configuration.d.ts +2 -0
- package/lib/rest/conversations/v1/service/configuration.js +13 -0
- package/lib/rest/flexApi/v1/configuration.d.ts +4 -0
- package/lib/rest/flexApi/v1/configuration.js +5 -0
- package/lib/rest/frontlineApi/v1/user.d.ts +4 -0
- package/lib/rest/frontlineApi/v1/user.js +10 -1
- package/lib/rest/insights/V1.d.ts +3 -0
- package/lib/rest/insights/V1.js +11 -0
- package/lib/rest/insights/v1/setting.d.ts +181 -0
- package/lib/rest/insights/v1/setting.js +384 -0
- package/lib/rest/media/v1/mediaProcessor.d.ts +4 -0
- package/lib/rest/media/v1/mediaProcessor.js +5 -1
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +46 -2
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +139 -5
- package/lib/rest/messaging/v1/brandRegistration.d.ts +1 -1
- package/lib/rest/messaging/v1/brandRegistration.js +1 -1
- package/lib/rest/serverless/v1/service/build.d.ts +1 -1
- package/lib/rest/supersim/V1.d.ts +3 -0
- package/lib/rest/supersim/V1.js +11 -0
- package/lib/rest/supersim/v1/ipCommand.d.ts +362 -0
- package/lib/rest/supersim/v1/ipCommand.js +679 -0
- package/lib/rest/verify/v2/service/accessToken.d.ts +2 -0
- package/lib/rest/verify/v2/service/accessToken.js +3 -1
- package/lib/rest/verify/v2/service/entity/factor.d.ts +4 -2
- package/lib/rest/verify/v2/service/entity/factor.js +8 -3
- package/lib/rest/verify/v2/service/entity/newFactor.d.ts +2 -2
- package/lib/rest/verify/v2/service/entity/newFactor.js +1 -1
- package/lib/rest/verify/v2/service/verification.d.ts +4 -0
- package/lib/rest/verify/v2/service/verification.js +6 -1
- package/lib/rest/verify/v2/service.d.ts +6 -0
- package/lib/rest/verify/v2/service.js +12 -2
- package/lib/rest/verify/v2/verificationAttempt.d.ts +1 -1
- package/lib/rest/video/v1/room.d.ts +12 -0
- package/lib/rest/video/v1/room.js +19 -1
- package/lib/rest/voice/V1.d.ts +3 -0
- package/lib/rest/voice/V1.js +12 -0
- package/lib/rest/voice/v1/archivedCall.d.ts +136 -0
- package/lib/rest/voice/v1/archivedCall.js +325 -0
- package/lib/rest/wireless/v1/ratePlan.d.ts +1 -1
- package/lib/rest/wireless/v1/ratePlan.js +3 -3
- package/lib/rest/wireless/v1/sim.d.ts +4 -4
- package/lib/rest/wireless/v1/sim.js +17 -27
- package/lib/twiml/VoiceResponse.d.ts +1296 -24
- package/lib/twiml/VoiceResponse.js +2170 -82
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ type FactorFactorStatuses = 'unverified'|'verified';
|
|
|
14
14
|
|
|
15
15
|
type FactorFactorTypes = 'push'|'totp';
|
|
16
16
|
|
|
17
|
-
type FactorNotificationPlatforms = 'apn'|'fcm';
|
|
17
|
+
type FactorNotificationPlatforms = 'apn'|'fcm'|'none';
|
|
18
18
|
|
|
19
19
|
type FactorTotpAlgorithms = 'sha1'|'sha256'|'sha512';
|
|
20
20
|
|
|
@@ -36,7 +36,8 @@ declare function FactorList(version: V2, serviceSid: string, identity: string):
|
|
|
36
36
|
* @property authPayload - Optional payload to verify the Factor for the first time
|
|
37
37
|
* @property config.alg - The algorithm used to derive the TOTP codes
|
|
38
38
|
* @property config.codeLength - Number of digits for generated TOTP codes
|
|
39
|
-
* @property config.
|
|
39
|
+
* @property config.notificationPlatform - The transport technology used to generate the Notification Token
|
|
40
|
+
* @property config.notificationToken - For APN, the device token. For FCM, the registration token
|
|
40
41
|
* @property config.sdkVersion - The Verify Push SDK version used to configure the factor
|
|
41
42
|
* @property config.skew - The number of past and future time-steps valid at a given time
|
|
42
43
|
* @property config.timeStep - How often, in seconds, are TOTP codes generated
|
|
@@ -51,6 +52,7 @@ interface FactorInstanceUpdateOptions {
|
|
|
51
52
|
skew?: number;
|
|
52
53
|
codeLength?: number;
|
|
53
54
|
alg?: FactorTotpAlgorithms;
|
|
55
|
+
notificationPlatform?: string;
|
|
54
56
|
};
|
|
55
57
|
friendlyName?: string;
|
|
56
58
|
}
|
|
@@ -519,7 +519,7 @@ FactorInstance.prototype.fetch = function fetch(callback) {
|
|
|
519
519
|
* Optional payload to verify the Factor for the first time
|
|
520
520
|
* @param {string} [opts.friendlyName] - The friendly name of this Factor
|
|
521
521
|
* @param {string} [opts.config.notificationToken] -
|
|
522
|
-
* For APN, the device token. For FCM the registration token
|
|
522
|
+
* For APN, the device token. For FCM, the registration token
|
|
523
523
|
* @param {string} [opts.config.sdkVersion] -
|
|
524
524
|
* The Verify Push SDK version used to configure the factor
|
|
525
525
|
* @param {number} [opts.config.timeStep] -
|
|
@@ -530,6 +530,8 @@ FactorInstance.prototype.fetch = function fetch(callback) {
|
|
|
530
530
|
* Number of digits for generated TOTP codes
|
|
531
531
|
* @param {factor.totp_algorithms} [opts.config.alg] -
|
|
532
532
|
* The algorithm used to derive the TOTP codes
|
|
533
|
+
* @param {string} [opts.config.notificationPlatform] -
|
|
534
|
+
* The transport technology used to generate the Notification Token
|
|
533
535
|
* @param {function} [callback] - Callback to handle processed record
|
|
534
536
|
*
|
|
535
537
|
* @returns {Promise} Resolves to processed FactorInstance
|
|
@@ -668,7 +670,7 @@ FactorContext.prototype.fetch = function fetch(callback) {
|
|
|
668
670
|
* Optional payload to verify the Factor for the first time
|
|
669
671
|
* @param {string} [opts.friendlyName] - The friendly name of this Factor
|
|
670
672
|
* @param {string} [opts.config.notificationToken] -
|
|
671
|
-
* For APN, the device token. For FCM the registration token
|
|
673
|
+
* For APN, the device token. For FCM, the registration token
|
|
672
674
|
* @param {string} [opts.config.sdkVersion] -
|
|
673
675
|
* The Verify Push SDK version used to configure the factor
|
|
674
676
|
* @param {number} [opts.config.timeStep] -
|
|
@@ -679,6 +681,8 @@ FactorContext.prototype.fetch = function fetch(callback) {
|
|
|
679
681
|
* Number of digits for generated TOTP codes
|
|
680
682
|
* @param {factor.totp_algorithms} [opts.config.alg] -
|
|
681
683
|
* The algorithm used to derive the TOTP codes
|
|
684
|
+
* @param {string} [opts.config.notificationPlatform] -
|
|
685
|
+
* The transport technology used to generate the Notification Token
|
|
682
686
|
* @param {function} [callback] - Callback to handle processed record
|
|
683
687
|
*
|
|
684
688
|
* @returns {Promise} Resolves to processed FactorInstance
|
|
@@ -700,7 +704,8 @@ FactorContext.prototype.update = function update(opts, callback) {
|
|
|
700
704
|
'Config.TimeStep': _.get(opts, 'config.timeStep'),
|
|
701
705
|
'Config.Skew': _.get(opts, 'config.skew'),
|
|
702
706
|
'Config.CodeLength': _.get(opts, 'config.codeLength'),
|
|
703
|
-
'Config.Alg': _.get(opts, 'config.alg')
|
|
707
|
+
'Config.Alg': _.get(opts, 'config.alg'),
|
|
708
|
+
'Config.NotificationPlatform': _.get(opts, 'config.notificationPlatform')
|
|
704
709
|
});
|
|
705
710
|
|
|
706
711
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
@@ -14,7 +14,7 @@ type NewFactorFactorStatuses = 'unverified'|'verified';
|
|
|
14
14
|
|
|
15
15
|
type NewFactorFactorTypes = 'push'|'totp';
|
|
16
16
|
|
|
17
|
-
type NewFactorNotificationPlatforms = 'apn'|'fcm';
|
|
17
|
+
type NewFactorNotificationPlatforms = 'apn'|'fcm'|'none';
|
|
18
18
|
|
|
19
19
|
type NewFactorTotpAlgorithms = 'sha1'|'sha256'|'sha512';
|
|
20
20
|
|
|
@@ -54,7 +54,7 @@ interface NewFactorListInstance {
|
|
|
54
54
|
* @property config.appId - The ID that uniquely identifies your app in the Google or Apple store
|
|
55
55
|
* @property config.codeLength - Number of digits for generated TOTP codes
|
|
56
56
|
* @property config.notificationPlatform - The transport technology used to generate the Notification Token
|
|
57
|
-
* @property config.notificationToken - For APN, the device token. For FCM the registration token
|
|
57
|
+
* @property config.notificationToken - For APN, the device token. For FCM, the registration token
|
|
58
58
|
* @property config.sdkVersion - The Verify Push SDK version used to configure the factor
|
|
59
59
|
* @property config.skew - The number of past and future time-steps valid at a given time
|
|
60
60
|
* @property config.timeStep - How often, in seconds, are TOTP codes generated
|
|
@@ -72,7 +72,7 @@ NewFactorList = function NewFactorList(version, serviceSid, identity) {
|
|
|
72
72
|
* @param {new_factor.notification_platforms} [opts.config.notificationPlatform] -
|
|
73
73
|
* The transport technology used to generate the Notification Token
|
|
74
74
|
* @param {string} [opts.config.notificationToken] -
|
|
75
|
-
* For APN, the device token. For FCM the registration token
|
|
75
|
+
* For APN, the device token. For FCM, the registration token
|
|
76
76
|
* @param {string} [opts.config.sdkVersion] -
|
|
77
77
|
* The Verify Push SDK version used to configure the factor
|
|
78
78
|
* @param {string} [opts.binding.secret] - The shared secret in Base32
|
|
@@ -69,6 +69,8 @@ interface VerificationListInstance {
|
|
|
69
69
|
* @property payee - The payee of the associated PSD2 compliant transaction
|
|
70
70
|
* @property rateLimits - The custom key-value pairs of Programmable Rate Limits.
|
|
71
71
|
* @property sendDigits - The digits to send after a phone call is answered
|
|
72
|
+
* @property templateCustomSubstitutions - The values of the special variables declared on the message template.
|
|
73
|
+
* @property templateSid - The verification template SMS messages.
|
|
72
74
|
* @property to - The phone number or email to verify
|
|
73
75
|
*/
|
|
74
76
|
interface VerificationListInstanceCreateOptions {
|
|
@@ -83,6 +85,8 @@ interface VerificationListInstanceCreateOptions {
|
|
|
83
85
|
payee?: string;
|
|
84
86
|
rateLimits?: object;
|
|
85
87
|
sendDigits?: string;
|
|
88
|
+
templateCustomSubstitutions?: string;
|
|
89
|
+
templateSid?: string;
|
|
86
90
|
to: string;
|
|
87
91
|
}
|
|
88
92
|
|
|
@@ -81,6 +81,9 @@ VerificationList = function VerificationList(version, serviceSid) {
|
|
|
81
81
|
* Channel specific configuration in json format.
|
|
82
82
|
* @param {string} [opts.appHash] -
|
|
83
83
|
* Your App Hash to be appended at the end of an SMS.
|
|
84
|
+
* @param {string} [opts.templateSid] - The verification template SMS messages.
|
|
85
|
+
* @param {string} [opts.templateCustomSubstitutions] -
|
|
86
|
+
* The values of the special variables declared on the message template.
|
|
84
87
|
* @param {function} [callback] - Callback to handle processed record
|
|
85
88
|
*
|
|
86
89
|
* @returns {Promise} Resolves to processed VerificationInstance
|
|
@@ -110,7 +113,9 @@ VerificationList = function VerificationList(version, serviceSid) {
|
|
|
110
113
|
'Payee': _.get(opts, 'payee'),
|
|
111
114
|
'RateLimits': serialize.object(_.get(opts, 'rateLimits')),
|
|
112
115
|
'ChannelConfiguration': serialize.object(_.get(opts, 'channelConfiguration')),
|
|
113
|
-
'AppHash': _.get(opts, 'appHash')
|
|
116
|
+
'AppHash': _.get(opts, 'appHash'),
|
|
117
|
+
'TemplateSid': _.get(opts, 'templateSid'),
|
|
118
|
+
'TemplateCustomSubstitutions': _.get(opts, 'templateCustomSubstitutions')
|
|
114
119
|
});
|
|
115
120
|
|
|
116
121
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -36,6 +36,7 @@ declare function ServiceList(version: V2): ServiceListInstance;
|
|
|
36
36
|
*
|
|
37
37
|
* @property codeLength - The length of the verification code to generate
|
|
38
38
|
* @property customCodeEnabled - Whether to allow sending verifications with a custom code.
|
|
39
|
+
* @property defaultTemplateSid - The verification template SMS messages.
|
|
39
40
|
* @property doNotShareWarningEnabled - Whether to add a privacy warning at the end of an SMS.
|
|
40
41
|
* @property dtmfInputRequired - Whether to ask the user to press a number before delivering the verify code in a phone call
|
|
41
42
|
* @property friendlyName - A string to describe the verification service
|
|
@@ -54,6 +55,7 @@ declare function ServiceList(version: V2): ServiceListInstance;
|
|
|
54
55
|
interface ServiceInstanceUpdateOptions {
|
|
55
56
|
codeLength?: number;
|
|
56
57
|
customCodeEnabled?: boolean;
|
|
58
|
+
defaultTemplateSid?: string;
|
|
57
59
|
doNotShareWarningEnabled?: boolean;
|
|
58
60
|
dtmfInputRequired?: boolean;
|
|
59
61
|
friendlyName?: string;
|
|
@@ -199,6 +201,7 @@ interface ServiceListInstance {
|
|
|
199
201
|
*
|
|
200
202
|
* @property codeLength - The length of the verification code to generate
|
|
201
203
|
* @property customCodeEnabled - Whether to allow sending verifications with a custom code.
|
|
204
|
+
* @property defaultTemplateSid - The verification template SMS messages.
|
|
202
205
|
* @property doNotShareWarningEnabled - Whether to add a security warning at the end of an SMS.
|
|
203
206
|
* @property dtmfInputRequired - Whether to ask the user to press a number before delivering the verify code in a phone call
|
|
204
207
|
* @property friendlyName - A string to describe the verification service
|
|
@@ -217,6 +220,7 @@ interface ServiceListInstance {
|
|
|
217
220
|
interface ServiceListInstanceCreateOptions {
|
|
218
221
|
codeLength?: number;
|
|
219
222
|
customCodeEnabled?: boolean;
|
|
223
|
+
defaultTemplateSid?: string;
|
|
220
224
|
doNotShareWarningEnabled?: boolean;
|
|
221
225
|
dtmfInputRequired?: boolean;
|
|
222
226
|
friendlyName: string;
|
|
@@ -303,6 +307,7 @@ interface ServiceResource {
|
|
|
303
307
|
custom_code_enabled: boolean;
|
|
304
308
|
date_created: Date;
|
|
305
309
|
date_updated: Date;
|
|
310
|
+
default_template_sid: string;
|
|
306
311
|
do_not_share_warning_enabled: boolean;
|
|
307
312
|
dtmf_input_required: boolean;
|
|
308
313
|
friendly_name: string;
|
|
@@ -389,6 +394,7 @@ declare class ServiceInstance extends SerializableClass {
|
|
|
389
394
|
customCodeEnabled: boolean;
|
|
390
395
|
dateCreated: Date;
|
|
391
396
|
dateUpdated: Date;
|
|
397
|
+
defaultTemplateSid: string;
|
|
392
398
|
doNotShareWarningEnabled: boolean;
|
|
393
399
|
dtmfInputRequired: boolean;
|
|
394
400
|
/**
|
|
@@ -99,6 +99,8 @@ ServiceList = function ServiceList(version) {
|
|
|
99
99
|
* Optional. Number of digits for generated TOTP codes
|
|
100
100
|
* @param {number} [opts.totp.skew] -
|
|
101
101
|
* Optional. The number of past and future time-steps valid at a given time
|
|
102
|
+
* @param {string} [opts.defaultTemplateSid] -
|
|
103
|
+
* The verification template SMS messages.
|
|
102
104
|
* @param {function} [callback] - Callback to handle processed record
|
|
103
105
|
*
|
|
104
106
|
* @returns {Promise} Resolves to processed ServiceInstance
|
|
@@ -129,7 +131,8 @@ ServiceList = function ServiceList(version) {
|
|
|
129
131
|
'Totp.Issuer': _.get(opts, 'totp.issuer'),
|
|
130
132
|
'Totp.TimeStep': _.get(opts, 'totp.timeStep'),
|
|
131
133
|
'Totp.CodeLength': _.get(opts, 'totp.codeLength'),
|
|
132
|
-
'Totp.Skew': _.get(opts, 'totp.skew')
|
|
134
|
+
'Totp.Skew': _.get(opts, 'totp.skew'),
|
|
135
|
+
'DefaultTemplateSid': _.get(opts, 'defaultTemplateSid')
|
|
133
136
|
});
|
|
134
137
|
|
|
135
138
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -520,6 +523,7 @@ ServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
520
523
|
* Whether to allow sending verifications with a custom code.
|
|
521
524
|
* @property {object} push - The service level configuration of factor push type.
|
|
522
525
|
* @property {object} totp - The service level configuration of factor TOTP type.
|
|
526
|
+
* @property {string} defaultTemplateSid - The default_template_sid
|
|
523
527
|
* @property {Date} dateCreated -
|
|
524
528
|
* The RFC 2822 date and time in GMT when the resource was created
|
|
525
529
|
* @property {Date} dateUpdated -
|
|
@@ -549,6 +553,7 @@ ServiceInstance = function ServiceInstance(version, payload, sid) {
|
|
|
549
553
|
this.customCodeEnabled = payload.custom_code_enabled; // jshint ignore:line
|
|
550
554
|
this.push = payload.push; // jshint ignore:line
|
|
551
555
|
this.totp = payload.totp; // jshint ignore:line
|
|
556
|
+
this.defaultTemplateSid = payload.default_template_sid; // jshint ignore:line
|
|
552
557
|
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
|
|
553
558
|
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
|
|
554
559
|
this.url = payload.url; // jshint ignore:line
|
|
@@ -641,6 +646,8 @@ ServiceInstance.prototype.remove = function remove(callback) {
|
|
|
641
646
|
* Optional. Number of digits for generated TOTP codes
|
|
642
647
|
* @param {number} [opts.totp.skew] -
|
|
643
648
|
* Optional. The number of past and future time-steps valid at a given time
|
|
649
|
+
* @param {string} [opts.defaultTemplateSid] -
|
|
650
|
+
* The verification template SMS messages.
|
|
644
651
|
* @param {function} [callback] - Callback to handle processed record
|
|
645
652
|
*
|
|
646
653
|
* @returns {Promise} Resolves to processed ServiceInstance
|
|
@@ -918,6 +925,8 @@ ServiceContext.prototype.remove = function remove(callback) {
|
|
|
918
925
|
* Optional. Number of digits for generated TOTP codes
|
|
919
926
|
* @param {number} [opts.totp.skew] -
|
|
920
927
|
* Optional. The number of past and future time-steps valid at a given time
|
|
928
|
+
* @param {string} [opts.defaultTemplateSid] -
|
|
929
|
+
* The verification template SMS messages.
|
|
921
930
|
* @param {function} [callback] - Callback to handle processed record
|
|
922
931
|
*
|
|
923
932
|
* @returns {Promise} Resolves to processed ServiceInstance
|
|
@@ -947,7 +956,8 @@ ServiceContext.prototype.update = function update(opts, callback) {
|
|
|
947
956
|
'Totp.Issuer': _.get(opts, 'totp.issuer'),
|
|
948
957
|
'Totp.TimeStep': _.get(opts, 'totp.timeStep'),
|
|
949
958
|
'Totp.CodeLength': _.get(opts, 'totp.codeLength'),
|
|
950
|
-
'Totp.Skew': _.get(opts, 'totp.skew')
|
|
959
|
+
'Totp.Skew': _.get(opts, 'totp.skew'),
|
|
960
|
+
'DefaultTemplateSid': _.get(opts, 'defaultTemplateSid')
|
|
951
961
|
});
|
|
952
962
|
|
|
953
963
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
@@ -10,7 +10,7 @@ import Response = require('../../../http/response');
|
|
|
10
10
|
import V2 = require('../V2');
|
|
11
11
|
import { SerializableClass } from '../../../interfaces';
|
|
12
12
|
|
|
13
|
-
type VerificationAttemptChannels = 'sms'|'call'|'email';
|
|
13
|
+
type VerificationAttemptChannels = 'sms'|'call'|'email'|'whatsapp';
|
|
14
14
|
|
|
15
15
|
type VerificationAttemptConversionStatus = 'converted'|'unconverted';
|
|
16
16
|
|
|
@@ -168,7 +168,9 @@ interface RoomListInstance {
|
|
|
168
168
|
* Options to pass to create
|
|
169
169
|
*
|
|
170
170
|
* @property audioOnly - Indicates whether the room will only contain audio track participants for group rooms.
|
|
171
|
+
* @property emptyRoomTimeout - Configures the time a room will remain active after last participant leaves.
|
|
171
172
|
* @property enableTurn - Enable Twilio's Network Traversal TURN service
|
|
173
|
+
* @property maxParticipantDuration - The maximum number of seconds a Participant can be connected to the room
|
|
172
174
|
* @property maxParticipants - The maximum number of concurrent Participants allowed in the room
|
|
173
175
|
* @property mediaRegion - The region for the media server in Group Rooms
|
|
174
176
|
* @property recordParticipantsOnConnect - Whether to start recording when Participants connect
|
|
@@ -177,11 +179,14 @@ interface RoomListInstance {
|
|
|
177
179
|
* @property statusCallbackMethod - The HTTP method we should use to call status_callback
|
|
178
180
|
* @property type - The type of room
|
|
179
181
|
* @property uniqueName - An application-defined string that uniquely identifies the resource
|
|
182
|
+
* @property unusedRoomTimeout - Configures the time a room will remain active when no one joins.
|
|
180
183
|
* @property videoCodecs - An array of the video codecs that are supported when publishing a track in the room
|
|
181
184
|
*/
|
|
182
185
|
interface RoomListInstanceCreateOptions {
|
|
183
186
|
audioOnly?: boolean;
|
|
187
|
+
emptyRoomTimeout?: number;
|
|
184
188
|
enableTurn?: boolean;
|
|
189
|
+
maxParticipantDuration?: number;
|
|
185
190
|
maxParticipants?: number;
|
|
186
191
|
mediaRegion?: string;
|
|
187
192
|
recordParticipantsOnConnect?: boolean;
|
|
@@ -190,6 +195,7 @@ interface RoomListInstanceCreateOptions {
|
|
|
190
195
|
statusCallbackMethod?: string;
|
|
191
196
|
type?: RoomRoomType;
|
|
192
197
|
uniqueName?: string;
|
|
198
|
+
unusedRoomTimeout?: number;
|
|
193
199
|
videoCodecs?: RoomVideoCodec | RoomVideoCodec[];
|
|
194
200
|
}
|
|
195
201
|
|
|
@@ -283,10 +289,12 @@ interface RoomResource {
|
|
|
283
289
|
date_created: Date;
|
|
284
290
|
date_updated: Date;
|
|
285
291
|
duration: number;
|
|
292
|
+
empty_room_timeout: number;
|
|
286
293
|
enable_turn: boolean;
|
|
287
294
|
end_time: Date;
|
|
288
295
|
links: string;
|
|
289
296
|
max_concurrent_published_tracks: number;
|
|
297
|
+
max_participant_duration: number;
|
|
290
298
|
max_participants: number;
|
|
291
299
|
media_region: string;
|
|
292
300
|
record_participants_on_connect: boolean;
|
|
@@ -296,6 +304,7 @@ interface RoomResource {
|
|
|
296
304
|
status_callback_method: string;
|
|
297
305
|
type: RoomRoomType;
|
|
298
306
|
unique_name: string;
|
|
307
|
+
unused_room_timeout: number;
|
|
299
308
|
url: string;
|
|
300
309
|
video_codecs: RoomVideoCodec[];
|
|
301
310
|
}
|
|
@@ -352,6 +361,7 @@ declare class RoomInstance extends SerializableClass {
|
|
|
352
361
|
dateCreated: Date;
|
|
353
362
|
dateUpdated: Date;
|
|
354
363
|
duration: number;
|
|
364
|
+
emptyRoomTimeout: number;
|
|
355
365
|
enableTurn: boolean;
|
|
356
366
|
endTime: Date;
|
|
357
367
|
/**
|
|
@@ -362,6 +372,7 @@ declare class RoomInstance extends SerializableClass {
|
|
|
362
372
|
fetch(callback?: (error: Error | null, items: RoomInstance) => any): Promise<RoomInstance>;
|
|
363
373
|
links: string;
|
|
364
374
|
maxConcurrentPublishedTracks: number;
|
|
375
|
+
maxParticipantDuration: number;
|
|
365
376
|
maxParticipants: number;
|
|
366
377
|
mediaRegion: string;
|
|
367
378
|
/**
|
|
@@ -387,6 +398,7 @@ declare class RoomInstance extends SerializableClass {
|
|
|
387
398
|
toJSON(): any;
|
|
388
399
|
type: RoomRoomType;
|
|
389
400
|
uniqueName: string;
|
|
401
|
+
unusedRoomTimeout: number;
|
|
390
402
|
/**
|
|
391
403
|
* update a RoomInstance
|
|
392
404
|
*
|
|
@@ -82,6 +82,12 @@ RoomList = function RoomList(version) {
|
|
|
82
82
|
* @param {object} [opts.recordingRules] - A collection of Recording Rules
|
|
83
83
|
* @param {boolean} [opts.audioOnly] -
|
|
84
84
|
* Indicates whether the room will only contain audio track participants for group rooms.
|
|
85
|
+
* @param {number} [opts.maxParticipantDuration] -
|
|
86
|
+
* The maximum number of seconds a Participant can be connected to the room
|
|
87
|
+
* @param {number} [opts.emptyRoomTimeout] -
|
|
88
|
+
* Configures the time a room will remain active after last participant leaves.
|
|
89
|
+
* @param {number} [opts.unusedRoomTimeout] -
|
|
90
|
+
* Configures the time a room will remain active when no one joins.
|
|
85
91
|
* @param {function} [callback] - Callback to handle processed record
|
|
86
92
|
*
|
|
87
93
|
* @returns {Promise} Resolves to processed RoomInstance
|
|
@@ -106,7 +112,10 @@ RoomList = function RoomList(version) {
|
|
|
106
112
|
'VideoCodecs': serialize.map(_.get(opts, 'videoCodecs'), function(e) { return e; }),
|
|
107
113
|
'MediaRegion': _.get(opts, 'mediaRegion'),
|
|
108
114
|
'RecordingRules': serialize.object(_.get(opts, 'recordingRules')),
|
|
109
|
-
'AudioOnly': serialize.bool(_.get(opts, 'audioOnly'))
|
|
115
|
+
'AudioOnly': serialize.bool(_.get(opts, 'audioOnly')),
|
|
116
|
+
'MaxParticipantDuration': _.get(opts, 'maxParticipantDuration'),
|
|
117
|
+
'EmptyRoomTimeout': _.get(opts, 'emptyRoomTimeout'),
|
|
118
|
+
'UnusedRoomTimeout': _.get(opts, 'unusedRoomTimeout')
|
|
110
119
|
});
|
|
111
120
|
|
|
112
121
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -517,6 +526,8 @@ RoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
517
526
|
* @property {room.room_type} type - The type of room
|
|
518
527
|
* @property {number} maxParticipants -
|
|
519
528
|
* The maximum number of concurrent Participants allowed in the room
|
|
529
|
+
* @property {number} maxParticipantDuration -
|
|
530
|
+
* The maximum number of seconds a Participant can be connected to the room
|
|
520
531
|
* @property {number} maxConcurrentPublishedTracks -
|
|
521
532
|
* The maximum number of published tracks allowed in the room at the same time
|
|
522
533
|
* @property {boolean} recordParticipantsOnConnect -
|
|
@@ -526,6 +537,10 @@ RoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
526
537
|
* @property {string} mediaRegion - The region for the media server in Group Rooms
|
|
527
538
|
* @property {boolean} audioOnly -
|
|
528
539
|
* Indicates whether the room will only contain audio track participants for group rooms.
|
|
540
|
+
* @property {number} emptyRoomTimeout -
|
|
541
|
+
* The time a room will remain active after last participant leaves.
|
|
542
|
+
* @property {number} unusedRoomTimeout -
|
|
543
|
+
* The time a room will remain active when no one joins.
|
|
529
544
|
* @property {string} url - The absolute URL of the resource
|
|
530
545
|
* @property {string} links - The URLs of related resources
|
|
531
546
|
*
|
|
@@ -551,11 +566,14 @@ RoomInstance = function RoomInstance(version, payload, sid) {
|
|
|
551
566
|
this.duration = deserialize.integer(payload.duration); // jshint ignore:line
|
|
552
567
|
this.type = payload.type; // jshint ignore:line
|
|
553
568
|
this.maxParticipants = deserialize.integer(payload.max_participants); // jshint ignore:line
|
|
569
|
+
this.maxParticipantDuration = deserialize.integer(payload.max_participant_duration); // jshint ignore:line
|
|
554
570
|
this.maxConcurrentPublishedTracks = deserialize.integer(payload.max_concurrent_published_tracks); // jshint ignore:line
|
|
555
571
|
this.recordParticipantsOnConnect = payload.record_participants_on_connect; // jshint ignore:line
|
|
556
572
|
this.videoCodecs = payload.video_codecs; // jshint ignore:line
|
|
557
573
|
this.mediaRegion = payload.media_region; // jshint ignore:line
|
|
558
574
|
this.audioOnly = payload.audio_only; // jshint ignore:line
|
|
575
|
+
this.emptyRoomTimeout = deserialize.integer(payload.empty_room_timeout); // jshint ignore:line
|
|
576
|
+
this.unusedRoomTimeout = deserialize.integer(payload.unused_room_timeout); // jshint ignore:line
|
|
559
577
|
this.url = payload.url; // jshint ignore:line
|
|
560
578
|
this.links = payload.links; // jshint ignore:line
|
|
561
579
|
|
package/lib/rest/voice/V1.d.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import Version = require('../../base/Version');
|
|
9
9
|
import Voice = require('../Voice');
|
|
10
|
+
import { ArchivedCallList } from './v1/archivedCall';
|
|
11
|
+
import { ArchivedCallListInstance } from './v1/archivedCall';
|
|
10
12
|
import { ByocTrunkList } from './v1/byocTrunk';
|
|
11
13
|
import { ByocTrunkListInstance } from './v1/byocTrunk';
|
|
12
14
|
import { ConnectionPolicyList } from './v1/connectionPolicy';
|
|
@@ -27,6 +29,7 @@ declare class V1 extends Version {
|
|
|
27
29
|
*/
|
|
28
30
|
constructor(domain: Voice);
|
|
29
31
|
|
|
32
|
+
readonly archivedCalls: ArchivedCallListInstance;
|
|
30
33
|
readonly byocTrunks: ByocTrunkListInstance;
|
|
31
34
|
readonly connectionPolicies: ConnectionPolicyListInstance;
|
|
32
35
|
readonly dialingPermissions: DialingPermissionsListInstance;
|
package/lib/rest/voice/V1.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
/* jshint ignore:end */
|
|
11
11
|
|
|
12
12
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
|
+
var ArchivedCallList = require('./v1/archivedCall').ArchivedCallList;
|
|
13
14
|
var ByocTrunkList = require('./v1/byocTrunk').ByocTrunkList;
|
|
14
15
|
var ConnectionPolicyList = require(
|
|
15
16
|
'./v1/connectionPolicy').ConnectionPolicyList;
|
|
@@ -26,6 +27,8 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
|
26
27
|
*
|
|
27
28
|
* @constructor Twilio.Voice.V1
|
|
28
29
|
*
|
|
30
|
+
* @property {Twilio.Voice.V1.ArchivedCallList} archivedCalls -
|
|
31
|
+
* archivedCalls resource
|
|
29
32
|
* @property {Twilio.Voice.V1.ByocTrunkList} byocTrunks - byocTrunks resource
|
|
30
33
|
* @property {Twilio.Voice.V1.ConnectionPolicyList} connectionPolicies -
|
|
31
34
|
* connectionPolicies resource
|
|
@@ -42,6 +45,7 @@ function V1(domain) {
|
|
|
42
45
|
Version.prototype.constructor.call(this, domain, 'v1');
|
|
43
46
|
|
|
44
47
|
// Resources
|
|
48
|
+
this._archivedCalls = undefined;
|
|
45
49
|
this._byocTrunks = undefined;
|
|
46
50
|
this._connectionPolicies = undefined;
|
|
47
51
|
this._dialingPermissions = undefined;
|
|
@@ -52,6 +56,14 @@ function V1(domain) {
|
|
|
52
56
|
_.extend(V1.prototype, Version.prototype);
|
|
53
57
|
V1.prototype.constructor = V1;
|
|
54
58
|
|
|
59
|
+
Object.defineProperty(V1.prototype,
|
|
60
|
+
'archivedCalls', {
|
|
61
|
+
get: function() {
|
|
62
|
+
this._archivedCalls = this._archivedCalls || new ArchivedCallList(this);
|
|
63
|
+
return this._archivedCalls;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
55
67
|
Object.defineProperty(V1.prototype,
|
|
56
68
|
'byocTrunks', {
|
|
57
69
|
get: function() {
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by
|
|
3
|
+
* \ / _ _ _| _ _
|
|
4
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
* / /
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import Page = require('../../../base/Page');
|
|
9
|
+
import Response = require('../../../http/response');
|
|
10
|
+
import V1 = require('../V1');
|
|
11
|
+
import { SerializableClass } from '../../../interfaces';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Initialize the ArchivedCallList
|
|
15
|
+
*
|
|
16
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
17
|
+
* Use them with caution.
|
|
18
|
+
*
|
|
19
|
+
* @param version - Version of the resource
|
|
20
|
+
*/
|
|
21
|
+
declare function ArchivedCallList(version: V1): ArchivedCallListInstance;
|
|
22
|
+
|
|
23
|
+
interface ArchivedCallListInstance {
|
|
24
|
+
/**
|
|
25
|
+
* @param sid - sid of instance
|
|
26
|
+
*/
|
|
27
|
+
(sid: string): ArchivedCallContext;
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a archived_call
|
|
30
|
+
*
|
|
31
|
+
* @param date - The date of the Call in UTC.
|
|
32
|
+
* @param sid - The unique string that identifies this resource
|
|
33
|
+
*/
|
|
34
|
+
get(date: string, sid: string): ArchivedCallContext;
|
|
35
|
+
/**
|
|
36
|
+
* Provide a user-friendly representation
|
|
37
|
+
*/
|
|
38
|
+
toJSON(): any;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface ArchivedCallPayload extends ArchivedCallResource, Page.TwilioResponsePayload {
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface ArchivedCallResource {
|
|
45
|
+
date: Date;
|
|
46
|
+
sid: string;
|
|
47
|
+
url: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface ArchivedCallSolution {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
declare class ArchivedCallContext {
|
|
55
|
+
/**
|
|
56
|
+
* Initialize the ArchivedCallContext
|
|
57
|
+
*
|
|
58
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
59
|
+
* Use them with caution.
|
|
60
|
+
*
|
|
61
|
+
* @param version - Version of the resource
|
|
62
|
+
* @param date - The date of the Call in UTC.
|
|
63
|
+
* @param sid - The unique string that identifies this resource
|
|
64
|
+
*/
|
|
65
|
+
constructor(version: V1, date: Date, sid: string);
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* remove a ArchivedCallInstance
|
|
69
|
+
*
|
|
70
|
+
* @param callback - Callback to handle processed record
|
|
71
|
+
*/
|
|
72
|
+
remove(callback?: (error: Error | null, items: ArchivedCallInstance) => any): Promise<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* Provide a user-friendly representation
|
|
75
|
+
*/
|
|
76
|
+
toJSON(): any;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
declare class ArchivedCallInstance extends SerializableClass {
|
|
81
|
+
/**
|
|
82
|
+
* Initialize the ArchivedCallContext
|
|
83
|
+
*
|
|
84
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
85
|
+
* Use them with caution.
|
|
86
|
+
*
|
|
87
|
+
* @param version - Version of the resource
|
|
88
|
+
* @param payload - The instance payload
|
|
89
|
+
* @param date - The date of the Call in UTC.
|
|
90
|
+
* @param sid - The unique string that identifies this resource
|
|
91
|
+
*/
|
|
92
|
+
constructor(version: V1, payload: ArchivedCallPayload, date: Date, sid: string);
|
|
93
|
+
|
|
94
|
+
private _proxy: ArchivedCallContext;
|
|
95
|
+
date: Date;
|
|
96
|
+
/**
|
|
97
|
+
* remove a ArchivedCallInstance
|
|
98
|
+
*
|
|
99
|
+
* @param callback - Callback to handle processed record
|
|
100
|
+
*/
|
|
101
|
+
remove(callback?: (error: Error | null, items: ArchivedCallInstance) => any): Promise<boolean>;
|
|
102
|
+
sid: string;
|
|
103
|
+
/**
|
|
104
|
+
* Provide a user-friendly representation
|
|
105
|
+
*/
|
|
106
|
+
toJSON(): any;
|
|
107
|
+
url: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
declare class ArchivedCallPage extends Page<V1, ArchivedCallPayload, ArchivedCallResource, ArchivedCallInstance> {
|
|
112
|
+
/**
|
|
113
|
+
* Initialize the ArchivedCallPage
|
|
114
|
+
*
|
|
115
|
+
* PLEASE NOTE that this class contains beta products that are subject to change.
|
|
116
|
+
* Use them with caution.
|
|
117
|
+
*
|
|
118
|
+
* @param version - Version of the resource
|
|
119
|
+
* @param response - Response from the API
|
|
120
|
+
* @param solution - Path solution
|
|
121
|
+
*/
|
|
122
|
+
constructor(version: V1, response: Response<string>, solution: ArchivedCallSolution);
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Build an instance of ArchivedCallInstance
|
|
126
|
+
*
|
|
127
|
+
* @param payload - Payload response from the API
|
|
128
|
+
*/
|
|
129
|
+
getInstance(payload: ArchivedCallPayload): ArchivedCallInstance;
|
|
130
|
+
/**
|
|
131
|
+
* Provide a user-friendly representation
|
|
132
|
+
*/
|
|
133
|
+
toJSON(): any;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { ArchivedCallContext, ArchivedCallInstance, ArchivedCallList, ArchivedCallListInstance, ArchivedCallPage, ArchivedCallPayload, ArchivedCallResource, ArchivedCallSolution }
|