From 04f9e9153f68c346516383698a9cf526b73ae9da Mon Sep 17 00:00:00 2001 From: Shawn Stern Date: Wed, 31 Mar 2021 07:32:12 -0700 Subject: [PATCH] chore: expose internal RequestClient to users at top level (#668) --- index.d.ts | 2 ++ lib/index.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/index.d.ts b/index.d.ts index ade6a8737a..920376d1b4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -8,6 +8,7 @@ import TwilioClient = require('./lib/rest/Twilio'); import AccessToken = require('./lib/jwt/AccessToken'); import ClientCapability = require('./lib/jwt/ClientCapability'); import TaskRouterCapability = require('./lib/jwt/taskrouter/TaskRouterCapability'); +import RequestClient = require('./lib/base/RequestClient'); interface TwimlConstructor { new (): T; @@ -36,6 +37,7 @@ declare namespace twilio { } export const jwt: JwtInterface; export const twiml: TwimlInterface; + export const RequestClient: RequestClient; export const validateRequest: typeof webhookTools.validateRequest; export const validateRequestWithBody: typeof webhookTools.validateRequestWithBody; export const validateExpressRequest: typeof webhookTools.validateExpressRequest; diff --git a/lib/index.js b/lib/index.js index 0084157694..c2275398cb 100644 --- a/lib/index.js +++ b/lib/index.js @@ -3,6 +3,7 @@ var Twilio = require('./rest/Twilio'); var webhooks = require('./webhooks/webhooks'); var obsolete = require('./base/obsolete'); +var RequestClient = require('./base/RequestClient'); // Shorthand to automatically create a RestClient var initializer = function(accountSid, authToken, opts) { @@ -13,6 +14,7 @@ var initializer = function(accountSid, authToken, opts) { initializer.Twilio = Twilio; initializer.jwt = { }; initializer.twiml = { }; +initializer.RequestClient = RequestClient; var AccessToken; Object.defineProperty(initializer.jwt,