twilio 4.7.1 → 4.8.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.
Files changed (231) hide show
  1. package/lib/index.d.ts +52 -36
  2. package/lib/index.js +32 -51
  3. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +2 -2
  4. package/lib/rest/api/v2010/account/authorizedConnectApp.d.ts +1 -1
  5. package/lib/rest/api/v2010/account/call/feedback.d.ts +1 -1
  6. package/lib/rest/api/v2010/account/call/feedbackSummary.d.ts +1 -1
  7. package/lib/rest/api/v2010/account/call/payment.d.ts +5 -5
  8. package/lib/rest/api/v2010/account/call/recording.d.ts +2 -2
  9. package/lib/rest/api/v2010/account/call/siprec.d.ts +3 -3
  10. package/lib/rest/api/v2010/account/call/stream.d.ts +3 -3
  11. package/lib/rest/api/v2010/account/call.d.ts +2 -2
  12. package/lib/rest/api/v2010/account/conference/participant.d.ts +1 -1
  13. package/lib/rest/api/v2010/account/conference/recording.d.ts +2 -2
  14. package/lib/rest/api/v2010/account/conference.d.ts +4 -4
  15. package/lib/rest/api/v2010/account/connectApp.d.ts +1 -1
  16. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +4 -4
  17. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +4 -4
  18. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +4 -4
  19. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +4 -4
  20. package/lib/rest/api/v2010/account/message/feedback.d.ts +1 -1
  21. package/lib/rest/api/v2010/account/message.d.ts +6 -6
  22. package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +1 -1
  23. package/lib/rest/api/v2010/account/recording/transcription.d.ts +1 -1
  24. package/lib/rest/api/v2010/account/recording.d.ts +2 -2
  25. package/lib/rest/api/v2010/account/transcription.d.ts +1 -1
  26. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +1 -1
  27. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +1 -1
  28. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +1 -1
  29. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +1 -1
  30. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +1 -1
  31. package/lib/rest/api/v2010/account/usage/record/today.d.ts +1 -1
  32. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +1 -1
  33. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +1 -1
  34. package/lib/rest/api/v2010/account/usage/record.d.ts +1 -1
  35. package/lib/rest/api/v2010/account/usage/trigger.d.ts +3 -3
  36. package/lib/rest/api/v2010/account/usage.d.ts +1 -0
  37. package/lib/rest/api/v2010/account.d.ts +2 -2
  38. package/lib/rest/autopilot/v1/assistant/modelBuild.d.ts +1 -1
  39. package/lib/rest/chat/v1/credential.d.ts +1 -1
  40. package/lib/rest/chat/v1/service/channel/message.d.ts +1 -1
  41. package/lib/rest/chat/v1/service/channel.d.ts +1 -1
  42. package/lib/rest/chat/v1/service/role.d.ts +1 -1
  43. package/lib/rest/chat/v1/service/user/userChannel.d.ts +1 -1
  44. package/lib/rest/chat/v2/credential.d.ts +1 -1
  45. package/lib/rest/chat/v2/service/binding.d.ts +1 -1
  46. package/lib/rest/chat/v2/service/channel/member.d.ts +1 -1
  47. package/lib/rest/chat/v2/service/channel/message.d.ts +2 -2
  48. package/lib/rest/chat/v2/service/channel/webhook.d.ts +2 -2
  49. package/lib/rest/chat/v2/service/channel.d.ts +2 -2
  50. package/lib/rest/chat/v2/service/role.d.ts +1 -1
  51. package/lib/rest/chat/v2/service/user/userBinding.d.ts +1 -1
  52. package/lib/rest/chat/v2/service/user/userChannel.d.ts +3 -3
  53. package/lib/rest/chat/v2/service/user.d.ts +1 -1
  54. package/lib/rest/chat/v3/channel.d.ts +2 -2
  55. package/lib/rest/content/V1.d.ts +5 -0
  56. package/lib/rest/content/V1.js +7 -0
  57. package/lib/rest/content/v1/legacyContent.d.ts +202 -0
  58. package/lib/rest/content/v1/legacyContent.js +138 -0
  59. package/lib/rest/conversations/v1/addressConfiguration.d.ts +3 -3
  60. package/lib/rest/conversations/v1/configuration/webhook.d.ts +2 -2
  61. package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.d.ts +1 -1
  62. package/lib/rest/conversations/v1/conversation/message.d.ts +2 -2
  63. package/lib/rest/conversations/v1/conversation/participant.d.ts +1 -1
  64. package/lib/rest/conversations/v1/conversation/webhook.d.ts +2 -2
  65. package/lib/rest/conversations/v1/conversation.d.ts +2 -2
  66. package/lib/rest/conversations/v1/credential.d.ts +1 -1
  67. package/lib/rest/conversations/v1/participantConversation.d.ts +1 -1
  68. package/lib/rest/conversations/v1/role.d.ts +1 -1
  69. package/lib/rest/conversations/v1/service/binding.d.ts +1 -1
  70. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +1 -1
  71. package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.d.ts +1 -1
  72. package/lib/rest/conversations/v1/service/conversation/message.d.ts +2 -2
  73. package/lib/rest/conversations/v1/service/conversation/participant.d.ts +1 -1
  74. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +2 -2
  75. package/lib/rest/conversations/v1/service/conversation.d.ts +2 -2
  76. package/lib/rest/conversations/v1/service/participantConversation.d.ts +1 -1
  77. package/lib/rest/conversations/v1/service/role.d.ts +1 -1
  78. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +2 -2
  79. package/lib/rest/conversations/v1/service/user.d.ts +1 -1
  80. package/lib/rest/conversations/v1/user/userConversation.d.ts +2 -2
  81. package/lib/rest/conversations/v1/user.d.ts +1 -1
  82. package/lib/rest/events/v1/sink.d.ts +2 -2
  83. package/lib/rest/flexApi/V1.d.ts +15 -0
  84. package/lib/rest/flexApi/V1.js +22 -0
  85. package/lib/rest/flexApi/v1/assessments.d.ts +138 -10
  86. package/lib/rest/flexApi/v1/assessments.js +138 -22
  87. package/lib/rest/flexApi/v1/configuration.d.ts +1 -1
  88. package/lib/rest/flexApi/v1/flexFlow.d.ts +2 -2
  89. package/lib/rest/flexApi/v1/insightsAssessmentsComment.d.ts +255 -0
  90. package/lib/rest/flexApi/v1/insightsAssessmentsComment.js +198 -0
  91. package/lib/rest/flexApi/v1/insightsQuestionnaires.d.ts +357 -0
  92. package/lib/rest/flexApi/v1/insightsQuestionnaires.js +280 -0
  93. package/lib/rest/flexApi/v1/insightsQuestionnairesCategory.d.ts +111 -0
  94. package/lib/rest/flexApi/v1/insightsQuestionnairesCategory.js +68 -1
  95. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +135 -6
  96. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.js +80 -13
  97. package/lib/rest/flexApi/v1/insightsSegments.d.ts +341 -0
  98. package/lib/rest/flexApi/v1/insightsSegments.js +223 -0
  99. package/lib/rest/flexApi/v1/insightsSession.d.ts +2 -2
  100. package/lib/rest/flexApi/v1/insightsSession.js +2 -2
  101. package/lib/rest/flexApi/v1/insightsUserRoles.d.ts +2 -2
  102. package/lib/rest/flexApi/v1/insightsUserRoles.js +2 -2
  103. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +2 -2
  104. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +3 -3
  105. package/lib/rest/flexApi/v1/webChannel.d.ts +1 -1
  106. package/lib/rest/frontlineApi/v1/user.d.ts +1 -1
  107. package/lib/rest/insights/v1/call/annotation.d.ts +2 -2
  108. package/lib/rest/insights/v1/call/callSummary.d.ts +4 -4
  109. package/lib/rest/insights/v1/call/event.d.ts +2 -2
  110. package/lib/rest/insights/v1/call/metric.d.ts +2 -2
  111. package/lib/rest/insights/v1/callSummaries.d.ts +6 -6
  112. package/lib/rest/insights/v1/conference/conferenceParticipant.d.ts +6 -6
  113. package/lib/rest/insights/v1/conference.d.ts +5 -5
  114. package/lib/rest/insights/v1/room/participant.d.ts +4 -4
  115. package/lib/rest/insights/v1/room.d.ts +8 -8
  116. package/lib/rest/ipMessaging/v1/credential.d.ts +1 -1
  117. package/lib/rest/ipMessaging/v1/service/channel/message.d.ts +1 -1
  118. package/lib/rest/ipMessaging/v1/service/channel.d.ts +1 -1
  119. package/lib/rest/ipMessaging/v1/service/role.d.ts +1 -1
  120. package/lib/rest/ipMessaging/v1/service/user/userChannel.d.ts +1 -1
  121. package/lib/rest/ipMessaging/v2/credential.d.ts +1 -1
  122. package/lib/rest/ipMessaging/v2/service/binding.d.ts +1 -1
  123. package/lib/rest/ipMessaging/v2/service/channel/member.d.ts +1 -1
  124. package/lib/rest/ipMessaging/v2/service/channel/message.d.ts +2 -2
  125. package/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +2 -2
  126. package/lib/rest/ipMessaging/v2/service/channel.d.ts +2 -2
  127. package/lib/rest/ipMessaging/v2/service/role.d.ts +1 -1
  128. package/lib/rest/ipMessaging/v2/service/user/userBinding.d.ts +1 -1
  129. package/lib/rest/ipMessaging/v2/service/user/userChannel.d.ts +2 -2
  130. package/lib/rest/ipMessaging/v2/service/user.d.ts +1 -1
  131. package/lib/rest/lookups/v2/phoneNumber.d.ts +13 -1
  132. package/lib/rest/lookups/v2/phoneNumber.js +4 -0
  133. package/lib/rest/media/v1/mediaProcessor.d.ts +3 -3
  134. package/lib/rest/media/v1/mediaRecording.d.ts +3 -3
  135. package/lib/rest/media/v1/playerStreamer.d.ts +4 -4
  136. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +1 -1
  137. package/lib/rest/messaging/v1/brandRegistration.d.ts +3 -3
  138. package/lib/rest/messaging/v1/service.d.ts +1 -1
  139. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +2 -2
  140. package/lib/rest/microvisor/V1.d.ts +10 -0
  141. package/lib/rest/microvisor/V1.js +14 -0
  142. package/lib/rest/microvisor/v1/accountConfig.d.ts +263 -0
  143. package/lib/rest/microvisor/v1/accountConfig.js +246 -0
  144. package/lib/rest/microvisor/v1/accountSecret.d.ts +257 -0
  145. package/lib/rest/microvisor/v1/accountSecret.js +244 -0
  146. package/lib/rest/microvisor/v1/device/deviceConfig.d.ts +271 -0
  147. package/lib/rest/microvisor/v1/device/deviceConfig.js +254 -0
  148. package/lib/rest/microvisor/v1/device/deviceSecret.d.ts +265 -0
  149. package/lib/rest/microvisor/v1/device/deviceSecret.js +252 -0
  150. package/lib/rest/microvisor/v1/device.d.ts +16 -0
  151. package/lib/rest/microvisor/v1/device.js +26 -0
  152. package/lib/rest/notify/v1/credential.d.ts +1 -1
  153. package/lib/rest/notify/v1/service/binding.d.ts +1 -1
  154. package/lib/rest/notify/v1/service/notification.d.ts +1 -1
  155. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +1 -1
  156. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +1 -1
  157. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +1 -1
  158. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +4 -4
  159. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +1 -1
  160. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +1 -1
  161. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +1 -1
  162. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +2 -2
  163. package/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +1 -1
  164. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +2 -2
  165. package/lib/rest/preview/sync/service/syncList/syncListItem.d.ts +2 -2
  166. package/lib/rest/preview/sync/service/syncMap/syncMapItem.d.ts +2 -2
  167. package/lib/rest/preview/understand/assistant/modelBuild.d.ts +1 -1
  168. package/lib/rest/proxy/v1/service/session/interaction.d.ts +2 -2
  169. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +2 -2
  170. package/lib/rest/proxy/v1/service/session.d.ts +2 -2
  171. package/lib/rest/proxy/v1/service.d.ts +2 -2
  172. package/lib/rest/serverless/v1/service/asset/assetVersion.d.ts +1 -1
  173. package/lib/rest/serverless/v1/service/build/buildStatus.d.ts +1 -1
  174. package/lib/rest/serverless/v1/service/build.d.ts +2 -2
  175. package/lib/rest/serverless/v1/service/environment/log.d.ts +1 -1
  176. package/lib/rest/serverless/v1/service/function/functionVersion.d.ts +1 -1
  177. package/lib/rest/studio/v1/flow/engagement.d.ts +1 -1
  178. package/lib/rest/studio/v1/flow/execution.d.ts +1 -1
  179. package/lib/rest/studio/v1/flow.d.ts +1 -1
  180. package/lib/rest/studio/v2/flow/execution.d.ts +1 -1
  181. package/lib/rest/studio/v2/flow/flowRevision.d.ts +1 -1
  182. package/lib/rest/studio/v2/flow.d.ts +1 -1
  183. package/lib/rest/studio/v2/flowValidate.d.ts +1 -1
  184. package/lib/rest/supersim/v1/esimProfile.d.ts +1 -1
  185. package/lib/rest/supersim/v1/fleet.d.ts +1 -1
  186. package/lib/rest/supersim/v1/ipCommand.d.ts +3 -3
  187. package/lib/rest/supersim/v1/settingsUpdate.d.ts +1 -1
  188. package/lib/rest/supersim/v1/sim/billingPeriod.d.ts +1 -1
  189. package/lib/rest/supersim/v1/sim/simIpAddress.d.ts +1 -1
  190. package/lib/rest/supersim/v1/sim.d.ts +2 -2
  191. package/lib/rest/supersim/v1/smsCommand.d.ts +5 -5
  192. package/lib/rest/supersim/v1/usageRecord.d.ts +2 -2
  193. package/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +2 -2
  194. package/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +2 -2
  195. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +4 -4
  196. package/lib/rest/taskrouter/v1/workspace/task.d.ts +1 -1
  197. package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +1 -1
  198. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +3 -3
  199. package/lib/rest/taskrouter/v1/workspace.d.ts +1 -1
  200. package/lib/rest/trunking/v1/trunk/phoneNumber.d.ts +1 -1
  201. package/lib/rest/trunking/v1/trunk/recording.d.ts +2 -2
  202. package/lib/rest/trunking/v1/trunk.d.ts +2 -2
  203. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +1 -1
  204. package/lib/rest/trusthub/v1/customerProfiles.d.ts +1 -1
  205. package/lib/rest/trusthub/v1/supportingDocument.d.ts +1 -1
  206. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +1 -1
  207. package/lib/rest/trusthub/v1/trustProducts.d.ts +1 -1
  208. package/lib/rest/verify/v2/form.d.ts +1 -1
  209. package/lib/rest/verify/v2/service/accessToken.d.ts +1 -1
  210. package/lib/rest/verify/v2/service/entity/challenge.d.ts +4 -4
  211. package/lib/rest/verify/v2/service/entity/factor.d.ts +3 -3
  212. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +4 -4
  213. package/lib/rest/verify/v2/service/verification.d.ts +2 -2
  214. package/lib/rest/verify/v2/service/verificationCheck.d.ts +1 -1
  215. package/lib/rest/verify/v2/service/webhook.d.ts +3 -3
  216. package/lib/rest/verify/v2/verificationAttempt.d.ts +2 -2
  217. package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +1 -1
  218. package/lib/rest/video/v1/composition.d.ts +2 -2
  219. package/lib/rest/video/v1/compositionHook.d.ts +1 -1
  220. package/lib/rest/video/v1/recording.d.ts +4 -4
  221. package/lib/rest/video/v1/room/participant/anonymize.d.ts +1 -1
  222. package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +1 -1
  223. package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +1 -1
  224. package/lib/rest/video/v1/room/participant.d.ts +1 -1
  225. package/lib/rest/video/v1/room/roomRecording.d.ts +4 -4
  226. package/lib/rest/video/v1/room.d.ts +3 -3
  227. package/lib/rest/wireless/v1/command.d.ts +4 -4
  228. package/lib/rest/wireless/v1/sim/usageRecord.d.ts +1 -1
  229. package/lib/rest/wireless/v1/sim.d.ts +2 -2
  230. package/lib/rest/wireless/v1/usageRecord.d.ts +1 -1
  231. package/package.json +2 -5
