twilio 5.7.0 → 5.7.2

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 (258) hide show
  1. package/lib/rest/Twilio.d.ts +0 -10
  2. package/lib/rest/Twilio.js +0 -11
  3. package/lib/rest/accounts/v1/bulkConsents.d.ts +4 -4
  4. package/lib/rest/accounts/v1/bulkConsents.js +1 -1
  5. package/lib/rest/accounts/v1/bulkContacts.d.ts +4 -4
  6. package/lib/rest/accounts/v1/bulkContacts.js +1 -1
  7. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +15 -10
  8. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.js +2 -2
  9. package/lib/rest/api/v2010/account/authorizedConnectApp.d.ts +3 -0
  10. package/lib/rest/api/v2010/account/call/event.d.ts +6 -6
  11. package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
  12. package/lib/rest/api/v2010/account/call/recording.d.ts +3 -3
  13. package/lib/rest/api/v2010/account/conference/recording.d.ts +3 -3
  14. package/lib/rest/api/v2010/account/connectApp.d.ts +3 -0
  15. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.d.ts +3 -3
  16. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +3 -0
  17. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +3 -0
  18. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +3 -0
  19. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +3 -0
  20. package/lib/rest/api/v2010/account/recording.d.ts +4 -4
  21. package/lib/rest/api/v2010/account/usage/trigger.d.ts +3 -0
  22. package/lib/rest/bulkexports/v1/export/day.d.ts +3 -3
  23. package/lib/rest/bulkexports/v1/export/exportCustomJob.d.ts +3 -3
  24. package/lib/rest/bulkexports/v1/export/job.d.ts +3 -3
  25. package/lib/rest/chat/v1/credential.d.ts +3 -0
  26. package/lib/rest/chat/v1/service/channel.d.ts +3 -0
  27. package/lib/rest/chat/v1/service/role.d.ts +3 -0
  28. package/lib/rest/chat/v1/service/user/userChannel.d.ts +3 -0
  29. package/lib/rest/chat/v1/service.d.ts +9 -9
  30. package/lib/rest/chat/v2/credential.d.ts +3 -0
  31. package/lib/rest/chat/v2/service/channel/message.d.ts +3 -3
  32. package/lib/rest/chat/v2/service/channel/webhook.d.ts +3 -3
  33. package/lib/rest/chat/v2/service/channel.d.ts +3 -0
  34. package/lib/rest/chat/v2/service/role.d.ts +3 -0
  35. package/lib/rest/chat/v2/service/user/userChannel.d.ts +3 -0
  36. package/lib/rest/chat/v2/service.d.ts +9 -9
  37. package/lib/rest/chat/v3/channel.d.ts +3 -0
  38. package/lib/rest/content/v2/content.d.ts +6 -6
  39. package/lib/rest/content/v2/contentAndApprovals.d.ts +9 -9
  40. package/lib/rest/conversations/v1/addressConfiguration.d.ts +7 -7
  41. package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.d.ts +6 -3
  42. package/lib/rest/conversations/v1/conversation/message.d.ts +9 -9
  43. package/lib/rest/conversations/v1/conversation/participant.d.ts +6 -6
  44. package/lib/rest/conversations/v1/conversation/webhook.d.ts +7 -7
  45. package/lib/rest/conversations/v1/conversation.d.ts +9 -9
  46. package/lib/rest/conversations/v1/conversationWithParticipants.d.ts +6 -6
  47. package/lib/rest/conversations/v1/credential.d.ts +6 -3
  48. package/lib/rest/conversations/v1/participantConversation.d.ts +12 -9
  49. package/lib/rest/conversations/v1/role.d.ts +6 -3
  50. package/lib/rest/conversations/v1/service/binding.d.ts +3 -3
  51. package/lib/rest/conversations/v1/service/configuration/notification.d.ts +9 -9
  52. package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.d.ts +6 -3
  53. package/lib/rest/conversations/v1/service/conversation/message.d.ts +9 -9
  54. package/lib/rest/conversations/v1/service/conversation/participant.d.ts +6 -6
  55. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +7 -7
  56. package/lib/rest/conversations/v1/service/conversation.d.ts +9 -9
  57. package/lib/rest/conversations/v1/service/conversationWithParticipants.d.ts +6 -6
  58. package/lib/rest/conversations/v1/service/participantConversation.d.ts +12 -9
  59. package/lib/rest/conversations/v1/service/role.d.ts +6 -3
  60. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +9 -6
  61. package/lib/rest/conversations/v1/service/user.d.ts +3 -3
  62. package/lib/rest/conversations/v1/service.d.ts +3 -3
  63. package/lib/rest/conversations/v1/user/userConversation.d.ts +9 -6
  64. package/lib/rest/conversations/v1/user.d.ts +3 -3
  65. package/lib/rest/events/v1/sink.d.ts +4 -4
  66. package/lib/rest/events/v1/subscription.d.ts +1 -1
  67. package/lib/rest/events/v1/subscription.js +1 -1
  68. package/lib/rest/flexApi/v1/assessments.d.ts +3 -3
  69. package/lib/rest/flexApi/v1/configuration.d.ts +66 -66
  70. package/lib/rest/flexApi/v1/flexFlow.d.ts +3 -3
  71. package/lib/rest/flexApi/v1/insightsAssessmentsComment.d.ts +3 -3
  72. package/lib/rest/flexApi/v1/insightsConversations.d.ts +3 -3
  73. package/lib/rest/flexApi/v1/insightsQuestionnaires.d.ts +3 -3
  74. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +6 -6
  75. package/lib/rest/flexApi/v1/insightsSegments.d.ts +9 -9
  76. package/lib/rest/flexApi/v1/insightsSettingsAnswerSets.d.ts +9 -9
  77. package/lib/rest/flexApi/v1/insightsSettingsComment.d.ts +3 -3
  78. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +4 -4
  79. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +5 -5
  80. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionTransfer.d.ts +6 -0
  81. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +4 -1
  82. package/lib/rest/flexApi/v1/interaction.d.ts +8 -8
  83. package/lib/rest/flexApi/v1/pluginConfiguration.d.ts +1 -1
  84. package/lib/rest/flexApi/v1/pluginConfiguration.js +1 -1
  85. package/lib/rest/frontlineApi/v1/user.d.ts +3 -0
  86. package/lib/rest/intelligence/v2/customOperator.d.ts +5 -5
  87. package/lib/rest/intelligence/v2/operator.d.ts +3 -3
  88. package/lib/rest/intelligence/v2/operatorType.d.ts +3 -3
  89. package/lib/rest/intelligence/v2/prebuiltOperator.d.ts +3 -3
  90. package/lib/rest/intelligence/v2/service.d.ts +3 -0
  91. package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +15 -15
  92. package/lib/rest/intelligence/v2/transcript/sentence.d.ts +3 -3
  93. package/lib/rest/intelligence/v2/transcript.d.ts +4 -4
  94. package/lib/rest/ipMessaging/v1/service.d.ts +9 -9
  95. package/lib/rest/ipMessaging/v2/service/channel/message.d.ts +3 -3
  96. package/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +3 -3
  97. package/lib/rest/ipMessaging/v2/service.d.ts +9 -9
  98. package/lib/rest/lookups/V2.d.ts +20 -0
  99. package/lib/rest/lookups/V2.js +25 -0
  100. package/lib/rest/lookups/v2/bucket.d.ts +205 -0
  101. package/lib/rest/lookups/v2/bucket.js +187 -0
  102. package/lib/rest/lookups/v2/lookupOverride.d.ts +264 -0
  103. package/lib/rest/lookups/v2/lookupOverride.js +225 -0
  104. package/lib/rest/lookups/v2/phoneNumber.d.ts +3 -0
  105. package/lib/rest/lookups/v2/query.d.ts +175 -0
  106. package/lib/rest/lookups/v2/query.js +123 -0
  107. package/lib/rest/lookups/v2/rateLimit.d.ts +83 -0
  108. package/lib/rest/lookups/v2/rateLimit.js +82 -0
  109. package/lib/rest/messaging/v1/service/destinationAlphaSender.d.ts +6 -0
  110. package/lib/rest/messaging/v1/service/destinationAlphaSender.js +2 -0
  111. package/lib/rest/messaging/v1/service.d.ts +3 -3
  112. package/lib/rest/messaging/v2/channelsSender.d.ts +49 -4
  113. package/lib/rest/messaging/v2/channelsSender.js +14 -2
  114. package/lib/rest/monitor/v1/event.d.ts +3 -3
  115. package/lib/rest/notify/v1/credential.d.ts +3 -0
  116. package/lib/rest/notify/v1/service/notification.d.ts +28 -28
  117. package/lib/rest/numbers/v1/bulkEligibility.d.ts +3 -3
  118. package/lib/rest/numbers/v1/eligibility.d.ts +3 -3
  119. package/lib/rest/numbers/v1/portingPortIn.d.ts +6 -6
  120. package/lib/rest/numbers/v2/bulkHostedNumberOrder.d.ts +3 -3
  121. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +3 -3
  122. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +5 -5
  123. package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.d.ts +3 -3
  124. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +3 -3
  125. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +8 -8
  126. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.d.ts +3 -3
  127. package/lib/rest/preview/marketplace/availableAddOn.d.ts +3 -3
  128. package/lib/rest/preview/marketplace/installedAddOn.d.ts +5 -5
  129. package/lib/rest/preview/wireless/sim/usage.d.ts +15 -15
  130. package/lib/rest/proxy/v1/service/session/interaction.d.ts +3 -0
  131. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +3 -0
  132. package/lib/rest/proxy/v1/service/session.d.ts +1 -1
  133. package/lib/rest/proxy/v1/service/session.js +1 -1
  134. package/lib/rest/proxy/v1/service.d.ts +0 -8
  135. package/lib/rest/proxy/v1/service.js +0 -13
  136. package/lib/rest/serverless/v1/service/build.d.ts +9 -9
  137. package/lib/rest/serverless/v1/service/environment/log.d.ts +6 -7
  138. package/lib/rest/studio/v1/flow/engagement/engagementContext.d.ts +3 -3
  139. package/lib/rest/studio/v1/flow/engagement/step/stepContext.d.ts +3 -3
  140. package/lib/rest/studio/v1/flow/engagement/step.d.ts +3 -3
  141. package/lib/rest/studio/v1/flow/engagement.d.ts +4 -4
  142. package/lib/rest/studio/v1/flow/execution/executionContext.d.ts +3 -3
  143. package/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.d.ts +3 -3
  144. package/lib/rest/studio/v1/flow/execution/executionStep.d.ts +3 -3
  145. package/lib/rest/studio/v1/flow/execution.d.ts +4 -4
  146. package/lib/rest/studio/v2/flow/execution/executionContext.d.ts +3 -3
  147. package/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.d.ts +3 -3
  148. package/lib/rest/studio/v2/flow/execution/executionStep.d.ts +3 -3
  149. package/lib/rest/studio/v2/flow/execution.d.ts +4 -4
  150. package/lib/rest/studio/v2/flow/flowRevision.d.ts +6 -6
  151. package/lib/rest/studio/v2/flow.d.ts +11 -11
  152. package/lib/rest/studio/v2/flowValidate.d.ts +1 -1
  153. package/lib/rest/supersim/v1/network.d.ts +3 -3
  154. package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.d.ts +3 -3
  155. package/lib/rest/supersim/v1/settingsUpdate.d.ts +3 -3
  156. package/lib/rest/supersim/v1/sim/billingPeriod.d.ts +3 -0
  157. package/lib/rest/supersim/v1/usageRecord.d.ts +3 -3
  158. package/lib/rest/sync/v1/service/document/documentPermission.d.ts +3 -3
  159. package/lib/rest/sync/v1/service/document.d.ts +3 -3
  160. package/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +3 -3
  161. package/lib/rest/sync/v1/service/syncList/syncListPermission.d.ts +3 -3
  162. package/lib/rest/sync/v1/service/syncList.d.ts +3 -3
  163. package/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +3 -3
  164. package/lib/rest/sync/v1/service/syncMap/syncMapPermission.d.ts +3 -3
  165. package/lib/rest/sync/v1/service/syncMap.d.ts +3 -3
  166. package/lib/rest/sync/v1/service/syncStream.d.ts +3 -3
  167. package/lib/rest/sync/v1/service.d.ts +3 -3
  168. package/lib/rest/taskrouter/v1/workspace/event.d.ts +3 -3
  169. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +3 -0
  170. package/lib/rest/taskrouter/v1/workspace/task.d.ts +4 -1
  171. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueBulkRealTimeStatistics.d.ts +3 -3
  172. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +12 -12
  173. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.d.ts +9 -9
  174. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.d.ts +6 -6
  175. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.d.ts +6 -6
  176. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +3 -0
  177. package/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.d.ts +3 -3
  178. package/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.d.ts +3 -3
  179. package/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.d.ts +3 -3
  180. package/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.d.ts +6 -6
  181. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +9 -9
  182. package/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.d.ts +6 -6
  183. package/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.d.ts +6 -6
  184. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +9 -9
  185. package/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.d.ts +9 -9
  186. package/lib/rest/taskrouter/v1/workspace/workspaceStatistics.d.ts +6 -6
  187. package/lib/rest/taskrouter/v1/workspace.d.ts +3 -0
  188. package/lib/rest/trunking/v1/trunk/phoneNumber.d.ts +3 -0
  189. package/lib/rest/trunking/v1/trunk/recording.d.ts +6 -0
  190. package/lib/rest/trunking/v1/trunk.d.ts +12 -3
  191. package/lib/rest/trunking/v1/trunk.js +2 -0
  192. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +3 -3
  193. package/lib/rest/trusthub/v1/customerProfiles.d.ts +3 -3
  194. package/lib/rest/trusthub/v1/endUser.d.ts +5 -5
  195. package/lib/rest/trusthub/v1/endUserType.d.ts +3 -3
  196. package/lib/rest/trusthub/v1/policies.d.ts +3 -3
  197. package/lib/rest/trusthub/v1/supportingDocument.d.ts +5 -5
  198. package/lib/rest/trusthub/v1/supportingDocumentType.d.ts +3 -3
  199. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +3 -3
  200. package/lib/rest/trusthub/v1/trustProducts.d.ts +3 -3
  201. package/lib/rest/verify/v2/form.d.ts +9 -6
  202. package/lib/rest/verify/v2/service/accessToken.d.ts +3 -0
  203. package/lib/rest/verify/v2/service/entity/challenge.d.ts +21 -12
  204. package/lib/rest/verify/v2/service/entity/challenge.js +1 -1
  205. package/lib/rest/verify/v2/service/entity/factor.d.ts +12 -6
  206. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +16 -10
  207. package/lib/rest/verify/v2/service/verification.d.ts +11 -11
  208. package/lib/rest/verify/v2/service/verificationCheck.d.ts +3 -3
  209. package/lib/rest/verify/v2/service/webhook.d.ts +3 -0
  210. package/lib/rest/verify/v2/service.d.ts +9 -9
  211. package/lib/rest/verify/v2/template.d.ts +3 -3
  212. package/lib/rest/verify/v2/verificationAttempt.d.ts +13 -10
  213. package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +2 -2
  214. package/lib/rest/video/v1/composition.d.ts +3 -3
  215. package/lib/rest/video/v1/recording.d.ts +3 -3
  216. package/lib/rest/video/v1/room/transcriptions.d.ts +316 -0
  217. package/lib/rest/{proxy/v1/service/shortCode.js → video/v1/room/transcriptions.js} +61 -78
  218. package/lib/rest/video/v1/room.d.ts +8 -0
  219. package/lib/rest/video/v1/room.js +13 -0
  220. package/lib/rest/wireless/v1/sim/dataSession.d.ts +3 -3
  221. package/lib/rest/wireless/v1/sim/usageRecord.d.ts +9 -9
  222. package/lib/rest/wireless/v1/usageRecord.d.ts +9 -9
  223. package/lib/twiml/VoiceResponse.d.ts +32 -1
  224. package/lib/twiml/VoiceResponse.js +18 -0
  225. package/package.json +1 -1
  226. package/lib/rest/Knowledge.d.ts +0 -4
  227. package/lib/rest/Knowledge.js +0 -8
  228. package/lib/rest/KnowledgeBase.d.ts +0 -13
  229. package/lib/rest/KnowledgeBase.js +0 -31
  230. package/lib/rest/Microvisor.d.ts +0 -14
  231. package/lib/rest/Microvisor.js +0 -22
  232. package/lib/rest/MicrovisorBase.d.ts +0 -13
  233. package/lib/rest/MicrovisorBase.js +0 -31
  234. package/lib/rest/knowledge/V1.d.ts +0 -15
  235. package/lib/rest/knowledge/V1.js +0 -36
  236. package/lib/rest/knowledge/v1/knowledge/chunk.d.ts +0 -167
  237. package/lib/rest/knowledge/v1/knowledge/chunk.js +0 -131
  238. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.d.ts +0 -101
  239. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.js +0 -118
  240. package/lib/rest/knowledge/v1/knowledge.d.ts +0 -406
  241. package/lib/rest/knowledge/v1/knowledge.js +0 -300
  242. package/lib/rest/microvisor/V1.d.ts +0 -30
  243. package/lib/rest/microvisor/V1.js +0 -56
  244. package/lib/rest/microvisor/v1/accountConfig.d.ts +0 -263
  245. package/lib/rest/microvisor/v1/accountConfig.js +0 -254
  246. package/lib/rest/microvisor/v1/accountSecret.d.ts +0 -257
  247. package/lib/rest/microvisor/v1/accountSecret.js +0 -252
  248. package/lib/rest/microvisor/v1/app/appManifest.d.ts +0 -101
  249. package/lib/rest/microvisor/v1/app/appManifest.js +0 -118
  250. package/lib/rest/microvisor/v1/app.d.ts +0 -251
  251. package/lib/rest/microvisor/v1/app.js +0 -222
  252. package/lib/rest/microvisor/v1/device/deviceConfig.d.ts +0 -271
  253. package/lib/rest/microvisor/v1/device/deviceConfig.js +0 -262
  254. package/lib/rest/microvisor/v1/device/deviceSecret.d.ts +0 -265
  255. package/lib/rest/microvisor/v1/device/deviceSecret.js +0 -260
  256. package/lib/rest/microvisor/v1/device.d.ts +0 -299
  257. package/lib/rest/microvisor/v1/device.js +0 -250
  258. package/lib/rest/proxy/v1/service/shortCode.d.ts +0 -316
