Skip to content

Commit a9c901f

Browse files
committed
[Librarian] Regenerated @ fffff4e2a9903902262deb482f4cefeb44c2d081
1 parent 972358a commit a9c901f

21 files changed

+781
-126
lines changed

CHANGES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
twilio-node changelog
22
=====================
33

4+
[2023-05-18] Version 4.11.1
5+
---------------------------
6+
**Conversations**
7+
- Added `AddressCountry` parameter to Address Configuration endpoint, to support regional short code addresses
8+
- Added query parameters `start_date`, `end_date` and `state` in list Conversations resource for filtering
9+
10+
**Insights**
11+
- Added annotations parameters to list summary api
12+
13+
**Messaging**
14+
- Add GET domainByMessagingService endpoint to linkShortening service
15+
- Add `disable_https` to link shortening domain_config properties
16+
17+
**Numbers**
18+
- Add bulk_eligibility api under version `/v1`.
19+
20+
421
[2023-05-04] Version 4.11.0
522
---------------------------
623
**Library - Docs**

src/rest/NumbersBase.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
*/
1111

1212
import Domain from "../base/Domain";
13+
import V1 from "./numbers/V1";
1314
import V2 from "./numbers/V2";
1415

1516
class NumbersBase extends Domain {
17+
_v1?: V1;
1618
_v2?: V2;
1719

1820
/**
@@ -24,6 +26,10 @@ class NumbersBase extends Domain {
2426
super(twilio, "https://numbers.twilio.com");
2527
}
2628

29+
get v1(): V1 {
30+
this._v1 = this._v1 || new V1(this);
31+
return this._v1;
32+
}
2733
get v2(): V2 {
2834
this._v2 = this._v2 || new V2(this);
2935
return this._v2;

src/rest/conversations/v1/addressConfiguration.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ export interface AddressConfigurationListInstanceCreateOptions {
7979
"autoCreation.studioFlowSid"?: string;
8080
/** For type `studio`, number of times to retry the webhook request */
8181
"autoCreation.studioRetryCount"?: number;
82+
/** An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses. */
83+
addressCountry?: string;
8284
}
8385
/**
8486
* Options to pass to each
@@ -337,6 +339,7 @@ interface AddressConfigurationResource {
337339
date_created: Date;
338340
date_updated: Date;
339341
url: string;
342+
address_country: string;
340343
}
341344

342345
export class AddressConfigurationInstance {
@@ -357,6 +360,7 @@ export class AddressConfigurationInstance {
357360
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
358361
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
359362
this.url = payload.url;
363+
this.addressCountry = payload.address_country;
360364

361365
this._solution = { sid: sid || this.sid };
362366
}
@@ -397,6 +401,10 @@ export class AddressConfigurationInstance {
397401
* An absolute API resource URL for this address configuration.
398402
*/
399403
url: string;
404+
/**
405+
* An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses.
406+
*/
407+
addressCountry: string;
400408

401409
private get _proxy(): AddressConfigurationContext {
402410
this._context =
@@ -477,6 +485,7 @@ export class AddressConfigurationInstance {
477485
dateCreated: this.dateCreated,
478486
dateUpdated: this.dateUpdated,
479487
url: this.url,
488+
addressCountry: this.addressCountry,
480489
};
481490
}
482491