@@ -3,7 +3,7 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V1 from "../../V1";
6
- type ServiceRoleRoleType = "conversation" | "service";
6
+ export type ServiceRoleRoleType = "conversation" | "service";
7
7
  /**
8
8
  * Options to pass to update a RoleInstance
9
9
  */
@@ -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 ServiceUserConversationNotificationLevel = "default" | "muted";
7
- type ServiceUserConversationState = "inactive" | "active" | "closed";
6
+ export type ServiceUserConversationNotificationLevel = "default" | "muted";
7
+ export type ServiceUserConversationState = "inactive" | "active" | "closed";
8
8
  /**
9
9
  * Options to pass to update a UserConversationInstance
10
10
  */
@@ -4,7 +4,7 @@ import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V1 from "../../V1";
6
6
  import { UserConversationListInstance } from "./user/userConversation";
7
- type ServiceUserWebhookEnabledType = "true" | "false";
7
+ export type ServiceUserWebhookEnabledType = "true" | "false";
8
8
  /**
9
9
  * Options to pass to remove a UserInstance
10
10
  */
@@ -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 UserConversationNotificationLevel = "default" | "muted";
7
- type UserConversationState = "inactive" | "active" | "closed";
6
+ export type UserConversationNotificationLevel = "default" | "muted";
7
+ export type UserConversationState = "inactive" | "active" | "closed";
8
8
  /**
9
9
  * Options to pass to update a UserConversationInstance
10
10
  */
