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
|
@@ -1,15 +1,107 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import Page, { TwilioResponsePayload } from "../../../base/Page";
|
|
4
|
+
import Response from "../../../http/response";
|
|
3
5
|
import V1 from "../V1";
|
|
6
|
+
/**
|
|
7
|
+
* Options to pass to update a AssessmentsInstance
|
|
8
|
+
*/
|
|
9
|
+
export interface AssessmentsContextUpdateOptions {
|
|
10
|
+
/** The offset of the conversation */
|
|
11
|
+
offset: number;
|
|
12
|
+
/** The answer text selected by user */
|
|
13
|
+
answerText: string;
|
|
14
|
+
/** The id of the answer selected by user */
|
|
15
|
+
answerId: string;
|
|
16
|
+
/** The Token HTTP request header */
|
|
17
|
+
token?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Options to pass to create a AssessmentsInstance
|
|
21
|
+
*/
|
|
22
|
+
export interface AssessmentsListInstanceCreateOptions {
|
|
23
|
+
/** The id of the category */
|
|
24
|
+
categoryId: string;
|
|
25
|
+
/** The name of the category */
|
|
26
|
+
categoryName: string;
|
|
27
|
+
/** Segment Id of the conversation */
|
|
28
|
+
segmentId: string;
|
|
29
|
+
/** Name of the user assessing conversation */
|
|
30
|
+
userName: string;
|
|
31
|
+
/** Email of the user assessing conversation */
|
|
32
|
+
userEmail: string;
|
|
33
|
+
/** The id of the Agent */
|
|
34
|
+
agentId: string;
|
|
35
|
+
/** The offset of the conversation. */
|
|
36
|
+
offset: number;
|
|
37
|
+
/** The question Id selected for assessment */
|
|
38
|
+
metricId: string;
|
|
39
|
+
/** The question name of the assessment */
|
|
40
|
+
metricName: string;
|
|
41
|
+
/** The answer text selected by user */
|
|
42
|
+
answerText: string;
|
|
43
|
+
/** The id of the answer selected by user */
|
|
44
|
+
answerId: string;
|
|
45
|
+
/** Questionnaire Id of the associated question */
|
|
46
|
+
questionnaireId: string;
|
|
47
|
+
/** The Token HTTP request header */
|
|
48
|
+
token?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Options to pass to each
|
|
52
|
+
*/
|
|
53
|
+
export interface AssessmentsListInstanceEachOptions {
|
|
54
|
+
/** The Token HTTP request header */
|
|
55
|
+
token?: string;
|
|
56
|
+
/** The id of the segment. */
|
|
57
|
+
segmentId?: string;
|
|
58
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
59
|
+
pageSize?: number;
|
|
60
|
+
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
61
|
+
callback?: (item: AssessmentsInstance, done: (err?: Error) => void) => void;
|
|
62
|
+
/** Function to be called upon completion of streaming */
|
|
63
|
+
done?: Function;
|
|
64
|
+
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
65
|
+
limit?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Options to pass to list
|
|
69
|
+
*/
|
|
70
|
+
export interface AssessmentsListInstanceOptions {
|
|
71
|
+
/** The Token HTTP request header */
|
|
72
|
+
token?: string;
|
|
73
|
+
/** The id of the segment. */
|
|
74
|
+
segmentId?: string;
|
|
75
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
76
|
+
pageSize?: number;
|
|
77
|
+
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
78
|
+
limit?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Options to pass to page
|
|
82
|
+
*/
|
|
83
|
+
export interface AssessmentsListInstancePageOptions {
|
|
84
|
+
/** The Token HTTP request header */
|
|
85
|
+
token?: string;
|
|
86
|
+
/** The id of the segment. */
|
|
87
|
+
segmentId?: string;
|
|
88
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
89
|
+
pageSize?: number;
|
|
90
|
+
/** Page Number, this value is simply for client state */
|
|
91
|
+
pageNumber?: number;
|
|
92
|
+
/** PageToken provided by the API */
|
|
93
|
+
pageToken?: string;
|
|
94
|
+
}
|
|
4
95
|
export interface AssessmentsContext {
|
|
5
96
|
/**
|
|
6
|
-
*
|
|
97
|
+
* Update a AssessmentsInstance
|
|
7
98
|
*
|
|
99
|
+
* @param params - Parameter for request
|
|
8
100
|
* @param callback - Callback to handle processed record
|
|
9
101
|
*
|
|
10
102
|
* @returns Resolves to processed AssessmentsInstance
|
|
11
103
|
*/
|
|
12
|
-
|
|
104
|
+
update(params: AssessmentsContextUpdateOptions, callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
|
|
13
105
|
/**
|
|
14
106
|
* Provide a user-friendly representation
|
|
15
107
|
*/
|
|
@@ -17,13 +109,14 @@ export interface AssessmentsContext {
|
|
|
17
109
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
18
110
|
}
|
|
19
111
|
export interface AssessmentsContextSolution {
|
|
112
|
+
assessmentId: string;
|
|
20
113
|
}
|
|
21
114
|
export declare class AssessmentsContextImpl implements AssessmentsContext {
|
|
22
115
|
protected _version: V1;
|
|
23
116
|
protected _solution: AssessmentsContextSolution;
|
|
24
117
|
protected _uri: string;
|
|
25
|
-
constructor(_version: V1);
|
|
26
|
-
|
|
118
|
+
constructor(_version: V1, assessmentId: string);
|
|
119
|
+
update(params: AssessmentsContextUpdateOptions, callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
|
|
27
120
|
/**
|
|
28
121
|
* Provide a user-friendly representation
|
|
29
122
|
*
|
|
@@ -32,33 +125,109 @@ export declare class AssessmentsContextImpl implements AssessmentsContext {
|
|
|
32
125
|
toJSON(): AssessmentsContextSolution;
|
|
33
126
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
34
127
|
}
|
|
128
|
+
interface AssessmentsPayload extends TwilioResponsePayload {
|
|
129
|
+
assessments: AssessmentsResource[];
|
|
130
|
+
}
|
|
35
131
|
interface AssessmentsResource {
|
|
132
|
+
account_sid: string;
|
|
133
|
+
assessment_id: string;
|
|
134
|
+
offset: number;
|
|
135
|
+
report: boolean;
|
|
136
|
+
weight: number;
|
|
137
|
+
agent_id: string;
|
|
138
|
+
segment_id: string;
|
|
139
|
+
user_name: string;
|
|
140
|
+
user_email: string;
|
|
141
|
+
answer_text: string;
|
|
142
|
+
answer_id: string;
|
|
143
|
+
assessment: any;
|
|
144
|
+
timestamp: number;
|
|
36
145
|
url: string;
|
|
37
146
|
}
|
|
38
147
|
export declare class AssessmentsInstance {
|
|
39
148
|
protected _version: V1;
|
|
40
149
|
protected _solution: AssessmentsContextSolution;
|
|
41
150
|
protected _context?: AssessmentsContext;
|
|
42
|
-
constructor(_version: V1, payload: AssessmentsResource);
|
|
151
|
+
constructor(_version: V1, payload: AssessmentsResource, assessmentId?: string);
|
|
152
|
+
/**
|
|
153
|
+
* The unique SID identifier of the Account.
|
|
154
|
+
*/
|
|
155
|
+
accountSid: string;
|
|
156
|
+
/**
|
|
157
|
+
* The unique id of the assessment
|
|
158
|
+
*/
|
|
159
|
+
assessmentId: string;
|
|
160
|
+
/**
|
|
161
|
+
* Offset of the conversation
|
|
162
|
+
*/
|
|
163
|
+
offset: number;
|
|
164
|
+
/**
|
|
165
|
+
* The flag indicating if this assessment is part of report
|
|
166
|
+
*/
|
|
167
|
+
report: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* The weightage given to this comment
|
|
170
|
+
*/
|
|
171
|
+
weight: number;
|
|
172
|
+
/**
|
|
173
|
+
* The id of the Agent
|
|
174
|
+
*/
|
|
175
|
+
agentId: string;
|
|
176
|
+
/**
|
|
177
|
+
* Segment Id of conversation
|
|
178
|
+
*/
|
|
179
|
+
segmentId: string;
|
|
180
|
+
/**
|
|
181
|
+
* The name of the user.
|
|
182
|
+
*/
|
|
183
|
+
userName: string;
|
|
184
|
+
/**
|
|
185
|
+
* The email id of the user.
|
|
186
|
+
*/
|
|
187
|
+
userEmail: string;
|
|
188
|
+
/**
|
|
189
|
+
* The answer text selected by user
|
|
190
|
+
*/
|
|
191
|
+
answerText: string;
|
|
192
|
+
/**
|
|
193
|
+
* The id of the answer selected by user
|
|
194
|
+
*/
|
|
195
|
+
answerId: string;
|
|
43
196
|
/**
|
|
44
|
-
*
|
|
197
|
+
* Assessment Details associated with an assessment
|
|
45
198
|
*/
|
|
199
|
+
assessment: any;
|
|
200
|
+
timestamp: number;
|
|
46
201
|
url: string;
|
|
47
202
|
private get _proxy();
|
|
48
203
|
/**
|
|
49
|
-
*
|
|
204
|
+
* Update a AssessmentsInstance
|
|
50
205
|
*
|
|
206
|
+
* @param params - Parameter for request
|
|
51
207
|
* @param callback - Callback to handle processed record
|
|
52
208
|
*
|
|
53
209
|
* @returns Resolves to processed AssessmentsInstance
|
|
54
210
|
*/
|
|
55
|
-
|
|
211
|
+
update(params: AssessmentsContextUpdateOptions, callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
|
|
56
212
|
/**
|
|
57
213
|
* Provide a user-friendly representation
|
|
58
214
|
*
|
|
59
215
|
* @returns Object
|
|
60
216
|
*/
|
|
61
217
|
toJSON(): {
|
|
218
|
+
accountSid: string;
|
|
219
|
+
assessmentId: string;
|
|
220
|
+
offset: number;
|
|
221
|
+
report: boolean;
|
|
222
|
+
weight: number;
|
|
223
|
+
agentId: string;
|
|
224
|
+
segmentId: string;
|
|
225
|
+
userName: string;
|
|
226
|
+
userEmail: string;
|
|
227
|
+
answerText: string;
|
|
228
|
+
answerId: string;
|
|
229
|
+
assessment: any;
|
|
230
|
+
timestamp: number;
|
|
62
231
|
url: string;
|
|
63
232
|
};
|
|
64
233
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
@@ -69,8 +238,67 @@ export interface AssessmentsListInstance {
|
|
|
69
238
|
_version: V1;
|
|
70
239
|
_solution: AssessmentsSolution;
|
|
71
240
|
_uri: string;
|
|
72
|
-
(): AssessmentsContext;
|
|
73
|
-
get(): AssessmentsContext;
|
|
241
|
+
(assessmentId: string): AssessmentsContext;
|
|
242
|
+
get(assessmentId: string): AssessmentsContext;
|
|
243
|
+
/**
|
|
244
|
+
* Create a AssessmentsInstance
|
|
245
|
+
*
|
|
246
|
+
* @param params - Parameter for request
|
|
247
|
+
* @param callback - Callback to handle processed record
|
|
248
|
+
*
|
|
249
|
+
* @returns Resolves to processed AssessmentsInstance
|
|
250
|
+
*/
|
|
251
|
+
create(params: AssessmentsListInstanceCreateOptions, callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
|
|
252
|
+
/**
|
|
253
|
+
* Streams AssessmentsInstance records from the API.
|
|
254
|
+
*
|
|
255
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
256
|
+
* is reached.
|
|
257
|
+
*
|
|
258
|
+
* The results are passed into the callback function, so this operation is memory
|
|
259
|
+
* efficient.
|
|
260
|
+
*
|
|
261
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
262
|
+
* function.
|
|
263
|
+
*
|
|
264
|
+
* @param { AssessmentsListInstanceEachOptions } [params] - Options for request
|
|
265
|
+
* @param { function } [callback] - Function to process each record
|
|
266
|
+
*/
|
|
267
|
+
each(callback?: (item: AssessmentsInstance, done: (err?: Error) => void) => void): void;
|
|
268
|
+
each(params: AssessmentsListInstanceEachOptions, callback?: (item: AssessmentsInstance, done: (err?: Error) => void) => void): void;
|
|
269
|
+
/**
|
|
270
|
+
* Retrieve a single target page of AssessmentsInstance records from the API.
|
|
271
|
+
*
|
|
272
|
+
* The request is executed immediately.
|
|
273
|
+
*
|
|
274
|
+
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
275
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
276
|
+
*/
|
|
277
|
+
getPage(targetUrl: string, callback?: (error: Error | null, items: AssessmentsPage) => any): Promise<AssessmentsPage>;
|
|
278
|
+
/**
|
|
279
|
+
* Lists AssessmentsInstance records from the API as a list.
|
|
280
|
+
*
|
|
281
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
282
|
+
* function.
|
|
283
|
+
*
|
|
284
|
+
* @param { AssessmentsListInstanceOptions } [params] - Options for request
|
|
285
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
286
|
+
*/
|
|
287
|
+
list(callback?: (error: Error | null, items: AssessmentsInstance[]) => any): Promise<AssessmentsInstance[]>;
|
|
288
|
+
list(params: AssessmentsListInstanceOptions, callback?: (error: Error | null, items: AssessmentsInstance[]) => any): Promise<AssessmentsInstance[]>;
|
|
289
|
+
/**
|
|
290
|
+
* Retrieve a single page of AssessmentsInstance records from the API.
|
|
291
|
+
*
|
|
292
|
+
* The request is executed immediately.
|
|
293
|
+
*
|
|
294
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
295
|
+
* function.
|
|
296
|
+
*
|
|
297
|
+
* @param { AssessmentsListInstancePageOptions } [params] - Options for request
|
|
298
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
299
|
+
*/
|
|
300
|
+
page(callback?: (error: Error | null, items: AssessmentsPage) => any): Promise<AssessmentsPage>;
|
|
301
|
+
page(params: AssessmentsListInstancePageOptions, callback?: (error: Error | null, items: AssessmentsPage) => any): Promise<AssessmentsPage>;
|
|
74
302
|
/**
|
|
75
303
|
* Provide a user-friendly representation
|
|
76
304
|
*/
|
|
@@ -78,4 +306,21 @@ export interface AssessmentsListInstance {
|
|
|
78
306
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
79
307
|
}
|
|
80
308
|
export declare function AssessmentsListInstance(version: V1): AssessmentsListInstance;
|
|
309
|
+
export declare class AssessmentsPage extends Page<V1, AssessmentsPayload, AssessmentsResource, AssessmentsInstance> {
|
|
310
|
+
/**
|
|
311
|
+
* Initialize the AssessmentsPage
|
|
312
|
+
*
|
|
313
|
+
* @param version - Version of the resource
|
|
314
|
+
* @param response - Response from the API
|
|
315
|
+
* @param solution - Path solution
|
|
316
|
+
*/
|
|
317
|
+
constructor(version: V1, response: Response<string>, solution: AssessmentsSolution);
|
|
318
|
+
/**
|
|
319
|
+
* Build an instance of AssessmentsInstance
|
|
320
|
+
*
|
|
321
|
+
* @param payload - Payload response from the API
|
|
322
|
+
*/
|
|
323
|
+
getInstance(payload: AssessmentsResource): AssessmentsInstance;
|
|
324
|
+
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
325
|
+
}
|
|
81
326
|
export {};
|
|
@@ -12,24 +12,54 @@
|
|
|
12
12
|
* https://openapi-generator.tech
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
15
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.AssessmentsListInstance = exports.AssessmentsInstance = exports.AssessmentsContextImpl = void 0;
|
|
19
|
+
exports.AssessmentsPage = exports.AssessmentsListInstance = exports.AssessmentsInstance = exports.AssessmentsContextImpl = void 0;
|
|
17
20
|
const util_1 = require("util");
|
|
21
|
+
const Page_1 = __importDefault(require("../../../base/Page"));
|
|
18
22
|
const deserialize = require("../../../base/deserialize");
|
|
19
23
|
const serialize = require("../../../base/serialize");
|
|
24
|
+
const utility_1 = require("../../../base/utility");
|
|
20
25
|
class AssessmentsContextImpl {
|
|
21
|
-
constructor(_version) {
|
|
26
|
+
constructor(_version, assessmentId) {
|
|
22
27
|
this._version = _version;
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
if (!(0, utility_1.isValidPathParam)(assessmentId)) {
|
|
29
|
+
throw new Error("Parameter 'assessmentId' is not valid.");
|
|
30
|
+
}
|
|
31
|
+
this._solution = { assessmentId };
|
|
32
|
+
this._uri = `/Insights/QM/Assessments/${assessmentId}`;
|
|
25
33
|
}
|
|
26
|
-
|
|
34
|
+
update(params, callback) {
|
|
35
|
+
if (params === null || params === undefined) {
|
|
36
|
+
throw new Error('Required parameter "params" missing.');
|
|
37
|
+
}
|
|
38
|
+
if (params["offset"] === null || params["offset"] === undefined) {
|
|
39
|
+
throw new Error("Required parameter \"params['offset']\" missing.");
|
|
40
|
+
}
|
|
41
|
+
if (params["answerText"] === null || params["answerText"] === undefined) {
|
|
42
|
+
throw new Error("Required parameter \"params['answerText']\" missing.");
|
|
43
|
+
}
|
|
44
|
+
if (params["answerId"] === null || params["answerId"] === undefined) {
|
|
45
|
+
throw new Error("Required parameter \"params['answerId']\" missing.");
|
|
46
|
+
}
|
|
47
|
+
let data = {};
|
|
48
|
+
data["Offset"] = params["offset"];
|
|
49
|
+
data["AnswerText"] = params["answerText"];
|
|
50
|
+
data["AnswerId"] = params["answerId"];
|
|
51
|
+
const headers = {};
|
|
52
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
53
|
+
if (params["token"] !== undefined)
|
|
54
|
+
headers["Token"] = params["token"];
|
|
27
55
|
const instance = this;
|
|
28
|
-
let operationVersion = instance._version, operationPromise = operationVersion.
|
|
56
|
+
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
29
57
|
uri: instance._uri,
|
|
30
58
|
method: "post",
|
|
59
|
+
data,
|
|
60
|
+
headers,
|
|
31
61
|
});
|
|
32
|
-
operationPromise = operationPromise.then((payload) => new AssessmentsInstance(operationVersion, payload));
|
|
62
|
+
operationPromise = operationPromise.then((payload) => new AssessmentsInstance(operationVersion, payload, instance._solution.assessmentId));
|
|
33
63
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
34
64
|
return operationPromise;
|
|
35
65
|
}
|
|
@@ -47,24 +77,32 @@ class AssessmentsContextImpl {
|
|
|
47
77
|
}
|
|
48
78
|
exports.AssessmentsContextImpl = AssessmentsContextImpl;
|
|
49
79
|
class AssessmentsInstance {
|
|
50
|
-
constructor(_version, payload) {
|
|
80
|
+
constructor(_version, payload, assessmentId) {
|
|
51
81
|
this._version = _version;
|
|
82
|
+
this.accountSid = payload.account_sid;
|
|
83
|
+
this.assessmentId = payload.assessment_id;
|
|
84
|
+
this.offset = payload.offset;
|
|
85
|
+
this.report = payload.report;
|
|
86
|
+
this.weight = payload.weight;
|
|
87
|
+
this.agentId = payload.agent_id;
|
|
88
|
+
this.segmentId = payload.segment_id;
|
|
89
|
+
this.userName = payload.user_name;
|
|
90
|
+
this.userEmail = payload.user_email;
|
|
91
|
+
this.answerText = payload.answer_text;
|
|
92
|
+
this.answerId = payload.answer_id;
|
|
93
|
+
this.assessment = payload.assessment;
|
|
94
|
+
this.timestamp = payload.timestamp;
|
|
52
95
|
this.url = payload.url;
|
|
53
|
-
this._solution = {};
|
|
96
|
+
this._solution = { assessmentId: assessmentId || this.assessmentId };
|
|
54
97
|
}
|
|
55
98
|
get _proxy() {
|
|
56
|
-
this._context =
|
|
99
|
+
this._context =
|
|
100
|
+
this._context ||
|
|
101
|
+
new AssessmentsContextImpl(this._version, this._solution.assessmentId);
|
|
57
102
|
return this._context;
|
|
58
103
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
* @param callback - Callback to handle processed record
|
|
63
|
-
*
|
|
64
|
-
* @returns Resolves to processed AssessmentsInstance
|
|
65
|
-
*/
|
|
66
|
-
create(callback) {
|
|
67
|
-
return this._proxy.create(callback);
|
|
104
|
+
update(params, callback) {
|
|
105
|
+
return this._proxy.update(params, callback);
|
|
68
106
|
}
|
|
69
107
|
/**
|
|
70
108
|
* Provide a user-friendly representation
|
|
@@ -73,6 +111,19 @@ class AssessmentsInstance {
|
|
|
73
111
|
*/
|
|
74
112
|
toJSON() {
|
|
75
113
|
return {
|
|
114
|
+
accountSid: this.accountSid,
|
|
115
|
+
assessmentId: this.assessmentId,
|
|
116
|
+
offset: this.offset,
|
|
117
|
+
report: this.report,
|
|
118
|
+
weight: this.weight,
|
|
119
|
+
agentId: this.agentId,
|
|
120
|
+
segmentId: this.segmentId,
|
|
121
|
+
userName: this.userName,
|
|
122
|
+
userEmail: this.userEmail,
|
|
123
|
+
answerText: this.answerText,
|
|
124
|
+
answerId: this.answerId,
|
|
125
|
+
assessment: this.assessment,
|
|
126
|
+
timestamp: this.timestamp,
|
|
76
127
|
url: this.url,
|
|
77
128
|
};
|
|
78
129
|
}
|
|
@@ -82,13 +133,123 @@ class AssessmentsInstance {
|
|
|
82
133
|
}
|
|
83
134
|
exports.AssessmentsInstance = AssessmentsInstance;
|
|
84
135
|
function AssessmentsListInstance(version) {
|
|
85
|
-
const instance = (() => instance.get());
|
|
86
|
-
instance.get = function get() {
|
|
87
|
-
return new AssessmentsContextImpl(version);
|
|
136
|
+
const instance = ((assessmentId) => instance.get(assessmentId));
|
|
137
|
+
instance.get = function get(assessmentId) {
|
|
138
|
+
return new AssessmentsContextImpl(version, assessmentId);
|
|
88
139
|
};
|
|
89
140
|
instance._version = version;
|
|
90
141
|
instance._solution = {};
|
|
91
|
-
instance._uri =
|
|
142
|
+
instance._uri = `/Insights/QM/Assessments`;
|
|
143
|
+
instance.create = function create(params, callback) {
|
|
144
|
+
if (params === null || params === undefined) {
|
|
145
|
+
throw new Error('Required parameter "params" missing.');
|
|
146
|
+
}
|
|
147
|
+
if (params["categoryId"] === null || params["categoryId"] === undefined) {
|
|
148
|
+
throw new Error("Required parameter \"params['categoryId']\" missing.");
|
|
149
|
+
}
|
|
150
|
+
if (params["categoryName"] === null ||
|
|
151
|
+
params["categoryName"] === undefined) {
|
|
152
|
+
throw new Error("Required parameter \"params['categoryName']\" missing.");
|
|
153
|
+
}
|
|
154
|
+
if (params["segmentId"] === null || params["segmentId"] === undefined) {
|
|
155
|
+
throw new Error("Required parameter \"params['segmentId']\" missing.");
|
|
156
|
+
}
|
|
157
|
+
if (params["userName"] === null || params["userName"] === undefined) {
|
|
158
|
+
throw new Error("Required parameter \"params['userName']\" missing.");
|
|
159
|
+
}
|
|
160
|
+
if (params["userEmail"] === null || params["userEmail"] === undefined) {
|
|
161
|
+
throw new Error("Required parameter \"params['userEmail']\" missing.");
|
|
162
|
+
}
|
|
163
|
+
if (params["agentId"] === null || params["agentId"] === undefined) {
|
|
164
|
+
throw new Error("Required parameter \"params['agentId']\" missing.");
|
|
165
|
+
}
|
|
166
|
+
if (params["offset"] === null || params["offset"] === undefined) {
|
|
167
|
+
throw new Error("Required parameter \"params['offset']\" missing.");
|
|
168
|
+
}
|
|
169
|
+
if (params["metricId"] === null || params["metricId"] === undefined) {
|
|
170
|
+
throw new Error("Required parameter \"params['metricId']\" missing.");
|
|
171
|
+
}
|
|
172
|
+
if (params["metricName"] === null || params["metricName"] === undefined) {
|
|
173
|
+
throw new Error("Required parameter \"params['metricName']\" missing.");
|
|
174
|
+
}
|
|
175
|
+
if (params["answerText"] === null || params["answerText"] === undefined) {
|
|
176
|
+
throw new Error("Required parameter \"params['answerText']\" missing.");
|
|
177
|
+
}
|
|
178
|
+
if (params["answerId"] === null || params["answerId"] === undefined) {
|
|
179
|
+
throw new Error("Required parameter \"params['answerId']\" missing.");
|
|
180
|
+
}
|
|
181
|
+
if (params["questionnaireId"] === null ||
|
|
182
|
+
params["questionnaireId"] === undefined) {
|
|
183
|
+
throw new Error("Required parameter \"params['questionnaireId']\" missing.");
|
|
184
|
+
}
|
|
185
|
+
let data = {};
|
|
186
|
+
data["CategoryId"] = params["categoryId"];
|
|
187
|
+
data["CategoryName"] = params["categoryName"];
|
|
188
|
+
data["SegmentId"] = params["segmentId"];
|
|
189
|
+
data["UserName"] = params["userName"];
|
|
190
|
+
data["UserEmail"] = params["userEmail"];
|
|
191
|
+
data["AgentId"] = params["agentId"];
|
|
192
|
+
data["Offset"] = params["offset"];
|
|
193
|
+
data["MetricId"] = params["metricId"];
|
|
194
|
+
data["MetricName"] = params["metricName"];
|
|
195
|
+
data["AnswerText"] = params["answerText"];
|
|
196
|
+
data["AnswerId"] = params["answerId"];
|
|
197
|
+
data["QuestionnaireId"] = params["questionnaireId"];
|
|
198
|
+
const headers = {};
|
|
199
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
200
|
+
if (params["token"] !== undefined)
|
|
201
|
+
headers["Token"] = params["token"];
|
|
202
|
+
let operationVersion = version, operationPromise = operationVersion.create({
|
|
203
|
+
uri: instance._uri,
|
|
204
|
+
method: "post",
|
|
205
|
+
data,
|
|
206
|
+
headers,
|
|
207
|
+
});
|
|
208
|
+
operationPromise = operationPromise.then((payload) => new AssessmentsInstance(operationVersion, payload));
|
|
209
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
210
|
+
return operationPromise;
|
|
211
|
+
};
|
|
212
|
+
instance.page = function page(params, callback) {
|
|
213
|
+
if (params instanceof Function) {
|
|
214
|
+
callback = params;
|
|
215
|
+
params = {};
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
params = params || {};
|
|
219
|
+
}
|
|
220
|
+
let data = {};
|
|
221
|
+
if (params["segmentId"] !== undefined)
|
|
222
|
+
data["SegmentId"] = params["segmentId"];
|
|
223
|
+
if (params["pageSize"] !== undefined)
|
|
224
|
+
data["PageSize"] = params["pageSize"];
|
|
225
|
+
if (params.pageNumber !== undefined)
|
|
226
|
+
data["Page"] = params.pageNumber;
|
|
227
|
+
if (params.pageToken !== undefined)
|
|
228
|
+
data["PageToken"] = params.pageToken;
|
|
229
|
+
const headers = {};
|
|
230
|
+
if (params["token"] !== undefined)
|
|
231
|
+
headers["Token"] = params["token"];
|
|
232
|
+
let operationVersion = version, operationPromise = operationVersion.page({
|
|
233
|
+
uri: instance._uri,
|
|
234
|
+
method: "get",
|
|
235
|
+
params: data,
|
|
236
|
+
headers,
|
|
237
|
+
});
|
|
238
|
+
operationPromise = operationPromise.then((payload) => new AssessmentsPage(operationVersion, payload, instance._solution));
|
|
239
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
240
|
+
return operationPromise;
|
|
241
|
+
};
|
|
242
|
+
instance.each = instance._version.each;
|
|
243
|
+
instance.list = instance._version.list;
|
|
244
|
+
instance.getPage = function getPage(targetUrl, callback) {
|
|
245
|
+
const operationPromise = instance._version._domain.twilio.request({
|
|
246
|
+
method: "get",
|
|
247
|
+
uri: targetUrl,
|
|
248
|
+
});
|
|
249
|
+
let pagePromise = operationPromise.then((payload) => new AssessmentsPage(instance._version, payload, instance._solution));
|
|
250
|
+
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
251
|
+
return pagePromise;
|
|
252
|
+
};
|
|
92
253
|
instance.toJSON = function toJSON() {
|
|
93
254
|
return instance._solution;
|
|
94
255
|
};
|
|
@@ -98,3 +259,27 @@ function AssessmentsListInstance(version) {
|
|
|
98
259
|
return instance;
|
|
99
260
|
}
|
|
100
261
|
exports.AssessmentsListInstance = AssessmentsListInstance;
|
|
262
|
+
class AssessmentsPage extends Page_1.default {
|
|
263
|
+
/**
|
|
264
|
+
* Initialize the AssessmentsPage
|
|
265
|
+
*
|
|
266
|
+
* @param version - Version of the resource
|
|
267
|
+
* @param response - Response from the API
|
|
268
|
+
* @param solution - Path solution
|
|
269
|
+
*/
|
|
270
|
+
constructor(version, response, solution) {
|
|
271
|
+
super(version, response, solution);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Build an instance of AssessmentsInstance
|
|
275
|
+
*
|
|
276
|
+
* @param payload - Payload response from the API
|
|
277
|
+
*/
|
|
278
|
+
getInstance(payload) {
|
|
279
|
+
return new AssessmentsInstance(this._version, payload);
|
|
280
|
+
}
|
|
281
|
+
[util_1.inspect.custom](depth, options) {
|
|
282
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
exports.AssessmentsPage = AssessmentsPage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
3
|
import V1 from "../V1";
|
|
4
|
-
type ConfigurationStatus = "ok" | "inprogress" | "notstarted";
|
|
4
|
+
export type ConfigurationStatus = "ok" | "inprogress" | "notstarted";
|
|
5
5
|
/**
|
|
6
6
|
* Options to pass to fetch a ConfigurationInstance
|
|
7
7
|
*/
|
|
@@ -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 V1 from "../V1";
|
|
6
|
-
type FlexFlowChannelType = "web" | "sms" | "facebook" | "whatsapp" | "line" | "custom";
|
|
7
|
-
type FlexFlowIntegrationType = "studio" | "external" | "task";
|
|
6
|
+
export type FlexFlowChannelType = "web" | "sms" | "facebook" | "whatsapp" | "line" | "custom";
|
|
7
|
+
export type FlexFlowIntegrationType = "studio" | "external" | "task";
|
|
8
8
|
/**
|
|
9
9
|
* Options to pass to update a FlexFlowInstance
|
|
10
10
|
*/
|