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
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import Page, { TwilioResponsePayload } from "../../../base/Page";
|
|
4
|
+
import Response from "../../../http/response";
|
|
5
|
+
import V1 from "../V1";
|
|
6
|
+
/**
|
|
7
|
+
* Options to pass to each
|
|
8
|
+
*/
|
|
9
|
+
export interface InsightsConversationsListInstanceEachOptions {
|
|
10
|
+
/** The Token HTTP request header */
|
|
11
|
+
token?: string;
|
|
12
|
+
/** Unique Id of the segment for which conversation details needs to be fetched */
|
|
13
|
+
segmentId?: string;
|
|
14
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
15
|
+
pageSize?: number;
|
|
16
|
+
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
17
|
+
callback?: (item: InsightsConversationsInstance, done: (err?: Error) => void) => void;
|
|
18
|
+
/** Function to be called upon completion of streaming */
|
|
19
|
+
done?: Function;
|
|
20
|
+
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
21
|
+
limit?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Options to pass to list
|
|
25
|
+
*/
|
|
26
|
+
export interface InsightsConversationsListInstanceOptions {
|
|
27
|
+
/** The Token HTTP request header */
|
|
28
|
+
token?: string;
|
|
29
|
+
/** Unique Id of the segment for which conversation details needs to be fetched */
|
|
30
|
+
segmentId?: string;
|
|
31
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
32
|
+
pageSize?: number;
|
|
33
|
+
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
34
|
+
limit?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Options to pass to page
|
|
38
|
+
*/
|
|
39
|
+
export interface InsightsConversationsListInstancePageOptions {
|
|
40
|
+
/** The Token HTTP request header */
|
|
41
|
+
token?: string;
|
|
42
|
+
/** Unique Id of the segment for which conversation details needs to be fetched */
|
|
43
|
+
segmentId?: string;
|
|
44
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
45
|
+
pageSize?: number;
|
|
46
|
+
/** Page Number, this value is simply for client state */
|
|
47
|
+
pageNumber?: number;
|
|
48
|
+
/** PageToken provided by the API */
|
|
49
|
+
pageToken?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface InsightsConversationsSolution {
|
|
52
|
+
}
|
|
53
|
+
export interface InsightsConversationsListInstance {
|
|
54
|
+
_version: V1;
|
|
55
|
+
_solution: InsightsConversationsSolution;
|
|
56
|
+
_uri: string;
|
|
57
|
+
/**
|
|
58
|
+
* Streams InsightsConversationsInstance records from the API.
|
|
59
|
+
*
|
|
60
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
61
|
+
* is reached.
|
|
62
|
+
*
|
|
63
|
+
* The results are passed into the callback function, so this operation is memory
|
|
64
|
+
* efficient.
|
|
65
|
+
*
|
|
66
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
67
|
+
* function.
|
|
68
|
+
*
|
|
69
|
+
* @param { InsightsConversationsListInstanceEachOptions } [params] - Options for request
|
|
70
|
+
* @param { function } [callback] - Function to process each record
|
|
71
|
+
*/
|
|
72
|
+
each(callback?: (item: InsightsConversationsInstance, done: (err?: Error) => void) => void): void;
|
|
73
|
+
each(params: InsightsConversationsListInstanceEachOptions, callback?: (item: InsightsConversationsInstance, done: (err?: Error) => void) => void): void;
|
|
74
|
+
/**
|
|
75
|
+
* Retrieve a single target page of InsightsConversationsInstance records from the API.
|
|
76
|
+
*
|
|
77
|
+
* The request is executed immediately.
|
|
78
|
+
*
|
|
79
|
+
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
80
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
81
|
+
*/
|
|
82
|
+
getPage(targetUrl: string, callback?: (error: Error | null, items: InsightsConversationsPage) => any): Promise<InsightsConversationsPage>;
|
|
83
|
+
/**
|
|
84
|
+
* Lists InsightsConversationsInstance records from the API as a list.
|
|
85
|
+
*
|
|
86
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
87
|
+
* function.
|
|
88
|
+
*
|
|
89
|
+
* @param { InsightsConversationsListInstanceOptions } [params] - Options for request
|
|
90
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
91
|
+
*/
|
|
92
|
+
list(callback?: (error: Error | null, items: InsightsConversationsInstance[]) => any): Promise<InsightsConversationsInstance[]>;
|
|
93
|
+
list(params: InsightsConversationsListInstanceOptions, callback?: (error: Error | null, items: InsightsConversationsInstance[]) => any): Promise<InsightsConversationsInstance[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Retrieve a single page of InsightsConversationsInstance records from the API.
|
|
96
|
+
*
|
|
97
|
+
* The request is executed immediately.
|
|
98
|
+
*
|
|
99
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
100
|
+
* function.
|
|
101
|
+
*
|
|
102
|
+
* @param { InsightsConversationsListInstancePageOptions } [params] - Options for request
|
|
103
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
104
|
+
*/
|
|
105
|
+
page(callback?: (error: Error | null, items: InsightsConversationsPage) => any): Promise<InsightsConversationsPage>;
|
|
106
|
+
page(params: InsightsConversationsListInstancePageOptions, callback?: (error: Error | null, items: InsightsConversationsPage) => any): Promise<InsightsConversationsPage>;
|
|
107
|
+
/**
|
|
108
|
+
* Provide a user-friendly representation
|
|
109
|
+
*/
|
|
110
|
+
toJSON(): any;
|
|
111
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
112
|
+
}
|
|
113
|
+
export declare function InsightsConversationsListInstance(version: V1): InsightsConversationsListInstance;
|
|
114
|
+
interface InsightsConversationsPayload extends TwilioResponsePayload {
|
|
115
|
+
conversations: InsightsConversationsResource[];
|
|
116
|
+
}
|
|
117
|
+
interface InsightsConversationsResource {
|
|
118
|
+
account_id: string;
|
|
119
|
+
conversation_id: string;
|
|
120
|
+
segment_count: number;
|
|
121
|
+
segments: Array<any>;
|
|
122
|
+
}
|
|
123
|
+
export declare class InsightsConversationsInstance {
|
|
124
|
+
protected _version: V1;
|
|
125
|
+
constructor(_version: V1, payload: InsightsConversationsResource);
|
|
126
|
+
/**
|
|
127
|
+
* The id of the account.
|
|
128
|
+
*/
|
|
129
|
+
accountId: string;
|
|
130
|
+
/**
|
|
131
|
+
* The unique id of the conversation
|
|
132
|
+
*/
|
|
133
|
+
conversationId: string;
|
|
134
|
+
/**
|
|
135
|
+
* The count of segments for a conversation
|
|
136
|
+
*/
|
|
137
|
+
segmentCount: number;
|
|
138
|
+
/**
|
|
139
|
+
* The Segments of a conversation
|
|
140
|
+
*/
|
|
141
|
+
segments: Array<any>;
|
|
142
|
+
/**
|
|
143
|
+
* Provide a user-friendly representation
|
|
144
|
+
*
|
|
145
|
+
* @returns Object
|
|
146
|
+
*/
|
|
147
|
+
toJSON(): {
|
|
148
|
+
accountId: string;
|
|
149
|
+
conversationId: string;
|
|
150
|
+
segmentCount: number;
|
|
151
|
+
segments: any[];
|
|
152
|
+
};
|
|
153
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
154
|
+
}
|
|
155
|
+
export declare class InsightsConversationsPage extends Page<V1, InsightsConversationsPayload, InsightsConversationsResource, InsightsConversationsInstance> {
|
|
156
|
+
/**
|
|
157
|
+
* Initialize the InsightsConversationsPage
|
|
158
|
+
*
|
|
159
|
+
* @param version - Version of the resource
|
|
160
|
+
* @param response - Response from the API
|
|
161
|
+
* @param solution - Path solution
|
|
162
|
+
*/
|
|
163
|
+
constructor(version: V1, response: Response<string>, solution: InsightsConversationsSolution);
|
|
164
|
+
/**
|
|
165
|
+
* Build an instance of InsightsConversationsInstance
|
|
166
|
+
*
|
|
167
|
+
* @param payload - Payload response from the API
|
|
168
|
+
*/
|
|
169
|
+
getInstance(payload: InsightsConversationsResource): InsightsConversationsInstance;
|
|
170
|
+
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
171
|
+
}
|
|
172
|
+
export {};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Flex
|
|
9
|
+
* This is the public Twilio REST API.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.InsightsConversationsPage = exports.InsightsConversationsInstance = exports.InsightsConversationsListInstance = void 0;
|
|
20
|
+
const util_1 = require("util");
|
|
21
|
+
const Page_1 = __importDefault(require("../../../base/Page"));
|
|
22
|
+
const deserialize = require("../../../base/deserialize");
|
|
23
|
+
const serialize = require("../../../base/serialize");
|
|
24
|
+
function InsightsConversationsListInstance(version) {
|
|
25
|
+
const instance = {};
|
|
26
|
+
instance._version = version;
|
|
27
|
+
instance._solution = {};
|
|
28
|
+
instance._uri = `/Insights/Conversations`;
|
|
29
|
+
instance.page = function page(params, callback) {
|
|
30
|
+
if (params instanceof Function) {
|
|
31
|
+
callback = params;
|
|
32
|
+
params = {};
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
params = params || {};
|
|
36
|
+
}
|
|
37
|
+
let data = {};
|
|
38
|
+
if (params["segmentId"] !== undefined)
|
|
39
|
+
data["SegmentId"] = params["segmentId"];
|
|
40
|
+
if (params["pageSize"] !== undefined)
|
|
41
|
+
data["PageSize"] = params["pageSize"];
|
|
42
|
+
if (params.pageNumber !== undefined)
|
|
43
|
+
data["Page"] = params.pageNumber;
|
|
44
|
+
if (params.pageToken !== undefined)
|
|
45
|
+
data["PageToken"] = params.pageToken;
|
|
46
|
+
const headers = {};
|
|
47
|
+
if (params["token"] !== undefined)
|
|
48
|
+
headers["Token"] = params["token"];
|
|
49
|
+
let operationVersion = version, operationPromise = operationVersion.page({
|
|
50
|
+
uri: instance._uri,
|
|
51
|
+
method: "get",
|
|
52
|
+
params: data,
|
|
53
|
+
headers,
|
|
54
|
+
});
|
|
55
|
+
operationPromise = operationPromise.then((payload) => new InsightsConversationsPage(operationVersion, payload, instance._solution));
|
|
56
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
57
|
+
return operationPromise;
|
|
58
|
+
};
|
|
59
|
+
instance.each = instance._version.each;
|
|
60
|
+
instance.list = instance._version.list;
|
|
61
|
+
instance.getPage = function getPage(targetUrl, callback) {
|
|
62
|
+
const operationPromise = instance._version._domain.twilio.request({
|
|
63
|
+
method: "get",
|
|
64
|
+
uri: targetUrl,
|
|
65
|
+
});
|
|
66
|
+
let pagePromise = operationPromise.then((payload) => new InsightsConversationsPage(instance._version, payload, instance._solution));
|
|
67
|
+
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
68
|
+
return pagePromise;
|
|
69
|
+
};
|
|
70
|
+
instance.toJSON = function toJSON() {
|
|
71
|
+
return instance._solution;
|
|
72
|
+
};
|
|
73
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
74
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
75
|
+
};
|
|
76
|
+
return instance;
|
|
77
|
+
}
|
|
78
|
+
exports.InsightsConversationsListInstance = InsightsConversationsListInstance;
|
|
79
|
+
class InsightsConversationsInstance {
|
|
80
|
+
constructor(_version, payload) {
|
|
81
|
+
this._version = _version;
|
|
82
|
+
this.accountId = payload.account_id;
|
|
83
|
+
this.conversationId = payload.conversation_id;
|
|
84
|
+
this.segmentCount = deserialize.integer(payload.segment_count);
|
|
85
|
+
this.segments = payload.segments;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Provide a user-friendly representation
|
|
89
|
+
*
|
|
90
|
+
* @returns Object
|
|
91
|
+
*/
|
|
92
|
+
toJSON() {
|
|
93
|
+
return {
|
|
94
|
+
accountId: this.accountId,
|
|
95
|
+
conversationId: this.conversationId,
|
|
96
|
+
segmentCount: this.segmentCount,
|
|
97
|
+
segments: this.segments,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
[util_1.inspect.custom](_depth, options) {
|
|
101
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.InsightsConversationsInstance = InsightsConversationsInstance;
|
|
105
|
+
class InsightsConversationsPage extends Page_1.default {
|
|
106
|
+
/**
|
|
107
|
+
* Initialize the InsightsConversationsPage
|
|
108
|
+
*
|
|
109
|
+
* @param version - Version of the resource
|
|
110
|
+
* @param response - Response from the API
|
|
111
|
+
* @param solution - Path solution
|
|
112
|
+
*/
|
|
113
|
+
constructor(version, response, solution) {
|
|
114
|
+
super(version, response, solution);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Build an instance of InsightsConversationsInstance
|
|
118
|
+
*
|
|
119
|
+
* @param payload - Payload response from the API
|
|
120
|
+
*/
|
|
121
|
+
getInstance(payload) {
|
|
122
|
+
return new InsightsConversationsInstance(this._version, payload);
|
|
123
|
+
}
|
|
124
|
+
[util_1.inspect.custom](depth, options) {
|
|
125
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.InsightsConversationsPage = InsightsConversationsPage;
|
|
@@ -35,14 +35,14 @@ export interface InsightsQuestionnairesQuestionListInstanceCreateOptions {
|
|
|
35
35
|
categoryId: string;
|
|
36
36
|
/** The question. */
|
|
37
37
|
question: string;
|
|
38
|
-
/** The description for the question. */
|
|
39
|
-
description: string;
|
|
40
38
|
/** The answer_set for the question. */
|
|
41
39
|
answerSetId: string;
|
|
42
40
|
/** The flag to enable for disable NA for answer. */
|
|
43
41
|
allowNa: boolean;
|
|
44
42
|
/** The Token HTTP request header */
|
|
45
43
|
token?: string;
|
|
44
|
+
/** The description for the question. */
|
|
45
|
+
description?: string;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Options to pass to each
|
|
@@ -152,6 +152,7 @@ interface InsightsQuestionnairesQuestionResource {
|
|
|
152
152
|
answer_set_id: string;
|
|
153
153
|
allow_na: boolean;
|
|
154
154
|
usage: number;
|
|
155
|
+
answer_set: any;
|
|
155
156
|
url: string;
|
|
156
157
|
}
|
|
157
158
|
export declare class InsightsQuestionnairesQuestionInstance {
|
|
@@ -191,6 +192,10 @@ export declare class InsightsQuestionnairesQuestionInstance {
|
|
|
191
192
|
* Integer value that tells a particular question is used by how many questionnaires
|
|
192
193
|
*/
|
|
193
194
|
usage: number;
|
|
195
|
+
/**
|
|
196
|
+
* Set of answers for the question
|
|
197
|
+
*/
|
|
198
|
+
answerSet: any;
|
|
194
199
|
url: string;
|
|
195
200
|
private get _proxy();
|
|
196
201
|
/**
|
|
@@ -233,6 +238,7 @@ export declare class InsightsQuestionnairesQuestionInstance {
|
|
|
233
238
|
answerSetId: string;
|
|
234
239
|
allowNa: boolean;
|
|
235
240
|
usage: number;
|
|
241
|
+
answerSet: any;
|
|
236
242
|
url: string;
|
|
237
243
|
};
|
|
238
244
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
@@ -109,6 +109,7 @@ class InsightsQuestionnairesQuestionInstance {
|
|
|
109
109
|
this.answerSetId = payload.answer_set_id;
|
|
110
110
|
this.allowNa = payload.allow_na;
|
|
111
111
|
this.usage = deserialize.integer(payload.usage);
|
|
112
|
+
this.answerSet = payload.answer_set;
|
|
112
113
|
this.url = payload.url;
|
|
113
114
|
this._solution = { questionId: questionId || this.questionId };
|
|
114
115
|
}
|
|
@@ -139,6 +140,7 @@ class InsightsQuestionnairesQuestionInstance {
|
|
|
139
140
|
answerSetId: this.answerSetId,
|
|
140
141
|
allowNa: this.allowNa,
|
|
141
142
|
usage: this.usage,
|
|
143
|
+
answerSet: this.answerSet,
|
|
142
144
|
url: this.url,
|
|
143
145
|
};
|
|
144
146
|
}
|
|
@@ -165,9 +167,6 @@ function InsightsQuestionnairesQuestionListInstance(version) {
|
|
|
165
167
|
if (params["question"] === null || params["question"] === undefined) {
|
|
166
168
|
throw new Error("Required parameter \"params['question']\" missing.");
|
|
167
169
|
}
|
|
168
|
-
if (params["description"] === null || params["description"] === undefined) {
|
|
169
|
-
throw new Error("Required parameter \"params['description']\" missing.");
|
|
170
|
-
}
|
|
171
170
|
if (params["answerSetId"] === null || params["answerSetId"] === undefined) {
|
|
172
171
|
throw new Error("Required parameter \"params['answerSetId']\" missing.");
|
|
173
172
|
}
|
|
@@ -177,9 +176,10 @@ function InsightsQuestionnairesQuestionListInstance(version) {
|
|
|
177
176
|
let data = {};
|
|
178
177
|
data["CategoryId"] = params["categoryId"];
|
|
179
178
|
data["Question"] = params["question"];
|
|
180
|
-
data["Description"] = params["description"];
|
|
181
179
|
data["AnswerSetId"] = params["answerSetId"];
|
|
182
180
|
data["AllowNa"] = serialize.bool(params["allowNa"]);
|
|
181
|
+
if (params["description"] !== undefined)
|
|
182
|
+
data["Description"] = params["description"];
|
|
183
183
|
const headers = {};
|
|
184
184
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
185
185
|
if (params["token"] !== undefined)
|
|
@@ -1,5 +1,7 @@
|
|
|
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";
|
|
4
6
|
/**
|
|
5
7
|
* Options to pass to fetch a InsightsSegmentsInstance
|
|
@@ -8,6 +10,51 @@ export interface InsightsSegmentsContextFetchOptions {
|
|
|
8
10
|
/** The Token HTTP request header */
|
|
9
11
|
token?: string;
|
|
10
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Options to pass to each
|
|
15
|
+
*/
|
|
16
|
+
export interface InsightsSegmentsListInstanceEachOptions {
|
|
17
|
+
/** The Token HTTP request header */
|
|
18
|
+
token?: string;
|
|
19
|
+
/** The list of reservation Ids */
|
|
20
|
+
reservationId?: Array<string>;
|
|
21
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
22
|
+
pageSize?: number;
|
|
23
|
+
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
24
|
+
callback?: (item: InsightsSegmentsInstance, done: (err?: Error) => void) => void;
|
|
25
|
+
/** Function to be called upon completion of streaming */
|
|
26
|
+
done?: Function;
|
|
27
|
+
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
28
|
+
limit?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Options to pass to list
|
|
32
|
+
*/
|
|
33
|
+
export interface InsightsSegmentsListInstanceOptions {
|
|
34
|
+
/** The Token HTTP request header */
|
|
35
|
+
token?: string;
|
|
36
|
+
/** The list of reservation Ids */
|
|
37
|
+
reservationId?: Array<string>;
|
|
38
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
39
|
+
pageSize?: number;
|
|
40
|
+
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
41
|
+
limit?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Options to pass to page
|
|
45
|
+
*/
|
|
46
|
+
export interface InsightsSegmentsListInstancePageOptions {
|
|
47
|
+
/** The Token HTTP request header */
|
|
48
|
+
token?: string;
|
|
49
|
+
/** The list of reservation Ids */
|
|
50
|
+
reservationId?: Array<string>;
|
|
51
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
52
|
+
pageSize?: number;
|
|
53
|
+
/** Page Number, this value is simply for client state */
|
|
54
|
+
pageNumber?: number;
|
|
55
|
+
/** PageToken provided by the API */
|
|
56
|
+
pageToken?: string;
|
|
57
|
+
}
|
|
11
58
|
export interface InsightsSegmentsContext {
|
|
12
59
|
/**
|
|
13
60
|
* Fetch a InsightsSegmentsInstance
|
|
@@ -49,6 +96,9 @@ export declare class InsightsSegmentsContextImpl implements InsightsSegmentsCont
|
|
|
49
96
|
toJSON(): InsightsSegmentsContextSolution;
|
|
50
97
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
51
98
|
}
|
|
99
|
+
interface InsightsSegmentsPayload extends TwilioResponsePayload {
|
|
100
|
+
segments: InsightsSegmentsResource[];
|
|
101
|
+
}
|
|
52
102
|
interface InsightsSegmentsResource {
|
|
53
103
|
segment_id: string;
|
|
54
104
|
external_id: string;
|
|
@@ -68,7 +118,7 @@ interface InsightsSegmentsResource {
|
|
|
68
118
|
customer_name: string;
|
|
69
119
|
customer_link: string;
|
|
70
120
|
segment_recording_offset: string;
|
|
71
|
-
media:
|
|
121
|
+
media: any;
|
|
72
122
|
assessment_type: any;
|
|
73
123
|
assessment_percentage: any;
|
|
74
124
|
url: string;
|
|
@@ -145,9 +195,9 @@ export declare class InsightsSegmentsInstance {
|
|
|
145
195
|
*/
|
|
146
196
|
segmentRecordingOffset: string;
|
|
147
197
|
/**
|
|
148
|
-
* The
|
|
198
|
+
* The media identifiers of the conversation.
|
|
149
199
|
*/
|
|
150
|
-
media:
|
|
200
|
+
media: any;
|
|
151
201
|
/**
|
|
152
202
|
* The type of the assessment.
|
|
153
203
|
*/
|
|
@@ -199,7 +249,7 @@ export declare class InsightsSegmentsInstance {
|
|
|
199
249
|
customerName: string;
|
|
200
250
|
customerLink: string;
|
|
201
251
|
segmentRecordingOffset: string;
|
|
202
|
-
media:
|
|
252
|
+
media: any;
|
|
203
253
|
assessmentType: any;
|
|
204
254
|
assessmentPercentage: any;
|
|
205
255
|
url: string;
|
|
@@ -214,6 +264,56 @@ export interface InsightsSegmentsListInstance {
|
|
|
214
264
|
_uri: string;
|
|
215
265
|
(segmentId: string): InsightsSegmentsContext;
|
|
216
266
|
get(segmentId: string): InsightsSegmentsContext;
|
|
267
|
+
/**
|
|
268
|
+
* Streams InsightsSegmentsInstance records from the API.
|
|
269
|
+
*
|
|
270
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
271
|
+
* is reached.
|
|
272
|
+
*
|
|
273
|
+
* The results are passed into the callback function, so this operation is memory
|
|
274
|
+
* efficient.
|
|
275
|
+
*
|
|
276
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
277
|
+
* function.
|
|
278
|
+
*
|
|
279
|
+
* @param { InsightsSegmentsListInstanceEachOptions } [params] - Options for request
|
|
280
|
+
* @param { function } [callback] - Function to process each record
|
|
281
|
+
*/
|
|
282
|
+
each(callback?: (item: InsightsSegmentsInstance, done: (err?: Error) => void) => void): void;
|
|
283
|
+
each(params: InsightsSegmentsListInstanceEachOptions, callback?: (item: InsightsSegmentsInstance, done: (err?: Error) => void) => void): void;
|
|
284
|
+
/**
|
|
285
|
+
* Retrieve a single target page of InsightsSegmentsInstance records from the API.
|
|
286
|
+
*
|
|
287
|
+
* The request is executed immediately.
|
|
288
|
+
*
|
|
289
|
+
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
290
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
291
|
+
*/
|
|
292
|
+
getPage(targetUrl: string, callback?: (error: Error | null, items: InsightsSegmentsPage) => any): Promise<InsightsSegmentsPage>;
|
|
293
|
+
/**
|
|
294
|
+
* Lists InsightsSegmentsInstance records from the API as a list.
|
|
295
|
+
*
|
|
296
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
297
|
+
* function.
|
|
298
|
+
*
|
|
299
|
+
* @param { InsightsSegmentsListInstanceOptions } [params] - Options for request
|
|
300
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
301
|
+
*/
|
|
302
|
+
list(callback?: (error: Error | null, items: InsightsSegmentsInstance[]) => any): Promise<InsightsSegmentsInstance[]>;
|
|
303
|
+
list(params: InsightsSegmentsListInstanceOptions, callback?: (error: Error | null, items: InsightsSegmentsInstance[]) => any): Promise<InsightsSegmentsInstance[]>;
|
|
304
|
+
/**
|
|
305
|
+
* Retrieve a single page of InsightsSegmentsInstance records from the API.
|
|
306
|
+
*
|
|
307
|
+
* The request is executed immediately.
|
|
308
|
+
*
|
|
309
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
310
|
+
* function.
|
|
311
|
+
*
|
|
312
|
+
* @param { InsightsSegmentsListInstancePageOptions } [params] - Options for request
|
|
313
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
314
|
+
*/
|
|
315
|
+
page(callback?: (error: Error | null, items: InsightsSegmentsPage) => any): Promise<InsightsSegmentsPage>;
|
|
316
|
+
page(params: InsightsSegmentsListInstancePageOptions, callback?: (error: Error | null, items: InsightsSegmentsPage) => any): Promise<InsightsSegmentsPage>;
|
|
217
317
|
/**
|
|
218
318
|
* Provide a user-friendly representation
|
|
219
319
|
*/
|
|
@@ -221,4 +321,21 @@ export interface InsightsSegmentsListInstance {
|
|
|
221
321
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
222
322
|
}
|
|
223
323
|
export declare function InsightsSegmentsListInstance(version: V1): InsightsSegmentsListInstance;
|
|
324
|
+
export declare class InsightsSegmentsPage extends Page<V1, InsightsSegmentsPayload, InsightsSegmentsResource, InsightsSegmentsInstance> {
|
|
325
|
+
/**
|
|
326
|
+
* Initialize the InsightsSegmentsPage
|
|
327
|
+
*
|
|
328
|
+
* @param version - Version of the resource
|
|
329
|
+
* @param response - Response from the API
|
|
330
|
+
* @param solution - Path solution
|
|
331
|
+
*/
|
|
332
|
+
constructor(version: V1, response: Response<string>, solution: InsightsSegmentsSolution);
|
|
333
|
+
/**
|
|
334
|
+
* Build an instance of InsightsSegmentsInstance
|
|
335
|
+
*
|
|
336
|
+
* @param payload - Payload response from the API
|
|
337
|
+
*/
|
|
338
|
+
getInstance(payload: InsightsSegmentsResource): InsightsSegmentsInstance;
|
|
339
|
+
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
340
|
+
}
|
|
224
341
|
export {};
|
|
@@ -12,9 +12,13 @@
|
|
|
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.InsightsSegmentsListInstance = exports.InsightsSegmentsInstance = exports.InsightsSegmentsContextImpl = void 0;
|
|
19
|
+
exports.InsightsSegmentsPage = exports.InsightsSegmentsListInstance = exports.InsightsSegmentsInstance = exports.InsightsSegmentsContextImpl = 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");
|
|
20
24
|
const utility_1 = require("../../../base/utility");
|
|
@@ -142,7 +146,48 @@ function InsightsSegmentsListInstance(version) {
|
|
|
142
146
|
};
|
|
143
147
|
instance._version = version;
|
|
144
148
|
instance._solution = {};
|
|
145
|
-
instance._uri =
|
|
149
|
+
instance._uri = `/Insights/Segments`;
|
|
150
|
+
instance.page = function page(params, callback) {
|
|
151
|
+
if (params instanceof Function) {
|
|
152
|
+
callback = params;
|
|
153
|
+
params = {};
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
params = params || {};
|
|
157
|
+
}
|
|
158
|
+
let data = {};
|
|
159
|
+
if (params["reservationId"] !== undefined)
|
|
160
|
+
data["ReservationId"] = serialize.map(params["reservationId"], (e) => e);
|
|
161
|
+
if (params["pageSize"] !== undefined)
|
|
162
|
+
data["PageSize"] = params["pageSize"];
|
|
163
|
+
if (params.pageNumber !== undefined)
|
|
164
|
+
data["Page"] = params.pageNumber;
|
|
165
|
+
if (params.pageToken !== undefined)
|
|
166
|
+
data["PageToken"] = params.pageToken;
|
|
167
|
+
const headers = {};
|
|
168
|
+
if (params["token"] !== undefined)
|
|
169
|
+
headers["Token"] = params["token"];
|
|
170
|
+
let operationVersion = version, operationPromise = operationVersion.page({
|
|
171
|
+
uri: instance._uri,
|
|
172
|
+
method: "get",
|
|
173
|
+
params: data,
|
|
174
|
+
headers,
|
|
175
|
+
});
|
|
176
|
+
operationPromise = operationPromise.then((payload) => new InsightsSegmentsPage(operationVersion, payload, instance._solution));
|
|
177
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
178
|
+
return operationPromise;
|
|
179
|
+
};
|
|
180
|
+
instance.each = instance._version.each;
|
|
181
|
+
instance.list = instance._version.list;
|
|
182
|
+
instance.getPage = function getPage(targetUrl, callback) {
|
|
183
|
+
const operationPromise = instance._version._domain.twilio.request({
|
|
184
|
+
method: "get",
|
|
185
|
+
uri: targetUrl,
|
|
186
|
+
});
|
|
187
|
+
let pagePromise = operationPromise.then((payload) => new InsightsSegmentsPage(instance._version, payload, instance._solution));
|
|
188
|
+
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
189
|
+
return pagePromise;
|
|
190
|
+
};
|
|
146
191
|
instance.toJSON = function toJSON() {
|
|
147
192
|
return instance._solution;
|
|
148
193
|
};
|
|
@@ -152,3 +197,27 @@ function InsightsSegmentsListInstance(version) {
|
|
|
152
197
|
return instance;
|
|
153
198
|
}
|
|
154
199
|
exports.InsightsSegmentsListInstance = InsightsSegmentsListInstance;
|
|
200
|
+
class InsightsSegmentsPage extends Page_1.default {
|
|
201
|
+
/**
|
|
202
|
+
* Initialize the InsightsSegmentsPage
|
|
203
|
+
*
|
|
204
|
+
* @param version - Version of the resource
|
|
205
|
+
* @param response - Response from the API
|
|
206
|
+
* @param solution - Path solution
|
|
207
|
+
*/
|
|
208
|
+
constructor(version, response, solution) {
|
|
209
|
+
super(version, response, solution);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Build an instance of InsightsSegmentsInstance
|
|
213
|
+
*
|
|
214
|
+
* @param payload - Payload response from the API
|
|
215
|
+
*/
|
|
216
|
+
getInstance(payload) {
|
|
217
|
+
return new InsightsSegmentsInstance(this._version, payload);
|
|
218
|
+
}
|
|
219
|
+
[util_1.inspect.custom](depth, options) {
|
|
220
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.InsightsSegmentsPage = InsightsSegmentsPage;
|
package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts
CHANGED
|
@@ -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 InteractionChannelParticipantStatus = "closed" | "wrapup";
|
|
7
|
-
type InteractionChannelParticipantType = "supervisor" | "customer" | "external" | "agent" | "unknown";
|
|
6
|
+
export type InteractionChannelParticipantStatus = "closed" | "wrapup";
|
|
7
|
+
export type InteractionChannelParticipantType = "supervisor" | "customer" | "external" | "agent" | "unknown";
|
|
8
8
|
/**
|
|
9
9
|
* Options to pass to update a InteractionChannelParticipantInstance
|
|
10
10
|
*/
|
|
@@ -5,9 +5,9 @@ import Response from "../../../../http/response";
|
|
|
5
5
|
import V1 from "../../V1";
|
|
6
6
|
import { InteractionChannelInviteListInstance } from "./interactionChannel/interactionChannelInvite";
|
|
7
7
|
import { InteractionChannelParticipantListInstance } from "./interactionChannel/interactionChannelParticipant";
|
|
8
|
-
type InteractionChannelChannelStatus = "setup" | "active" | "failed" | "closed";
|
|
9
|
-
type InteractionChannelStatus = "closed" | "wrapup";
|
|
10
|
-
type InteractionChannelType = "voice" | "sms" | "email" | "web" | "whatsapp" | "chat" | "messenger" | "gbm";
|
|
8
|
+
export type InteractionChannelChannelStatus = "setup" | "active" | "failed" | "closed";
|
|
9
|
+
export type InteractionChannelStatus = "closed" | "wrapup";
|
|
10
|
+
export type InteractionChannelType = "voice" | "sms" | "email" | "web" | "whatsapp" | "chat" | "messenger" | "gbm";
|
|
11
11
|
/**
|
|
12
12
|
* Options to pass to update a InteractionChannelInstance
|
|
13
13
|
*/
|