forked from twilio/twilio-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
45 lines (40 loc) · 1.57 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import * as util from './lib/jwt/taskrouter/util';
import * as FaxResponse from './lib/twiml/FaxResponse';
import * as MessagingResponse from './lib/twiml/MessagingResponse';
import * as VoiceResponse from './lib/twiml/VoiceResponse';
import * as webhookTools from './lib/webhooks/webhooks';
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');
interface TwimlConstructor<T> {
new (): T;
}
declare function twilio(
accountSid?: string,
authToken?: string,
opts?: TwilioClient.TwilioClientOptions
): TwilioClient;
declare namespace twilio {
export import Twilio = TwilioClient;
export interface TwimlInterface {
VoiceResponse: TwimlConstructor<VoiceResponse>;
FaxResponse: TwimlConstructor<FaxResponse>;
MessagingResponse: TwimlConstructor<MessagingResponse>;
}
export interface JwtInterface {
AccessToken: typeof AccessToken;
ClientCapability: typeof ClientCapability;
taskrouter: {
TaskRouterCapability: typeof TaskRouterCapability;
util: typeof util;
};
}
export const jwt: JwtInterface;
export const twiml: TwimlInterface;
export const validateRequest: typeof webhookTools.validateRequest;
export const validateRequestWithBody: typeof webhookTools.validateRequestWithBody;
export const validateExpressRequest: typeof webhookTools.validateExpressRequest;
export const webhook: typeof webhookTools.webhook;
}
export = twilio;