@@ -4,7 +4,7 @@ import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V1 from "../V1";
6
6
  import { UserConversationListInstance } from "./user/userConversation";
7
- type UserWebhookEnabledType = "true" | "false";
7
+ export type UserWebhookEnabledType = "true" | "false";
8
8
  /**
9
9
  * Options to pass to remove a UserInstance
10
10
  */
@@ -5,8 +5,8 @@ import Response from "../../../http/response";
5
5
  import V1 from "../V1";
6
6
  import { SinkTestListInstance } from "./sink/sinkTest";
7
7
  import { SinkValidateListInstance } from "./sink/sinkValidate";
8
- type SinkSinkType = "kinesis" | "webhook" | "segment";
9
- type SinkStatus = "initialized" | "validating" | "active" | "failed";
8
+ export type SinkSinkType = "kinesis" | "webhook" | "segment";
9
+ export type SinkStatus = "initialized" | "validating" | "active" | "failed";
10
10
  /**
11
11
  * Options to pass to update a SinkInstance
12
12
  */
@@ -4,8 +4,11 @@ import { AssessmentsListInstance } from "./v1/assessments";
4
4
  import { ChannelListInstance } from "./v1/channel";
5
5
  import { ConfigurationListInstance } from "./v1/configuration";
6
6
  import { FlexFlowListInstance } from "./v1/flexFlow";
