twilio 3.23.0 → 3.25.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 +55 -0
- package/lib/rest/Api.d.ts +2 -0
- package/lib/rest/Api.js +9 -0
- package/lib/rest/Authy.js +5 -5
- package/lib/rest/Preview.d.ts +0 -2
- package/lib/rest/Preview.js +12 -23
- package/lib/rest/Twilio.d.ts +1 -0
- package/lib/rest/Twilio.js +9 -0
- package/lib/rest/Video.js +8 -8
- package/lib/rest/api/V2010.d.ts +3 -0
- package/lib/rest/api/V2010.js +9 -0
- package/lib/rest/api/v2010/account/balance.d.ts +87 -0
- package/lib/rest/api/v2010/account/balance.js +162 -0
- package/lib/rest/api/v2010/account/message.d.ts +2 -0
- package/lib/rest/api/v2010/account/message.js +4 -1
- package/lib/rest/api/v2010/account/sip/ipAccessControlList.d.ts +3 -3
- package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +3 -3
- package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/trigger.d.ts +1 -1
- package/lib/rest/api/v2010/account.d.ts +8 -0
- package/lib/rest/api/v2010/account.js +25 -0
- package/lib/rest/authy/V1.d.ts +1 -1
- package/lib/rest/authy/V1.js +8 -8
- package/lib/rest/authy/v1/form.d.ts +13 -13
- package/lib/rest/authy/v1/form.js +17 -17
- package/lib/rest/authy/v1/service/entity/factor/challenge.d.ts +12 -13
- package/lib/rest/authy/v1/service/entity/factor/challenge.js +4 -6
- package/lib/rest/authy/v1/service/entity/factor.d.ts +9 -9
- package/lib/rest/authy/v1/service/entity/factor.js +7 -9
- package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.d.ts +5 -5
- package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +9 -5
- package/lib/rest/autopilot/v1/assistant/fieldType.d.ts +5 -5
- package/lib/rest/autopilot/v1/assistant/fieldType.js +8 -5
- package/lib/rest/autopilot/v1/assistant/modelBuild.d.ts +5 -5
- package/lib/rest/autopilot/v1/assistant/modelBuild.js +8 -5
- package/lib/rest/autopilot/v1/assistant/query.d.ts +17 -17
- package/lib/rest/autopilot/v1/assistant/query.js +24 -18
- package/lib/rest/autopilot/v1/assistant/task/field.d.ts +11 -11
- package/lib/rest/autopilot/v1/assistant/task/field.js +15 -11
- package/lib/rest/autopilot/v1/assistant/task/sample.d.ts +18 -18
- package/lib/rest/autopilot/v1/assistant/task/sample.js +23 -21
- package/lib/rest/autopilot/v1/assistant/task/taskActions.d.ts +2 -2
- package/lib/rest/autopilot/v1/assistant/task/taskActions.js +4 -3
- package/lib/rest/autopilot/v1/assistant/task/taskStatistics.d.ts +6 -6
- package/lib/rest/autopilot/v1/assistant/task/taskStatistics.js +7 -6
- package/lib/rest/autopilot/v1/assistant/task.d.ts +10 -10
- package/lib/rest/autopilot/v1/assistant/task.js +21 -12
- package/lib/rest/autopilot/v1/assistant.d.ts +15 -15
- package/lib/rest/autopilot/v1/assistant.js +25 -20
- package/lib/rest/chat/v2/service/channel/member.d.ts +7 -0
- package/lib/rest/chat/v2/service/channel/member.js +13 -2
- package/lib/rest/ipMessaging/v2/service/channel/member.d.ts +7 -0
- package/lib/rest/ipMessaging/v2/service/channel/member.js +13 -2
- package/lib/rest/preview/Marketplace.d.ts +1 -1
- package/lib/rest/preview/Marketplace.js +9 -9
- package/lib/rest/proxy/v1/service.d.ts +7 -0
- package/lib/rest/proxy/v1/service.js +13 -2
- package/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +10 -2
- package/lib/rest/sync/v1/service/syncList/syncListItem.js +24 -5
- package/lib/rest/sync/v1/service/syncList.d.ts +6 -2
- package/lib/rest/sync/v1/service/syncList.js +12 -5
- package/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +10 -2
- package/lib/rest/sync/v1/service/syncMap/syncMapItem.js +24 -6
- package/lib/rest/sync/v1/service/syncMap.d.ts +6 -2
- package/lib/rest/sync/v1/service/syncMap.js +12 -5
- package/lib/rest/verify/v1/service/verification.d.ts +4 -0
- package/lib/rest/verify/v1/service/verification.js +5 -1
- package/lib/rest/video/V1.d.ts +1 -1
- package/lib/rest/video/V1.js +10 -10
- package/lib/twiml/VoiceResponse.d.ts +124 -0
- package/lib/twiml/VoiceResponse.js +960 -0
- package/package.json +1 -1
- package/lib/rest/preview/Authy.d.ts +0 -27
- package/lib/rest/preview/Authy.js +0 -44
- package/lib/rest/preview/authy/service/entity.d.ts +0 -250
- package/lib/rest/preview/authy/service/entity.js +0 -514
- package/lib/rest/preview/authy/service.d.ts +0 -275
- package/lib/rest/preview/authy/service.js +0 -578
|
@@ -61,8 +61,11 @@ SyncMapItemList = function SyncMapItemList(version, serviceSid, mapSid) {
|
|
|
61
61
|
* @param {string} opts.key - The unique user-defined key of this Map Item.
|
|
62
62
|
* @param {string} opts.data -
|
|
63
63
|
* Contains arbitrary user-defined, schema-less data that this Map Item stores, represented by a JSON object, up to 16KB.
|
|
64
|
-
* @param {number} [opts.ttl] -
|
|
65
|
-
*
|
|
64
|
+
* @param {number} [opts.ttl] - Alias for item_ttl
|
|
65
|
+
* @param {number} [opts.itemTtl] -
|
|
66
|
+
* Time-to-live of this item in seconds, defaults to no expiration.
|
|
67
|
+
* @param {number} [opts.collectionTtl] -
|
|
68
|
+
* Time-to-live of this item's parent Map in seconds, defaults to no expiration.
|
|
66
69
|
* @param {function} [callback] - Callback to handle processed record
|
|
67
70
|
*
|
|
68
71
|
* @returns {Promise} Resolves to processed SyncMapItemInstance
|
|
@@ -83,7 +86,9 @@ SyncMapItemList = function SyncMapItemList(version, serviceSid, mapSid) {
|
|
|
83
86
|
var data = values.of({
|
|
84
87
|
'Key': _.get(opts, 'key'),
|
|
85
88
|
'Data': serialize.object(_.get(opts, 'data')),
|
|
86
|
-
'Ttl': _.get(opts, 'ttl')
|
|
89
|
+
'Ttl': _.get(opts, 'ttl'),
|
|
90
|
+
'ItemTtl': _.get(opts, 'itemTtl'),
|
|
91
|
+
'CollectionTtl': _.get(opts, 'collectionTtl')
|
|
87
92
|
});
|
|
88
93
|
|
|
89
94
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
@@ -509,7 +514,11 @@ SyncMapItemInstance.prototype.remove = function remove(callback) {
|
|
|
509
514
|
* @param {object} [opts] - Options for request
|
|
510
515
|
* @param {string} [opts.data] -
|
|
511
516
|
* Contains an arbitrary JSON object to be stored in this Map Item.
|
|
512
|
-
* @param {number} [opts.ttl] -
|
|
517
|
+
* @param {number} [opts.ttl] - Alias for item_ttl
|
|
518
|
+
* @param {number} [opts.itemTtl] -
|
|
519
|
+
* Time-to-live of this item in seconds, defaults to no expiration.
|
|
520
|
+
* @param {number} [opts.collectionTtl] -
|
|
521
|
+
* Time-to-live of this item's parent Map in seconds, defaults to no expiration.
|
|
513
522
|
* @param {function} [callback] - Callback to handle processed record
|
|
514
523
|
*
|
|
515
524
|
* @returns {Promise} Resolves to processed SyncMapItemInstance
|
|
@@ -628,7 +637,11 @@ SyncMapItemContext.prototype.remove = function remove(callback) {
|
|
|
628
637
|
* @param {object} [opts] - Options for request
|
|
629
638
|
* @param {string} [opts.data] -
|
|
630
639
|
* Contains an arbitrary JSON object to be stored in this Map Item.
|
|
631
|
-
* @param {number} [opts.ttl] -
|
|
640
|
+
* @param {number} [opts.ttl] - Alias for item_ttl
|
|
641
|
+
* @param {number} [opts.itemTtl] -
|
|
642
|
+
* Time-to-live of this item in seconds, defaults to no expiration.
|
|
643
|
+
* @param {number} [opts.collectionTtl] -
|
|
644
|
+
* Time-to-live of this item's parent Map in seconds, defaults to no expiration.
|
|
632
645
|
* @param {function} [callback] - Callback to handle processed record
|
|
633
646
|
*
|
|
634
647
|
* @returns {Promise} Resolves to processed SyncMapItemInstance
|
|
@@ -642,7 +655,12 @@ SyncMapItemContext.prototype.update = function update(opts, callback) {
|
|
|
642
655
|
opts = opts || {};
|
|
643
656
|
|
|
644
657
|
var deferred = Q.defer();
|
|
645
|
-
var data = values.of({
|
|
658
|
+
var data = values.of({
|
|
659
|
+
'Data': serialize.object(_.get(opts, 'data')),
|
|
660
|
+
'Ttl': _.get(opts, 'ttl'),
|
|
661
|
+
'ItemTtl': _.get(opts, 'itemTtl'),
|
|
662
|
+
'CollectionTtl': _.get(opts, 'collectionTtl')
|
|
663
|
+
});
|
|
646
664
|
|
|
647
665
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
648
666
|
|
|
@@ -26,9 +26,11 @@ declare function SyncMapList(version: V1, serviceSid: string): SyncMapListInstan
|
|
|
26
26
|
/**
|
|
27
27
|
* Options to pass to update
|
|
28
28
|
*
|
|
29
|
-
* @property
|
|
29
|
+
* @property collectionTtl - New time-to-live of this Map in seconds.
|
|
30
|
+
* @property ttl - Alias for collection_ttl
|
|
30
31
|
*/
|
|
31
32
|
interface SyncMapInstanceUpdateOptions {
|
|
33
|
+
collectionTtl?: number;
|
|
32
34
|
ttl?: number;
|
|
33
35
|
}
|
|
34
36
|
|
|
@@ -98,10 +100,12 @@ interface SyncMapListInstance {
|
|
|
98
100
|
/**
|
|
99
101
|
* Options to pass to create
|
|
100
102
|
*
|
|
101
|
-
* @property
|
|
103
|
+
* @property collectionTtl - Time-to-live of this Map in seconds, defaults to no expiration.
|
|
104
|
+
* @property ttl - Alias for collection_ttl
|
|
102
105
|
* @property uniqueName - Human-readable name for this map
|
|
103
106
|
*/
|
|
104
107
|
interface SyncMapListInstanceCreateOptions {
|
|
108
|
+
collectionTtl?: number;
|
|
105
109
|
ttl?: number;
|
|
106
110
|
uniqueName?: string;
|
|
107
111
|
}
|
|
@@ -58,7 +58,8 @@ SyncMapList = function SyncMapList(version, serviceSid) {
|
|
|
58
58
|
*
|
|
59
59
|
* @param {object} [opts] - Options for request
|
|
60
60
|
* @param {string} [opts.uniqueName] - Human-readable name for this map
|
|
61
|
-
* @param {number} [opts.ttl] -
|
|
61
|
+
* @param {number} [opts.ttl] - Alias for collection_ttl
|
|
62
|
+
* @param {number} [opts.collectionTtl] -
|
|
62
63
|
* Time-to-live of this Map in seconds, defaults to no expiration.
|
|
63
64
|
* @param {function} [callback] - Callback to handle processed record
|
|
64
65
|
*
|
|
@@ -73,7 +74,11 @@ SyncMapList = function SyncMapList(version, serviceSid) {
|
|
|
73
74
|
opts = opts || {};
|
|
74
75
|
|
|
75
76
|
var deferred = Q.defer();
|
|
76
|
-
var data = values.of({
|
|
77
|
+
var data = values.of({
|
|
78
|
+
'UniqueName': _.get(opts, 'uniqueName'),
|
|
79
|
+
'Ttl': _.get(opts, 'ttl'),
|
|
80
|
+
'CollectionTtl': _.get(opts, 'collectionTtl')
|
|
81
|
+
});
|
|
77
82
|
|
|
78
83
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
|
79
84
|
|
|
@@ -466,7 +471,8 @@ SyncMapInstance.prototype.remove = function remove(callback) {
|
|
|
466
471
|
* update a SyncMapInstance
|
|
467
472
|
*
|
|
468
473
|
* @param {object} [opts] - Options for request
|
|
469
|
-
* @param {number} [opts.ttl] -
|
|
474
|
+
* @param {number} [opts.ttl] - Alias for collection_ttl
|
|
475
|
+
* @param {number} [opts.collectionTtl] - New time-to-live of this Map in seconds.
|
|
470
476
|
* @param {function} [callback] - Callback to handle processed record
|
|
471
477
|
*
|
|
472
478
|
* @returns {Promise} Resolves to processed SyncMapInstance
|
|
@@ -611,7 +617,8 @@ SyncMapContext.prototype.remove = function remove(callback) {
|
|
|
611
617
|
* update a SyncMapInstance
|
|
612
618
|
*
|
|
613
619
|
* @param {object} [opts] - Options for request
|
|
614
|
-
* @param {number} [opts.ttl] -
|
|
620
|
+
* @param {number} [opts.ttl] - Alias for collection_ttl
|
|
621
|
+
* @param {number} [opts.collectionTtl] - New time-to-live of this Map in seconds.
|
|
615
622
|
* @param {function} [callback] - Callback to handle processed record
|
|
616
623
|
*
|
|
617
624
|
* @returns {Promise} Resolves to processed SyncMapInstance
|
|
@@ -625,7 +632,7 @@ SyncMapContext.prototype.update = function update(opts, callback) {
|
|
|
625
632
|
opts = opts || {};
|
|
626
633
|
|
|
627
634
|
var deferred = Q.defer();
|
|
628
|
-
var data = values.of({'Ttl': _.get(opts, 'ttl')});
|
|
635
|
+
var data = values.of({'Ttl': _.get(opts, 'ttl'), 'CollectionTtl': _.get(opts, 'collectionTtl')});
|
|
629
636
|
|
|
630
637
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
631
638
|
|
|
@@ -35,13 +35,17 @@ interface VerificationListInstance {
|
|
|
35
35
|
* Options to pass to create
|
|
36
36
|
*
|
|
37
37
|
* @property channel - sms or call
|
|
38
|
+
* @property customCode - A pre-generated code
|
|
38
39
|
* @property customMessage - A custom message for this verification
|
|
40
|
+
* @property locale - Locale used in the sms or call.
|
|
39
41
|
* @property sendDigits - Digits to send when a phone call is started
|
|
40
42
|
* @property to - To phonenumber
|
|
41
43
|
*/
|
|
42
44
|
interface VerificationListInstanceCreateOptions {
|
|
43
45
|
channel: string;
|
|
46
|
+
customCode?: string;
|
|
44
47
|
customMessage?: string;
|
|
48
|
+
locale?: string;
|
|
45
49
|
sendDigits?: string;
|
|
46
50
|
to: string;
|
|
47
51
|
}
|
|
@@ -56,6 +56,8 @@ VerificationList = function VerificationList(version, serviceSid) {
|
|
|
56
56
|
* @param {string} opts.channel - sms or call
|
|
57
57
|
* @param {string} [opts.customMessage] - A custom message for this verification
|
|
58
58
|
* @param {string} [opts.sendDigits] - Digits to send when a phone call is started
|
|
59
|
+
* @param {string} [opts.locale] - Locale used in the sms or call.
|
|
60
|
+
* @param {string} [opts.customCode] - A pre-generated code
|
|
59
61
|
* @param {function} [callback] - Callback to handle processed record
|
|
60
62
|
*
|
|
61
63
|
* @returns {Promise} Resolves to processed VerificationInstance
|
|
@@ -77,7 +79,9 @@ VerificationList = function VerificationList(version, serviceSid) {
|
|
|
77
79
|
'To': _.get(opts, 'to'),
|
|
78
80
|
'Channel': _.get(opts, 'channel'),
|
|
79
81
|
'CustomMessage': _.get(opts, 'customMessage'),
|
|
80
|
-
'SendDigits': _.get(opts, 'sendDigits')
|
|
82
|
+
'SendDigits': _.get(opts, 'sendDigits'),
|
|
83
|
+
'Locale': _.get(opts, 'locale'),
|
|
84
|
+
'CustomCode': _.get(opts, 'customCode')
|
|
81
85
|
});
|
|
82
86
|
|
|
83
87
|
var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
|
package/lib/rest/video/V1.d.ts
CHANGED
|
@@ -25,11 +25,11 @@ declare class V1 extends Version {
|
|
|
25
25
|
/**
|
|
26
26
|
* Initialize the V1 version of Video
|
|
27
27
|
*
|
|
28
|
+
* @property compositions - compositions resource
|
|
28
29
|
* @property compositionHooks - compositionHooks resource
|
|
29
30
|
* @property compositionSettings - compositionSettings resource
|
|
30
31
|
* @property recordings - recordings resource
|
|
31
32
|
* @property recordingSettings - recordingSettings resource
|
|
32
|
-
* @property compositions - compositions resource
|
|
33
33
|
* @property rooms - rooms resource
|
|
34
34
|
*
|
|
35
35
|
* @param domain - The twilio domain
|
package/lib/rest/video/V1.js
CHANGED
|
@@ -25,6 +25,7 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
|
25
25
|
/**
|
|
26
26
|
* Initialize the V1 version of Video
|
|
27
27
|
*
|
|
28
|
+
* @property {Twilio.Video.V1.CompositionList} compositions - compositions resource
|
|
28
29
|
* @property {Twilio.Video.V1.CompositionHookList} compositionHooks -
|
|
29
30
|
* compositionHooks resource
|
|
30
31
|
* @property {Twilio.Video.V1.CompositionSettingsList} compositionSettings -
|
|
@@ -32,7 +33,6 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
|
32
33
|
* @property {Twilio.Video.V1.RecordingList} recordings - recordings resource
|
|
33
34
|
* @property {Twilio.Video.V1.RecordingSettingsList} recordingSettings -
|
|
34
35
|
* recordingSettings resource
|
|
35
|
-
* @property {Twilio.Video.V1.CompositionList} compositions - compositions resource
|
|
36
36
|
* @property {Twilio.Video.V1.RoomList} rooms - rooms resource
|
|
37
37
|
*
|
|
38
38
|
* @param {Twilio.Video} domain - The twilio domain
|
|
@@ -42,17 +42,25 @@ function V1(domain) {
|
|
|
42
42
|
Version.prototype.constructor.call(this, domain, 'v1');
|
|
43
43
|
|
|
44
44
|
// Resources
|
|
45
|
+
this._compositions = undefined;
|
|
45
46
|
this._compositionHooks = undefined;
|
|
46
47
|
this._compositionSettings = undefined;
|
|
47
48
|
this._recordings = undefined;
|
|
48
49
|
this._recordingSettings = undefined;
|
|
49
|
-
this._compositions = undefined;
|
|
50
50
|
this._rooms = undefined;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
_.extend(V1.prototype, Version.prototype);
|
|
54
54
|
V1.prototype.constructor = V1;
|
|
55
55
|
|
|
56
|
+
Object.defineProperty(V1.prototype,
|
|
57
|
+
'compositions', {
|
|
58
|
+
get: function() {
|
|
59
|
+
this._compositions = this._compositions || new CompositionList(this);
|
|
60
|
+
return this._compositions;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
56
64
|
Object.defineProperty(V1.prototype,
|
|
57
65
|
'compositionHooks', {
|
|
58
66
|
get: function() {
|
|
@@ -85,14 +93,6 @@ Object.defineProperty(V1.prototype,
|
|
|
85
93
|
}
|
|
86
94
|
});
|
|
87
95
|
|
|
88
|
-
Object.defineProperty(V1.prototype,
|
|
89
|
-
'compositions', {
|
|
90
|
-
get: function() {
|
|
91
|
-
this._compositions = this._compositions || new CompositionList(this);
|
|
92
|
-
return this._compositions;
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
|
|
96
96
|
Object.defineProperty(V1.prototype,
|
|
97
97
|
'rooms', {
|
|
98
98
|
get: function() {
|
|
@@ -74,6 +74,12 @@ declare class VoiceResponse {
|
|
|
74
74
|
* @param attributes - TwiML attributes
|
|
75
75
|
*/
|
|
76
76
|
pause(attributes?: VoiceResponse.PauseAttributes): void;
|
|
77
|
+
/**
|
|
78
|
+
* <Pay> Twiml Verb
|
|
79
|
+
*
|
|
80
|
+
* @param attributes - TwiML attributes
|
|
81
|
+
*/
|
|
82
|
+
pay(attributes?: VoiceResponse.PayAttributes): VoiceResponse.Pay;
|
|
77
83
|
/**
|
|
78
84
|
* <Play> TwiML Verb
|
|
79
85
|
*
|
|
@@ -81,6 +87,12 @@ declare class VoiceResponse {
|
|
|
81
87
|
* @param url - Media URL
|
|
82
88
|
*/
|
|
83
89
|
play(attributes?: VoiceResponse.PlayAttributes, url?: string): void;
|
|
90
|
+
/**
|
|
91
|
+
* <Prompt> Twiml Verb
|
|
92
|
+
*
|
|
93
|
+
* @param attributes - TwiML attributes
|
|
94
|
+
*/
|
|
95
|
+
prompt(attributes?: VoiceResponse.PromptAttributes): VoiceResponse.Prompt;
|
|
84
96
|
/**
|
|
85
97
|
* <Queue> TwiML Noun
|
|
86
98
|
*
|
|
@@ -181,6 +193,24 @@ declare namespace VoiceResponse {
|
|
|
181
193
|
|
|
182
194
|
type NumberEvent = 'initiated'|'ringing'|'answered'|'completed';
|
|
183
195
|
|
|
196
|
+
type PayCurrency = 'usd'|'eur'|'gbp';
|
|
197
|
+
|
|
198
|
+
type PayInput = 'dtmf';
|
|
199
|
+
|
|
200
|
+
type PayLanguage = 'de-DE'|'en-AU'|'en-CA'|'en-GB'|'en-IN'|'en-IE'|'en-NZ'|'en-PH'|'en-ZA'|'en-US'|'es-ES'|'es-US'|'fr-CA'|'fr-FR'|'it-IT';
|
|
201
|
+
|
|
202
|
+
type PayStatusCallbackMethod = 'GET'|'POST';
|
|
203
|
+
|
|
204
|
+
type PayTokenType = 'one-time'|'reusable';
|
|
205
|
+
|
|
206
|
+
type PayValidCardTypes = 'visa'|'mastercard'|'amex'|'maestro'|'discover'|'optima'|'jcb'|'diners-club'|'enroute';
|
|
207
|
+
|
|
208
|
+
type PromptCardType = 'visa'|'mastercard'|'amex'|'maestro'|'discover'|'optima'|'jcb'|'diners-club'|'enroute';
|
|
209
|
+
|
|
210
|
+
type PromptErrorType = 'timeout'|'invalid-card-number'|'invalid-card-type'|'invalid-date'|'invalid-security-code'|'internal-error';
|
|
211
|
+
|
|
212
|
+
type PromptFor = 'payment-card-number'|'expiration-date'|'security-code'|'postal-code'|'payment-processing';
|
|
213
|
+
|
|
184
214
|
type RecordTrim = 'trim-silence'|'do-not-trim';
|
|
185
215
|
|
|
186
216
|
type RejectReason = 'rejected'|'busy';
|
|
@@ -400,6 +430,43 @@ declare namespace VoiceResponse {
|
|
|
400
430
|
length?: number;
|
|
401
431
|
}
|
|
402
432
|
|
|
433
|
+
/**
|
|
434
|
+
* Options to pass to pay
|
|
435
|
+
*
|
|
436
|
+
* @property action - Action URL
|
|
437
|
+
* @property chargeAmount - Amount to process. If value is greater than 0 then make the payment else create a payment token
|
|
438
|
+
* @property currency - Currency of the amount attribute
|
|
439
|
+
* @property description - Details regarding the payment
|
|
440
|
+
* @property input - Input type Twilio should accept
|
|
441
|
+
* @property language - Language to use
|
|
442
|
+
* @property maxAttempts - Maximum number of allowed retries when gathering input
|
|
443
|
+
* @property paymentConnector - Unique name for payment connector
|
|
444
|
+
* @property postalCode - Prompt for postal code and it should be true/false or default postal code
|
|
445
|
+
* @property securityCode - Prompt for security code
|
|
446
|
+
* @property statusCallback - Status callback URL
|
|
447
|
+
* @property statusCallbackMethod - Status callback method
|
|
448
|
+
* @property timeout - Time to wait to gather input
|
|
449
|
+
* @property tokenType - Type of token
|
|
450
|
+
* @property validCardTypes - Comma separated accepted card types
|
|
451
|
+
*/
|
|
452
|
+
export interface PayAttributes {
|
|
453
|
+
action?: string;
|
|
454
|
+
chargeAmount?: string;
|
|
455
|
+
currency?: PayCurrency;
|
|
456
|
+
description?: string;
|
|
457
|
+
input?: PayInput;
|
|
458
|
+
language?: PayLanguage;
|
|
459
|
+
maxAttempts?: number;
|
|
460
|
+
paymentConnector?: string;
|
|
461
|
+
postalCode?: string;
|
|
462
|
+
securityCode?: boolean;
|
|
463
|
+
statusCallback?: string;
|
|
464
|
+
statusCallbackMethod?: PayStatusCallbackMethod;
|
|
465
|
+
timeout?: number;
|
|
466
|
+
tokenType?: PayTokenType;
|
|
467
|
+
validCardTypes?: string;
|
|
468
|
+
}
|
|
469
|
+
|
|
403
470
|
/**
|
|
404
471
|
* Options to pass to play
|
|
405
472
|
*
|
|
@@ -411,6 +478,21 @@ declare namespace VoiceResponse {
|
|
|
411
478
|
loop?: number;
|
|
412
479
|
}
|
|
413
480
|
|
|
481
|
+
/**
|
|
482
|
+
* Options to pass to prompt
|
|
483
|
+
*
|
|
484
|
+
* @property attempt - Current attempt count
|
|
485
|
+
* @property cardType - Type of the credit card
|
|
486
|
+
* @property errorType - Type of error
|
|
487
|
+
* @property for_ - Name of the credit card data element
|
|
488
|
+
*/
|
|
489
|
+
export interface PromptAttributes {
|
|
490
|
+
attempt?: string;
|
|
491
|
+
cardType?: string;
|
|
492
|
+
errorType?: string;
|
|
493
|
+
for_?: PromptFor;
|
|
494
|
+
}
|
|
495
|
+
|
|
414
496
|
/**
|
|
415
497
|
* Options to pass to queue
|
|
416
498
|
*
|
|
@@ -814,6 +896,48 @@ declare namespace VoiceResponse {
|
|
|
814
896
|
}
|
|
815
897
|
|
|
816
898
|
|
|
899
|
+
class Pay {
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* <Prompt> Twiml Verb
|
|
903
|
+
*
|
|
904
|
+
* @param attributes - TwiML attributes
|
|
905
|
+
*/
|
|
906
|
+
prompt(attributes?: VoiceResponse.PromptAttributes): VoiceResponse.Prompt;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
class Prompt {
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* <Pause> TwiML Verb
|
|
914
|
+
*
|
|
915
|
+
* @param attributes - TwiML attributes
|
|
916
|
+
*/
|
|
917
|
+
pause(attributes?: VoiceResponse.PauseAttributes): void;
|
|
918
|
+
/**
|
|
919
|
+
* <Play> TwiML Verb
|
|
920
|
+
*
|
|
921
|
+
* @param attributes - TwiML attributes
|
|
922
|
+
* @param url - Media URL
|
|
923
|
+
*/
|
|
924
|
+
play(attributes?: VoiceResponse.PlayAttributes, url?: string): void;
|
|
925
|
+
/**
|
|
926
|
+
* <Say> TwiML Verb
|
|
927
|
+
*
|
|
928
|
+
* @param message - Message to say
|
|
929
|
+
*/
|
|
930
|
+
say(message: string): VoiceResponse.Say;
|
|
931
|
+
/**
|
|
932
|
+
* <Say> TwiML Verb
|
|
933
|
+
*
|
|
934
|
+
* @param attributes - TwiML attributes
|
|
935
|
+
* @param message - Message to say
|
|
936
|
+
*/
|
|
937
|
+
say(attributes: VoiceResponse.SayAttributes, message: string): VoiceResponse.Say;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
|
|
817
941
|
class Say {
|
|
818
942
|
|
|
819
943
|
/**
|