UNPKG

2.78 kBTypeScriptView Raw
1import ITwilio from "./rest/Twilio";
2import * as webhooks from "./webhooks/webhooks";
3import IRequestClient from "./base/RequestClient";
4import type { ClientOpts as IClientOpts } from "./base/BaseTwilio";
5import IAccessToken from "./jwt/AccessToken";
6import IClientCapability from "./jwt/ClientCapability";
7import ITaskRouterCapability from "./jwt/taskrouter/TaskRouterCapability";
8import * as taskRouterUtil from "./jwt/taskrouter/util";
9import IVoiceResponse from "./twiml/VoiceResponse";
10import IMessagingResponse from "./twiml/MessagingResponse";
11import IFaxResponse from "./twiml/FaxResponse";
12declare function TwilioSDK(accountSid?: string, authToken?: string, opts?: IClientOpts): TwilioSDK.Twilio;
13declare namespace TwilioSDK {
14 type Twilio = ITwilio;
15 const Twilio: typeof ITwilio;
16 namespace jwt {
17 type AccessToken = IAccessToken;
18 const AccessToken: typeof IAccessToken;
19 type ClientCapability = IClientCapability;
20 const ClientCapability: typeof IClientCapability;
21 namespace taskrouter {
22 type TaskRouterCapability = ITaskRouterCapability;
23 const TaskRouterCapability: typeof ITaskRouterCapability;
24 const util: typeof taskRouterUtil;
25 }
26 }
27 namespace twiml {
28 type VoiceResponse = IVoiceResponse;
29 const VoiceResponse: typeof IVoiceResponse;
30 type MessagingResponse = IMessagingResponse;
31 const MessagingResponse: typeof IMessagingResponse;
32 type FaxResponse = IFaxResponse;
33 const FaxResponse: typeof IFaxResponse;
34 }
35 type RequestClient = IRequestClient;
36 const RequestClient: typeof IRequestClient;
37 type validateBody = typeof webhooks.validateBody;
38 const validateBody: typeof webhooks.validateBody;
39 type validateRequest = typeof webhooks.validateRequest;
40 const validateRequest: typeof webhooks.validateRequest;
41 type validateRequestWithBody = typeof webhooks.validateRequestWithBody;
42 const validateRequestWithBody: typeof webhooks.validateRequestWithBody;
43 type validateExpressRequest = typeof webhooks.validateExpressRequest;
44 const validateExpressRequest: typeof webhooks.validateExpressRequest;
45 type validateIncomingRequest = typeof webhooks.validateIncomingRequest;
46 const validateIncomingRequest: typeof webhooks.validateIncomingRequest;
47 type getExpectedBodyHash = typeof webhooks.getExpectedBodyHash;
48 const getExpectedBodyHash: typeof webhooks.getExpectedBodyHash;
49 type getExpectedTwilioSignature = typeof webhooks.getExpectedTwilioSignature;
50 const getExpectedTwilioSignature: typeof webhooks.getExpectedTwilioSignature;
51 type webhook = typeof webhooks.webhook;
52 const webhook: typeof webhooks.webhook;
53 type ClientOpts = IClientOpts;
54}
55export = TwilioSDK;