twilio 5.0.0 → 5.0.2
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/lib/rest/Oauth.d.ts +4 -0
- package/lib/rest/{Media.js → Oauth.js} +3 -3
- package/lib/rest/{MediaBase.d.ts → OauthBase.d.ts} +4 -4
- package/lib/rest/{MediaBase.js → OauthBase.js} +5 -5
- package/lib/rest/Twilio.d.ts +5 -5
- package/lib/rest/Twilio.js +5 -5
- package/lib/rest/api/v2010/account/call.d.ts +34 -10
- package/lib/rest/api/v2010/account/call.js +8 -0
- package/lib/rest/api/v2010/account/conference/participant.d.ts +6 -0
- package/lib/rest/api/v2010/account/conference/participant.js +2 -0
- package/lib/rest/api/v2010/account/conference.d.ts +24 -0
- package/lib/rest/api/v2010/account/conference.js +8 -0
- package/lib/rest/api/v2010/account/message.d.ts +12 -0
- package/lib/rest/api/v2010/account/message.js +4 -0
- package/lib/rest/content/v1/content/approvalCreate.d.ts +3 -3
- package/lib/rest/content/v1/content/approvalCreate.js +7 -7
- package/lib/rest/content/v1/content/approvalFetch.d.ts +5 -5
- package/lib/rest/content/v1/content/approvalFetch.js +14 -14
- package/lib/rest/content/v1/content.d.ts +20 -0
- package/lib/rest/content/v1/content.js +10 -1
- package/lib/rest/conversations/v1/service/conversation.d.ts +6 -6
- package/lib/rest/flexApi/v1/plugin.d.ts +4 -0
- package/lib/rest/flexApi/v1/plugin.js +4 -0
- package/lib/rest/numbers/v1/portingPortInFetch.d.ts +6 -0
- package/lib/rest/numbers/v1/portingPortInFetch.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +12 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +4 -0
- package/lib/rest/oauth/V1.d.ts +20 -0
- package/lib/rest/oauth/V1.js +42 -0
- package/lib/rest/oauth/v1/authorize.d.ts +69 -0
- package/lib/rest/oauth/v1/authorize.js +83 -0
- package/lib/rest/oauth/v1/token.d.ts +88 -0
- package/lib/rest/oauth/v1/token.js +98 -0
- package/lib/rest/trusthub/v1/complianceRegistrationInquiries.d.ts +84 -10
- package/lib/rest/trusthub/v1/complianceRegistrationInquiries.js +92 -28
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.d.ts +6 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js +2 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.d.ts +6 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js +2 -0
- package/lib/rest/trusthub/v1/trustProducts.d.ts +16 -16
- package/lib/twiml/VoiceResponse.d.ts +2 -2
- package/package.json +1 -1
- package/lib/rest/Media.d.ts +0 -4
- package/lib/rest/media/V1.d.ts +0 -25
- package/lib/rest/media/V1.js +0 -51
- package/lib/rest/media/v1/mediaProcessor.d.ts +0 -317
- package/lib/rest/media/v1/mediaProcessor.js +0 -256
- package/lib/rest/media/v1/mediaRecording.d.ts +0 -309
- package/lib/rest/media/v1/mediaRecording.js +0 -226
- package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +0 -151
- package/lib/rest/media/v1/playerStreamer/playbackGrant.js +0 -146
- package/lib/rest/media/v1/playerStreamer.d.ts +0 -327
- package/lib/rest/media/v1/playerStreamer.js +0 -264
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
|
-
const
|
|
6
|
-
class
|
|
5
|
+
const OauthBase_1 = __importDefault(require("./OauthBase"));
|
|
6
|
+
class Oauth extends OauthBase_1.default {
|
|
7
7
|
}
|
|
8
|
-
module.exports =
|
|
8
|
+
module.exports = Oauth;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import Domain from "../base/Domain";
|
|
2
|
-
import V1 from "./
|
|
3
|
-
declare class
|
|
2
|
+
import V1 from "./oauth/V1";
|
|
3
|
+
declare class OauthBase extends Domain {
|
|
4
4
|
_v1?: V1;
|
|
5
5
|
/**
|
|
6
|
-
* Initialize
|
|
6
|
+
* Initialize oauth domain
|
|
7
7
|
*
|
|
8
8
|
* @param twilio - The twilio client
|
|
9
9
|
*/
|
|
10
10
|
constructor(twilio: any);
|
|
11
11
|
get v1(): V1;
|
|
12
12
|
}
|
|
13
|
-
export =
|
|
13
|
+
export = OauthBase;
|
|
@@ -13,19 +13,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
const Domain_1 = __importDefault(require("../base/Domain"));
|
|
16
|
-
const V1_1 = __importDefault(require("./
|
|
17
|
-
class
|
|
16
|
+
const V1_1 = __importDefault(require("./oauth/V1"));
|
|
17
|
+
class OauthBase extends Domain_1.default {
|
|
18
18
|
/**
|
|
19
|
-
* Initialize
|
|
19
|
+
* Initialize oauth domain
|
|
20
20
|
*
|
|
21
21
|
* @param twilio - The twilio client
|
|
22
22
|
*/
|
|
23
23
|
constructor(twilio) {
|
|
24
|
-
super(twilio, "https://
|
|
24
|
+
super(twilio, "https://oauth.twilio.com");
|
|
25
25
|
}
|
|
26
26
|
get v1() {
|
|
27
27
|
this._v1 = this._v1 || new V1_1.default(this);
|
|
28
28
|
return this._v1;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
module.exports =
|
|
31
|
+
module.exports = OauthBase;
|
package/lib/rest/Twilio.d.ts
CHANGED
|
@@ -12,13 +12,13 @@ import Insights from "./Insights";
|
|
|
12
12
|
import Intelligence from "./Intelligence";
|
|
13
13
|
import IpMessaging from "./IpMessaging";
|
|
14
14
|
import Lookups from "./Lookups";
|
|
15
|
-
import Media from "./Media";
|
|
16
15
|
import PreviewMessaging from "./PreviewMessaging";
|
|
17
16
|
import Messaging from "./Messaging";
|
|
18
17
|
import Microvisor from "./Microvisor";
|
|
19
18
|
import Monitor from "./Monitor";
|
|
20
19
|
import Notify from "./Notify";
|
|
21
20
|
import Numbers from "./Numbers";
|
|
21
|
+
import Oauth from "./Oauth";
|
|
22
22
|
import Preview from "./Preview";
|
|
23
23
|
import Pricing from "./Pricing";
|
|
24
24
|
import Proxy from "./Proxy";
|
|
@@ -88,8 +88,6 @@ declare class Twilio extends Client {
|
|
|
88
88
|
_ipMessaging?: IpMessaging;
|
|
89
89
|
/** (Twilio.Lookups) - lookups domain */
|
|
90
90
|
_lookups?: Lookups;
|
|
91
|
-
/** (Twilio.Media) - media domain */
|
|
92
|
-
_media?: Media;
|
|
93
91
|
/** (Twilio.PreviewMessaging) - previewMessaging domain */
|
|
94
92
|
_previewMessaging?: PreviewMessaging;
|
|
95
93
|
/** (Twilio.Messaging) - messaging domain */
|
|
@@ -102,6 +100,8 @@ declare class Twilio extends Client {
|
|
|
102
100
|
_notify?: Notify;
|
|
103
101
|
/** (Twilio.Numbers) - numbers domain */
|
|
104
102
|
_numbers?: Numbers;
|
|
103
|
+
/** (Twilio.Oauth) - oauth domain */
|
|
104
|
+
_oauth?: Oauth;
|
|
105
105
|
/** (Twilio.Preview) - preview domain */
|
|
106
106
|
_preview?: Preview;
|
|
107
107
|
/** (Twilio.Pricing) - pricing domain */
|
|
@@ -170,8 +170,6 @@ declare class Twilio extends Client {
|
|
|
170
170
|
get ipMessaging(): IpMessaging;
|
|
171
171
|
/** Getter for (Twilio.Lookups) domain */
|
|
172
172
|
get lookups(): Lookups;
|
|
173
|
-
/** Getter for (Twilio.Media) domain */
|
|
174
|
-
get media(): Media;
|
|
175
173
|
/** Getter for (Twilio.PreviewMessaging) domain */
|
|
176
174
|
get previewMessaging(): PreviewMessaging;
|
|
177
175
|
/** Getter for (Twilio.Messaging) domain */
|
|
@@ -184,6 +182,8 @@ declare class Twilio extends Client {
|
|
|
184
182
|
get notify(): Notify;
|
|
185
183
|
/** Getter for (Twilio.Numbers) domain */
|
|
186
184
|
get numbers(): Numbers;
|
|
185
|
+
/** Getter for (Twilio.Oauth) domain */
|
|
186
|
+
get oauth(): Oauth;
|
|
187
187
|
/** Getter for (Twilio.Preview) domain */
|
|
188
188
|
get preview(): Preview;
|
|
189
189
|
/** Getter for (Twilio.Pricing) domain */
|
package/lib/rest/Twilio.js
CHANGED
|
@@ -45,13 +45,13 @@ class Twilio extends BaseTwilio_1.Client {
|
|
|
45
45
|
this.intelligence;
|
|
46
46
|
this.ipMessaging;
|
|
47
47
|
this.lookups;
|
|
48
|
-
this.media;
|
|
49
48
|
this.previewMessaging;
|
|
50
49
|
this.messaging;
|
|
51
50
|
this.microvisor;
|
|
52
51
|
this.monitor;
|
|
53
52
|
this.notify;
|
|
54
53
|
this.numbers;
|
|
54
|
+
this.oauth;
|
|
55
55
|
this.preview;
|
|
56
56
|
this.pricing;
|
|
57
57
|
this.proxy;
|
|
@@ -127,10 +127,6 @@ class Twilio extends BaseTwilio_1.Client {
|
|
|
127
127
|
get lookups() {
|
|
128
128
|
return this._lookups ?? (this._lookups = new (require("./Lookups"))(this));
|
|
129
129
|
}
|
|
130
|
-
/** Getter for (Twilio.Media) domain */
|
|
131
|
-
get media() {
|
|
132
|
-
return this._media ?? (this._media = new (require("./Media"))(this));
|
|
133
|
-
}
|
|
134
130
|
/** Getter for (Twilio.PreviewMessaging) domain */
|
|
135
131
|
get previewMessaging() {
|
|
136
132
|
return (this._previewMessaging ??
|
|
@@ -157,6 +153,10 @@ class Twilio extends BaseTwilio_1.Client {
|
|
|
157
153
|
get numbers() {
|
|
158
154
|
return this._numbers ?? (this._numbers = new (require("./Numbers"))(this));
|
|
159
155
|
}
|
|
156
|
+
/** Getter for (Twilio.Oauth) domain */
|
|
157
|
+
get oauth() {
|
|
158
|
+
return this._oauth ?? (this._oauth = new (require("./Oauth"))(this));
|
|
159
|
+
}
|
|
160
160
|
/** Getter for (Twilio.Preview) domain */
|
|
161
161
|
get preview() {
|
|
162
162
|
return this._preview ?? (this._preview = new (require("./Preview"))(this));
|
|
@@ -124,10 +124,18 @@ export interface CallListInstanceEachOptions {
|
|
|
124
124
|
parentCallSid?: string;
|
|
125
125
|
/** The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. */
|
|
126
126
|
status?: CallStatus;
|
|
127
|
-
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in
|
|
127
|
+
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
|
|
128
128
|
startTime?: Date;
|
|
129
|
-
/** Only include calls that
|
|
129
|
+
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
|
|
130
|
+
startTimeBefore?: Date;
|
|
131
|
+
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
|
|
132
|
+
startTimeAfter?: Date;
|
|
133
|
+
/** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
|
|
130
134
|
endTime?: Date;
|
|
135
|
+
/** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
|
|
136
|
+
endTimeBefore?: Date;
|
|
137
|
+
/** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
|
|
138
|
+
endTimeAfter?: Date;
|
|
131
139
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
132
140
|
pageSize?: number;
|
|
133
141
|
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
@@ -149,10 +157,18 @@ export interface CallListInstanceOptions {
|
|
|
149
157
|
parentCallSid?: string;
|
|
150
158
|
/** The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. */
|
|
151
159
|
status?: CallStatus;
|
|
152
|
-
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in
|
|
160
|
+
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
|
|
153
161
|
startTime?: Date;
|
|
154
|
-
/** Only include calls that
|
|
162
|
+
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
|
|
163
|
+
startTimeBefore?: Date;
|
|
164
|
+
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
|
|
165
|
+
startTimeAfter?: Date;
|
|
166
|
+
/** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
|
|
155
167
|
endTime?: Date;
|
|
168
|
+
/** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
|
|
169
|
+
endTimeBefore?: Date;
|
|
170
|
+
/** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
|
|
171
|
+
endTimeAfter?: Date;
|
|
156
172
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
157
173
|
pageSize?: number;
|
|
158
174
|
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
@@ -170,10 +186,18 @@ export interface CallListInstancePageOptions {
|
|
|
170
186
|
parentCallSid?: string;
|
|
171
187
|
/** The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. */
|
|
172
188
|
status?: CallStatus;
|
|
173
|
-
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in
|
|
189
|
+
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
|
|
174
190
|
startTime?: Date;
|
|
175
|
-
/** Only include calls that
|
|
191
|
+
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
|
|
192
|
+
startTimeBefore?: Date;
|
|
193
|
+
/** Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. */
|
|
194
|
+
startTimeAfter?: Date;
|
|
195
|
+
/** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
|
|
176
196
|
endTime?: Date;
|
|
197
|
+
/** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
|
|
198
|
+
endTimeBefore?: Date;
|
|
199
|
+
/** Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. */
|
|
200
|
+
endTimeAfter?: Date;
|
|
177
201
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
178
202
|
pageSize?: number;
|
|
179
203
|
/** Page Number, this value is simply for client state */
|
|
@@ -306,11 +330,11 @@ export declare class CallInstance {
|
|
|
306
330
|
*/
|
|
307
331
|
sid: string;
|
|
308
332
|
/**
|
|
309
|
-
* The date and time in
|
|
333
|
+
* The date and time in UTC that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
310
334
|
*/
|
|
311
335
|
dateCreated: Date;
|
|
312
336
|
/**
|
|
313
|
-
* The date and time in
|
|
337
|
+
* The date and time in UTC that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
|
314
338
|
*/
|
|
315
339
|
dateUpdated: Date;
|
|
316
340
|
/**
|
|
@@ -343,11 +367,11 @@ export declare class CallInstance {
|
|
|
343
367
|
phoneNumberSid: string;
|
|
344
368
|
status: CallStatus;
|
|
345
369
|
/**
|
|
346
|
-
* The start time of the call, given as
|
|
370
|
+
* The start time of the call, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call has not yet been dialed.
|
|
347
371
|
*/
|
|
348
372
|
startTime: Date;
|
|
349
373
|
/**
|
|
350
|
-
* The time the call ended, given as
|
|
374
|
+
* The time the call ended, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call did not complete successfully.
|
|
351
375
|
*/
|
|
352
376
|
endTime: Date;
|
|
353
377
|
/**
|
|
@@ -436,8 +436,16 @@ function CallListInstance(version, accountSid) {
|
|
|
436
436
|
data["Status"] = params["status"];
|
|
437
437
|
if (params["startTime"] !== undefined)
|
|
438
438
|
data["StartTime"] = serialize.iso8601DateTime(params["startTime"]);
|
|
439
|
+
if (params["startTimeBefore"] !== undefined)
|
|
440
|
+
data["StartTime<"] = serialize.iso8601DateTime(params["startTimeBefore"]);
|
|
441
|
+
if (params["startTimeAfter"] !== undefined)
|
|
442
|
+
data["StartTime>"] = serialize.iso8601DateTime(params["startTimeAfter"]);
|
|
439
443
|
if (params["endTime"] !== undefined)
|
|
440
444
|
data["EndTime"] = serialize.iso8601DateTime(params["endTime"]);
|
|
445
|
+
if (params["endTimeBefore"] !== undefined)
|
|
446
|
+
data["EndTime<"] = serialize.iso8601DateTime(params["endTimeBefore"]);
|
|
447
|
+
if (params["endTimeAfter"] !== undefined)
|
|
448
|
+
data["EndTime>"] = serialize.iso8601DateTime(params["endTimeAfter"]);
|
|
441
449
|
if (params["pageSize"] !== undefined)
|
|
442
450
|
data["PageSize"] = params["pageSize"];
|
|
443
451
|
if (params.pageNumber !== undefined)
|
|
@@ -263,6 +263,7 @@ interface ParticipantResource {
|
|
|
263
263
|
hold: boolean;
|
|
264
264
|
start_conference_on_enter: boolean;
|
|
265
265
|
status: ParticipantStatus;
|
|
266
|
+
queue_time: string;
|
|
266
267
|
uri: string;
|
|
267
268
|
}
|
|
268
269
|
export declare class ParticipantInstance {
|
|
@@ -319,6 +320,10 @@ export declare class ParticipantInstance {
|
|
|
319
320
|
*/
|
|
320
321
|
startConferenceOnEnter: boolean;
|
|
321
322
|
status: ParticipantStatus;
|
|
323
|
+
/**
|
|
324
|
+
* The wait time in milliseconds before participant\'s call is placed. Only available in the response to a create participant request.
|
|
325
|
+
*/
|
|
326
|
+
queueTime: string;
|
|
322
327
|
/**
|
|
323
328
|
* The URI of the resource, relative to `https://api.twilio.com`.
|
|
324
329
|
*/
|
|
@@ -376,6 +381,7 @@ export declare class ParticipantInstance {
|
|
|
376
381
|
hold: boolean;
|
|
377
382
|
startConferenceOnEnter: boolean;
|
|
378
383
|
status: ParticipantStatus;
|
|
384
|
+
queueTime: string;
|
|
379
385
|
uri: string;
|
|
380
386
|
};
|
|
381
387
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
@@ -131,6 +131,7 @@ class ParticipantInstance {
|
|
|
131
131
|
this.hold = payload.hold;
|
|
132
132
|
this.startConferenceOnEnter = payload.start_conference_on_enter;
|
|
133
133
|
this.status = payload.status;
|
|
134
|
+
this.queueTime = payload.queue_time;
|
|
134
135
|
this.uri = payload.uri;
|
|
135
136
|
this._solution = {
|
|
136
137
|
accountSid,
|
|
@@ -187,6 +188,7 @@ class ParticipantInstance {
|
|
|
187
188
|
hold: this.hold,
|
|
188
189
|
startConferenceOnEnter: this.startConferenceOnEnter,
|
|
189
190
|
status: this.status,
|
|
191
|
+
queueTime: this.queueTime,
|
|
190
192
|
uri: this.uri,
|
|
191
193
|
};
|
|
192
194
|
}
|
|
@@ -25,8 +25,16 @@ export interface ConferenceContextUpdateOptions {
|
|
|
25
25
|
export interface ConferenceListInstanceEachOptions {
|
|
26
26
|
/** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
|
|
27
27
|
dateCreated?: Date;
|
|
28
|
+
/** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
|
|
29
|
+
dateCreatedBefore?: Date;
|
|
30
|
+
/** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
|
|
31
|
+
dateCreatedAfter?: Date;
|
|
28
32
|
/** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
|
|
29
33
|
dateUpdated?: Date;
|
|
34
|
+
/** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
|
|
35
|
+
dateUpdatedBefore?: Date;
|
|
36
|
+
/** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
|
|
37
|
+
dateUpdatedAfter?: Date;
|
|
30
38
|
/** The string that identifies the Conference resources to read. */
|
|
31
39
|
friendlyName?: string;
|
|
32
40
|
/** The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. */
|
|
@@ -46,8 +54,16 @@ export interface ConferenceListInstanceEachOptions {
|
|
|
46
54
|
export interface ConferenceListInstanceOptions {
|
|
47
55
|
/** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
|
|
48
56
|
dateCreated?: Date;
|
|
57
|
+
/** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
|
|
58
|
+
dateCreatedBefore?: Date;
|
|
59
|
+
/** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
|
|
60
|
+
dateCreatedAfter?: Date;
|
|
49
61
|
/** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
|
|
50
62
|
dateUpdated?: Date;
|
|
63
|
+
/** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
|
|
64
|
+
dateUpdatedBefore?: Date;
|
|
65
|
+
/** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
|
|
66
|
+
dateUpdatedAfter?: Date;
|
|
51
67
|
/** The string that identifies the Conference resources to read. */
|
|
52
68
|
friendlyName?: string;
|
|
53
69
|
/** The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. */
|
|
@@ -63,8 +79,16 @@ export interface ConferenceListInstanceOptions {
|
|
|
63
79
|
export interface ConferenceListInstancePageOptions {
|
|
64
80
|
/** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
|
|
65
81
|
dateCreated?: Date;
|
|
82
|
+
/** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
|
|
83
|
+
dateCreatedBefore?: Date;
|
|
84
|
+
/** The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. */
|
|
85
|
+
dateCreatedAfter?: Date;
|
|
66
86
|
/** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
|
|
67
87
|
dateUpdated?: Date;
|
|
88
|
+
/** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
|
|
89
|
+
dateUpdatedBefore?: Date;
|
|
90
|
+
/** The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. */
|
|
91
|
+
dateUpdatedAfter?: Date;
|
|
68
92
|
/** The string that identifies the Conference resources to read. */
|
|
69
93
|
friendlyName?: string;
|
|
70
94
|
/** The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. */
|
|
@@ -195,8 +195,16 @@ function ConferenceListInstance(version, accountSid) {
|
|
|
195
195
|
let data = {};
|
|
196
196
|
if (params["dateCreated"] !== undefined)
|
|
197
197
|
data["DateCreated"] = serialize.iso8601Date(params["dateCreated"]);
|
|
198
|
+
if (params["dateCreatedBefore"] !== undefined)
|
|
199
|
+
data["DateCreated<"] = serialize.iso8601Date(params["dateCreatedBefore"]);
|
|
200
|
+
if (params["dateCreatedAfter"] !== undefined)
|
|
201
|
+
data["DateCreated>"] = serialize.iso8601Date(params["dateCreatedAfter"]);
|
|
198
202
|
if (params["dateUpdated"] !== undefined)
|
|
199
203
|
data["DateUpdated"] = serialize.iso8601Date(params["dateUpdated"]);
|
|
204
|
+
if (params["dateUpdatedBefore"] !== undefined)
|
|
205
|
+
data["DateUpdated<"] = serialize.iso8601Date(params["dateUpdatedBefore"]);
|
|
206
|
+
if (params["dateUpdatedAfter"] !== undefined)
|
|
207
|
+
data["DateUpdated>"] = serialize.iso8601Date(params["dateUpdatedAfter"]);
|
|
200
208
|
if (params["friendlyName"] !== undefined)
|
|
201
209
|
data["FriendlyName"] = params["friendlyName"];
|
|
202
210
|
if (params["status"] !== undefined)
|
|
@@ -82,6 +82,10 @@ export interface MessageListInstanceEachOptions {
|
|
|
82
82
|
from?: string;
|
|
83
83
|
/** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
|
|
84
84
|
dateSent?: Date;
|
|
85
|
+
/** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
|
|
86
|
+
dateSentBefore?: Date;
|
|
87
|
+
/** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
|
|
88
|
+
dateSentAfter?: Date;
|
|
85
89
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
86
90
|
pageSize?: number;
|
|
87
91
|
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
@@ -101,6 +105,10 @@ export interface MessageListInstanceOptions {
|
|
|
101
105
|
from?: string;
|
|
102
106
|
/** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
|
|
103
107
|
dateSent?: Date;
|
|
108
|
+
/** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
|
|
109
|
+
dateSentBefore?: Date;
|
|
110
|
+
/** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
|
|
111
|
+
dateSentAfter?: Date;
|
|
104
112
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
105
113
|
pageSize?: number;
|
|
106
114
|
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
@@ -116,6 +124,10 @@ export interface MessageListInstancePageOptions {
|
|
|
116
124
|
from?: string;
|
|
117
125
|
/** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
|
|
118
126
|
dateSent?: Date;
|
|
127
|
+
/** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
|
|
128
|
+
dateSentBefore?: Date;
|
|
129
|
+
/** Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date). */
|
|
130
|
+
dateSentAfter?: Date;
|
|
119
131
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
120
132
|
pageSize?: number;
|
|
121
133
|
/** Page Number, this value is simply for client state */
|
|
@@ -297,6 +297,10 @@ function MessageListInstance(version, accountSid) {
|
|
|
297
297
|
data["From"] = params["from"];
|
|
298
298
|
if (params["dateSent"] !== undefined)
|
|
299
299
|
data["DateSent"] = serialize.iso8601DateTime(params["dateSent"]);
|
|
300
|
+
if (params["dateSentBefore"] !== undefined)
|
|
301
|
+
data["DateSent<"] = serialize.iso8601DateTime(params["dateSentBefore"]);
|
|
302
|
+
if (params["dateSentAfter"] !== undefined)
|
|
303
|
+
data["DateSent>"] = serialize.iso8601DateTime(params["dateSentAfter"]);
|
|
300
304
|
if (params["pageSize"] !== undefined)
|
|
301
305
|
data["PageSize"] = params["pageSize"];
|
|
302
306
|
if (params.pageNumber !== undefined)
|
|
@@ -22,7 +22,7 @@ export interface ApprovalCreateListInstanceCreateOptions {
|
|
|
22
22
|
contentApprovalRequest: ContentApprovalRequest;
|
|
23
23
|
}
|
|
24
24
|
export interface ApprovalCreateSolution {
|
|
25
|
-
|
|
25
|
+
contentSid: string;
|
|
26
26
|
}
|
|
27
27
|
export interface ApprovalCreateListInstance {
|
|
28
28
|
_version: V1;
|
|
@@ -43,7 +43,7 @@ export interface ApprovalCreateListInstance {
|
|
|
43
43
|
toJSON(): any;
|
|
44
44
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
45
45
|
}
|
|
46
|
-
export declare function ApprovalCreateListInstance(version: V1,
|
|
46
|
+
export declare function ApprovalCreateListInstance(version: V1, contentSid: string): ApprovalCreateListInstance;
|
|
47
47
|
interface ApprovalCreateResource {
|
|
48
48
|
name: string;
|
|
49
49
|
category: string;
|
|
@@ -54,7 +54,7 @@ interface ApprovalCreateResource {
|
|
|
54
54
|
}
|
|
55
55
|
export declare class ApprovalCreateInstance {
|
|
56
56
|
protected _version: V1;
|
|
57
|
-
constructor(_version: V1, payload: ApprovalCreateResource,
|
|
57
|
+
constructor(_version: V1, payload: ApprovalCreateResource, contentSid: string);
|
|
58
58
|
name: string;
|
|
59
59
|
category: string;
|
|
60
60
|
contentType: string;
|
|
@@ -24,14 +24,14 @@ const utility_1 = require("../../../../base/utility");
|
|
|
24
24
|
class ContentApprovalRequest {
|
|
25
25
|
}
|
|
26
26
|
exports.ContentApprovalRequest = ContentApprovalRequest;
|
|
27
|
-
function ApprovalCreateListInstance(version,
|
|
28
|
-
if (!(0, utility_1.isValidPathParam)(
|
|
29
|
-
throw new Error("Parameter '
|
|
27
|
+
function ApprovalCreateListInstance(version, contentSid) {
|
|
28
|
+
if (!(0, utility_1.isValidPathParam)(contentSid)) {
|
|
29
|
+
throw new Error("Parameter 'contentSid' is not valid.");
|
|
30
30
|
}
|
|
31
31
|
const instance = {};
|
|
32
32
|
instance._version = version;
|
|
33
|
-
instance._solution = {
|
|
34
|
-
instance._uri = `/Content/${
|
|
33
|
+
instance._solution = { contentSid };
|
|
34
|
+
instance._uri = `/Content/${contentSid}/ApprovalRequests/whatsapp`;
|
|
35
35
|
instance.create = function create(params, callback) {
|
|
36
36
|
if (params === null || params === undefined) {
|
|
37
37
|
throw new Error('Required parameter "params" missing.');
|
|
@@ -46,7 +46,7 @@ function ApprovalCreateListInstance(version, sid) {
|
|
|
46
46
|
data,
|
|
47
47
|
headers,
|
|
48
48
|
});
|
|
49
|
-
operationPromise = operationPromise.then((payload) => new ApprovalCreateInstance(operationVersion, payload, instance._solution.
|
|
49
|
+
operationPromise = operationPromise.then((payload) => new ApprovalCreateInstance(operationVersion, payload, instance._solution.contentSid));
|
|
50
50
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
51
51
|
return operationPromise;
|
|
52
52
|
};
|
|
@@ -60,7 +60,7 @@ function ApprovalCreateListInstance(version, sid) {
|
|
|
60
60
|
}
|
|
61
61
|
exports.ApprovalCreateListInstance = ApprovalCreateListInstance;
|
|
62
62
|
class ApprovalCreateInstance {
|
|
63
|
-
constructor(_version, payload,
|
|
63
|
+
constructor(_version, payload, contentSid) {
|
|
64
64
|
this._version = _version;
|
|
65
65
|
this.name = payload.name;
|
|
66
66
|
this.category = payload.category;
|
|
@@ -17,13 +17,13 @@ export interface ApprovalFetchContext {
|
|
|
17
17
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
18
18
|
}
|
|
19
19
|
export interface ApprovalFetchContextSolution {
|
|
20
|
-
|
|
20
|
+
contentSid: string;
|
|
21
21
|
}
|
|
22
22
|
export declare class ApprovalFetchContextImpl implements ApprovalFetchContext {
|
|
23
23
|
protected _version: V1;
|
|
24
24
|
protected _solution: ApprovalFetchContextSolution;
|
|
25
25
|
protected _uri: string;
|
|
26
|
-
constructor(_version: V1,
|
|
26
|
+
constructor(_version: V1, contentSid: string);
|
|
27
27
|
fetch(callback?: (error: Error | null, item?: ApprovalFetchInstance) => any): Promise<ApprovalFetchInstance>;
|
|
28
28
|
/**
|
|
29
29
|
* Provide a user-friendly representation
|
|
@@ -43,7 +43,7 @@ export declare class ApprovalFetchInstance {
|
|
|
43
43
|
protected _version: V1;
|
|
44
44
|
protected _solution: ApprovalFetchContextSolution;
|
|
45
45
|
protected _context?: ApprovalFetchContext;
|
|
46
|
-
constructor(_version: V1, payload: ApprovalFetchResource,
|
|
46
|
+
constructor(_version: V1, payload: ApprovalFetchResource, contentSid: string);
|
|
47
47
|
/**
|
|
48
48
|
* The unique string that that we created to identify the Content resource.
|
|
49
49
|
*/
|
|
@@ -83,7 +83,7 @@ export declare class ApprovalFetchInstance {
|
|
|
83
83
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
84
84
|
}
|
|
85
85
|
export interface ApprovalFetchSolution {
|
|
86
|
-
|
|
86
|
+
contentSid: string;
|
|
87
87
|
}
|
|
88
88
|
export interface ApprovalFetchListInstance {
|
|
89
89
|
_version: V1;
|
|
@@ -97,5 +97,5 @@ export interface ApprovalFetchListInstance {
|
|
|
97
97
|
toJSON(): any;
|
|
98
98
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
99
99
|
}
|
|
100
|
-
export declare function ApprovalFetchListInstance(version: V1,
|
|
100
|
+
export declare function ApprovalFetchListInstance(version: V1, contentSid: string): ApprovalFetchListInstance;
|
|
101
101
|
export {};
|
|
@@ -19,13 +19,13 @@ const deserialize = require("../../../../base/deserialize");
|
|
|
19
19
|
const serialize = require("../../../../base/serialize");
|
|
20
20
|
const utility_1 = require("../../../../base/utility");
|
|
21
21
|
class ApprovalFetchContextImpl {
|
|
22
|
-
constructor(_version,
|
|
22
|
+
constructor(_version, contentSid) {
|
|
23
23
|
this._version = _version;
|
|
24
|
-
if (!(0, utility_1.isValidPathParam)(
|
|
25
|
-
throw new Error("Parameter '
|
|
24
|
+
if (!(0, utility_1.isValidPathParam)(contentSid)) {
|
|
25
|
+
throw new Error("Parameter 'contentSid' is not valid.");
|
|
26
26
|
}
|
|
27
|
-
this._solution = {
|
|
28
|
-
this._uri = `/Content/${
|
|
27
|
+
this._solution = { contentSid };
|
|
28
|
+
this._uri = `/Content/${contentSid}/ApprovalRequests`;
|
|
29
29
|
}
|
|
30
30
|
fetch(callback) {
|
|
31
31
|
const instance = this;
|
|
@@ -33,7 +33,7 @@ class ApprovalFetchContextImpl {
|
|
|
33
33
|
uri: instance._uri,
|
|
34
34
|
method: "get",
|
|
35
35
|
});
|
|
36
|
-
operationPromise = operationPromise.then((payload) => new ApprovalFetchInstance(operationVersion, payload, instance._solution.
|
|
36
|
+
operationPromise = operationPromise.then((payload) => new ApprovalFetchInstance(operationVersion, payload, instance._solution.contentSid));
|
|
37
37
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
38
38
|
return operationPromise;
|
|
39
39
|
}
|
|
@@ -51,18 +51,18 @@ class ApprovalFetchContextImpl {
|
|
|
51
51
|
}
|
|
52
52
|
exports.ApprovalFetchContextImpl = ApprovalFetchContextImpl;
|
|
53
53
|
class ApprovalFetchInstance {
|
|
54
|
-
constructor(_version, payload,
|
|
54
|
+
constructor(_version, payload, contentSid) {
|
|
55
55
|
this._version = _version;
|
|
56
56
|
this.sid = payload.sid;
|
|
57
57
|
this.accountSid = payload.account_sid;
|
|
58
58
|
this.whatsapp = payload.whatsapp;
|
|
59
59
|
this.url = payload.url;
|
|
60
|
-
this._solution = {
|
|
60
|
+
this._solution = { contentSid };
|
|
61
61
|
}
|
|
62
62
|
get _proxy() {
|
|
63
63
|
this._context =
|
|
64
64
|
this._context ||
|
|
65
|
-
new ApprovalFetchContextImpl(this._version, this._solution.
|
|
65
|
+
new ApprovalFetchContextImpl(this._version, this._solution.contentSid);
|
|
66
66
|
return this._context;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
@@ -93,16 +93,16 @@ class ApprovalFetchInstance {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
exports.ApprovalFetchInstance = ApprovalFetchInstance;
|
|
96
|
-
function ApprovalFetchListInstance(version,
|
|
97
|
-
if (!(0, utility_1.isValidPathParam)(
|
|
98
|
-
throw new Error("Parameter '
|
|
96
|
+
function ApprovalFetchListInstance(version, contentSid) {
|
|
97
|
+
if (!(0, utility_1.isValidPathParam)(contentSid)) {
|
|
98
|
+
throw new Error("Parameter 'contentSid' is not valid.");
|
|
99
99
|
}
|
|
100
100
|
const instance = (() => instance.get());
|
|
101
101
|
instance.get = function get() {
|
|
102
|
-
return new ApprovalFetchContextImpl(version,
|
|
102
|
+
return new ApprovalFetchContextImpl(version, contentSid);
|
|
103
103
|
};
|
|
104
104
|
instance._version = version;
|
|
105
|
-
instance._solution = {
|
|
105
|
+
instance._solution = { contentSid };
|
|
106
106
|
instance._uri = ``;
|
|
107
107
|
instance.toJSON = function toJSON() {
|
|
108
108
|
return instance._solution;
|