@@ -1,406 +0,0 @@
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
- import { ChunkListInstance } from "./knowledge/chunk";
7
- import { KnowledgeStatusListInstance } from "./knowledge/knowledgeStatus";
8
- export declare class KnowledgeV1ServiceCreateKnowledgeRequest {
9
- /**
10
- * The description of the knowledge source.
11
- */
12
- "description"?: string;
13
- /**
14
- * The details of the knowledge source based on the type.
15
- */
16
- "knowledge_source_details"?: Record<string, object>;
17
- /**
18
- * The name of the tool.
19
- */
20
- "name": string;
21
- "policy"?: KnowledgeV1ServiceCreatePolicyRequest;
22
- /**
23
- * The type of the knowledge source.
24
- */
25
- "type": string;
26
- /**
27
- * The embedding model to be used for the knowledge source. It\'s required for \'Database\' type but disallowed for other types.
28
- */
29
- "embedding_model"?: string;
30
- }
31
- export declare class KnowledgeV1ServiceCreatePolicyRequest {
32
- /**
33
- * The description of the policy.
34
- */
35
- "description"?: string;
36
- /**
37
- * The Policy ID.
38
- */
39
- "id"?: string;
40
- /**
41
- * The name of the policy.
42
- */
43
- "name"?: string;
44
- "policy_details": any | null;
45
- /**
46
- * The description of the policy.
47
- */
48
- "type"?: string;
49
- }
50
- export declare class KnowledgeV1ServiceUpdateKnowledgeRequest {
51
- /**
52
- * The description of the knowledge source.
53
- */
54
- "description"?: string;
55
- /**
56
- * The details of the knowledge source based on the type.
57
- */
58
- "knowledge_source_details"?: Record<string, object>;
59
- /**
60
- * The name of the knowledge source.
61
- */
62
- "name"?: string;
63
- "policy"?: KnowledgeV1ServiceCreatePolicyRequest;
64
- /**
65
- * The description of the knowledge source.
66
- */
67
- "type"?: string;
68
- /**
69
- * The embedding model to be used for the knowledge source. It\'s only applicable to \'Database\' type.
70
- */
71
- "embedding_model"?: string;
72
- }
73
- /**
74
- * Options to pass to update a KnowledgeInstance
75
- */
76
- export interface KnowledgeContextUpdateOptions {
77
- /** */
78
- knowledgeV1ServiceUpdateKnowledgeRequest?: KnowledgeV1ServiceUpdateKnowledgeRequest;
79
- }
80
- /**
81
- * Options to pass to create a KnowledgeInstance
82
- */
83
- export interface KnowledgeListInstanceCreateOptions {
84
- /** */
85
- knowledgeV1ServiceCreateKnowledgeRequest: KnowledgeV1ServiceCreateKnowledgeRequest;
86
- }
87
- /**
88
- * Options to pass to each
89
- */
90
- export interface KnowledgeListInstanceEachOptions {
91
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
92
- pageSize?: number;
93
- /** Function to process each record. If this and a positional callback are passed, this one will be used */
94
- callback?: (item: KnowledgeInstance, done: (err?: Error) => void) => void;
95
- /** Function to be called upon completion of streaming */
96
- done?: Function;
97
- /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
98
- limit?: number;
99
- }
100
- /**
101
- * Options to pass to list
102
- */
103
- export interface KnowledgeListInstanceOptions {
104
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
105
- pageSize?: number;
106
- /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
107
- limit?: number;
108
- }
109
- /**
110
- * Options to pass to page
111
- */
112
- export interface KnowledgeListInstancePageOptions {
113
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
114
- pageSize?: number;
115
- /** Page Number, this value is simply for client state */
116
- pageNumber?: number;
117
- /** PageToken provided by the API */
118
- pageToken?: string;
119
- }
120
- export interface KnowledgeContext {
121
- chunks: ChunkListInstance;
122
- knowledgeStatus: KnowledgeStatusListInstance;
123
- /**
124
- * Remove a KnowledgeInstance
125
- *
126
- * @param callback - Callback to handle processed record
127
- *
128
- * @returns Resolves to processed boolean
129
- */
130
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
131
- /**
132
- * Fetch a KnowledgeInstance
133
- *
134
- * @param callback - Callback to handle processed record
135
- *
136
- * @returns Resolves to processed KnowledgeInstance
137
- */
138
- fetch(callback?: (error: Error | null, item?: KnowledgeInstance) => any): Promise<KnowledgeInstance>;
139
- /**
140
- * Update a KnowledgeInstance
141
- *
142
- * @param callback - Callback to handle processed record
143
- *
144
- * @returns Resolves to processed KnowledgeInstance
145
- */
146
- update(callback?: (error: Error | null, item?: KnowledgeInstance) => any): Promise<KnowledgeInstance>;
147
- /**
148
- * Update a KnowledgeInstance
149
- *
150
- * @param params - Body for request
151
- * @param headers - header params for request
152
- * @param callback - Callback to handle processed record
153
- *
154
- * @returns Resolves to processed KnowledgeInstance
155
- */
156
- update(params: KnowledgeV1ServiceUpdateKnowledgeRequest, headers?: any, callback?: (error: Error | null, item?: KnowledgeInstance) => any): Promise<KnowledgeInstance>;
157
- /**
158
- * Provide a user-friendly representation
159
- */
160
- toJSON(): any;
161
- [inspect.custom](_depth: any, options: InspectOptions): any;
162
- }
163
- export interface KnowledgeContextSolution {
164
- id: string;
165
- }
166
- export declare class KnowledgeContextImpl implements KnowledgeContext {
167
- protected _version: V1;
168
- protected _solution: KnowledgeContextSolution;
169
- protected _uri: string;
170
- protected _chunks?: ChunkListInstance;
171
- protected _knowledgeStatus?: KnowledgeStatusListInstance;
172
- constructor(_version: V1, id: string);
173
- get chunks(): ChunkListInstance;
174
- get knowledgeStatus(): KnowledgeStatusListInstance;
175
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
176
- fetch(callback?: (error: Error | null, item?: KnowledgeInstance) => any): Promise<KnowledgeInstance>;
177
- update(params?: KnowledgeV1ServiceUpdateKnowledgeRequest | ((error: Error | null, item?: KnowledgeInstance) => any), headers?: any, callback?: (error: Error | null, item?: KnowledgeInstance) => any): Promise<KnowledgeInstance>;
178
- /**
179
- * Provide a user-friendly representation
180
- *
181
- * @returns Object
182
- */
183
- toJSON(): KnowledgeContextSolution;
184
- [inspect.custom](_depth: any, options: InspectOptions): string;
185
- }
186
- interface KnowledgePayload extends TwilioResponsePayload {
187
- knowledge: KnowledgeResource[];
188
- }
189
- interface KnowledgeResource {
190
- description: string;
191
- id: string;
192
- account_sid: string;
193
- knowledge_source_details: Record<string, object>;
194
- name: string;
195
- status: string;
196
- type: string;
197
- url: string;
198
- embedding_model: string;
199
- date_created: Date;
200
- date_updated: Date;
201
- }
202
- export declare class KnowledgeInstance {
203
- protected _version: V1;
204
- protected _solution: KnowledgeContextSolution;
205
- protected _context?: KnowledgeContext;
206
- constructor(_version: V1, payload: KnowledgeResource, id?: string);
207
- /**
208
- * The type of knowledge source.
209
- */
210
- description: string;
211
- /**
212
- * The description of knowledge.
213
- */
214
- id: string;
215
- /**
216
- * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
217
- */
218
- accountSid: string;
219
- /**
220
- * The details of the knowledge source based on the type.
221
- */
222
- knowledgeSourceDetails: Record<string, object>;
223
- /**
224
- * The name of the knowledge source.
225
- */
226
- name: string;
227
- /**
228
- * The status of processing the knowledge source (\'QUEUED\', \'PROCESSING\', \'COMPLETED\', \'FAILED\')
229
- */
230
- status: string;
231
- /**
232
- * The type of knowledge source (\'Web\', \'Database\', \'Text\', \'File\')
233
- */
234
- type: string;
235
- /**
236
- * The url of the knowledge resource.
237
- */
238
- url: string;
239
- /**
240
- * The embedding model to be used for the knowledge source.
241
- */
242
- embeddingModel: string;
243
- /**
244
- * The date and time in GMT when the Knowledge was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
245
- */
246
- dateCreated: Date;
247
- /**
248
- * The date and time in GMT when the Knowledge was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
249
- */
250
- dateUpdated: Date;
251
- private get _proxy();
252
- /**
253
- * Remove a KnowledgeInstance
254
- *
255
- * @param callback - Callback to handle processed record
256
- *
257
- * @returns Resolves to processed boolean
258
- */
259
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
260
- /**
261
- * Fetch a KnowledgeInstance
262
- *
263
- * @param callback - Callback to handle processed record
264
- *
265
- * @returns Resolves to processed KnowledgeInstance
266
- */
267
- fetch(callback?: (error: Error | null, item?: KnowledgeInstance) => any): Promise<KnowledgeInstance>;
268
- /**
269
- * Update a KnowledgeInstance
270
- *
271
- * @param callback - Callback to handle processed record
272
- *
273
- * @returns Resolves to processed KnowledgeInstance
274
- */
275
- update(callback?: (error: Error | null, item?: KnowledgeInstance) => any): Promise<KnowledgeInstance>;
276
- /**
277
- * Update a KnowledgeInstance
278
- *
279
- * @param params - Body for request
280
- * @param headers - header params for request
281
- * @param callback - Callback to handle processed record
282
- *
283
- * @returns Resolves to processed KnowledgeInstance
284
- */
285
- update(params: KnowledgeV1ServiceUpdateKnowledgeRequest, headers?: any, callback?: (error: Error | null, item?: KnowledgeInstance) => any): Promise<KnowledgeInstance>;
286
- /**
287
- * Access the chunks.
288
- */
289
- chunks(): ChunkListInstance;
290
- /**
291
- * Access the knowledgeStatus.
292
- */
293
- knowledgeStatus(): KnowledgeStatusListInstance;
294
- /**
295
- * Provide a user-friendly representation
296
- *
297
- * @returns Object
298
- */
299
- toJSON(): {
300
- description: string;
301
- id: string;
302
- accountSid: string;
303
- knowledgeSourceDetails: Record<string, object>;
304
- name: string;
305
- status: string;
306
- type: string;
307
- url: string;
308
- embeddingModel: string;
309
- dateCreated: Date;
310
- dateUpdated: Date;
311
- };
312
- [inspect.custom](_depth: any, options: InspectOptions): string;
313
- }
314
- export interface KnowledgeSolution {
315
- }
316
- export interface KnowledgeListInstance {
317
- _version: V1;
318
- _solution: KnowledgeSolution;
319
- _uri: string;
320
- (id: string): KnowledgeContext;
321
- get(id: string): KnowledgeContext;
322
- /**
323
- * Create a KnowledgeInstance
324
- *
325
- * @param params - Body for request
326
- * @param headers - header params for request
327
- * @param callback - Callback to handle processed record
328
- *
329
- * @returns Resolves to processed KnowledgeInstance
330
- */
331
- create(params: KnowledgeV1ServiceCreateKnowledgeRequest, headers?: any, callback?: (error: Error | null, item?: KnowledgeInstance) => any): Promise<KnowledgeInstance>;
332
- /**
333
- * Streams KnowledgeInstance records from the API.
334
- *
335
- * This operation lazily loads records as efficiently as possible until the limit
336
- * is reached.
337
- *
338
- * The results are passed into the callback function, so this operation is memory
339
- * efficient.
340
- *
341
- * If a function is passed as the first argument, it will be used as the callback
342
- * function.
343
- *
344
- * @param { KnowledgeListInstanceEachOptions } [params] - Options for request
345
- * @param { function } [callback] - Function to process each record
346
- */
347
- each(callback?: (item: KnowledgeInstance, done: (err?: Error) => void) => void): void;
348
- each(params: KnowledgeListInstanceEachOptions, callback?: (item: KnowledgeInstance, done: (err?: Error) => void) => void): void;
349
- /**
350
- * Retrieve a single target page of KnowledgeInstance records from the API.
351
- *
352
- * The request is executed immediately.
353
- *
354
- * @param { string } [targetUrl] - API-generated URL for the requested results page
355
- * @param { function } [callback] - Callback to handle list of records
356
- */
357
- getPage(targetUrl: string, callback?: (error: Error | null, items: KnowledgePage) => any): Promise<KnowledgePage>;
358
- /**
359
- * Lists KnowledgeInstance records from the API as a list.
360
- *
361
- * If a function is passed as the first argument, it will be used as the callback
362
- * function.
363
- *
364
- * @param { KnowledgeListInstanceOptions } [params] - Options for request
365
- * @param { function } [callback] - Callback to handle list of records
366
- */
367
- list(callback?: (error: Error | null, items: KnowledgeInstance[]) => any): Promise<KnowledgeInstance[]>;
368
- list(params: KnowledgeListInstanceOptions, callback?: (error: Error | null, items: KnowledgeInstance[]) => any): Promise<KnowledgeInstance[]>;
369
- /**
370
- * Retrieve a single page of KnowledgeInstance records from the API.
371
- *
372
- * The request is executed immediately.
373
- *
374
- * If a function is passed as the first argument, it will be used as the callback
375
- * function.
376
- *
377
- * @param { KnowledgeListInstancePageOptions } [params] - Options for request
378
- * @param { function } [callback] - Callback to handle list of records
379
- */
380
- page(callback?: (error: Error | null, items: KnowledgePage) => any): Promise<KnowledgePage>;
381
- page(params: KnowledgeListInstancePageOptions, callback?: (error: Error | null, items: KnowledgePage) => any): Promise<KnowledgePage>;
382
- /**
383
- * Provide a user-friendly representation
384
- */
385
- toJSON(): any;
386
- [inspect.custom](_depth: any, options: InspectOptions): any;
387
- }
388
- export declare function KnowledgeListInstance(version: V1): KnowledgeListInstance;
389
- export declare class KnowledgePage extends Page<V1, KnowledgePayload, KnowledgeResource, KnowledgeInstance> {
390
- /**
391
- * Initialize the KnowledgePage
392
- *
393
- * @param version - Version of the resource
394
- * @param response - Response from the API
395
- * @param solution - Path solution
396
- */
397
- constructor(version: V1, response: Response<string>, solution: KnowledgeSolution);
398
- /**
399
- * Build an instance of KnowledgeInstance
400
- *
401
- * @param payload - Payload response from the API
402
- */
403
- getInstance(payload: KnowledgeResource): KnowledgeInstance;
404
- [inspect.custom](depth: any, options: InspectOptions): string;
405
- }
406
- export {};
@@ -1,300 +0,0 @@
1
- "use strict";
2
- /*
3
- * This code was generated by
4
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
- *
8
- * Twilio - Knowledge
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.KnowledgePage = exports.KnowledgeListInstance = exports.KnowledgeInstance = exports.KnowledgeContextImpl = exports.KnowledgeV1ServiceUpdateKnowledgeRequest = exports.KnowledgeV1ServiceCreatePolicyRequest = exports.KnowledgeV1ServiceCreateKnowledgeRequest = 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
- const utility_1 = require("../../../base/utility");
25
- const chunk_1 = require("./knowledge/chunk");
26
- const knowledgeStatus_1 = require("./knowledge/knowledgeStatus");
27
- class KnowledgeV1ServiceCreateKnowledgeRequest {
28
- }
29
- exports.KnowledgeV1ServiceCreateKnowledgeRequest = KnowledgeV1ServiceCreateKnowledgeRequest;
30
- class KnowledgeV1ServiceCreatePolicyRequest {
31
- }
32
- exports.KnowledgeV1ServiceCreatePolicyRequest = KnowledgeV1ServiceCreatePolicyRequest;
33
- class KnowledgeV1ServiceUpdateKnowledgeRequest {
34
- }
35
- exports.KnowledgeV1ServiceUpdateKnowledgeRequest = KnowledgeV1ServiceUpdateKnowledgeRequest;
36
- class KnowledgeContextImpl {
37
- constructor(_version, id) {
38
- this._version = _version;
39
- if (!(0, utility_1.isValidPathParam)(id)) {
40
- throw new Error("Parameter 'id' is not valid.");
41
- }
42
- this._solution = { id };
43
- this._uri = `/Knowledge/${id}`;
44
- }
45
- get chunks() {
46
- this._chunks =
47
- this._chunks || (0, chunk_1.ChunkListInstance)(this._version, this._solution.id);
48
- return this._chunks;
49
- }
50
- get knowledgeStatus() {
51
- this._knowledgeStatus =
52
- this._knowledgeStatus ||
53
- (0, knowledgeStatus_1.KnowledgeStatusListInstance)(this._version, this._solution.id);
54
- return this._knowledgeStatus;
55
- }
56
- remove(callback) {
57
- const headers = {};
58
- const instance = this;
59
- let operationVersion = instance._version, operationPromise = operationVersion.remove({
60
- uri: instance._uri,
61
- method: "delete",
62
- headers,
63
- });
64
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
65
- return operationPromise;
66
- }
67
- fetch(callback) {
68
- const headers = {};
69
- headers["Accept"] = "application/json";
70
- const instance = this;
71
- let operationVersion = instance._version, operationPromise = operationVersion.fetch({
72
- uri: instance._uri,
73
- method: "get",
74
- headers,
75
- });
76
- operationPromise = operationPromise.then((payload) => new KnowledgeInstance(operationVersion, payload, instance._solution.id));
77
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
78
- return operationPromise;
79
- }
80
- update(params, headers, callback) {
81
- if (params instanceof Function) {
82
- callback = params;
83
- params = {};
84
- }
85
- else {
86
- params = params || {};
87
- }
88
- let data = {};
89
- data = params;
90
- if (headers === null || headers === undefined) {
91
- headers = {};
92
- }
93
- headers["Content-Type"] = "application/json";
94
- headers["Accept"] = "application/json";
95
- const instance = this;
96
- let operationVersion = instance._version, operationPromise = operationVersion.update({
97
- uri: instance._uri,
98
- method: "put",
99
- data,
100
- headers,
101
- });
102
- operationPromise = operationPromise.then((payload) => new KnowledgeInstance(operationVersion, payload, instance._solution.id));
103
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
104
- return operationPromise;
105
- }
106
- /**
107
- * Provide a user-friendly representation
108
- *
109
- * @returns Object
110
- */
111
- toJSON() {
112
- return this._solution;
113
- }
114
- [util_1.inspect.custom](_depth, options) {
115
- return (0, util_1.inspect)(this.toJSON(), options);
116
- }
117
- }
118
- exports.KnowledgeContextImpl = KnowledgeContextImpl;
119
- class KnowledgeInstance {
120
- constructor(_version, payload, id) {
121
- this._version = _version;
122
- this.description = payload.description;
123
- this.id = payload.id;
124
- this.accountSid = payload.account_sid;
125
- this.knowledgeSourceDetails = payload.knowledge_source_details;
126
- this.name = payload.name;
127
- this.status = payload.status;
128
- this.type = payload.type;
129
- this.url = payload.url;
130
- this.embeddingModel = payload.embedding_model;
131
- this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
132
- this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
133
- this._solution = { id: id || this.id };
134
- }
135
- get _proxy() {
136
- this._context =
137
- this._context ||
138
- new KnowledgeContextImpl(this._version, this._solution.id);
139
- return this._context;
140
- }
141
- /**
142
- * Remove a KnowledgeInstance
143
- *
144
- * @param callback - Callback to handle processed record
145
- *
146
- * @returns Resolves to processed boolean
147
- */
148
- remove(callback) {
149
- return this._proxy.remove(callback);
150
- }
151
- /**
152
- * Fetch a KnowledgeInstance
153
- *
154
- * @param callback - Callback to handle processed record
155
- *
156
- * @returns Resolves to processed KnowledgeInstance
157
- */
158
- fetch(callback) {
159
- return this._proxy.fetch(callback);
160
- }
161
- update(params, callback) {
162
- return this._proxy.update(params, callback);
163
- }
164
- /**
165
- * Access the chunks.
166
- */
167
- chunks() {
168
- return this._proxy.chunks;
169
- }
170
- /**
171
- * Access the knowledgeStatus.
172
- */
173
- knowledgeStatus() {
174
- return this._proxy.knowledgeStatus;
175
- }
176
- /**
177
- * Provide a user-friendly representation
178
- *
179
- * @returns Object
180
- */
181
- toJSON() {
182
- return {
183
- description: this.description,
184
- id: this.id,
185
- accountSid: this.accountSid,
186
- knowledgeSourceDetails: this.knowledgeSourceDetails,
187
- name: this.name,
188
- status: this.status,
189
- type: this.type,
190
- url: this.url,
191
- embeddingModel: this.embeddingModel,
192
- dateCreated: this.dateCreated,
193
- dateUpdated: this.dateUpdated,
194
- };
195
- }
196
- [util_1.inspect.custom](_depth, options) {
197
- return (0, util_1.inspect)(this.toJSON(), options);
198
- }
199
- }
200
- exports.KnowledgeInstance = KnowledgeInstance;
201
- function KnowledgeListInstance(version) {
202
- const instance = ((id) => instance.get(id));
203
- instance.get = function get(id) {
204
- return new KnowledgeContextImpl(version, id);
205
- };
206
- instance._version = version;
207
- instance._solution = {};
208
- instance._uri = `/Knowledge`;
209
- instance.create = function create(params, headers, callback) {
210
- if (params === null || params === undefined) {
211
- throw new Error('Required parameter "params" missing.');
212
- }
213
- let data = {};
214
- data = params;
215
- if (headers === null || headers === undefined) {
216
- headers = {};
217
- }
218
- headers["Content-Type"] = "application/json";
219
- headers["Accept"] = "application/json";
220
- let operationVersion = version, operationPromise = operationVersion.create({
221
- uri: instance._uri,
222
- method: "post",
223
- data,
224
- headers,
225
- });
226
- operationPromise = operationPromise.then((payload) => new KnowledgeInstance(operationVersion, payload));
227
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
228
- return operationPromise;
229
- };
230
- instance.page = function page(params, callback) {
231
- if (params instanceof Function) {
232
- callback = params;
233
- params = {};
234
- }
235
- else {
236
- params = params || {};
237
- }
238
- let data = {};
239
- if (params["pageSize"] !== undefined)
240
- data["PageSize"] = params["pageSize"];
241
- if (params.pageNumber !== undefined)
242
- data["Page"] = params.pageNumber;
243
- if (params.pageToken !== undefined)
244
- data["PageToken"] = params.pageToken;
245
- const headers = {};
246
- headers["Accept"] = "application/json";
247
- let operationVersion = version, operationPromise = operationVersion.page({
248
- uri: instance._uri,
249
- method: "get",
250
- params: data,
251
- headers,
252
- });
253
- operationPromise = operationPromise.then((payload) => new KnowledgePage(operationVersion, payload, instance._solution));
254
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
255
- return operationPromise;
256
- };
257
- instance.each = instance._version.each;
258
- instance.list = instance._version.list;
259
- instance.getPage = function getPage(targetUrl, callback) {
260
- const operationPromise = instance._version._domain.twilio.request({
261
- method: "get",
262
- uri: targetUrl,
263
- });
264
- let pagePromise = operationPromise.then((payload) => new KnowledgePage(instance._version, payload, instance._solution));
265
- pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
266
- return pagePromise;
267
- };
268
- instance.toJSON = function toJSON() {
269
- return instance._solution;
270
- };
271
- instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
272
- return (0, util_1.inspect)(instance.toJSON(), options);
273
- };
274
- return instance;
275
- }
276
- exports.KnowledgeListInstance = KnowledgeListInstance;
277
- class KnowledgePage extends Page_1.default {
278
- /**
279
- * Initialize the KnowledgePage
280
- *
281
- * @param version - Version of the resource
282
- * @param response - Response from the API
283
- * @param solution - Path solution
284
- */
285
- constructor(version, response, solution) {
286
- super(version, response, solution);
287
- }
288
- /**
289
- * Build an instance of KnowledgeInstance
290
- *
291
- * @param payload - Payload response from the API
292
- */
293
- getInstance(payload) {
294
- return new KnowledgeInstance(this._version, payload);
295
- }
296
- [util_1.inspect.custom](depth, options) {
297
- return (0, util_1.inspect)(this.toJSON(), options);
298
- }
299
- }
300
- exports.KnowledgePage = KnowledgePage;