Skip to content

Commit

Permalink
[Librarian] Regenerated @ 42b8ce059dcc13e9d9713dbf88dcec856be2bbc9
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed May 4, 2023
1 parent e470157 commit 478c192
Show file tree
Hide file tree
Showing 17 changed files with 344 additions and 1,618 deletions.
19 changes: 19 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
twilio-node changelog
=====================

[2023-05-04] Version 4.11.0
---------------------------
**Library - Docs**
- [PR #928](https://github.com/twilio/twilio-node/pull/928): consolidate. Thanks to [@stern-shawn](https://github.com/stern-shawn)!

**Conversations**
- Remove `start_date`, `end_date` and `state` query parameters from list operation on Conversations resource **(breaking change)**

**Messaging**
- Remove `messaging_service_sids` and `messaging_service_sid_action` from domain config endpoint **(breaking change)**
- Add error_code and rejection_reason properties to tollfree verification API response

**Numbers**
- Added the new Eligibility API under version `/v1`.

**Twiml**
- Add support for new Amazon Polly voices (Q1 2023) for `Say` verb


[2023-04-05] Version 4.10.0
---------------------------
**Conversations**
Expand Down
22 changes: 0 additions & 22 deletions src/rest/conversations/v1/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ export interface ConversationListInstanceCreateOptions {
* Options to pass to each
*/
export interface ConversationListInstanceEachOptions {
/** Start date in ISO8601 format for sorting and filtering list of Conversations. */
startDate?: string;
/** End date in ISO8601 format for sorting and filtering list of Conversations. */
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 @@ -110,12 +104,6 @@ export interface ConversationListInstanceEachOptions {
* Options to pass to list
*/
export interface ConversationListInstanceOptions {
/** Start date in ISO8601 format for sorting and filtering list of Conversations. */
startDate?: string;
/** End date in ISO8601 format for sorting and filtering list of Conversations. */
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 @@ -126,12 +114,6 @@ export interface ConversationListInstanceOptions {
* Options to pass to page
*/
export interface ConversationListInstancePageOptions {
/** Start date in ISO8601 format for sorting and filtering list of Conversations. */
startDate?: string;
/** End date in ISO8601 format for sorting and filtering list of Conversations. */
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 @@ -810,10 +792,6 @@ 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: 0 additions & 22 deletions src/rest/conversations/v1/service/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ export interface ConversationListInstanceCreateOptions {
* Options to pass to each
*/
export interface ConversationListInstanceEachOptions {
/** Start date in ISO8601 format for sorting and filtering list of Conversations. */
startDate?: string;
/** End date in ISO8601 format for sorting and filtering list of Conversations. */
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 @@ -110,12 +104,6 @@ export interface ConversationListInstanceEachOptions {
* Options to pass to list
*/
export interface ConversationListInstanceOptions {
/** Start date in ISO8601 format for sorting and filtering list of Conversations. */
startDate?: string;
/** End date in ISO8601 format for sorting and filtering list of Conversations. */
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 @@ -126,12 +114,6 @@ export interface ConversationListInstanceOptions {
* Options to pass to page
*/
export interface ConversationListInstancePageOptions {
/** Start date in ISO8601 format for sorting and filtering list of Conversations. */
startDate?: string;
/** End date in ISO8601 format for sorting and filtering list of Conversations. */
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 @@ -848,10 +830,6 @@ 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
68 changes: 34 additions & 34 deletions src/rest/flexApi/v1/assessments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export interface AssessmentsContextUpdateOptions {
* Options to pass to create a AssessmentsInstance
*/
export interface AssessmentsListInstanceCreateOptions {
/** The id of the category */
categoryId: string;
/** The SID of the category */
categorySid: string;
/** The name of the category */
categoryName: string;
/** Segment Id of the conversation */
Expand All @@ -52,16 +52,16 @@ export interface AssessmentsListInstanceCreateOptions {
agentId: string;
/** The offset of the conversation. */
offset: number;
/** The question Id selected for assessment */
/** The question SID selected for assessment */
metricId: string;
/** The question name of the assessment */
metricName: string;
/** The answer text selected by user */
answerText: string;
/** The id of the answer selected by user */
answerId: string;
/** Questionnaire Id of the associated question */
questionnaireId: string;
/** Questionnaire SID of the associated question */
questionnaireSid: string;
/** The Token HTTP request header */
token?: string;
}
Expand Down Expand Up @@ -135,20 +135,20 @@ export interface AssessmentsContext {
}

export interface AssessmentsContextSolution {
assessmentId: string;
assessmentSid: string;
}

export class AssessmentsContextImpl implements AssessmentsContext {
protected _solution: AssessmentsContextSolution;
protected _uri: string;

constructor(protected _version: V1, assessmentId: string) {
if (!isValidPathParam(assessmentId)) {
throw new Error("Parameter 'assessmentId' is not valid.");
constructor(protected _version: V1, assessmentSid: string) {
if (!isValidPathParam(assessmentSid)) {
throw new Error("Parameter 'assessmentSid' is not valid.");
}

this._solution = { assessmentId };
this._uri = `/Insights/QM/Assessments/${assessmentId}`;
this._solution = { assessmentSid };
this._uri = `/Insights/QualityManagement/Assessments/${assessmentSid}`;
}

update(
Expand Down Expand Up @@ -197,7 +197,7 @@ export class AssessmentsContextImpl implements AssessmentsContext {
new AssessmentsInstance(
operationVersion,
payload,
instance._solution.assessmentId
instance._solution.assessmentSid
)
);

Expand Down Expand Up @@ -228,7 +228,7 @@ interface AssessmentsPayload extends TwilioResponsePayload {

interface AssessmentsResource {
account_sid: string;
assessment_id: string;
assessment_sid: string;
offset: number;
report: boolean;
weight: number;
Expand All @@ -250,10 +250,10 @@ export class AssessmentsInstance {
constructor(
protected _version: V1,
payload: AssessmentsResource,
assessmentId?: string
assessmentSid?: string
) {
this.accountSid = payload.account_sid;
this.assessmentId = payload.assessment_id;
this.assessmentSid = payload.assessment_sid;
this.offset = payload.offset;
this.report = payload.report;
this.weight = payload.weight;
Expand All @@ -267,17 +267,17 @@ export class AssessmentsInstance {
this.timestamp = payload.timestamp;
this.url = payload.url;

this._solution = { assessmentId: assessmentId || this.assessmentId };
this._solution = { assessmentSid: assessmentSid || this.assessmentSid };
}

/**
* The unique SID identifier of the Account.
*/
accountSid: string;
/**
* The unique id of the assessment
* The SID of the assessment
*/
assessmentId: string;
assessmentSid: string;
/**
* Offset of the conversation
*/
Expand Down Expand Up @@ -324,7 +324,7 @@ export class AssessmentsInstance {
private get _proxy(): AssessmentsContext {
this._context =
this._context ||
new AssessmentsContextImpl(this._version, this._solution.assessmentId);
new AssessmentsContextImpl(this._version, this._solution.assessmentSid);
return this._context;
}

Expand Down Expand Up @@ -356,7 +356,7 @@ export class AssessmentsInstance {
toJSON() {
return {
accountSid: this.accountSid,
assessmentId: this.assessmentId,
assessmentSid: this.assessmentSid,
offset: this.offset,
report: this.report,
weight: this.weight,
Expand Down Expand Up @@ -384,8 +384,8 @@ export interface AssessmentsListInstance {
_solution: AssessmentsSolution;
_uri: string;

(assessmentId: string): AssessmentsContext;
get(assessmentId: string): AssessmentsContext;
(assessmentSid: string): AssessmentsContext;
get(assessmentSid: string): AssessmentsContext;

/**
* Create a AssessmentsInstance
Expand Down Expand Up @@ -477,16 +477,16 @@ export interface AssessmentsListInstance {
}

export function AssessmentsListInstance(version: V1): AssessmentsListInstance {
const instance = ((assessmentId) =>
instance.get(assessmentId)) as AssessmentsListInstance;
const instance = ((assessmentSid) =>
instance.get(assessmentSid)) as AssessmentsListInstance;

instance.get = function get(assessmentId): AssessmentsContext {
return new AssessmentsContextImpl(version, assessmentId);
instance.get = function get(assessmentSid): AssessmentsContext {
return new AssessmentsContextImpl(version, assessmentSid);
};

instance._version = version;
instance._solution = {};
instance._uri = `/Insights/QM/Assessments`;
instance._uri = `/Insights/QualityManagement/Assessments`;

instance.create = function create(
params: AssessmentsListInstanceCreateOptions,
Expand All @@ -496,8 +496,8 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance {
throw new Error('Required parameter "params" missing.');
}

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

if (
Expand Down Expand Up @@ -544,17 +544,17 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance {
}

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

let data: any = {};

data["CategoryId"] = params["categoryId"];
data["CategorySid"] = params["categorySid"];

data["CategoryName"] = params["categoryName"];

Expand All @@ -576,7 +576,7 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance {

data["AnswerId"] = params["answerId"];

data["QuestionnaireId"] = params["questionnaireId"];
data["QuestionnaireSid"] = params["questionnaireSid"];

const headers: any = {};
headers["Content-Type"] = "application/x-www-form-urlencoded";
Expand Down
12 changes: 6 additions & 6 deletions src/rest/flexApi/v1/insightsAssessmentsComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export function InsightsAssessmentsCommentListInstance(

instance._version = version;
instance._solution = {};
instance._uri = `/Insights/QM/Assessments/Comments`;
instance._uri = `/Insights/QualityManagement/Assessments/Comments`;

instance.create = function create(
params: InsightsAssessmentsCommentListInstanceCreateOptions,
Expand Down Expand Up @@ -416,7 +416,7 @@ interface InsightsAssessmentsCommentPayload extends TwilioResponsePayload {

interface InsightsAssessmentsCommentResource {
account_sid: string;
assessment_id: string;
assessment_sid: string;
comment: any;
offset: number;
report: boolean;
Expand All @@ -435,7 +435,7 @@ export class InsightsAssessmentsCommentInstance {
payload: InsightsAssessmentsCommentResource
) {
this.accountSid = payload.account_sid;
this.assessmentId = payload.assessment_id;
this.assessmentSid = payload.assessment_sid;
this.comment = payload.comment;
this.offset = payload.offset;
this.report = payload.report;
Expand All @@ -453,9 +453,9 @@ export class InsightsAssessmentsCommentInstance {
*/
accountSid: string;
/**
* The unique ID of the assessment.
* The SID of the assessment.
*/
assessmentId: string;
assessmentSid: string;
/**
* The comment added for assessment.
*/
Expand Down Expand Up @@ -502,7 +502,7 @@ export class InsightsAssessmentsCommentInstance {
toJSON() {
return {
accountSid: this.accountSid,
assessmentId: this.assessmentId,
assessmentSid: this.assessmentSid,
comment: this.comment,
offset: this.offset,
report: this.report,
Expand Down
Loading

0 comments on commit 478c192

Please sign in to comment.