Skip to content

Commit

Permalink
[Librarian] Regenerated @ 54f479b2e9ba3ddad939d35c077bf4875093bb86
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Jul 21, 2022
1 parent 9af07c6 commit ade94a7
Show file tree
Hide file tree
Showing 7 changed files with 249 additions and 10 deletions.
20 changes: 20 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
twilio-node changelog
=====================

[2022-07-21] Version 3.80.0
---------------------------
**Library - Docs**
- [PR #772](https://github.com/twilio/twilio-node/pull/772): added npm/yarn install instructions. Thanks to [@citypaul](https://github.com/citypaul)!

**Library - Feature**
- [PR #775](https://github.com/twilio/twilio-node/pull/775): add a timeout options to RequestClient that creates a custom https agent. Thanks to [@benweissmann](https://github.com/benweissmann)!

**Flex**
- Add `status`, `error_code`, and `error_message` fields to Interaction `Channel`
- Adding `messenger` and `gbm` as supported channels for Interactions API

**Messaging**
- Update alpha_sender docs with new valid characters

**Verify**
- Reorder Verification Check parameters so `code` stays as the first parameter **(breaking change)**
- Rollback List Attempts API V2 back to pilot stage.


[2022-07-13] Version 3.79.0
---------------------------
**Library - Test**
Expand Down
16 changes: 12 additions & 4 deletions lib/rest/flexApi/v1/interaction/interactionChannel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ import { InteractionChannelParticipantList } from './interactionChannel/interact
import { InteractionChannelParticipantListInstance } from './interactionChannel/interactionChannelParticipant';
import { SerializableClass } from '../../../../interfaces';

type InteractionChannelChannelStatus = 'setup'|'active'|'failed'|'closed';

type InteractionChannelStatus = 'close'|'closed'|'wrapup';

type InteractionChannelType = 'voice'|'sms'|'email'|'web'|'whatsapp'|'chat';
type InteractionChannelType = 'voice'|'sms'|'email'|'web'|'whatsapp'|'chat'|'messenger'|'gbm';

/**
* Initialize the InteractionChannelList
*
* @param version - Version of the resource
* @param interactionSid - The unique string that identifies the resource
* @param interactionSid - The unique string that identifies the resource.
*/
declare function InteractionChannelList(version: V1, interactionSid: string): InteractionChannelListInstance;

Expand Down Expand Up @@ -213,9 +215,12 @@ interface InteractionChannelPayload extends InteractionChannelResource, Page.Twi
}

interface InteractionChannelResource {
error_code: number;
error_message: string;
interaction_sid: string;
links: string;
sid: string;
status: InteractionChannelChannelStatus;
type: InteractionChannelType;
url: string;
}
Expand Down Expand Up @@ -263,12 +268,14 @@ declare class InteractionChannelInstance extends SerializableClass {
*
* @param version - Version of the resource
* @param payload - The instance payload
* @param interactionSid - The unique string that identifies the resource
* @param interactionSid - The unique string that identifies the resource.
* @param sid - The unique string that identifies the resource
*/
constructor(version: V1, payload: InteractionChannelPayload, interactionSid: string, sid: string);

private _proxy: InteractionChannelContext;
errorCode: number;
errorMessage: string;
/**
* fetch a InteractionChannelInstance
*
Expand All @@ -286,6 +293,7 @@ declare class InteractionChannelInstance extends SerializableClass {
*/
participants(): InteractionChannelParticipantListInstance;
sid: string;
status: InteractionChannelChannelStatus;
/**
* Provide a user-friendly representation
*/
Expand Down Expand Up @@ -324,4 +332,4 @@ declare class InteractionChannelPage extends Page<V1, InteractionChannelPayload,
toJSON(): any;
}

export { InteractionChannelContext, InteractionChannelInstance, InteractionChannelInstanceUpdateOptions, InteractionChannelList, InteractionChannelListInstance, InteractionChannelListInstanceEachOptions, InteractionChannelListInstanceOptions, InteractionChannelListInstancePageOptions, InteractionChannelPage, InteractionChannelPayload, InteractionChannelResource, InteractionChannelSolution, InteractionChannelStatus, InteractionChannelType }
export { InteractionChannelChannelStatus, InteractionChannelContext, InteractionChannelInstance, InteractionChannelInstanceUpdateOptions, InteractionChannelList, InteractionChannelListInstance, InteractionChannelListInstanceEachOptions, InteractionChannelListInstanceOptions, InteractionChannelListInstancePageOptions, InteractionChannelPage, InteractionChannelPayload, InteractionChannelResource, InteractionChannelSolution, InteractionChannelStatus, InteractionChannelType }
15 changes: 12 additions & 3 deletions lib/rest/flexApi/v1/interaction/interactionChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ var InteractionChannelInviteList = require(
var InteractionChannelParticipantList = require(
'./interactionChannel/interactionChannelParticipant').InteractionChannelParticipantList;
var Page = require('../../../../base/Page'); /* jshint ignore:line */
var deserialize = require(
'../../../../base/deserialize'); /* jshint ignore:line */
var serialize = require('../../../../base/serialize'); /* jshint ignore:line */
var values = require('../../../../base/values'); /* jshint ignore:line */

Expand All @@ -32,7 +34,7 @@ var InteractionChannelContext;
* @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelList
*
* @param {Twilio.FlexApi.V1} version - Version of the resource
* @param {string} interactionSid - The unique string that identifies the resource
* @param {string} interactionSid - The unique string that identifies the resource.
*/
/* jshint ignore:end */
InteractionChannelList = function InteractionChannelList(version,
Expand Down Expand Up @@ -413,14 +415,18 @@ InteractionChannelPage.prototype[util.inspect.custom] = function inspect(depth,
*
* @property {string} sid - The unique string that identifies the resource
* @property {string} interactionSid -
* The unique string that identifies the resource
* The unique string that identifies the resource.
* @property {interaction_channel.type} type - The Interaction Channel's type.
* @property {interaction_channel.channel_status} status -
* The status of this channel.
* @property {number} errorCode - The Twilio error code for a failed channel.
* @property {string} errorMessage - The error message for a failed channel.
* @property {string} url - The url
* @property {string} links - The links
*
* @param {V1} version - Version of the resource
* @param {InteractionChannelPayload} payload - The instance payload
* @param {sid} interactionSid - The unique string that identifies the resource
* @param {sid} interactionSid - The unique string that identifies the resource.
* @param {sid} sid - The unique string that identifies the resource
*/
/* jshint ignore:end */
Expand All @@ -432,6 +438,9 @@ InteractionChannelInstance = function InteractionChannelInstance(version,
this.sid = payload.sid; // jshint ignore:line
this.interactionSid = payload.interaction_sid; // jshint ignore:line
this.type = payload.type; // jshint ignore:line
this.status = payload.status; // jshint ignore:line
this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line
this.errorMessage = payload.error_message; // jshint ignore:line
this.url = payload.url; // jshint ignore:line
this.links = payload.links; // jshint ignore:line

Expand Down
2 changes: 2 additions & 0 deletions lib/rest/verify/v2/service/verificationCheck.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ interface VerificationCheckResource {
payee: string;
service_sid: string;
sid: string;
sna_attempts_error_codes: object[];
status: string;
to: string;
valid: boolean;
Expand Down Expand Up @@ -97,6 +98,7 @@ declare class VerificationCheckInstance extends SerializableClass {
payee: string;
serviceSid: string;
sid: string;
snaAttemptsErrorCodes: object[];
status: string;
to: string;
/**
Expand Down
9 changes: 6 additions & 3 deletions lib/rest/verify/v2/service/verificationCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ VerificationCheckList = function VerificationCheckList(version, serviceSid) {
* @memberof Twilio.Verify.V2.ServiceContext.VerificationCheckList#
*
* @param {object} [opts] - Options for request
* @param {string} [opts.code] - The verification string
* @param {string} [opts.to] - The phone number or email to verify
* @param {string} [opts.verificationSid] -
* A SID that uniquely identifies the Verification Check
* @param {string} [opts.amount] -
* The amount of the associated PSD2 compliant transaction.
* @param {string} [opts.payee] -
* The payee of the associated PSD2 compliant transaction
* @param {string} [opts.code] - The verification string
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed VerificationCheckInstance
Expand All @@ -81,11 +81,11 @@ VerificationCheckList = function VerificationCheckList(version, serviceSid) {

var deferred = Q.defer();
var data = values.of({
'Code': _.get(opts, 'code'),
'To': _.get(opts, 'to'),
'VerificationSid': _.get(opts, 'verificationSid'),
'Amount': _.get(opts, 'amount'),
'Payee': _.get(opts, 'payee'),
'Code': _.get(opts, 'code')
'Payee': _.get(opts, 'payee')
});

var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
Expand Down Expand Up @@ -216,6 +216,8 @@ VerificationCheckPage.prototype[util.inspect.custom] = function inspect(depth,
* The ISO 8601 date and time in GMT when the Verification Check resource was created
* @property {Date} dateUpdated -
* The ISO 8601 date and time in GMT when the Verification Check resource was last updated
* @property {object} snaAttemptsErrorCodes -
* List of error codes as a result of attempting a verification using the `sna` channel.
*
* @param {V2} version - Version of the resource
* @param {VerificationCheckPayload} payload - The instance payload
Expand All @@ -239,6 +241,7 @@ VerificationCheckInstance = function VerificationCheckInstance(version, payload,
this.payee = payload.payee; // jshint ignore:line
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
this.snaAttemptsErrorCodes = payload.sna_attempts_error_codes; // jshint ignore:line

// Context
this._context = undefined;
Expand Down
Loading

0 comments on commit ade94a7

Please sign in to comment.