Skip to content

Commit

Permalink
[Librarian] Regenerated @ fffff4e2a9903902262deb482f4cefeb44c2d081
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed May 18, 2023
1 parent 972358a commit a9c901f
Show file tree
Hide file tree
Showing 21 changed files with 781 additions and 126 deletions.
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
twilio-node changelog
=====================

[2023-05-18] Version 4.11.1
---------------------------
**Conversations**
- Added `AddressCountry` parameter to Address Configuration endpoint, to support regional short code addresses
- Added query parameters `start_date`, `end_date` and `state` in list Conversations resource for filtering

**Insights**
- Added annotations parameters to list summary api

**Messaging**
- Add GET domainByMessagingService endpoint to linkShortening service
- Add `disable_https` to link shortening domain_config properties

**Numbers**
- Add bulk_eligibility api under version `/v1`.


[2023-05-04] Version 4.11.0
---------------------------
**Library - Docs**
Expand Down
6 changes: 6 additions & 0 deletions src/rest/NumbersBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
*/

import Domain from "../base/Domain";
import V1 from "./numbers/V1";
import V2 from "./numbers/V2";

class NumbersBase extends Domain {
_v1?: V1;
_v2?: V2;

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

get v1(): V1 {
this._v1 = this._v1 || new V1(this);
return this._v1;
}
get v2(): V2 {
this._v2 = this._v2 || new V2(this);
return this._v2;
Expand Down
11 changes: 11 additions & 0 deletions src/rest/conversations/v1/addressConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ export interface AddressConfigurationListInstanceCreateOptions {
"autoCreation.studioFlowSid"?: string;
/** For type `studio`, number of times to retry the webhook request */
"autoCreation.studioRetryCount"?: number;
/** An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses. */
addressCountry?: string;
}
/**
* Options to pass to each
Expand Down Expand Up @@ -337,6 +339,7 @@ interface AddressConfigurationResource {
date_created: Date;
date_updated: Date;
url: string;
address_country: string;
}

export class AddressConfigurationInstance {
Expand All @@ -357,6 +360,7 @@ export class AddressConfigurationInstance {
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
this.url = payload.url;
this.addressCountry = payload.address_country;

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

private get _proxy(): AddressConfigurationContext {
this._context =
Expand Down Expand Up @@ -477,6 +485,7 @@ export class AddressConfigurationInstance {
dateCreated: this.dateCreated,
dateUpdated: this.dateUpdated,
url: this.url,
addressCountry: this.addressCountry,
};
}

Expand Down Expand Up @@ -656,6 +665,8 @@ export function AddressConfigurationListInstance(
if (params["autoCreation.studioRetryCount"] !== undefined)
data["AutoCreation.StudioRetryCount"] =
params["autoCreation.studioRetryCount"];
if (params["addressCountry"] !== undefined)
data["AddressCountry"] = params["addressCountry"];

const headers: any = {};
headers["Content-Type"] = "application/x-www-form-urlencoded";
Expand Down
22 changes: 22 additions & 0 deletions src/rest/conversations/v1/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ export interface ConversationListInstanceCreateOptions {
* Options to pass to each
*/
export interface ConversationListInstanceEachOptions {
/** 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. */
startDate?: string;
/** 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. */
endDate?: string;
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
state?: ConversationState;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
/** Function to process each record. If this and a positional callback are passed, this one will be used */
Expand All @@ -104,6 +110,12 @@ export interface ConversationListInstanceEachOptions {
* Options to pass to list
*/
export interface ConversationListInstanceOptions {
/** 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. */
startDate?: string;
/** 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. */
endDate?: string;
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
state?: ConversationState;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
Expand All @@ -114,6 +126,12 @@ export interface ConversationListInstanceOptions {
* Options to pass to page
*/
export interface ConversationListInstancePageOptions {
/** 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. */
startDate?: string;
/** 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. */
endDate?: string;
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
state?: ConversationState;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
/** Page Number, this value is simply for client state */
Expand Down Expand Up @@ -792,6 +810,10 @@ export function ConversationListInstance(

let data: any = {};

if (params["startDate"] !== undefined)
data["StartDate"] = params["startDate"];
if (params["endDate"] !== undefined) data["EndDate"] = params["endDate"];
if (params["state"] !== undefined) data["State"] = params["state"];
if (params["pageSize"] !== undefined) data["PageSize"] = params["pageSize"];

if (params.pageNumber !== undefined) data["Page"] = params.pageNumber;
Expand Down
22 changes: 22 additions & 0 deletions src/rest/conversations/v1/service/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ export interface ConversationListInstanceCreateOptions {
* Options to pass to each
*/
export interface ConversationListInstanceEachOptions {
/** 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. */
startDate?: string;
/** 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. */
endDate?: string;
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
state?: ConversationState;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
/** Function to process each record. If this and a positional callback are passed, this one will be used */
Expand All @@ -104,6 +110,12 @@ export interface ConversationListInstanceEachOptions {
* Options to pass to list
*/
export interface ConversationListInstanceOptions {
/** 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. */
startDate?: string;
/** 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. */
endDate?: string;
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
state?: ConversationState;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
Expand All @@ -114,6 +126,12 @@ export interface ConversationListInstanceOptions {
* Options to pass to page
*/
export interface ConversationListInstancePageOptions {
/** 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. */
startDate?: string;
/** 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. */
endDate?: string;
/** State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed` */
state?: ConversationState;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
pageSize?: number;
/** Page Number, this value is simply for client state */
Expand Down Expand Up @@ -830,6 +848,10 @@ export function ConversationListInstance(

let data: any = {};

if (params["startDate"] !== undefined)
data["StartDate"] = params["startDate"];
if (params["endDate"] !== undefined) data["EndDate"] = params["endDate"];
if (params["state"] !== undefined) data["State"] = params["state"];
if (params["pageSize"] !== undefined) data["PageSize"] = params["pageSize"];

if (params.pageNumber !== undefined) data["Page"] = params.pageNumber;
Expand Down
45 changes: 16 additions & 29 deletions src/rest/flexApi/v1/assessments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export interface AssessmentsContextUpdateOptions {
answerText: string;
/** The id of the answer selected by user */
answerId: string;
/** The Token HTTP request header */
token?: string;
/** The Authorization HTTP request header */
authorization?: string;
}

/**
Expand All @@ -44,10 +44,6 @@ export interface AssessmentsListInstanceCreateOptions {
categoryName: string;
/** Segment Id of the conversation */
segmentId: string;
/** Name of the user assessing conversation */
userName: string;
/** Email of the user assessing conversation */
userEmail: string;
/** The id of the Agent */
agentId: string;
/** The offset of the conversation. */
Expand All @@ -62,15 +58,15 @@ export interface AssessmentsListInstanceCreateOptions {
answerId: string;
/** Questionnaire SID of the associated question */
questionnaireSid: string;
/** The Token HTTP request header */
token?: string;
/** The Authorization HTTP request header */
authorization?: string;
}
/**
* Options to pass to each
*/
export interface AssessmentsListInstanceEachOptions {
/** The Token HTTP request header */
token?: string;
/** The Authorization HTTP request header */
authorization?: string;
/** The id of the segment. */
segmentId?: string;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
Expand All @@ -87,8 +83,8 @@ export interface AssessmentsListInstanceEachOptions {
* Options to pass to list
*/
export interface AssessmentsListInstanceOptions {
/** The Token HTTP request header */
token?: string;
/** The Authorization HTTP request header */
authorization?: string;
/** The id of the segment. */
segmentId?: string;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
Expand All @@ -101,8 +97,8 @@ export interface AssessmentsListInstanceOptions {
* Options to pass to page
*/
export interface AssessmentsListInstancePageOptions {
/** The Token HTTP request header */
token?: string;
/** The Authorization HTTP request header */
authorization?: string;
/** The id of the segment. */
segmentId?: string;
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
Expand Down Expand Up @@ -181,7 +177,8 @@ export class AssessmentsContextImpl implements AssessmentsContext {

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

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

if (params["userName"] === null || params["userName"] === undefined) {
throw new Error("Required parameter \"params['userName']\" missing.");
}

if (params["userEmail"] === null || params["userEmail"] === undefined) {
throw new Error("Required parameter \"params['userEmail']\" missing.");
}

if (params["agentId"] === null || params["agentId"] === undefined) {
throw new Error("Required parameter \"params['agentId']\" missing.");
}
Expand Down Expand Up @@ -560,10 +549,6 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance {

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

data["UserName"] = params["userName"];

data["UserEmail"] = params["userEmail"];

data["AgentId"] = params["agentId"];

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

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

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

const headers: any = {};
if (params["token"] !== undefined) headers["Token"] = params["token"];
if (params["authorization"] !== undefined)
headers["Authorization"] = params["authorization"];

let operationVersion = version,
operationPromise = operationVersion.page({
Expand Down
Loading

0 comments on commit a9c901f

Please sign in to comment.