7
+ import { InsightsAssessmentsCommentListInstance } from "./v1/insightsAssessmentsComment";
8
+ import { InsightsQuestionnairesListInstance } from "./v1/insightsQuestionnaires";
7
9
  import { InsightsQuestionnairesCategoryListInstance } from "./v1/insightsQuestionnairesCategory";
8
10
  import { InsightsQuestionnairesQuestionListInstance } from "./v1/insightsQuestionnairesQuestion";
11
+ import { InsightsSegmentsListInstance } from "./v1/insightsSegments";
9
12
  import { InsightsSessionListInstance } from "./v1/insightsSession";
10
13
  import { InsightsSettingsAnswerSetsListInstance } from "./v1/insightsSettingsAnswerSets";
11
14
  import { InsightsSettingsCommentListInstance } from "./v1/insightsSettingsComment";
@@ -27,10 +30,16 @@ export default class V1 extends Version {
27
30
  protected _configuration?: ConfigurationListInstance;
28
31
  /** flexFlow - { Twilio.FlexApi.V1.FlexFlowListInstance } resource */
29
32
  protected _flexFlow?: FlexFlowListInstance;
33
+ /** insightsAssessmentsComment - { Twilio.FlexApi.V1.InsightsAssessmentsCommentListInstance } resource */
34
+ protected _insightsAssessmentsComment?: InsightsAssessmentsCommentListInstance;
35
+ /** insightsQuestionnaires - { Twilio.FlexApi.V1.InsightsQuestionnairesListInstance } resource */
36
+ protected _insightsQuestionnaires?: InsightsQuestionnairesListInstance;
30
37
  /** insightsQuestionnairesCategory - { Twilio.FlexApi.V1.InsightsQuestionnairesCategoryListInstance } resource */
31
38
  protected _insightsQuestionnairesCategory?: InsightsQuestionnairesCategoryListInstance;
32
39
  /** insightsQuestionnairesQuestion - { Twilio.FlexApi.V1.InsightsQuestionnairesQuestionListInstance } resource */
33
40
  protected _insightsQuestionnairesQuestion?: InsightsQuestionnairesQuestionListInstance;
41
+ /** insightsSegments - { Twilio.FlexApi.V1.InsightsSegmentsListInstance } resource */
42
+ protected _insightsSegments?: InsightsSegmentsListInstance;
34
43
  /** insightsSession - { Twilio.FlexApi.V1.InsightsSessionListInstance } resource */
35
44
  protected _insightsSession?: InsightsSessionListInstance;
36
45
  /** insightsSettingsAnswerSets - { Twilio.FlexApi.V1.InsightsSettingsAnswerSetsListInstance } resource */
@@ -51,10 +60,16 @@ export default class V1 extends Version {
51
60
  get configuration(): ConfigurationListInstance;
52
61
  /** Getter for flexFlow resource */
53
62
  get flexFlow(): FlexFlowListInstance;
63
+ /** Getter for insightsAssessmentsComment resource */
64
+ get insightsAssessmentsComment(): InsightsAssessmentsCommentListInstance;
65
+ /** Getter for insightsQuestionnaires resource */
66
+ get insightsQuestionnaires(): InsightsQuestionnairesListInstance;
54
67
  /** Getter for insightsQuestionnairesCategory resource */
55
68
  get insightsQuestionnairesCategory(): InsightsQuestionnairesCategoryListInstance;
56
69
  /** Getter for insightsQuestionnairesQuestion resource */
57
70
  get insightsQuestionnairesQuestion(): InsightsQuestionnairesQuestionListInstance;
71
+ /** Getter for insightsSegments resource */
72
+ get insightsSegments(): InsightsSegmentsListInstance;
58
73
  /** Getter for insightsSession resource */
59
74
  get insightsSession(): InsightsSessionListInstance;
60
75
  /** Getter for insightsSettingsAnswerSets resource */
@@ -21,8 +21,11 @@ const assessments_1 = require("./v1/assessments");
21
21
  const channel_1 = require("./v1/channel");
22
22
  const configuration_1 = require("./v1/configuration");
23
23
  const flexFlow_1 = require("./v1/flexFlow");
24
+ const insightsAssessmentsComment_1 = require("./v1/insightsAssessmentsComment");
25
+ const insightsQuestionnaires_1 = require("./v1/insightsQuestionnaires");
24
26
  const insightsQuestionnairesCategory_1 = require("./v1/insightsQuestionnairesCategory");
25
27
  const insightsQuestionnairesQuestion_1 = require("./v1/insightsQuestionnairesQuestion");
28
+ const insightsSegments_1 = require("./v1/insightsSegments");
26
29
  const insightsSession_1 = require("./v1/insightsSession");
27
30
  const insightsSettingsAnswerSets_1 = require("./v1/insightsSettingsAnswerSets");
28
31
  const insightsSettingsComment_1 = require("./v1/insightsSettingsComment");
@@ -59,6 +62,19 @@ class V1 extends Version_1.default {
59
62
  this._flexFlow = this._flexFlow || (0, flexFlow_1.FlexFlowListInstance)(this);
60
63
  return this._flexFlow;
61
64
  }
65
+ /** Getter for insightsAssessmentsComment resource */
66
+ get insightsAssessmentsComment() {
67
+ this._insightsAssessmentsComment =
68
+ this._insightsAssessmentsComment ||
69
+ (0, insightsAssessmentsComment_1.InsightsAssessmentsCommentListInstance)(this);
70
+ return this._insightsAssessmentsComment;
71
+ }
72
+ /** Getter for insightsQuestionnaires resource */
73
+ get insightsQuestionnaires() {
74
+ this._insightsQuestionnaires =
75
+ this._insightsQuestionnaires || (0, insightsQuestionnaires_1.InsightsQuestionnairesListInstance)(this);
76
+ return this._insightsQuestionnaires;
77
+ }
62
78
  /** Getter for insightsQuestionnairesCategory resource */
63
79
  get insightsQuestionnairesCategory() {
64
80
  this._insightsQuestionnairesCategory =
@@ -73,6 +89,12 @@ class V1 extends Version_1.default {
73
89
  (0, insightsQuestionnairesQuestion_1.InsightsQuestionnairesQuestionListInstance)(this);
74
90
  return this._insightsQuestionnairesQuestion;
75
91
  }
92
+ /** Getter for insightsSegments resource */
93
+ get insightsSegments() {
94
+ this._insightsSegments =
95
+ this._insightsSegments || (0, insightsSegments_1.InsightsSegmentsListInstance)(this);
96
+ return this._insightsSegments;
97
+ }
76
98
  /** Getter for insightsSession resource */
77
99
  get insightsSession() {
78
100
  this._insightsSession =
@@ -1,15 +1,60 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V1 from "../V1";
4
+ /**
5
+ * Options to pass to update a AssessmentsInstance
6
+ */
7
+ export interface AssessmentsContextUpdateOptions {
8
+ /** The offset of the conversation */
9
+ offset: number;
10
+ /** The answer text selected by user */
11
+ answerText: string;
12
+ /** The id of the answer selected by user */
13
+ answerId: string;
14
+ /** The Token HTTP request header */
15
+ token?: string;
16
+ }
17
+ /**
18
+ * Options to pass to create a AssessmentsInstance
19
+ */
20
+ export interface AssessmentsListInstanceCreateOptions {
21
+ /** The id of the category */
22
+ categoryId: string;
23
+ /** The name of the category */
24
+ categoryName: string;
25
+ /** Segment Id of the conversation */
26
+ segmentId: string;
27
+ /** Name of the user assessing conversation */
28
+ userName: string;
29
+ /** Email of the user assessing conversation */
30
+ userEmail: string;
31
+ /** The id of the Agent */
32
+ agentId: string;
33
+ /** The offset of the conversation. */
34
+ offset: number;
35
+ /** The question Id selected for assessment */
36
+ metricId: string;
37
+ /** The question name of the assessment */
38
+ metricName: string;
39
+ /** The answer text selected by user */
40
+ answerText: string;
41
+ /** The id of the answer selected by user */
42
+ answerId: string;
43
+ /** Questionnaire Id of the associated question */
44
+ questionnaireId: string;
45
+ /** The Token HTTP request header */
46
+ token?: string;
47
+ }
4
48
  export interface AssessmentsContext {
5
49
  /**
6
- * Create a AssessmentsInstance
50
+ * Update a AssessmentsInstance
7
51
  *
52
+ * @param params - Parameter for request
8
53
  * @param callback - Callback to handle processed record
9
54
  *
10
55
  * @returns Resolves to processed AssessmentsInstance
11
56
  */
12
- create(callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
57
+ update(params: AssessmentsContextUpdateOptions, callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
13
58
  /**
14
59
  * Provide a user-friendly representation
15
60
  */
@@ -17,13 +62,14 @@ export interface AssessmentsContext {
17
62
  [inspect.custom](_depth: any, options: InspectOptions): any;
18
63
  }
19
64
  export interface AssessmentsContextSolution {
65
+ assessmentId: string;
20
66
  }
21
67
  export declare class AssessmentsContextImpl implements AssessmentsContext {
22
68
  protected _version: V1;
23
69
  protected _solution: AssessmentsContextSolution;
24
70
  protected _uri: string;
25
- constructor(_version: V1);
26
- create(callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
71
+ constructor(_version: V1, assessmentId: string);
72
+ update(params: AssessmentsContextUpdateOptions, callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
27
73
  /**
28
74
  * Provide a user-friendly representation
29
75
  *
@@ -33,32 +79,105 @@ export declare class AssessmentsContextImpl implements AssessmentsContext {
33
79
  [inspect.custom](_depth: any, options: InspectOptions): string;
34
80
  }
35
81
  interface AssessmentsResource {
82
+ account_sid: string;
83
+ assessment_id: string;
84
+ offset: number;
85
+ report: boolean;
86
+ weight: number;
87
+ agent_id: string;
88
+ segment_id: string;
89
+ user_name: string;
90
+ user_email: string;
91
+ answer_text: string;
92
+ answer_id: string;
93
+ assessment: any;
94
+ timestamp: number;
36
95
  url: string;
37
96
  }
38
97
  export declare class AssessmentsInstance {
39
98
  protected _version: V1;
40
99
  protected _solution: AssessmentsContextSolution;
41
100
  protected _context?: AssessmentsContext;
42
- constructor(_version: V1, payload: AssessmentsResource);
101
+ constructor(_version: V1, payload: AssessmentsResource, assessmentId?: string);
102
+ /**
103
+ * The unique SID identifier of the Account.
104
+ */
105
+ accountSid: string;
106
+ /**
107
+ * The unique id of the assessment
108
+ */
109
+ assessmentId: string;
110
+ /**
111
+ * Offset of the conversation
112
+ */
113
+ offset: number;
114
+ /**
115
+ * The flag indicating if this assessment is part of report
116
+ */
117
+ report: boolean;
118
+ /**
119
+ * The weightage given to this comment
120
+ */
121
+ weight: number;
122
+ /**
123
+ * The id of the Agent
124
+ */
125
+ agentId: string;
126
+ /**
127
+ * Segment Id of conversation
128
+ */
129
+ segmentId: string;
43
130
  /**
44
- * The URL of this resource.
131
+ * The name of the user.
45
132
  */
133
+ userName: string;
134
+ /**
135
+ * The email id of the user.
136
+ */
137
+ userEmail: string;
138
+ /**
139
+ * The answer text selected by user
140
+ */
141
+ answerText: string;
142
+ /**
143
+ * The id of the answer selected by user
144
+ */
145
+ answerId: string;
146
+ /**
147
+ * Assessment Details associated with an assessment
148
+ */
149
+ assessment: any;
150
+ timestamp: number;
46
151
  url: string;
47
152
  private get _proxy();
48
153
  /**
49
- * Create a AssessmentsInstance
154
+ * Update a AssessmentsInstance
50
155
  *
156
+ * @param params - Parameter for request
51
157
  * @param callback - Callback to handle processed record
52
158
  *
53
159
  * @returns Resolves to processed AssessmentsInstance
54
160
  */
55
- create(callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
161
+ update(params: AssessmentsContextUpdateOptions, callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
56
162
  /**
57
163
  * Provide a user-friendly representation
58
164
  *
59
165
  * @returns Object
60
166
  */
61
167
  toJSON(): {
168
+ accountSid: string;
169
+ assessmentId: string;
170
+ offset: number;
171
+ report: boolean;
172
+ weight: number;
173
+ agentId: string;
174
+ segmentId: string;
175
+ userName: string;
176
+ userEmail: string;
177
+ answerText: string;
178
+ answerId: string;
179
+ assessment: any;
180
+ timestamp: number;
62
181
  url: string;
63
182
  };
64
183
  [inspect.custom](_depth: any, options: InspectOptions): string;
@@ -69,8 +188,17 @@ export interface AssessmentsListInstance {
69
188
  _version: V1;
70
189
  _solution: AssessmentsSolution;
71
190
  _uri: string;
72
- (): AssessmentsContext;
73
- get(): AssessmentsContext;
191
+ (assessmentId: string): AssessmentsContext;
192
+ get(assessmentId: string): AssessmentsContext;
193
+ /**
194
+ * Create a AssessmentsInstance
195
+ *
196
+ * @param params - Parameter for request
197
+ * @param callback - Callback to handle processed record
198
+ *
199
+ * @returns Resolves to processed AssessmentsInstance
200
+ */
201
+ create(params: AssessmentsListInstanceCreateOptions, callback?: (error: Error | null, item?: AssessmentsInstance) => any): Promise<AssessmentsInstance>;
74
202
  /**
75
203
  * Provide a user-friendly representation
76
204
  */
@@ -17,19 +17,45 @@ exports.AssessmentsListInstance = exports.AssessmentsInstance = exports.Assessme
17
17
  const util_1 = require("util");
18
18
  const deserialize = require("../../../base/deserialize");
19
19
  const serialize = require("../../../base/serialize");
20
+ const utility_1 = require("../../../base/utility");
20
21
  class AssessmentsContextImpl {
21
- constructor(_version) {
22
+ constructor(_version, assessmentId) {
22
23
  this._version = _version;
23
- this._solution = {};
24
- this._uri = `/Accounts/Assessments`;
24
+ if (!(0, utility_1.isValidPathParam)(assessmentId)) {
25
+ throw new Error("Parameter 'assessmentId' is not valid.");
26
+ }
27
+ this._solution = { assessmentId };
28
+ this._uri = `/Insights/QM/Assessments/${assessmentId}`;
25
29
  }
26
- create(callback) {
30
+ update(params, callback) {
31
+ if (params === null || params === undefined) {
32
+ throw new Error('Required parameter "params" missing.');
33
+ }
34
+ if (params["offset"] === null || params["offset"] === undefined) {
35
+ throw new Error("Required parameter \"params['offset']\" missing.");
36
+ }
37
+ if (params["answerText"] === null || params["answerText"] === undefined) {
38
+ throw new Error("Required parameter \"params['answerText']\" missing.");
39
+ }
40
+ if (params["answerId"] === null || params["answerId"] === undefined) {
41
+ throw new Error("Required parameter \"params['answerId']\" missing.");
42
+ }
43
+ let data = {};
44
+ data["Offset"] = params["offset"];
45
+ data["AnswerText"] = params["answerText"];
46
+ data["AnswerId"] = params["answerId"];
47
+ const headers = {};
48
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
49
+ if (params["token"] !== undefined)
50
+ headers["Token"] = params["token"];
27
51
  const instance = this;
28
- let operationVersion = instance._version, operationPromise = operationVersion.create({
52
+ let operationVersion = instance._version, operationPromise = operationVersion.update({
29
53
  uri: instance._uri,
30
54
  method: "post",
55
+ data,
56
+ headers,
31
57
  });
32
- operationPromise = operationPromise.then((payload) => new AssessmentsInstance(operationVersion, payload));
58
+ operationPromise = operationPromise.then((payload) => new AssessmentsInstance(operationVersion, payload, instance._solution.assessmentId));
33
59
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
34
60
  return operationPromise;
35
61
  }
@@ -47,24 +73,32 @@ class AssessmentsContextImpl {
47
73
  }
48
74
  exports.AssessmentsContextImpl = AssessmentsContextImpl;
49
75
  class AssessmentsInstance {
50
- constructor(_version, payload) {
76
+ constructor(_version, payload, assessmentId) {
51
77
  this._version = _version;
78
+ this.accountSid = payload.account_sid;
79
+ this.assessmentId = payload.assessment_id;
80
+ this.offset = payload.offset;
81
+ this.report = payload.report;
82
+ this.weight = payload.weight;
83
+ this.agentId = payload.agent_id;
84
+ this.segmentId = payload.segment_id;
85
+ this.userName = payload.user_name;
86
+ this.userEmail = payload.user_email;
87
+ this.answerText = payload.answer_text;
88
+ this.answerId = payload.answer_id;
89
+ this.assessment = payload.assessment;
90
+ this.timestamp = payload.timestamp;
52
91
  this.url = payload.url;
53
- this._solution = {};
92
+ this._solution = { assessmentId: assessmentId || this.assessmentId };
54
93
  }
55
94
  get _proxy() {
56
- this._context = this._context || new AssessmentsContextImpl(this._version);
95
+ this._context =
96
+ this._context ||
97
+ new AssessmentsContextImpl(this._version, this._solution.assessmentId);
57
98
  return this._context;
58
99
  }
59
- /**
60
- * Create a AssessmentsInstance
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);
100
+ update(params, callback) {
101
+ return this._proxy.update(params, callback);
68
102
  }
69
103
  /**
70
104
  * Provide a user-friendly representation
@@ -73,6 +107,19 @@ class AssessmentsInstance {
73
107
  */
74
108
  toJSON() {
75
109
  return {
110
+ accountSid: this.accountSid,
111
+ assessmentId: this.assessmentId,
112
+ offset: this.offset,
113
+ report: this.report,
114
+ weight: this.weight,
115
+ agentId: this.agentId,
116
+ segmentId: this.segmentId,
117
+ userName: this.userName,
118
+ userEmail: this.userEmail,
119
+ answerText: this.answerText,
120
+ answerId: this.answerId,
121
+ assessment: this.assessment,
122
+ timestamp: this.timestamp,
76
123
  url: this.url,
77
124
  };
78
125
  }
@@ -82,13 +129,82 @@ class AssessmentsInstance {
82
129
  }
83
130
  exports.AssessmentsInstance = AssessmentsInstance;
84
131
  function AssessmentsListInstance(version) {
85
- const instance = (() => instance.get());
86
- instance.get = function get() {
87
- return new AssessmentsContextImpl(version);
132
+ const instance = ((assessmentId) => instance.get(assessmentId));
133
+ instance.get = function get(assessmentId) {
134
+ return new AssessmentsContextImpl(version, assessmentId);
88
135
  };
89
136
  instance._version = version;
90
137
  instance._solution = {};
91
- instance._uri = ``;
138
+ instance._uri = `/Insights/QM/Assessments`;
139
+ instance.create = function create(params, callback) {
140
+ if (params === null || params === undefined) {
141
+ throw new Error('Required parameter "params" missing.');
142
+ }
143
+ if (params["categoryId"] === null || params["categoryId"] === undefined) {
144
+ throw new Error("Required parameter \"params['categoryId']\" missing.");
145
+ }
146
+ if (params["categoryName"] === null ||
147
+ params["categoryName"] === undefined) {
148
+ throw new Error("Required parameter \"params['categoryName']\" missing.");
149
+ }
150
+ if (params["segmentId"] === null || params["segmentId"] === undefined) {
151
+ throw new Error("Required parameter \"params['segmentId']\" missing.");
152
+ }
153
+ if (params["userName"] === null || params["userName"] === undefined) {
154
+ throw new Error("Required parameter \"params['userName']\" missing.");
155
+ }
156
+ if (params["userEmail"] === null || params["userEmail"] === undefined) {
157
+ throw new Error("Required parameter \"params['userEmail']\" missing.");
158
+ }
159
+ if (params["agentId"] === null || params["agentId"] === undefined) {
160
+ throw new Error("Required parameter \"params['agentId']\" missing.");
161
+ }
162
+ if (params["offset"] === null || params["offset"] === undefined) {
163
+ throw new Error("Required parameter \"params['offset']\" missing.");
164
+ }
165
+ if (params["metricId"] === null || params["metricId"] === undefined) {
166
+ throw new Error("Required parameter \"params['metricId']\" missing.");
167
+ }
168
+ if (params["metricName"] === null || params["metricName"] === undefined) {
169
+ throw new Error("Required parameter \"params['metricName']\" missing.");
170
+ }
171
+ if (params["answerText"] === null || params["answerText"] === undefined) {
172
+ throw new Error("Required parameter \"params['answerText']\" missing.");
173
+ }
174
+ if (params["answerId"] === null || params["answerId"] === undefined) {
175
+ throw new Error("Required parameter \"params['answerId']\" missing.");
176
+ }
177
+ if (params["questionnaireId"] === null ||
178
+ params["questionnaireId"] === undefined) {
179
+ throw new Error("Required parameter \"params['questionnaireId']\" missing.");
180
+ }
181
+ let data = {};
182
+ data["CategoryId"] = params["categoryId"];
183
+ data["CategoryName"] = params["categoryName"];
184
+ data["SegmentId"] = params["segmentId"];
185
+ data["UserName"] = params["userName"];
186
+ data["UserEmail"] = params["userEmail"];
187
+ data["AgentId"] = params["agentId"];
188
+ data["Offset"] = params["offset"];
189
+ data["MetricId"] = params["metricId"];
190
+ data["MetricName"] = params["metricName"];
191
+ data["AnswerText"] = params["answerText"];
192
+ data["AnswerId"] = params["answerId"];
193
+ data["QuestionnaireId"] = params["questionnaireId"];
194
+ const headers = {};
195
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
196
+ if (params["token"] !== undefined)
197
+ headers["Token"] = params["token"];
198
+ let operationVersion = version, operationPromise = operationVersion.create({
199
+ uri: instance._uri,
200
+ method: "post",
201
+ data,
202
+ headers,
203
+ });
204
+ operationPromise = operationPromise.then((payload) => new AssessmentsInstance(operationVersion, payload));
205
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
206
+ return operationPromise;
207
+ };
92
208
  instance.toJSON = function toJSON() {
93
209
  return instance._solution;
94
210
  };
@@ -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
  */