twilio 4.7.2 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base/BaseTwilio.d.ts +1 -0
- package/lib/index.d.ts +52 -36
- package/lib/index.js +32 -51
- package/lib/jwt/AccessToken.d.ts +168 -173
- package/lib/jwt/AccessToken.js +180 -185
- package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +17 -22
- package/lib/rest/api/v2010/account/application.d.ts +15 -20
- package/lib/rest/api/v2010/account/authorizedConnectApp.d.ts +1 -1
- package/lib/rest/api/v2010/account/call/feedback.d.ts +5 -5
- package/lib/rest/api/v2010/account/call/feedbackSummary.d.ts +4 -4
- package/lib/rest/api/v2010/account/call/notification.d.ts +3 -4
- package/lib/rest/api/v2010/account/call/payment.d.ts +10 -10
- package/lib/rest/api/v2010/account/call/recording.d.ts +9 -9
- package/lib/rest/api/v2010/account/call/siprec.d.ts +3 -3
- package/lib/rest/api/v2010/account/call/stream.d.ts +3 -3
- package/lib/rest/api/v2010/account/call.d.ts +2 -2
- package/lib/rest/api/v2010/account/conference/participant.d.ts +1 -1
- package/lib/rest/api/v2010/account/conference/recording.d.ts +9 -9
- package/lib/rest/api/v2010/account/conference.d.ts +4 -4
- package/lib/rest/api/v2010/account/connectApp.d.ts +4 -5
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +33 -38
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +33 -38
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +33 -38
- package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +19 -24
- package/lib/rest/api/v2010/account/message/feedback.d.ts +5 -5
- package/lib/rest/api/v2010/account/message.d.ts +6 -6
- package/lib/rest/api/v2010/account/notification.d.ts +3 -4
- package/lib/rest/api/v2010/account/queue.d.ts +3 -3
- package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +4 -4
- package/lib/rest/api/v2010/account/recording/transcription.d.ts +4 -4
- package/lib/rest/api/v2010/account/recording.d.ts +2 -2
- package/lib/rest/api/v2010/account/shortCode.d.ts +6 -8
- package/lib/rest/api/v2010/account/sip/domain.d.ts +9 -12
- package/lib/rest/api/v2010/account/transcription.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +7 -7
- package/lib/rest/api/v2010/account/usage/record/daily.d.ts +7 -7
- package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +7 -7
- package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +7 -7
- package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +7 -7
- package/lib/rest/api/v2010/account/usage/record/today.d.ts +7 -7
- package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +7 -7
- package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +7 -7
- package/lib/rest/api/v2010/account/usage/record.d.ts +7 -7
- package/lib/rest/api/v2010/account/usage/trigger.d.ts +27 -28
- package/lib/rest/api/v2010/account/usage.d.ts +1 -0
- package/lib/rest/api/v2010/account.d.ts +2 -2
- package/lib/rest/autopilot/v1/assistant/modelBuild.d.ts +1 -1
- package/lib/rest/chat/v1/credential.d.ts +1 -1
- package/lib/rest/chat/v1/service/channel/message.d.ts +1 -1
- package/lib/rest/chat/v1/service/channel.d.ts +1 -1
- package/lib/rest/chat/v1/service/role.d.ts +1 -1
- package/lib/rest/chat/v1/service/user/userChannel.d.ts +1 -1
- package/lib/rest/chat/v2/credential.d.ts +1 -1
- package/lib/rest/chat/v2/service/binding.d.ts +1 -1
- package/lib/rest/chat/v2/service/channel/member.d.ts +1 -1
- package/lib/rest/chat/v2/service/channel/message.d.ts +2 -2
- package/lib/rest/chat/v2/service/channel/webhook.d.ts +5 -5
- package/lib/rest/chat/v2/service/channel.d.ts +2 -2
- package/lib/rest/chat/v2/service/role.d.ts +1 -1
- package/lib/rest/chat/v2/service/user/userBinding.d.ts +1 -1
- package/lib/rest/chat/v2/service/user/userChannel.d.ts +3 -3
- package/lib/rest/chat/v2/service/user.d.ts +1 -1
- package/lib/rest/chat/v3/channel.d.ts +2 -2
- package/lib/rest/content/V1.d.ts +5 -0
- package/lib/rest/content/V1.js +7 -0
- package/lib/rest/content/v1/contentAndApprovals.d.ts +190 -0
- package/lib/rest/content/v1/contentAndApprovals.js +134 -0
- package/lib/rest/conversations/v1/addressConfiguration.d.ts +8 -8
- package/lib/rest/conversations/v1/configuration/webhook.d.ts +9 -9
- package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.d.ts +4 -4
- package/lib/rest/conversations/v1/conversation/message.d.ts +8 -8
- package/lib/rest/conversations/v1/conversation/participant.d.ts +4 -4
- package/lib/rest/conversations/v1/conversation/webhook.d.ts +5 -5
- package/lib/rest/conversations/v1/conversation.d.ts +2 -2
- package/lib/rest/conversations/v1/credential.d.ts +1 -1
- package/lib/rest/conversations/v1/participantConversation.d.ts +1 -1
- package/lib/rest/conversations/v1/role.d.ts +1 -1
- package/lib/rest/conversations/v1/service/binding.d.ts +7 -7
- package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +4 -4
- package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.d.ts +4 -4
- package/lib/rest/conversations/v1/service/conversation/message.d.ts +8 -8
- package/lib/rest/conversations/v1/service/conversation/participant.d.ts +4 -4
- package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +5 -5
- package/lib/rest/conversations/v1/service/conversation.d.ts +10 -10
- package/lib/rest/conversations/v1/service/participantConversation.d.ts +4 -4
- package/lib/rest/conversations/v1/service/role.d.ts +5 -5
- package/lib/rest/conversations/v1/service/user/userConversation.d.ts +9 -9
- package/lib/rest/conversations/v1/service/user.d.ts +4 -4
- package/lib/rest/conversations/v1/user/userConversation.d.ts +2 -2
- package/lib/rest/conversations/v1/user.d.ts +1 -1
- package/lib/rest/events/v1/sink.d.ts +2 -2
- package/lib/rest/flexApi/V1.d.ts +5 -0
- package/lib/rest/flexApi/V1.js +7 -0
- package/lib/rest/flexApi/v1/assessments.d.ts +255 -10
- package/lib/rest/flexApi/v1/assessments.js +208 -23
- package/lib/rest/flexApi/v1/configuration.d.ts +1 -1
- package/lib/rest/flexApi/v1/flexFlow.d.ts +2 -2
- package/lib/rest/flexApi/v1/insightsConversations.d.ts +172 -0
- package/lib/rest/flexApi/v1/insightsConversations.js +128 -0
- package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +8 -2
- package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.js +4 -4
- package/lib/rest/flexApi/v1/insightsSegments.d.ts +121 -4
- package/lib/rest/flexApi/v1/insightsSegments.js +71 -2
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +2 -2
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +3 -3
- package/lib/rest/flexApi/v1/webChannel.d.ts +1 -1
- package/lib/rest/frontlineApi/v1/user.d.ts +1 -1
- package/lib/rest/insights/v1/call/annotation.d.ts +2 -2
- package/lib/rest/insights/v1/call/callSummary.d.ts +17 -17
- package/lib/rest/insights/v1/call/event.d.ts +2 -2
- package/lib/rest/insights/v1/call/metric.d.ts +2 -2
- package/lib/rest/insights/v1/callSummaries.d.ts +6 -6
- package/lib/rest/insights/v1/conference/conferenceParticipant.d.ts +6 -6
- package/lib/rest/insights/v1/conference.d.ts +5 -5
- package/lib/rest/insights/v1/room/participant.d.ts +16 -16
- package/lib/rest/insights/v1/room.d.ts +41 -42
- package/lib/rest/ipMessaging/v1/credential.d.ts +1 -1
- package/lib/rest/ipMessaging/v1/service/channel/message.d.ts +1 -1
- package/lib/rest/ipMessaging/v1/service/channel.d.ts +1 -1
- package/lib/rest/ipMessaging/v1/service/role.d.ts +1 -1
- package/lib/rest/ipMessaging/v1/service/user/userChannel.d.ts +1 -1
- package/lib/rest/ipMessaging/v2/credential.d.ts +1 -1
- package/lib/rest/ipMessaging/v2/service/binding.d.ts +1 -1
- package/lib/rest/ipMessaging/v2/service/channel/member.d.ts +1 -1
- package/lib/rest/ipMessaging/v2/service/channel/message.d.ts +2 -2
- package/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +5 -5
- package/lib/rest/ipMessaging/v2/service/channel.d.ts +2 -2
- package/lib/rest/ipMessaging/v2/service/role.d.ts +1 -1
- package/lib/rest/ipMessaging/v2/service/user/userBinding.d.ts +1 -1
- package/lib/rest/ipMessaging/v2/service/user/userChannel.d.ts +2 -2
- package/lib/rest/ipMessaging/v2/service/user.d.ts +1 -1
- package/lib/rest/lookups/v2/phoneNumber.d.ts +1 -1
- package/lib/rest/media/v1/mediaProcessor.d.ts +6 -7
- package/lib/rest/media/v1/mediaRecording.d.ts +6 -7
- package/lib/rest/media/v1/playerStreamer.d.ts +7 -8
- package/lib/rest/messaging/V1.d.ts +10 -0
- package/lib/rest/messaging/V1.js +16 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +1 -1
- package/lib/rest/messaging/v1/brandRegistration.d.ts +12 -12
- package/lib/rest/messaging/v1/domainCerts.d.ts +4 -4
- package/lib/rest/messaging/v1/domainCerts.js +2 -2
- package/lib/rest/messaging/v1/domainConfigMessagingService.d.ts +121 -0
- package/lib/rest/messaging/v1/domainConfigMessagingService.js +122 -0
- package/lib/rest/messaging/v1/linkshorteningMessagingService.d.ts +109 -0
- package/lib/rest/messaging/v1/linkshorteningMessagingService.js +135 -0
- package/lib/rest/messaging/v1/service.d.ts +7 -9
- package/lib/rest/messaging/v1/tollfreeVerification.d.ts +2 -2
- package/lib/rest/microvisor/v1/accountConfig.d.ts +27 -1
- package/lib/rest/microvisor/v1/accountConfig.js +25 -0
- package/lib/rest/microvisor/v1/accountSecret.d.ts +26 -0
- package/lib/rest/microvisor/v1/accountSecret.js +25 -0
- package/lib/rest/microvisor/v1/app/appManifest.d.ts +101 -0
- package/lib/rest/microvisor/v1/app/appManifest.js +115 -0
- package/lib/rest/microvisor/v1/app.d.ts +11 -0
- package/lib/rest/microvisor/v1/app.js +15 -0
- package/lib/rest/microvisor/v1/device/deviceConfig.d.ts +26 -0
- package/lib/rest/microvisor/v1/device/deviceConfig.js +25 -0
- package/lib/rest/microvisor/v1/device/deviceSecret.d.ts +26 -0
- package/lib/rest/microvisor/v1/device/deviceSecret.js +25 -0
- package/lib/rest/monitor/v1/alert.d.ts +3 -4
- package/lib/rest/notify/v1/credential.d.ts +1 -1
- package/lib/rest/notify/v1/service/binding.d.ts +1 -1
- package/lib/rest/notify/v1/service/notification.d.ts +1 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +1 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +1 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +1 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +4 -4
- package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +1 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +1 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +1 -1
- package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +2 -2
- package/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +1 -1
- package/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +2 -2
- package/lib/rest/preview/sync/service/syncList/syncListItem.d.ts +2 -2
- package/lib/rest/preview/sync/service/syncMap/syncMapItem.d.ts +2 -2
- package/lib/rest/preview/understand/assistant/modelBuild.d.ts +1 -1
- package/lib/rest/preview/wireless/sim.d.ts +12 -16
- package/lib/rest/proxy/v1/service/session/interaction.d.ts +2 -2
- package/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +2 -2
- package/lib/rest/proxy/v1/service/session.d.ts +2 -2
- package/lib/rest/proxy/v1/service.d.ts +2 -2
- package/lib/rest/serverless/v1/service/asset/assetVersion.d.ts +1 -1
- package/lib/rest/serverless/v1/service/build/buildStatus.d.ts +1 -1
- package/lib/rest/serverless/v1/service/build.d.ts +2 -2
- package/lib/rest/serverless/v1/service/environment/log.d.ts +1 -1
- package/lib/rest/serverless/v1/service/function/functionVersion.d.ts +1 -1
- package/lib/rest/studio/v1/flow/engagement.d.ts +1 -1
- package/lib/rest/studio/v1/flow/execution.d.ts +1 -1
- package/lib/rest/studio/v1/flow.d.ts +1 -1
- package/lib/rest/studio/v2/flow/execution.d.ts +1 -1
- package/lib/rest/studio/v2/flow/flowRevision.d.ts +1 -1
- package/lib/rest/studio/v2/flow.d.ts +1 -1
- package/lib/rest/studio/v2/flowValidate.d.ts +1 -1
- package/lib/rest/supersim/v1/esimProfile.d.ts +15 -1
- package/lib/rest/supersim/v1/esimProfile.js +6 -0
- package/lib/rest/supersim/v1/fleet.d.ts +7 -9
- package/lib/rest/supersim/v1/ipCommand.d.ts +3 -3
- package/lib/rest/supersim/v1/settingsUpdate.d.ts +1 -1
- package/lib/rest/supersim/v1/sim/billingPeriod.d.ts +1 -1
- package/lib/rest/supersim/v1/sim/simIpAddress.d.ts +1 -1
- package/lib/rest/supersim/v1/sim.d.ts +2 -2
- package/lib/rest/supersim/v1/smsCommand.d.ts +2 -2
- package/lib/rest/supersim/v1/usageRecord.d.ts +2 -2
- package/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +2 -2
- package/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +2 -2
- package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +14 -14
- package/lib/rest/taskrouter/v1/workspace/task.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +12 -12
- package/lib/rest/taskrouter/v1/workspace.d.ts +1 -1
- package/lib/rest/trunking/v1/trunk/phoneNumber.d.ts +16 -21
- package/lib/rest/trunking/v1/trunk/recording.d.ts +2 -2
- package/lib/rest/trunking/v1/trunk.d.ts +5 -6
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +4 -4
- package/lib/rest/trusthub/v1/customerProfiles.d.ts +8 -8
- package/lib/rest/trusthub/v1/supportingDocument.d.ts +1 -1
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +4 -4
- package/lib/rest/trusthub/v1/trustProducts.d.ts +8 -8
- package/lib/rest/verify/v2/form.d.ts +1 -1
- package/lib/rest/verify/v2/service/accessToken.d.ts +1 -1
- package/lib/rest/verify/v2/service/entity/challenge.d.ts +4 -4
- package/lib/rest/verify/v2/service/entity/factor.d.ts +3 -3
- package/lib/rest/verify/v2/service/entity/newFactor.d.ts +4 -4
- package/lib/rest/verify/v2/service/verification.d.ts +3 -3
- package/lib/rest/verify/v2/service/verificationCheck.d.ts +1 -1
- package/lib/rest/verify/v2/service/webhook.d.ts +3 -3
- package/lib/rest/verify/v2/verificationAttempt.d.ts +2 -2
- package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +1 -1
- package/lib/rest/video/v1/composition.d.ts +5 -6
- package/lib/rest/video/v1/compositionHook.d.ts +4 -5
- package/lib/rest/video/v1/recording.d.ts +7 -8
- package/lib/rest/video/v1/room/participant/anonymize.d.ts +4 -4
- package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +4 -4
- package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +4 -4
- package/lib/rest/video/v1/room/participant.d.ts +8 -8
- package/lib/rest/video/v1/room/roomRecording.d.ts +4 -4
- package/lib/rest/video/v1/room.d.ts +6 -7
- package/lib/rest/voice/v1/byocTrunk.d.ts +9 -12
- package/lib/rest/wireless/v1/command.d.ts +4 -4
- package/lib/rest/wireless/v1/sim/usageRecord.d.ts +1 -1
- package/lib/rest/wireless/v1/sim.d.ts +17 -22
- package/lib/rest/wireless/v1/usageRecord.d.ts +4 -4
- package/package.json +2 -5
package/lib/jwt/AccessToken.js
CHANGED
|
@@ -2,181 +2,7 @@
|
|
|
2
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ChatGrant = exports.Grant = void 0;
|
|
7
5
|
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
8
|
-
class Grant {
|
|
9
|
-
constructor(opts) { }
|
|
10
|
-
}
|
|
11
|
-
exports.Grant = Grant;
|
|
12
|
-
class TaskRouterGrant extends Grant {
|
|
13
|
-
/**
|
|
14
|
-
* @param options - ...
|
|
15
|
-
* @param options.workspaceSid - The workspace unique ID
|
|
16
|
-
* @param options.workerSid - The worker unique ID
|
|
17
|
-
* @param options.role - The role of the grant
|
|
18
|
-
*/
|
|
19
|
-
constructor(options) {
|
|
20
|
-
options = options || {};
|
|
21
|
-
super(options);
|
|
22
|
-
this.workspaceSid = options.workspaceSid;
|
|
23
|
-
this.workerSid = options.workerSid;
|
|
24
|
-
this.role = options.role;
|
|
25
|
-
this.key = "task_router";
|
|
26
|
-
}
|
|
27
|
-
toPayload() {
|
|
28
|
-
var grant = {};
|
|
29
|
-
if (this.workspaceSid) {
|
|
30
|
-
grant.workspace_sid = this.workspaceSid;
|
|
31
|
-
}
|
|
32
|
-
if (this.workerSid) {
|
|
33
|
-
grant.worker_sid = this.workerSid;
|
|
34
|
-
}
|
|
35
|
-
if (this.role) {
|
|
36
|
-
grant.role = this.role;
|
|
37
|
-
}
|
|
38
|
-
return grant;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
class ChatGrant extends Grant {
|
|
42
|
-
/**
|
|
43
|
-
* @param options - ...
|
|
44
|
-
* @param options.serviceSid - The service unique ID
|
|
45
|
-
* @param options.endpointId - The endpoint ID
|
|
46
|
-
* @param options.deploymentRoleSid - SID of the deployment role to be
|
|
47
|
-
* assigned to the user
|
|
48
|
-
* @param options.pushCredentialSid - The Push Credentials SID
|
|
49
|
-
*/
|
|
50
|
-
constructor(options) {
|
|
51
|
-
options = options || {};
|
|
52
|
-
super(options);
|
|
53
|
-
this.serviceSid = options.serviceSid;
|
|
54
|
-
this.endpointId = options.endpointId;
|
|
55
|
-
this.deploymentRoleSid = options.deploymentRoleSid;
|
|
56
|
-
this.pushCredentialSid = options.pushCredentialSid;
|
|
57
|
-
this.key = "chat";
|
|
58
|
-
}
|
|
59
|
-
toPayload() {
|
|
60
|
-
var grant = {};
|
|
61
|
-
if (this.serviceSid) {
|
|
62
|
-
grant.service_sid = this.serviceSid;
|
|
63
|
-
}
|
|
64
|
-
if (this.endpointId) {
|
|
65
|
-
grant.endpoint_id = this.endpointId;
|
|
66
|
-
}
|
|
67
|
-
if (this.deploymentRoleSid) {
|
|
68
|
-
grant.deployment_role_sid = this.deploymentRoleSid;
|
|
69
|
-
}
|
|
70
|
-
if (this.pushCredentialSid) {
|
|
71
|
-
grant.push_credential_sid = this.pushCredentialSid;
|
|
72
|
-
}
|
|
73
|
-
return grant;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.ChatGrant = ChatGrant;
|
|
77
|
-
class VideoGrant extends Grant {
|
|
78
|
-
/**
|
|
79
|
-
* @param options - ...
|
|
80
|
-
* @param options.room - The Room name or Room sid.
|
|
81
|
-
*/
|
|
82
|
-
constructor(options) {
|
|
83
|
-
options = options || {};
|
|
84
|
-
super(options);
|
|
85
|
-
this.room = options.room;
|
|
86
|
-
this.key = "video";
|
|
87
|
-
}
|
|
88
|
-
toPayload() {
|
|
89
|
-
var grant = {};
|
|
90
|
-
if (this.room) {
|
|
91
|
-
grant.room = this.room;
|
|
92
|
-
}
|
|
93
|
-
return grant;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
class SyncGrant extends Grant {
|
|
97
|
-
/**
|
|
98
|
-
* @param options.serviceSid - The service unique ID
|
|
99
|
-
* @param options.endpointId - The endpoint ID
|
|
100
|
-
*/
|
|
101
|
-
constructor(options) {
|
|
102
|
-
options = options || {};
|
|
103
|
-
super(options);
|
|
104
|
-
this.serviceSid = options.serviceSid;
|
|
105
|
-
this.endpointId = options.endpointId;
|
|
106
|
-
this.key = "data_sync";
|
|
107
|
-
}
|
|
108
|
-
toPayload() {
|
|
109
|
-
var grant = {};
|
|
110
|
-
if (this.serviceSid) {
|
|
111
|
-
grant.service_sid = this.serviceSid;
|
|
112
|
-
}
|
|
113
|
-
if (this.endpointId) {
|
|
114
|
-
grant.endpoint_id = this.endpointId;
|
|
115
|
-
}
|
|
116
|
-
return grant;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
class VoiceGrant extends Grant {
|
|
120
|
-
/**
|
|
121
|
-
* @param options - ...
|
|
122
|
-
* @param options.incomingAllow - Whether or not this endpoint is allowed to receive incoming calls as grants.identity
|
|
123
|
-
* @param options.outgoingApplicationSid - application sid to call when placing outgoing call
|
|
124
|
-
* @param options.outgoingApplicationParams - request params to pass to the application
|
|
125
|
-
* @param options.pushCredentialSid - Push Credential Sid to use when registering to receive incoming call notifications
|
|
126
|
-
* @param options.endpointId - Specify an endpoint identifier for this device, which will allow the developer
|
|
127
|
-
* to direct calls to a specific endpoint when multiple devices are associated with a single identity
|
|
128
|
-
*/
|
|
129
|
-
constructor(options) {
|
|
130
|
-
options = options || {};
|
|
131
|
-
super(options);
|
|
132
|
-
this.incomingAllow = options.incomingAllow;
|
|
133
|
-
this.outgoingApplicationSid = options.outgoingApplicationSid;
|
|
134
|
-
this.outgoingApplicationParams = options.outgoingApplicationParams;
|
|
135
|
-
this.pushCredentialSid = options.pushCredentialSid;
|
|
136
|
-
this.endpointId = options.endpointId;
|
|
137
|
-
this.key = "voice";
|
|
138
|
-
}
|
|
139
|
-
toPayload() {
|
|
140
|
-
var grant = {};
|
|
141
|
-
if (this.incomingAllow === true) {
|
|
142
|
-
grant.incoming = { allow: true };
|
|
143
|
-
}
|
|
144
|
-
if (this.outgoingApplicationSid) {
|
|
145
|
-
grant.outgoing = {
|
|
146
|
-
application_sid: this.outgoingApplicationSid,
|
|
147
|
-
};
|
|
148
|
-
if (this.outgoingApplicationParams) {
|
|
149
|
-
grant.outgoing.params = this.outgoingApplicationParams;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (this.pushCredentialSid) {
|
|
153
|
-
grant.push_credential_sid = this.pushCredentialSid;
|
|
154
|
-
}
|
|
155
|
-
if (this.endpointId) {
|
|
156
|
-
grant.endpoint_id = this.endpointId;
|
|
157
|
-
}
|
|
158
|
-
return grant;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
class PlaybackGrant extends Grant {
|
|
162
|
-
/**
|
|
163
|
-
* @param options - ...
|
|
164
|
-
* @param options.grant - The PlaybackGrant retrieved from Twilio's API
|
|
165
|
-
*/
|
|
166
|
-
constructor(options) {
|
|
167
|
-
options = options || {};
|
|
168
|
-
super(options);
|
|
169
|
-
this.grant = options.grant;
|
|
170
|
-
this.key = "player";
|
|
171
|
-
}
|
|
172
|
-
toPayload() {
|
|
173
|
-
var grant = {};
|
|
174
|
-
if (this.grant) {
|
|
175
|
-
grant = this.grant;
|
|
176
|
-
}
|
|
177
|
-
return grant;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
6
|
class AccessToken {
|
|
181
7
|
/**
|
|
182
8
|
* @param accountSid - The account's unique ID to which access is scoped
|
|
@@ -219,22 +45,22 @@ class AccessToken {
|
|
|
219
45
|
throw new Error("Algorithm not supported. Allowed values are " +
|
|
220
46
|
AccessToken.ALGORITHMS.join(", "));
|
|
221
47
|
}
|
|
222
|
-
|
|
48
|
+
let grants = {};
|
|
223
49
|
if (Number.isInteger(this.identity) || typeof this.identity === "string") {
|
|
224
50
|
grants.identity = String(this.identity);
|
|
225
51
|
}
|
|
226
52
|
for (const grant of this.grants) {
|
|
227
53
|
grants[grant.key] = grant.toPayload();
|
|
228
54
|
}
|
|
229
|
-
|
|
230
|
-
|
|
55
|
+
const now = Math.floor(Date.now() / 1000);
|
|
56
|
+
let payload = {
|
|
231
57
|
jti: this.keySid + "-" + now,
|
|
232
58
|
grants: grants,
|
|
233
59
|
};
|
|
234
60
|
if (typeof this.nbf === "number") {
|
|
235
61
|
payload.nbf = this.nbf;
|
|
236
62
|
}
|
|
237
|
-
|
|
63
|
+
let header = {
|
|
238
64
|
cty: "twilio-fpa;v=1",
|
|
239
65
|
typ: "JWT",
|
|
240
66
|
};
|
|
@@ -250,12 +76,181 @@ class AccessToken {
|
|
|
250
76
|
});
|
|
251
77
|
}
|
|
252
78
|
}
|
|
253
|
-
exports.default = AccessToken;
|
|
254
79
|
AccessToken.DEFAULT_ALGORITHM = "HS256";
|
|
255
80
|
AccessToken.ALGORITHMS = ["HS256", "HS384", "HS512"];
|
|
256
|
-
AccessToken
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
81
|
+
(function (AccessToken) {
|
|
82
|
+
class Grant {
|
|
83
|
+
constructor(key) {
|
|
84
|
+
this.key = key;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
AccessToken.Grant = Grant;
|
|
88
|
+
class TaskRouterGrant extends Grant {
|
|
89
|
+
/**
|
|
90
|
+
* @param options - ...
|
|
91
|
+
* @param options.workspaceSid - The workspace unique ID
|
|
92
|
+
* @param options.workerSid - The worker unique ID
|
|
93
|
+
* @param options.role - The role of the grant
|
|
94
|
+
*/
|
|
95
|
+
constructor(options) {
|
|
96
|
+
options = options || {};
|
|
97
|
+
super("task_router");
|
|
98
|
+
this.workspaceSid = options.workspaceSid;
|
|
99
|
+
this.workerSid = options.workerSid;
|
|
100
|
+
this.role = options.role;
|
|
101
|
+
}
|
|
102
|
+
toPayload() {
|
|
103
|
+
let grant = {};
|
|
104
|
+
if (this.workspaceSid) {
|
|
105
|
+
grant.workspace_sid = this.workspaceSid;
|
|
106
|
+
}
|
|
107
|
+
if (this.workerSid) {
|
|
108
|
+
grant.worker_sid = this.workerSid;
|
|
109
|
+
}
|
|
110
|
+
if (this.role) {
|
|
111
|
+
grant.role = this.role;
|
|
112
|
+
}
|
|
113
|
+
return grant;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
AccessToken.TaskRouterGrant = TaskRouterGrant;
|
|
117
|
+
class ChatGrant extends Grant {
|
|
118
|
+
/**
|
|
119
|
+
* @param options - ...
|
|
120
|
+
* @param options.serviceSid - The service unique ID
|
|
121
|
+
* @param options.endpointId - The endpoint ID
|
|
122
|
+
* @param options.deploymentRoleSid - SID of the deployment role to be
|
|
123
|
+
* assigned to the user
|
|
124
|
+
* @param options.pushCredentialSid - The Push Credentials SID
|
|
125
|
+
*/
|
|
126
|
+
constructor(options) {
|
|
127
|
+
options = options || {};
|
|
128
|
+
super("chat");
|
|
129
|
+
this.serviceSid = options.serviceSid;
|
|
130
|
+
this.endpointId = options.endpointId;
|
|
131
|
+
this.deploymentRoleSid = options.deploymentRoleSid;
|
|
132
|
+
this.pushCredentialSid = options.pushCredentialSid;
|
|
133
|
+
}
|
|
134
|
+
toPayload() {
|
|
135
|
+
let grant = {};
|
|
136
|
+
if (this.serviceSid) {
|
|
137
|
+
grant.service_sid = this.serviceSid;
|
|
138
|
+
}
|
|
139
|
+
if (this.endpointId) {
|
|
140
|
+
grant.endpoint_id = this.endpointId;
|
|
141
|
+
}
|
|
142
|
+
if (this.deploymentRoleSid) {
|
|
143
|
+
grant.deployment_role_sid = this.deploymentRoleSid;
|
|
144
|
+
}
|
|
145
|
+
if (this.pushCredentialSid) {
|
|
146
|
+
grant.push_credential_sid = this.pushCredentialSid;
|
|
147
|
+
}
|
|
148
|
+
return grant;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
AccessToken.ChatGrant = ChatGrant;
|
|
152
|
+
class VideoGrant extends Grant {
|
|
153
|
+
/**
|
|
154
|
+
* @param options - ...
|
|
155
|
+
* @param options.room - The Room name or Room sid.
|
|
156
|
+
*/
|
|
157
|
+
constructor(options) {
|
|
158
|
+
options = options || {};
|
|
159
|
+
super("video");
|
|
160
|
+
this.room = options.room;
|
|
161
|
+
}
|
|
162
|
+
toPayload() {
|
|
163
|
+
let grant = {};
|
|
164
|
+
if (this.room) {
|
|
165
|
+
grant.room = this.room;
|
|
166
|
+
}
|
|
167
|
+
return grant;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
AccessToken.VideoGrant = VideoGrant;
|
|
171
|
+
class SyncGrant extends Grant {
|
|
172
|
+
/**
|
|
173
|
+
* @param options.serviceSid - The service unique ID
|
|
174
|
+
* @param options.endpointId - The endpoint ID
|
|
175
|
+
*/
|
|
176
|
+
constructor(options) {
|
|
177
|
+
options = options || {};
|
|
178
|
+
super("data_sync");
|
|
179
|
+
this.serviceSid = options.serviceSid;
|
|
180
|
+
this.endpointId = options.endpointId;
|
|
181
|
+
}
|
|
182
|
+
toPayload() {
|
|
183
|
+
let grant = {};
|
|
184
|
+
if (this.serviceSid) {
|
|
185
|
+
grant.service_sid = this.serviceSid;
|
|
186
|
+
}
|
|
187
|
+
if (this.endpointId) {
|
|
188
|
+
grant.endpoint_id = this.endpointId;
|
|
189
|
+
}
|
|
190
|
+
return grant;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
AccessToken.SyncGrant = SyncGrant;
|
|
194
|
+
class VoiceGrant extends Grant {
|
|
195
|
+
/**
|
|
196
|
+
* @param options - ...
|
|
197
|
+
* @param options.incomingAllow - Whether or not this endpoint is allowed to receive incoming calls as grants.identity
|
|
198
|
+
* @param options.outgoingApplicationSid - application sid to call when placing outgoing call
|
|
199
|
+
* @param options.outgoingApplicationParams - request params to pass to the application
|
|
200
|
+
* @param options.pushCredentialSid - Push Credential Sid to use when registering to receive incoming call notifications
|
|
201
|
+
* @param options.endpointId - Specify an endpoint identifier for this device, which will allow the developer
|
|
202
|
+
* to direct calls to a specific endpoint when multiple devices are associated with a single identity
|
|
203
|
+
*/
|
|
204
|
+
constructor(options) {
|
|
205
|
+
options = options || {};
|
|
206
|
+
super("voice");
|
|
207
|
+
this.incomingAllow = options.incomingAllow;
|
|
208
|
+
this.outgoingApplicationSid = options.outgoingApplicationSid;
|
|
209
|
+
this.outgoingApplicationParams = options.outgoingApplicationParams;
|
|
210
|
+
this.pushCredentialSid = options.pushCredentialSid;
|
|
211
|
+
this.endpointId = options.endpointId;
|
|
212
|
+
}
|
|
213
|
+
toPayload() {
|
|
214
|
+
let grant = {};
|
|
215
|
+
if (this.incomingAllow === true) {
|
|
216
|
+
grant.incoming = { allow: true };
|
|
217
|
+
}
|
|
218
|
+
if (this.outgoingApplicationSid) {
|
|
219
|
+
grant.outgoing = {
|
|
220
|
+
application_sid: this.outgoingApplicationSid,
|
|
221
|
+
};
|
|
222
|
+
if (this.outgoingApplicationParams) {
|
|
223
|
+
grant.outgoing.params = this.outgoingApplicationParams;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (this.pushCredentialSid) {
|
|
227
|
+
grant.push_credential_sid = this.pushCredentialSid;
|
|
228
|
+
}
|
|
229
|
+
if (this.endpointId) {
|
|
230
|
+
grant.endpoint_id = this.endpointId;
|
|
231
|
+
}
|
|
232
|
+
return grant;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
AccessToken.VoiceGrant = VoiceGrant;
|
|
236
|
+
class PlaybackGrant extends Grant {
|
|
237
|
+
/**
|
|
238
|
+
* @param options - ...
|
|
239
|
+
* @param options.grant - The PlaybackGrant retrieved from Twilio's API
|
|
240
|
+
*/
|
|
241
|
+
constructor(options) {
|
|
242
|
+
options = options || {};
|
|
243
|
+
super("player");
|
|
244
|
+
this.grant = options.grant;
|
|
245
|
+
}
|
|
246
|
+
toPayload() {
|
|
247
|
+
let grant = {};
|
|
248
|
+
if (this.grant) {
|
|
249
|
+
grant = this.grant;
|
|
250
|
+
}
|
|
251
|
+
return grant;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
AccessToken.PlaybackGrant = PlaybackGrant;
|
|
255
|
+
})(AccessToken || (AccessToken = {}));
|
|
256
|
+
module.exports = AccessToken;
|
|
@@ -3,8 +3,8 @@ import { inspect, InspectOptions } from "util";
|
|
|
3
3
|
import Page, { TwilioResponsePayload } from "../../../../../base/Page";
|
|
4
4
|
import Response from "../../../../../http/response";
|
|
5
5
|
import V2010 from "../../../V2010";
|
|
6
|
-
type DependentPhoneNumberAddressRequirement = "none" | "any" | "local" | "foreign";
|
|
7
|
-
type DependentPhoneNumberEmergencyStatus = "Active" | "Inactive";
|
|
6
|
+
export type DependentPhoneNumberAddressRequirement = "none" | "any" | "local" | "foreign";
|
|
7
|
+
export type DependentPhoneNumberEmergencyStatus = "Active" | "Inactive";
|
|
8
8
|
/**
|
|
9
9
|
* Options to pass to each
|
|
10
10
|
*/
|
|
@@ -103,11 +103,6 @@ export interface DependentPhoneNumberListInstance {
|
|
|
103
103
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
104
104
|
}
|
|
105
105
|
export declare function DependentPhoneNumberListInstance(version: V2010, accountSid: string, addressSid: string): DependentPhoneNumberListInstance;
|
|
106
|
-
export type DependentPhoneNumberVoiceMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
107
|
-
export type DependentPhoneNumberVoiceFallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
108
|
-
export type DependentPhoneNumberSmsFallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
109
|
-
export type DependentPhoneNumberSmsMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
110
|
-
export type DependentPhoneNumberStatusCallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
111
106
|
interface DependentPhoneNumberPayload extends TwilioResponsePayload {
|
|
112
107
|
dependent_phone_numbers: DependentPhoneNumberResource[];
|
|
113
108
|
}
|
|
@@ -117,20 +112,20 @@ interface DependentPhoneNumberResource {
|
|
|
117
112
|
friendly_name: string;
|
|
118
113
|
phone_number: string;
|
|
119
114
|
voice_url: string;
|
|
120
|
-
voice_method:
|
|
121
|
-
voice_fallback_method:
|
|
115
|
+
voice_method: string;
|
|
116
|
+
voice_fallback_method: string;
|
|
122
117
|
voice_fallback_url: string;
|
|
123
118
|
voice_caller_id_lookup: boolean;
|
|
124
119
|
date_created: Date;
|
|
125
120
|
date_updated: Date;
|
|
126
|
-
sms_fallback_method:
|
|
121
|
+
sms_fallback_method: string;
|
|
127
122
|
sms_fallback_url: string;
|
|
128
|
-
sms_method:
|
|
123
|
+
sms_method: string;
|
|
129
124
|
sms_url: string;
|
|
130
125
|
address_requirements: DependentPhoneNumberAddressRequirement;
|
|
131
126
|
capabilities: any;
|
|
132
127
|
status_callback: string;
|
|
133
|
-
status_callback_method:
|
|
128
|
+
status_callback_method: string;
|
|
134
129
|
api_version: string;
|
|
135
130
|
sms_application_sid: string;
|
|
136
131
|
voice_application_sid: string;
|
|
@@ -165,11 +160,11 @@ export declare class DependentPhoneNumberInstance {
|
|
|
165
160
|
/**
|
|
166
161
|
* The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.
|
|
167
162
|
*/
|
|
168
|
-
voiceMethod:
|
|
163
|
+
voiceMethod: string;
|
|
169
164
|
/**
|
|
170
165
|
* The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`.
|
|
171
166
|
*/
|
|
172
|
-
voiceFallbackMethod:
|
|
167
|
+
voiceFallbackMethod: string;
|
|
173
168
|
/**
|
|
174
169
|
* The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`.
|
|
175
170
|
*/
|
|
@@ -189,7 +184,7 @@ export declare class DependentPhoneNumberInstance {
|
|
|
189
184
|
/**
|
|
190
185
|
* The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`.
|
|
191
186
|
*/
|
|
192
|
-
smsFallbackMethod:
|
|
187
|
+
smsFallbackMethod: string;
|
|
193
188
|
/**
|
|
194
189
|
* The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`.
|
|
195
190
|
*/
|
|
@@ -197,7 +192,7 @@ export declare class DependentPhoneNumberInstance {
|
|
|
197
192
|
/**
|
|
198
193
|
* The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`.
|
|
199
194
|
*/
|
|
200
|
-
smsMethod:
|
|
195
|
+
smsMethod: string;
|
|
201
196
|
/**
|
|
202
197
|
* The URL we call when the phone number receives an incoming SMS message.
|
|
203
198
|
*/
|
|
@@ -214,7 +209,7 @@ export declare class DependentPhoneNumberInstance {
|
|
|
214
209
|
/**
|
|
215
210
|
* The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`.
|
|
216
211
|
*/
|
|
217
|
-
statusCallbackMethod:
|
|
212
|
+
statusCallbackMethod: string;
|
|
218
213
|
/**
|
|
219
214
|
* The API version used to start a new TwiML session.
|
|
220
215
|
*/
|
|
@@ -251,20 +246,20 @@ export declare class DependentPhoneNumberInstance {
|
|
|
251
246
|
friendlyName: string;
|
|
252
247
|
phoneNumber: string;
|
|
253
248
|
voiceUrl: string;
|
|
254
|
-
voiceMethod:
|
|
255
|
-
voiceFallbackMethod:
|
|
249
|
+
voiceMethod: string;
|
|
250
|
+
voiceFallbackMethod: string;
|
|
256
251
|
voiceFallbackUrl: string;
|
|
257
252
|
voiceCallerIdLookup: boolean;
|
|
258
253
|
dateCreated: Date;
|
|
259
254
|
dateUpdated: Date;
|
|
260
|
-
smsFallbackMethod:
|
|
255
|
+
smsFallbackMethod: string;
|
|
261
256
|
smsFallbackUrl: string;
|
|
262
|
-
smsMethod:
|
|
257
|
+
smsMethod: string;
|
|
263
258
|
smsUrl: string;
|
|
264
259
|
addressRequirements: DependentPhoneNumberAddressRequirement;
|
|
265
260
|
capabilities: any;
|
|
266
261
|
statusCallback: string;
|
|
267
|
-
statusCallbackMethod:
|
|
262
|
+
statusCallbackMethod: string;
|
|
268
263
|
apiVersion: string;
|
|
269
264
|
smsApplicationSid: string;
|
|
270
265
|
voiceApplicationSid: string;
|
|
@@ -176,11 +176,6 @@ export declare class ApplicationContextImpl implements ApplicationContext {
|
|
|
176
176
|
toJSON(): ApplicationContextSolution;
|
|
177
177
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
178
178
|
}
|
|
179
|
-
export type ApplicationSmsFallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
180
|
-
export type ApplicationSmsMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
181
|
-
export type ApplicationStatusCallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
182
|
-
export type ApplicationVoiceFallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
183
|
-
export type ApplicationVoiceMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
184
179
|
interface ApplicationPayload extends TwilioResponsePayload {
|
|
185
180
|
applications: ApplicationResource[];
|
|
186
181
|
}
|
|
@@ -192,18 +187,18 @@ interface ApplicationResource {
|
|
|
192
187
|
friendly_name: string;
|
|
193
188
|
message_status_callback: string;
|
|
194
189
|
sid: string;
|
|
195
|
-
sms_fallback_method:
|
|
190
|
+
sms_fallback_method: string;
|
|
196
191
|
sms_fallback_url: string;
|
|
197
|
-
sms_method:
|
|
192
|
+
sms_method: string;
|
|
198
193
|
sms_status_callback: string;
|
|
199
194
|
sms_url: string;
|
|
200
195
|
status_callback: string;
|
|
201
|
-
status_callback_method:
|
|
196
|
+
status_callback_method: string;
|
|
202
197
|
uri: string;
|
|
203
198
|
voice_caller_id_lookup: boolean;
|
|
204
|
-
voice_fallback_method:
|
|
199
|
+
voice_fallback_method: string;
|
|
205
200
|
voice_fallback_url: string;
|
|
206
|
-
voice_method:
|
|
201
|
+
voice_method: string;
|
|
207
202
|
voice_url: string;
|
|
208
203
|
public_application_connect_enabled: boolean;
|
|
209
204
|
}
|
|
@@ -243,7 +238,7 @@ export declare class ApplicationInstance {
|
|
|
243
238
|
/**
|
|
244
239
|
* The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`.
|
|
245
240
|
*/
|
|
246
|
-
smsFallbackMethod:
|
|
241
|
+
smsFallbackMethod: string;
|
|
247
242
|
/**
|
|
248
243
|
* The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`.
|
|
249
244
|
*/
|
|
@@ -251,7 +246,7 @@ export declare class ApplicationInstance {
|
|
|
251
246
|
/**
|
|
252
247
|
* The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`.
|
|
253
248
|
*/
|
|
254
|
-
smsMethod:
|
|
249
|
+
smsMethod: string;
|
|
255
250
|
/**
|
|
256
251
|
* The URL we call using a POST method to send status information to your application about SMS messages that refer to the application.
|
|
257
252
|
*/
|
|
@@ -267,7 +262,7 @@ export declare class ApplicationInstance {
|
|
|
267
262
|
/**
|
|
268
263
|
* The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`.
|
|
269
264
|
*/
|
|
270
|
-
statusCallbackMethod:
|
|
265
|
+
statusCallbackMethod: string;
|
|
271
266
|
/**
|
|
272
267
|
* The URI of the resource, relative to `https://api.twilio.com`.
|
|
273
268
|
*/
|
|
@@ -279,7 +274,7 @@ export declare class ApplicationInstance {
|
|
|
279
274
|
/**
|
|
280
275
|
* The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`.
|
|
281
276
|
*/
|
|
282
|
-
voiceFallbackMethod:
|
|
277
|
+
voiceFallbackMethod: string;
|
|
283
278
|
/**
|
|
284
279
|
* The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`.
|
|
285
280
|
*/
|
|
@@ -287,7 +282,7 @@ export declare class ApplicationInstance {
|
|
|
287
282
|
/**
|
|
288
283
|
* The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.
|
|
289
284
|
*/
|
|
290
|
-
voiceMethod:
|
|
285
|
+
voiceMethod: string;
|
|
291
286
|
/**
|
|
292
287
|
* The URL we call when the phone number assigned to this application receives a call.
|
|
293
288
|
*/
|
|
@@ -343,18 +338,18 @@ export declare class ApplicationInstance {
|
|
|
343
338
|
friendlyName: string;
|
|
344
339
|
messageStatusCallback: string;
|
|
345
340
|
sid: string;
|
|
346
|
-
smsFallbackMethod:
|
|
341
|
+
smsFallbackMethod: string;
|
|
347
342
|
smsFallbackUrl: string;
|
|
348
|
-
smsMethod:
|
|
343
|
+
smsMethod: string;
|
|
349
344
|
smsStatusCallback: string;
|
|
350
345
|
smsUrl: string;
|
|
351
346
|
statusCallback: string;
|
|
352
|
-
statusCallbackMethod:
|
|
347
|
+
statusCallbackMethod: string;
|
|
353
348
|
uri: string;
|
|
354
349
|
voiceCallerIdLookup: boolean;
|
|
355
|
-
voiceFallbackMethod:
|
|
350
|
+
voiceFallbackMethod: string;
|
|
356
351
|
voiceFallbackUrl: string;
|
|
357
|
-
voiceMethod:
|
|
352
|
+
voiceMethod: string;
|
|
358
353
|
voiceUrl: string;
|
|
359
354
|
publicApplicationConnectEnabled: boolean;
|
|
360
355
|
};
|
|
@@ -3,7 +3,7 @@ import { inspect, InspectOptions } from "util";
|
|
|
3
3
|
import Page, { TwilioResponsePayload } from "../../../../base/Page";
|
|
4
4
|
import Response from "../../../../http/response";
|
|
5
5
|
import V2010 from "../../V2010";
|
|
6
|
-
type AuthorizedConnectAppPermission = "get-all" | "post-all";
|
|
6
|
+
export type AuthorizedConnectAppPermission = "get-all" | "post-all";
|
|
7
7
|
/**
|
|
8
8
|
* Options to pass to each
|
|
9
9
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
3
|
import V2010 from "../../../V2010";
|
|
4
|
-
type
|
|
4
|
+
export type FeedbackIssues = "audio-latency" | "digits-not-captured" | "dropped-call" | "imperfect-audio" | "incorrect-caller-id" | "one-way-audio" | "post-dial-delay" | "unsolicited-call";
|
|
5
5
|
/**
|
|
6
6
|
* Options to pass to update a FeedbackInstance
|
|
7
7
|
*/
|
|
@@ -9,7 +9,7 @@ export interface FeedbackContextUpdateOptions {
|
|
|
9
9
|
/** The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. */
|
|
10
10
|
qualityScore?: number;
|
|
11
11
|
/** One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. */
|
|
12
|
-
issue?: Array<
|
|
12
|
+
issue?: Array<FeedbackIssues>;
|
|
13
13
|
}
|
|
14
14
|
export interface FeedbackContext {
|
|
15
15
|
/**
|
|
@@ -66,7 +66,7 @@ interface FeedbackResource {
|
|
|
66
66
|
account_sid: string;
|
|
67
67
|
date_created: Date;
|
|
68
68
|
date_updated: Date;
|
|
69
|
-
issues: Array<
|
|
69
|
+
issues: Array<FeedbackIssues>;
|
|
70
70
|
quality_score: number;
|
|
71
71
|
sid: string;
|
|
72
72
|
}
|
|
@@ -90,7 +90,7 @@ export declare class FeedbackInstance {
|
|
|
90
90
|
/**
|
|
91
91
|
* A list of issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`.
|
|
92
92
|
*/
|
|
93
|
-
issues: Array<
|
|
93
|
+
issues: Array<FeedbackIssues>;
|
|
94
94
|
/**
|
|
95
95
|
* `1` to `5` quality score where `1` represents imperfect experience and `5` represents a perfect call.
|
|
96
96
|
*/
|
|
@@ -134,7 +134,7 @@ export declare class FeedbackInstance {
|
|
|
134
134
|
accountSid: string;
|
|
135
135
|
dateCreated: Date;
|
|
136
136
|
dateUpdated: Date;
|
|
137
|
-
issues:
|
|
137
|
+
issues: FeedbackIssues[];
|
|
138
138
|
qualityScore: number;
|
|
139
139
|
sid: string;
|
|
140
140
|
};
|