@@ -656,6 +665,8 @@ export function AddressConfigurationListInstance(
656665
if (params["autoCreation.studioRetryCount"] !== undefined)
657666
data["AutoCreation.StudioRetryCount"] =
658667
params["autoCreation.studioRetryCount"];
668+
if (params["addressCountry"] !== undefined)
669+
data["AddressCountry"] = params["addressCountry"];
659670

660671
const headers: any = {};
661672
headers["Content-Type"] = "application/x-www-form-urlencoded";

src/rest/conversations/v1/conversation.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ export interface ConversationListInstanceCreateOptions {
9090
* Options to pass to each
9191
*/
9292
export interface ConversationListInstanceEachOptions {
93+
/** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
94+
startDate?: string;
95+
/** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
96+
endDate?: string;
97+
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
98+
state?: ConversationState;
9399
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
94100
pageSize?: number;
95101
/** Function to process each record. If this and a positional callback are passed, this one will be used */
@@ -104,6 +110,12 @@ export interface ConversationListInstanceEachOptions {
104110
* Options to pass to list
105111
*/
106112
export interface ConversationListInstanceOptions {
113+
/** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
114+
startDate?: string;
115+
/** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
116+
endDate?: string;
117+
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
118+
state?: ConversationState;
107119
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
108120
pageSize?: number;
109121
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
@@ -114,6 +126,12 @@ export interface ConversationListInstanceOptions {
114126
* Options to pass to page
115127
*/
116128
export interface ConversationListInstancePageOptions {
129+
/** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
130+
startDate?: string;
131+
/** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
132+
endDate?: string;
133+
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
134+
state?: ConversationState;
117135
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
118136
pageSize?: number;
119137
/** Page Number, this value is simply for client state */
@@ -792,6 +810,10 @@ export function ConversationListInstance(
792810

793811
let data: any = {};
794812

813+
if (params["startDate"] !== undefined)
814+
data["StartDate"] = params["startDate"];
815+
if (params["endDate"] !== undefined) data["EndDate"] = params["endDate"];
816+
if (params["state"] !== undefined) data["State"] = params["state"];
795817
if (params["pageSize"] !== undefined) data["PageSize"] = params["pageSize"];
796818

797819
if (params.pageNumber !== undefined) data["Page"] = params.pageNumber;

src/rest/conversations/v1/service/conversation.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ export interface ConversationListInstanceCreateOptions {
9090
* Options to pass to each
9191
*/
9292
export interface ConversationListInstanceEachOptions {
93+
/** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
94+
startDate?: string;
95+
/** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
96+
endDate?: string;
97+
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
98+
state?: ConversationState;
9399
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
94100
pageSize?: number;
95101
/** Function to process each record. If this and a positional callback are passed, this one will be used */
@@ -104,6 +110,12 @@ export interface ConversationListInstanceEachOptions {
104110
* Options to pass to list
105111
*/
106112
export interface ConversationListInstanceOptions {
113+
/** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
114+
startDate?: string;
115+
/** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
116+
endDate?: string;
117+
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
118+
state?: ConversationState;
107119
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
108120
pageSize?: number;
109121
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
@@ -114,6 +126,12 @@ export interface ConversationListInstanceOptions {
114126
* Options to pass to page
115127
*/
116128
export interface ConversationListInstancePageOptions {
129+
/** Start date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the start time of the date is used (YYYY-MM-DDT00:00:00Z). Can be combined with other filters. */
130+
startDate?: string;
131+
/** End date or time in ISO8601 format for filtering list of Conversations. If a date is provided, the end time of the date is used (YYYY-MM-DDT23:59:59Z). Can be combined with other filters. */
132+
endDate?: string;
133+
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
134+
state?: ConversationState;
117135
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
118136
pageSize?: number;
119137
/** Page Number, this value is simply for client state */
@@ -830,6 +848,10 @@ export function ConversationListInstance(
830848

831849
let data: any = {};
832850

851+
if (params["startDate"] !== undefined)
852+
data["StartDate"] = params["startDate"];
853+
if (params["endDate"] !== undefined) data["EndDate"] = params["endDate"];
854+
if (params["state"] !== undefined) data["State"] = params["state"];
833855
if (params["pageSize"] !== undefined) data["PageSize"] = params["pageSize"];
834856

835857
if (params.pageNumber !== undefined) data["Page"] = params.pageNumber;

src/rest/flexApi/v1/assessments.ts

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export interface AssessmentsContextUpdateOptions {
3030
answerText: string;
3131
/** The id of the answer selected by user */
3232
answerId: string;
33-
/** The Token HTTP request header */
34-
token?: string;
33+
/** The Authorization HTTP request header */
34+
authorization?: string;
3535
}
3636

3737
/**
@@ -44,10 +44,6 @@ export interface AssessmentsListInstanceCreateOptions {
4444
categoryName: string;
4545
/** Segment Id of the conversation */
4646
segmentId: string;
47-
/** Name of the user assessing conversation */
48-
userName: string;
49-
/** Email of the user assessing conversation */
50-
userEmail: string;
5147
/** The id of the Agent */
5248
agentId: string;
5349
/** The offset of the conversation. */
@@ -62,15 +58,15 @@ export interface AssessmentsListInstanceCreateOptions {
6258
answerId: string;
6359
/** Questionnaire SID of the associated question */
6460
questionnaireSid: string;
65-
/** The Token HTTP request header */
66-
token?: string;
61+
/** The Authorization HTTP request header */
62+
authorization?: string;
6763
}
6864
/**
6965
* Options to pass to each
7066
*/
7167
export interface AssessmentsListInstanceEachOptions {
72-
/** The Token HTTP request header */
73-
token?: string;
68+
/** The Authorization HTTP request header */
69+
authorization?: string;
7470
/** The id of the segment. */
7571
segmentId?: string;
7672
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
@@ -87,8 +83,8 @@ export interface AssessmentsListInstanceEachOptions {
8783
* Options to pass to list
8884
*/
8985
export interface AssessmentsListInstanceOptions {
90-
/** The Token HTTP request header */
91-
token?: string;
86+
/** The Authorization HTTP request header */
87+
authorization?: string;
9288
/** The id of the segment. */
9389
segmentId?: string;
9490
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
@@ -101,8 +97,8 @@ export interface AssessmentsListInstanceOptions {
10197
* Options to pass to page
10298
*/
10399
export interface AssessmentsListInstancePageOptions {
104-
/** The Token HTTP request header */
105-
token?: string;
100+
/** The Authorization HTTP request header */
101+
authorization?: string;
106102
/** The id of the segment. */
107103
segmentId?: string;
108104
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
@@ -181,7 +177,8 @@ export class AssessmentsContextImpl implements AssessmentsContext {
181177

182178
const headers: any = {};
183179
headers["Content-Type"] = "application/x-www-form-urlencoded";
184-
if (params["token"] !== undefined) headers["Token"] = params["token"];
180+
if (params["authorization"] !== undefined)
181+
headers["Authorization"] = params["authorization"];
185182

186183
const instance = this;
187184
let operationVersion = instance._version,
@@ -511,14 +508,6 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance {
511508
throw new Error("Required parameter \"params['segmentId']\" missing.");
512509
}
513510

514-
if (params["userName"] === null || params["userName"] === undefined) {
515-
throw new Error("Required parameter \"params['userName']\" missing.");
516-
}
517-
518-
if (params["userEmail"] === null || params["userEmail"] === undefined) {
519-
throw new Error("Required parameter \"params['userEmail']\" missing.");
520-
}
521-
522511
if (params["agentId"] === null || params["agentId"] === undefined) {
523512
throw new Error("Required parameter \"params['agentId']\" missing.");
524513
}
@@ -560,10 +549,6 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance {
560549

561550
data["SegmentId"] = params["segmentId"];
562551

563-
data["UserName"] = params["userName"];
564-
565-
data["UserEmail"] = params["userEmail"];
566-
567552
data["AgentId"] = params["agentId"];
568553

569554
data["Offset"] = params["offset"];
@@ -580,7 +565,8 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance {
580565

581566
const headers: any = {};
582567
headers["Content-Type"] = "application/x-www-form-urlencoded";
583-
if (params["token"] !== undefined) headers["Token"] = params["token"];
568+
if (params["authorization"] !== undefined)
569+
headers["Authorization"] = params["authorization"];
584570

585571
let operationVersion = version,
586572
operationPromise = operationVersion.create({
@@ -624,7 +610,8 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance {
624610
if (params.pageToken !== undefined) data["PageToken"] = params.pageToken;
625611

626612
const headers: any = {};
627-
if (params["token"] !== undefined) headers["Token"] = params["token"];
613+
if (params["authorization"] !== undefined)
614+
headers["Authorization"] = params["authorization"];
628615

629616
let operationVersion = version,
630617
operationPromise = operationVersion.page({

0 commit comments

Comments
 (0)