twilio 3.69.0 → 3.71.3
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 +96 -0
- package/README.md +1 -1
- package/lib/jwt/AccessToken.d.ts +16 -0
- package/lib/jwt/AccessToken.js +20 -0
- package/lib/jwt/ClientCapability.d.ts +1 -1
- package/lib/rest/Media.d.ts +28 -0
- package/lib/rest/Media.js +64 -0
- package/lib/rest/Supersim.d.ts +2 -0
- package/lib/rest/Supersim.js +8 -0
- package/lib/rest/Twilio.d.ts +2 -0
- package/lib/rest/Twilio.js +14 -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/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/conversations/v1/service/configuration/webhook.d.ts +172 -0
- package/lib/rest/conversations/v1/service/configuration/webhook.js +399 -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/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 +330 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +655 -0
- package/lib/rest/messaging/v1/brandRegistration.d.ts +15 -2
- package/lib/rest/messaging/v1/brandRegistration.js +37 -1
- package/lib/rest/messaging/v1/service.d.ts +8 -0
- package/lib/rest/messaging/v1/service.js +14 -0
- 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 +8 -0
- package/lib/rest/video/v1/room.js +13 -1
- 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 +18 -24
- package/lib/twiml/VoiceResponse.d.ts +1296 -24
- package/lib/twiml/VoiceResponse.js +2170 -82
- package/package.json +2 -2
|
@@ -13,6 +13,7 @@ var Q = require('q'); /* jshint ignore:line */
|
|
|
13
13
|
var _ = require('lodash'); /* jshint ignore:line */
|
|
14
14
|
var util = require('util'); /* jshint ignore:line */
|
|
15
15
|
var Page = require('../../../base/Page'); /* jshint ignore:line */
|
|
16
|
+
var serialize = require('../../../base/serialize'); /* jshint ignore:line */
|
|
16
17
|
var values = require('../../../base/values'); /* jshint ignore:line */
|
|
17
18
|
|
|
18
19
|
var UserList;
|
|
@@ -171,6 +172,8 @@ UserPage.prototype[util.inspect.custom] = function inspect(depth, options) {
|
|
|
171
172
|
* @property {string} avatar -
|
|
172
173
|
* The avatar URL which will be shown in Frontline application
|
|
173
174
|
* @property {user.state_type} state - Current state of this user
|
|
175
|
+
* @property {boolean} isAvailable -
|
|
176
|
+
* Whether the User is available for new conversations
|
|
174
177
|
* @property {string} url - An absolute URL for this user.
|
|
175
178
|
*
|
|
176
179
|
* @param {V1} version - Version of the resource
|
|
@@ -187,6 +190,7 @@ UserInstance = function UserInstance(version, payload, sid) {
|
|
|
187
190
|
this.friendlyName = payload.friendly_name; // jshint ignore:line
|
|
188
191
|
this.avatar = payload.avatar; // jshint ignore:line
|
|
189
192
|
this.state = payload.state; // jshint ignore:line
|
|
193
|
+
this.isAvailable = payload.is_available; // jshint ignore:line
|
|
190
194
|
this.url = payload.url; // jshint ignore:line
|
|
191
195
|
|
|
192
196
|
// Context
|
|
@@ -234,6 +238,8 @@ UserInstance.prototype.fetch = function fetch(callback) {
|
|
|
234
238
|
* @param {string} [opts.avatar] -
|
|
235
239
|
* The avatar URL which will be shown in Frontline application
|
|
236
240
|
* @param {user.state_type} [opts.state] - Current state of this user
|
|
241
|
+
* @param {boolean} [opts.isAvailable] -
|
|
242
|
+
* Whether the User is available for new conversations
|
|
237
243
|
* @param {function} [callback] - Callback to handle processed record
|
|
238
244
|
*
|
|
239
245
|
* @returns {Promise} Resolves to processed UserInstance
|
|
@@ -333,6 +339,8 @@ UserContext.prototype.fetch = function fetch(callback) {
|
|
|
333
339
|
* @param {string} [opts.avatar] -
|
|
334
340
|
* The avatar URL which will be shown in Frontline application
|
|
335
341
|
* @param {user.state_type} [opts.state] - Current state of this user
|
|
342
|
+
* @param {boolean} [opts.isAvailable] -
|
|
343
|
+
* Whether the User is available for new conversations
|
|
336
344
|
* @param {function} [callback] - Callback to handle processed record
|
|
337
345
|
*
|
|
338
346
|
* @returns {Promise} Resolves to processed UserInstance
|
|
@@ -349,7 +357,8 @@ UserContext.prototype.update = function update(opts, callback) {
|
|
|
349
357
|
var data = values.of({
|
|
350
358
|
'FriendlyName': _.get(opts, 'friendlyName'),
|
|
351
359
|
'Avatar': _.get(opts, 'avatar'),
|
|
352
|
-
'State': _.get(opts, 'state')
|
|
360
|
+
'State': _.get(opts, 'state'),
|
|
361
|
+
'IsAvailable': serialize.bool(_.get(opts, 'isAvailable'))
|
|
353
362
|
});
|
|
354
363
|
|
|
355
364
|
var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by
|
|
3
|
+
* \ / _ _ _| _ _
|
|
4
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
* / /
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import Media = require('../Media');
|
|
9
|
+
import Version = require('../../base/Version');
|
|
10
|
+
import { MediaProcessorList } from './v1/mediaProcessor';
|
|
11
|
+
import { MediaProcessorListInstance } from './v1/mediaProcessor';
|
|
12
|
+
import { PlayerStreamerList } from './v1/playerStreamer';
|
|
13
|
+
import { PlayerStreamerListInstance } from './v1/playerStreamer';
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
declare class V1 extends Version {
|
|
17
|
+
/**
|
|
18
|
+
* Initialize the V1 version of Media
|
|
19
|
+
*
|
|
20
|
+
* @param domain - The twilio domain
|
|
21
|
+
*/
|
|
22
|
+
constructor(domain: Media);
|
|
23
|
+
|
|
24
|
+
readonly mediaProcessor: MediaProcessorListInstance;
|
|
25
|
+
readonly playerStreamer: PlayerStreamerListInstance;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export = V1;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* jshint ignore:start */
|
|
4
|
+
/**
|
|
5
|
+
* This code was generated by
|
|
6
|
+
* \ / _ _ _| _ _
|
|
7
|
+
* | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
8
|
+
* / /
|
|
9
|
+
*/
|
|
10
|
+
/* jshint ignore:end */
|
|
11
|
+
|
|
12
|
+
var _ = require('lodash'); /* jshint ignore:line */
|
|
13
|
+
var MediaProcessorList = require('./v1/mediaProcessor').MediaProcessorList;
|
|
14
|
+
var PlayerStreamerList = require('./v1/playerStreamer').PlayerStreamerList;
|
|
15
|
+
var Version = require('../../base/Version'); /* jshint ignore:line */
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/* jshint ignore:start */
|
|
19
|
+
/**
|
|
20
|
+
* Initialize the V1 version of Media
|
|
21
|
+
*
|
|
22
|
+
* @constructor Twilio.Media.V1
|
|
23
|
+
*
|
|
24
|
+
* @property {Twilio.Media.V1.MediaProcessorList} mediaProcessor -
|
|
25
|
+
* mediaProcessor resource
|
|
26
|
+
* @property {Twilio.Media.V1.PlayerStreamerList} playerStreamer -
|
|
27
|
+
* playerStreamer resource
|
|
28
|
+
*
|
|
29
|
+
* @param {Twilio.Media} domain - The twilio domain
|
|
30
|
+
*/
|
|
31
|
+
/* jshint ignore:end */
|
|
32
|
+
function V1(domain) {
|
|
33
|
+
Version.prototype.constructor.call(this, domain, 'v1');
|
|
34
|
+
|
|
35
|
+
// Resources
|
|
36
|
+
this._mediaProcessor = undefined;
|
|
37
|
+
this._playerStreamer = undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
_.extend(V1.prototype, Version.prototype);
|
|
41
|
+
V1.prototype.constructor = V1;
|
|
42
|
+
|
|
43
|
+
Object.defineProperty(V1.prototype,
|
|
44
|
+
'mediaProcessor', {
|
|
45
|
+
get: function() {
|
|
46
|
+
this._mediaProcessor = this._mediaProcessor || new MediaProcessorList(this);
|
|
47
|
+
return this._mediaProcessor;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
Object.defineProperty(V1.prototype,
|
|
52
|
+
'playerStreamer', {
|
|
53
|
+
get: function() {
|
|
54
|
+
this._playerStreamer = this._playerStreamer || new PlayerStreamerList(this);
|
|
55
|
+
return this._playerStreamer;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
module.exports = V1;
|
|
@@ -0,0 +1,355 @@
|
|
|
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
|
+
type MediaProcessorOrder = 'asc'|'desc';
|
|
14
|
+
|
|
15
|
+
type MediaProcessorStatus = 'failed'|'started'|'ended';
|
|
16
|
+
|
|
17
|
+
type MediaProcessorUpdateStatus = 'ended';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Initialize the MediaProcessorList
|
|
21
|
+
*
|
|
22
|
+
* @param version - Version of the resource
|
|
23
|
+
*/
|
|
24
|
+
declare function MediaProcessorList(version: V1): MediaProcessorListInstance;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Options to pass to update
|
|
28
|
+
*
|
|
29
|
+
* @property status - The status of the MediaProcessor
|
|
30
|
+
*/
|
|
31
|
+
interface MediaProcessorInstanceUpdateOptions {
|
|
32
|
+
status: MediaProcessorUpdateStatus;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface MediaProcessorListInstance {
|
|
36
|
+
/**
|
|
37
|
+
* @param sid - sid of instance
|
|
38
|
+
*/
|
|
39
|
+
(sid: string): MediaProcessorContext;
|
|
40
|
+
/**
|
|
41
|
+
* create a MediaProcessorInstance
|
|
42
|
+
*
|
|
43
|
+
* @param opts - Options for request
|
|
44
|
+
* @param callback - Callback to handle processed record
|
|
45
|
+
*/
|
|
46
|
+
create(opts: MediaProcessorListInstanceCreateOptions, callback?: (error: Error | null, item: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
|
|
47
|
+
/**
|
|
48
|
+
* Streams MediaProcessorInstance records from the API.
|
|
49
|
+
*
|
|
50
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
51
|
+
* is reached.
|
|
52
|
+
*
|
|
53
|
+
* The results are passed into the callback function, so this operation is memory
|
|
54
|
+
* efficient.
|
|
55
|
+
*
|
|
56
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
57
|
+
* function.
|
|
58
|
+
*
|
|
59
|
+
* @param callback - Function to process each record
|
|
60
|
+
*/
|
|
61
|
+
each(callback?: (item: MediaProcessorInstance, done: (err?: Error) => void) => void): void;
|
|
62
|
+
/**
|
|
63
|
+
* Streams MediaProcessorInstance records from the API.
|
|
64
|
+
*
|
|
65
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
66
|
+
* is reached.
|
|
67
|
+
*
|
|
68
|
+
* The results are passed into the callback function, so this operation is memory
|
|
69
|
+
* efficient.
|
|
70
|
+
*
|
|
71
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
72
|
+
* function.
|
|
73
|
+
*
|
|
74
|
+
* @param opts - Options for request
|
|
75
|
+
* @param callback - Function to process each record
|
|
76
|
+
*/
|
|
77
|
+
each(opts?: MediaProcessorListInstanceEachOptions, callback?: (item: MediaProcessorInstance, done: (err?: Error) => void) => void): void;
|
|
78
|
+
/**
|
|
79
|
+
* Constructs a media_processor
|
|
80
|
+
*
|
|
81
|
+
* @param sid - The SID that identifies the resource to fetch
|
|
82
|
+
*/
|
|
83
|
+
get(sid: string): MediaProcessorContext;
|
|
84
|
+
/**
|
|
85
|
+
* Retrieve a single target page of MediaProcessorInstance records from the API.
|
|
86
|
+
*
|
|
87
|
+
* The request is executed immediately.
|
|
88
|
+
*
|
|
89
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
90
|
+
* function.
|
|
91
|
+
*
|
|
92
|
+
* @param callback - Callback to handle list of records
|
|
93
|
+
*/
|
|
94
|
+
getPage(callback?: (error: Error | null, items: MediaProcessorPage) => any): Promise<MediaProcessorPage>;
|
|
95
|
+
/**
|
|
96
|
+
* Retrieve a single target page of MediaProcessorInstance records from the API.
|
|
97
|
+
*
|
|
98
|
+
* The request is executed immediately.
|
|
99
|
+
*
|
|
100
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
101
|
+
* function.
|
|
102
|
+
*
|
|
103
|
+
* @param targetUrl - API-generated URL for the requested results page
|
|
104
|
+
* @param callback - Callback to handle list of records
|
|
105
|
+
*/
|
|
106
|
+
getPage(targetUrl?: string, callback?: (error: Error | null, items: MediaProcessorPage) => any): Promise<MediaProcessorPage>;
|
|
107
|
+
/**
|
|
108
|
+
* Lists MediaProcessorInstance records from the API as a list.
|
|
109
|
+
*
|
|
110
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
111
|
+
* function.
|
|
112
|
+
*
|
|
113
|
+
* @param callback - Callback to handle list of records
|
|
114
|
+
*/
|
|
115
|
+
list(callback?: (error: Error | null, items: MediaProcessorInstance[]) => any): Promise<MediaProcessorInstance[]>;
|
|
116
|
+
/**
|
|
117
|
+
* Lists MediaProcessorInstance records from the API as a list.
|
|
118
|
+
*
|
|
119
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
120
|
+
* function.
|
|
121
|
+
*
|
|
122
|
+
* @param opts - Options for request
|
|
123
|
+
* @param callback - Callback to handle list of records
|
|
124
|
+
*/
|
|
125
|
+
list(opts?: MediaProcessorListInstanceOptions, callback?: (error: Error | null, items: MediaProcessorInstance[]) => any): Promise<MediaProcessorInstance[]>;
|
|
126
|
+
/**
|
|
127
|
+
* Retrieve a single page of MediaProcessorInstance records from the API.
|
|
128
|
+
*
|
|
129
|
+
* The request is executed immediately.
|
|
130
|
+
*
|
|
131
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
132
|
+
* function.
|
|
133
|
+
*
|
|
134
|
+
* @param callback - Callback to handle list of records
|
|
135
|
+
*/
|
|
136
|
+
page(callback?: (error: Error | null, items: MediaProcessorPage) => any): Promise<MediaProcessorPage>;
|
|
137
|
+
/**
|
|
138
|
+
* Retrieve a single page of MediaProcessorInstance records from the API.
|
|
139
|
+
*
|
|
140
|
+
* The request is executed immediately.
|
|
141
|
+
*
|
|
142
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
143
|
+
* function.
|
|
144
|
+
*
|
|
145
|
+
* @param opts - Options for request
|
|
146
|
+
* @param callback - Callback to handle list of records
|
|
147
|
+
*/
|
|
148
|
+
page(opts?: MediaProcessorListInstancePageOptions, callback?: (error: Error | null, items: MediaProcessorPage) => any): Promise<MediaProcessorPage>;
|
|
149
|
+
/**
|
|
150
|
+
* Provide a user-friendly representation
|
|
151
|
+
*/
|
|
152
|
+
toJSON(): any;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Options to pass to create
|
|
157
|
+
*
|
|
158
|
+
* @property extension - The Media Extension name or URL
|
|
159
|
+
* @property extensionContext - The Media Extension context
|
|
160
|
+
* @property extensionEnvironment - The Media Extension environment
|
|
161
|
+
* @property statusCallback - The URL to send MediaProcessor event updates to your application
|
|
162
|
+
* @property statusCallbackMethod - The HTTP method Twilio should use to call the `status_callback` URL
|
|
163
|
+
*/
|
|
164
|
+
interface MediaProcessorListInstanceCreateOptions {
|
|
165
|
+
extension: string;
|
|
166
|
+
extensionContext: string;
|
|
167
|
+
extensionEnvironment?: object;
|
|
168
|
+
statusCallback?: string;
|
|
169
|
+
statusCallbackMethod?: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Options to pass to each
|
|
174
|
+
*
|
|
175
|
+
* @property callback -
|
|
176
|
+
* Function to process each record. If this and a positional
|
|
177
|
+
* callback are passed, this one will be used
|
|
178
|
+
* @property done - Function to be called upon completion of streaming
|
|
179
|
+
* @property limit -
|
|
180
|
+
* Upper limit for the number of records to return.
|
|
181
|
+
* each() guarantees never to return more than limit.
|
|
182
|
+
* Default is no limit
|
|
183
|
+
* @property order - The sort order of the list
|
|
184
|
+
* @property pageSize -
|
|
185
|
+
* Number of records to fetch per request,
|
|
186
|
+
* when not set will use the default value of 50 records.
|
|
187
|
+
* If no pageSize is defined but a limit is defined,
|
|
188
|
+
* each() will attempt to read the limit with the most efficient
|
|
189
|
+
* page size, i.e. min(limit, 1000)
|
|
190
|
+
* @property status - Status to filter by
|
|
191
|
+
*/
|
|
192
|
+
interface MediaProcessorListInstanceEachOptions {
|
|
193
|
+
callback?: (item: MediaProcessorInstance, done: (err?: Error) => void) => void;
|
|
194
|
+
done?: Function;
|
|
195
|
+
limit?: number;
|
|
196
|
+
order?: MediaProcessorOrder;
|
|
197
|
+
pageSize?: number;
|
|
198
|
+
status?: MediaProcessorStatus;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Options to pass to list
|
|
203
|
+
*
|
|
204
|
+
* @property limit -
|
|
205
|
+
* Upper limit for the number of records to return.
|
|
206
|
+
* list() guarantees never to return more than limit.
|
|
207
|
+
* Default is no limit
|
|
208
|
+
* @property order - The sort order of the list
|
|
209
|
+
* @property pageSize -
|
|
210
|
+
* Number of records to fetch per request,
|
|
211
|
+
* when not set will use the default value of 50 records.
|
|
212
|
+
* If no page_size is defined but a limit is defined,
|
|
213
|
+
* list() will attempt to read the limit with the most
|
|
214
|
+
* efficient page size, i.e. min(limit, 1000)
|
|
215
|
+
* @property status - Status to filter by
|
|
216
|
+
*/
|
|
217
|
+
interface MediaProcessorListInstanceOptions {
|
|
218
|
+
limit?: number;
|
|
219
|
+
order?: MediaProcessorOrder;
|
|
220
|
+
pageSize?: number;
|
|
221
|
+
status?: MediaProcessorStatus;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Options to pass to page
|
|
226
|
+
*
|
|
227
|
+
* @property order - The sort order of the list
|
|
228
|
+
* @property pageNumber - Page Number, this value is simply for client state
|
|
229
|
+
* @property pageSize - Number of records to return, defaults to 50
|
|
230
|
+
* @property pageToken - PageToken provided by the API
|
|
231
|
+
* @property status - Status to filter by
|
|
232
|
+
*/
|
|
233
|
+
interface MediaProcessorListInstancePageOptions {
|
|
234
|
+
order?: MediaProcessorOrder;
|
|
235
|
+
pageNumber?: number;
|
|
236
|
+
pageSize?: number;
|
|
237
|
+
pageToken?: string;
|
|
238
|
+
status?: MediaProcessorStatus;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
interface MediaProcessorPayload extends MediaProcessorResource, Page.TwilioResponsePayload {
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
interface MediaProcessorResource {
|
|
245
|
+
account_sid: string;
|
|
246
|
+
date_created: Date;
|
|
247
|
+
date_updated: Date;
|
|
248
|
+
ended_reason: string;
|
|
249
|
+
extension: string;
|
|
250
|
+
extension_context: string;
|
|
251
|
+
sid: string;
|
|
252
|
+
status: MediaProcessorStatus;
|
|
253
|
+
status_callback: string;
|
|
254
|
+
status_callback_method: string;
|
|
255
|
+
url: string;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
interface MediaProcessorSolution {
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
declare class MediaProcessorContext {
|
|
263
|
+
/**
|
|
264
|
+
* Initialize the MediaProcessorContext
|
|
265
|
+
*
|
|
266
|
+
* @param version - Version of the resource
|
|
267
|
+
* @param sid - The SID that identifies the resource to fetch
|
|
268
|
+
*/
|
|
269
|
+
constructor(version: V1, sid: string);
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* fetch a MediaProcessorInstance
|
|
273
|
+
*
|
|
274
|
+
* @param callback - Callback to handle processed record
|
|
275
|
+
*/
|
|
276
|
+
fetch(callback?: (error: Error | null, items: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
|
|
277
|
+
/**
|
|
278
|
+
* Provide a user-friendly representation
|
|
279
|
+
*/
|
|
280
|
+
toJSON(): any;
|
|
281
|
+
/**
|
|
282
|
+
* update a MediaProcessorInstance
|
|
283
|
+
*
|
|
284
|
+
* @param opts - Options for request
|
|
285
|
+
* @param callback - Callback to handle processed record
|
|
286
|
+
*/
|
|
287
|
+
update(opts: MediaProcessorInstanceUpdateOptions, callback?: (error: Error | null, items: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
declare class MediaProcessorInstance extends SerializableClass {
|
|
292
|
+
/**
|
|
293
|
+
* Initialize the MediaProcessorContext
|
|
294
|
+
*
|
|
295
|
+
* @param version - Version of the resource
|
|
296
|
+
* @param payload - The instance payload
|
|
297
|
+
* @param sid - The SID that identifies the resource to fetch
|
|
298
|
+
*/
|
|
299
|
+
constructor(version: V1, payload: MediaProcessorPayload, sid: string);
|
|
300
|
+
|
|
301
|
+
private _proxy: MediaProcessorContext;
|
|
302
|
+
accountSid: string;
|
|
303
|
+
dateCreated: Date;
|
|
304
|
+
dateUpdated: Date;
|
|
305
|
+
endedReason: string;
|
|
306
|
+
extension: string;
|
|
307
|
+
extensionContext: string;
|
|
308
|
+
/**
|
|
309
|
+
* fetch a MediaProcessorInstance
|
|
310
|
+
*
|
|
311
|
+
* @param callback - Callback to handle processed record
|
|
312
|
+
*/
|
|
313
|
+
fetch(callback?: (error: Error | null, items: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
|
|
314
|
+
sid: string;
|
|
315
|
+
status: MediaProcessorStatus;
|
|
316
|
+
statusCallback: string;
|
|
317
|
+
statusCallbackMethod: string;
|
|
318
|
+
/**
|
|
319
|
+
* Provide a user-friendly representation
|
|
320
|
+
*/
|
|
321
|
+
toJSON(): any;
|
|
322
|
+
/**
|
|
323
|
+
* update a MediaProcessorInstance
|
|
324
|
+
*
|
|
325
|
+
* @param opts - Options for request
|
|
326
|
+
* @param callback - Callback to handle processed record
|
|
327
|
+
*/
|
|
328
|
+
update(opts: MediaProcessorInstanceUpdateOptions, callback?: (error: Error | null, items: MediaProcessorInstance) => any): Promise<MediaProcessorInstance>;
|
|
329
|
+
url: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
declare class MediaProcessorPage extends Page<V1, MediaProcessorPayload, MediaProcessorResource, MediaProcessorInstance> {
|
|
334
|
+
/**
|
|
335
|
+
* Initialize the MediaProcessorPage
|
|
336
|
+
*
|
|
337
|
+
* @param version - Version of the resource
|
|
338
|
+
* @param response - Response from the API
|
|
339
|
+
* @param solution - Path solution
|
|
340
|
+
*/
|
|
341
|
+
constructor(version: V1, response: Response<string>, solution: MediaProcessorSolution);
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Build an instance of MediaProcessorInstance
|
|
345
|
+
*
|
|
346
|
+
* @param payload - Payload response from the API
|
|
347
|
+
*/
|
|
348
|
+
getInstance(payload: MediaProcessorPayload): MediaProcessorInstance;
|
|
349
|
+
/**
|
|
350
|
+
* Provide a user-friendly representation
|
|
351
|
+
*/
|
|
352
|
+
toJSON(): any;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export { MediaProcessorContext, MediaProcessorInstance, MediaProcessorInstanceUpdateOptions, MediaProcessorList, MediaProcessorListInstance, MediaProcessorListInstanceCreateOptions, MediaProcessorListInstanceEachOptions, MediaProcessorListInstanceOptions, MediaProcessorListInstancePageOptions, MediaProcessorOrder, MediaProcessorPage, MediaProcessorPayload, MediaProcessorResource, MediaProcessorSolution, MediaProcessorStatus, MediaProcessorUpdateStatus }
|