Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@twilio/flex-plugins-library-utils

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twilio/flex-plugins-library-utils - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3-beta.0

4

dist/core/ProgrammableVoiceUtils/index.d.ts

@@ -39,3 +39,3 @@ import { Twilio } from 'twilio';

* @param {string} parameters.callSid the unique call SID to fetch
* @param {string} parameters.to the phone number to transfer to
* @param {string} parameters.twiml the response of twiml based on to and from arguments of event
* @returns {object} generic response object

@@ -46,3 +46,3 @@ * @description cold transfers the given call SID to the given phone number

callSid: string;
to: string;
twiml: string;
}): Promise<ApiReturnType>;

@@ -49,0 +49,0 @@ /**

@@ -72,3 +72,3 @@ "use strict";

* @param {string} parameters.callSid the unique call SID to fetch
* @param {string} parameters.to the phone number to transfer to
* @param {string} parameters.twiml the response of twiml based on to and from arguments of event
* @returns {object} generic response object

@@ -79,7 +79,7 @@ * @description cold transfers the given call SID to the given phone number

return __awaiter(this, void 0, void 0, function* () {
const { callSid, to } = parameters;
const { callSid, twiml, attempts } = parameters;
const parameterChecks = {
attempts: 'number',
callSid: 'string',
to: 'string',
twiml: 'string',
};

@@ -92,3 +92,3 @@ try {

yield this.client.calls(callSid).update({
twiml: `<Response><Dial>${to}</Dial></Response>`,
twiml
});

@@ -95,0 +95,0 @@ return { success: true, status: statusCodes_1.HttpErrorCode.OK };

{
"name": "@twilio/flex-plugins-library-utils",
"version": "1.1.2",
"version": "1.1.3-beta.0",
"description": "Flex Plugins Library Utils",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -17,3 +17,2 @@ import { isArray, isBoolean, isNumber, isObject, isString } from 'lodash';

const actualValue = parameters[key];
switch (expectedType) {

@@ -20,0 +19,0 @@ case 'string':

@@ -87,17 +87,15 @@ import { Twilio } from 'twilio';

* @param {string} parameters.callSid the unique call SID to fetch
* @param {string} parameters.to the phone number to transfer to
* @param {string} parameters.twiml the response of twiml based on to and from arguments of event
* @returns {object} generic response object
* @description cold transfers the given call SID to the given phone number
*/
public async coldTransfer(parameters: Parameters & { callSid: string; to: string }): Promise<ApiReturnType> {
const { callSid, to } = parameters;
public async coldTransfer(parameters: Parameters & { callSid: string; twiml: string; }): Promise<ApiReturnType> {
const { callSid, twiml, attempts } = parameters;
const parameterChecks = {
attempts: 'number',
callSid: 'string',
to: 'string',
twiml: 'string',
};
try {
const inputError = PluginUtilsErrorManager.checkInvalidParameters<Parameters & { callSid: string; to: string }>(
const inputError = PluginUtilsErrorManager.checkInvalidParameters<Parameters & { callSid: string; twiml: string; }>(
parameters,

@@ -110,5 +108,6 @@ parameterChecks,

}
await this.client.calls(callSid).update({
twiml: `<Response><Dial>${to}</Dial></Response>`,
});
twiml
});

@@ -124,3 +123,3 @@ return { success: true, status: HttpErrorCode.OK };

}
return retryHandler<Parameters & { callSid: string; to: string }>(
return retryHandler<Parameters & { callSid: string; twiml: string;}>(
this.config,

@@ -127,0 +126,0 @@ error,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc