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

Flex Plugins Library Utils

  • 1.1.5-beta.0
  • npm
  • Socket score

Version published
Weekly downloads
4.3K
increased by13.28%
Maintainers
1
Weekly downloads
 
Created
Source

Flex Plugins Library Utils

Overview

This package is a utility library to be used in serverless functions to interact with commonly used Twilio resources and APIs such as Taskrouter, Programmable voice etc.

Usage

Installation

npm install @twilio/flex-plugins-library-utils

Methods Usage

Currently this library exposes methods for Taskrouter APIs, Programmable voice, Phone numbers etc. and other services will get incremently added to it.

Below is an example code to fetch all workers in a Flex Taskrouter workspace.

import { TaskRouterUtils } from '@twilio/flex-plugins-library-utils';

import Twilio from 'twilio';

const config = {
  maxBackoff: 2000,
  minBackoff: 1000,
  retryLimit: 3,
  accountSid: 'YOUR_TWILIO_ACCOUNT_SID',
  authToken: 'YOUR_TWILIO_AUTH_TOKEN',
  flexWorkSpaceSid: 'YOUR_TWILIO_FLEX_WORKSPACE_SID',
};

const twilioClient = new Twilio('YOUR_TWILIO_ACCOUNT_SID', 'YOUR_TWILIO_AUTH_TOKEN');
const taskrouterClient = new TaskRouterUtils(client, config);
const workers = await trClient.getAllWorkersFromWorkspace({ attempts: 3 });

FAQs

Package last updated on 10 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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