twilio 5.5.0 → 5.5.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 (183) hide show
  1. package/lib/rest/Knowledge.d.ts +4 -0
  2. package/lib/rest/Knowledge.js +8 -0
  3. package/lib/rest/KnowledgeBase.d.ts +13 -0
  4. package/lib/rest/KnowledgeBase.js +31 -0
  5. package/lib/rest/PreviewBase.d.ts +0 -3
  6. package/lib/rest/PreviewBase.js +0 -5
  7. package/lib/rest/Twilio.d.ts +5 -0
  8. package/lib/rest/Twilio.js +5 -0
  9. package/lib/rest/accounts/v1/safelist.d.ts +4 -4
  10. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +3 -0
  11. package/lib/rest/api/v2010/account/call/recording.d.ts +6 -0
  12. package/lib/rest/api/v2010/account/call/siprec.d.ts +3 -0
  13. package/lib/rest/api/v2010/account/call/stream.d.ts +3 -0
  14. package/lib/rest/api/v2010/account/call/transcription.d.ts +3 -0
  15. package/lib/rest/api/v2010/account/call.d.ts +3 -0
  16. package/lib/rest/api/v2010/account/conference/participant.d.ts +4 -1
  17. package/lib/rest/api/v2010/account/conference/recording.d.ts +6 -0
  18. package/lib/rest/api/v2010/account/conference.d.ts +7 -1
  19. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +6 -0
  20. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +6 -0
  21. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +6 -0
  22. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +6 -0
  23. package/lib/rest/api/v2010/account/message/feedback.d.ts +3 -0
  24. package/lib/rest/api/v2010/account/message.d.ts +9 -0
  25. package/lib/rest/api/v2010/account/message.js +2 -0
  26. package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +3 -0
  27. package/lib/rest/api/v2010/account/recording/transcription.d.ts +3 -0
  28. package/lib/rest/api/v2010/account/recording.d.ts +6 -0
  29. package/lib/rest/api/v2010/account/transcription.d.ts +3 -0
  30. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +3 -0
  31. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +3 -0
  32. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +3 -0
  33. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +3 -0
  34. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +3 -0
  35. package/lib/rest/api/v2010/account/usage/record/today.d.ts +3 -0
  36. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +3 -0
  37. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +3 -0
  38. package/lib/rest/api/v2010/account/usage/record.d.ts +3 -0
  39. package/lib/rest/api/v2010/account/usage/trigger.d.ts +6 -0
  40. package/lib/rest/api/v2010/account/usage.d.ts +3 -0
  41. package/lib/rest/api/v2010/account.d.ts +6 -0
  42. package/lib/rest/chat/v2/service/binding.d.ts +3 -0
  43. package/lib/rest/chat/v2/service/channel/webhook.d.ts +3 -0
  44. package/lib/rest/chat/v2/service/user/userBinding.d.ts +3 -0
  45. package/lib/rest/chat/v2/service/user/userChannel.d.ts +3 -0
  46. package/lib/rest/conversations/v1/addressConfiguration.d.ts +3 -0
  47. package/lib/rest/conversations/v1/configuration/webhook.d.ts +6 -0
  48. package/lib/rest/conversations/v1/conversation/webhook.d.ts +3 -0
  49. package/lib/rest/conversations/v1/conversation.d.ts +3 -0
  50. package/lib/rest/conversations/v1/conversationWithParticipants.d.ts +3 -0
  51. package/lib/rest/conversations/v1/service/binding.d.ts +3 -0
  52. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +3 -0
  53. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +3 -0
  54. package/lib/rest/conversations/v1/service/conversation.d.ts +3 -0
  55. package/lib/rest/conversations/v1/service/conversationWithParticipants.d.ts +3 -0
  56. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +3 -0
  57. package/lib/rest/conversations/v1/user/userConversation.d.ts +3 -0
  58. package/lib/rest/events/v1/sink.d.ts +6 -0
  59. package/lib/rest/flexApi/v1/configuration.d.ts +3 -0
  60. package/lib/rest/flexApi/v1/flexFlow.d.ts +6 -0
  61. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +3 -0
  62. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +3 -0
  63. package/lib/rest/flexApi/v1/provisioningStatus.d.ts +3 -0
  64. package/lib/rest/flexApi/v2/flexUser.d.ts +0 -24
  65. package/lib/rest/flexApi/v2/flexUser.js +0 -12
  66. package/lib/rest/iam/V1.d.ts +5 -0
  67. package/lib/rest/iam/V1.js +6 -0
  68. package/lib/rest/iam/v1/token.d.ts +88 -0
  69. package/lib/rest/iam/v1/token.js +99 -0
  70. package/lib/rest/insights/v1/room/participant.d.ts +2 -2
  71. package/lib/rest/insights/v1/room.d.ts +2 -2
  72. package/lib/rest/intelligence/v2/customOperator.d.ts +3 -0
  73. package/lib/rest/intelligence/v2/operator.d.ts +3 -0
  74. package/lib/rest/intelligence/v2/operatorType.d.ts +9 -0
  75. package/lib/rest/intelligence/v2/prebuiltOperator.d.ts +3 -0
  76. package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +3 -0
  77. package/lib/rest/intelligence/v2/transcript.d.ts +3 -0
  78. package/lib/rest/knowledge/V1.d.ts +15 -0
  79. package/lib/rest/{preview/Sync.js → knowledge/V1.js} +11 -11
  80. package/lib/rest/knowledge/v1/knowledge/chunk.d.ts +167 -0
  81. package/lib/rest/knowledge/v1/knowledge/chunk.js +131 -0
  82. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.d.ts +101 -0
  83. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.js +118 -0
  84. package/lib/rest/knowledge/v1/knowledge.d.ts +406 -0
  85. package/lib/rest/{preview/sync/service/document.js → knowledge/v1/knowledge.js} +102 -91
  86. package/lib/rest/lookups/v1/phoneNumber.d.ts +1 -1
  87. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +3 -0
  88. package/lib/rest/messaging/v1/brandRegistration.d.ts +9 -0
  89. package/lib/rest/messaging/v1/service.d.ts +3 -0
  90. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +6 -0
  91. package/lib/rest/monitor/v1/event.d.ts +1 -1
  92. package/lib/rest/notify/v1/service/binding.d.ts +3 -0
  93. package/lib/rest/notify/v1/service/notification.d.ts +3 -0
  94. package/lib/rest/numbers/v1/portingPortability.d.ts +3 -0
  95. package/lib/rest/numbers/v1/portingWebhookConfigurationDelete.d.ts +3 -0
  96. package/lib/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.d.ts +3 -0
  97. package/lib/rest/numbers/v2/authorizationDocument.d.ts +3 -0
  98. package/lib/rest/numbers/v2/bulkHostedNumberOrder.d.ts +3 -0
  99. package/lib/rest/numbers/v2/bundleClone.d.ts +3 -0
  100. package/lib/rest/numbers/v2/hostedNumberOrder.d.ts +6 -0
  101. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +3 -0
  102. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +3 -0
  103. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +3 -0
  104. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +3 -0
  105. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +3 -0
  106. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +3 -0
  107. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +3 -0
  108. package/lib/rest/numbers/v2/regulatoryCompliance.d.ts +3 -0
  109. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +6 -0
  110. package/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +3 -0
  111. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +6 -0
  112. package/lib/rest/proxy/v1/service/session/interaction.d.ts +3 -0
  113. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +3 -0
  114. package/lib/rest/proxy/v1/service/session.d.ts +6 -0
  115. package/lib/rest/proxy/v1/service.d.ts +6 -0
  116. package/lib/rest/serverless/v1/service/asset/assetVersion.d.ts +3 -0
  117. package/lib/rest/serverless/v1/service/build/buildStatus.d.ts +3 -0
  118. package/lib/rest/serverless/v1/service/build.d.ts +6 -0
  119. package/lib/rest/serverless/v1/service/environment/log.d.ts +3 -0
  120. package/lib/rest/serverless/v1/service/function/functionVersion.d.ts +3 -0
  121. package/lib/rest/studio/v1/flow/engagement/step.d.ts +6 -0
  122. package/lib/rest/studio/v1/flow/engagement/step.js +2 -0
  123. package/lib/rest/studio/v1/flow/engagement.d.ts +3 -0
  124. package/lib/rest/studio/v1/flow/execution/executionStep.d.ts +6 -0
  125. package/lib/rest/studio/v1/flow/execution/executionStep.js +2 -0
  126. package/lib/rest/studio/v1/flow/execution.d.ts +3 -0
  127. package/lib/rest/studio/v1/flow.d.ts +3 -0
  128. package/lib/rest/studio/v2/flow/execution/executionStep.d.ts +6 -0
  129. package/lib/rest/studio/v2/flow/execution/executionStep.js +2 -0
  130. package/lib/rest/studio/v2/flow/execution.d.ts +3 -0
  131. package/lib/rest/studio/v2/flow/flowRevision.d.ts +3 -0
  132. package/lib/rest/studio/v2/flow.d.ts +3 -0
  133. package/lib/rest/supersim/v1/esimProfile.d.ts +3 -0
  134. package/lib/rest/supersim/v1/fleet.d.ts +3 -0
  135. package/lib/rest/supersim/v1/ipCommand.d.ts +9 -0
  136. package/lib/rest/supersim/v1/settingsUpdate.d.ts +3 -0
  137. package/lib/rest/supersim/v1/sim/simIpAddress.d.ts +3 -0
  138. package/lib/rest/supersim/v1/sim.d.ts +3 -0
  139. package/lib/rest/supersim/v1/smsCommand.d.ts +6 -0
  140. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +1 -1
  141. package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +3 -0
  142. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +1 -1
  143. package/lib/rest/trunking/v1/trunk.d.ts +3 -0
  144. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +3 -0
  145. package/lib/rest/trusthub/v1/customerProfiles.d.ts +3 -0
  146. package/lib/rest/trusthub/v1/supportingDocument.d.ts +3 -0
  147. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +3 -0
  148. package/lib/rest/trusthub/v1/trustProducts.d.ts +3 -0
  149. package/lib/rest/verify/v2/service/verification.d.ts +6 -0
  150. package/lib/rest/verify/v2/service/verificationCheck.d.ts +3 -0
  151. package/lib/rest/verify/v2/service/webhook.d.ts +6 -0
  152. package/lib/rest/verify/v2/verificationAttempt.d.ts +3 -0
  153. package/lib/rest/video/v1/composition.d.ts +6 -0
  154. package/lib/rest/video/v1/compositionHook.d.ts +3 -0
  155. package/lib/rest/video/v1/recording.d.ts +9 -0
  156. package/lib/rest/video/v1/room/participant/anonymize.d.ts +3 -0
  157. package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +3 -0
  158. package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +3 -0
  159. package/lib/rest/video/v1/room/participant.d.ts +4 -1
  160. package/lib/rest/video/v1/room/roomRecording.d.ts +9 -0
  161. package/lib/rest/wireless/v1/command.d.ts +12 -0
  162. package/lib/rest/wireless/v1/ratePlan.d.ts +6 -0
  163. package/lib/rest/wireless/v1/ratePlan.js +2 -0
  164. package/lib/rest/wireless/v1/sim.d.ts +6 -0
  165. package/package.json +1 -1
  166. package/lib/rest/preview/Sync.d.ts +0 -15
  167. package/lib/rest/preview/sync/service/document/documentPermission.d.ts +0 -280
  168. package/lib/rest/preview/sync/service/document/documentPermission.js +0 -260
  169. package/lib/rest/preview/sync/service/document.d.ts +0 -295
  170. package/lib/rest/preview/sync/service/syncList/syncListItem.d.ts +0 -321
  171. package/lib/rest/preview/sync/service/syncList/syncListItem.js +0 -286
  172. package/lib/rest/preview/sync/service/syncList/syncListPermission.d.ts +0 -280
  173. package/lib/rest/preview/sync/service/syncList/syncListPermission.js +0 -260
  174. package/lib/rest/preview/sync/service/syncList.d.ts +0 -270
  175. package/lib/rest/preview/sync/service/syncList.js +0 -270
  176. package/lib/rest/preview/sync/service/syncMap/syncMapItem.d.ts +0 -323
  177. package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +0 -290
  178. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.d.ts +0 -280
  179. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +0 -260
  180. package/lib/rest/preview/sync/service/syncMap.d.ts +0 -270
  181. package/lib/rest/preview/sync/service/syncMap.js +0 -270
  182. package/lib/rest/preview/sync/service.d.ts +0 -330
  183. package/lib/rest/preview/sync/service.js +0 -316
@@ -5,7 +5,7 @@
5
5
  * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
6
  * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
7
  *
8
- * Twilio - Preview
8
+ * Twilio - Knowledge
9
9
  * This is the public Twilio REST API.
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator.
@@ -16,30 +16,42 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.DocumentPage = exports.DocumentListInstance = exports.DocumentInstance = exports.DocumentContextImpl = void 0;
19
+ exports.KnowledgePage = exports.KnowledgeListInstance = exports.KnowledgeInstance = exports.KnowledgeContextImpl = exports.KnowledgeV1ServiceUpdateKnowledgeRequest = exports.KnowledgeV1ServiceCreatePolicyRequest = exports.KnowledgeV1ServiceCreateKnowledgeRequest = void 0;
20
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 documentPermission_1 = require("./document/documentPermission");
26
- class DocumentContextImpl {
27
- constructor(_version, serviceSid, sid) {
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) {
28
38
  this._version = _version;
29
- if (!(0, utility_1.isValidPathParam)(serviceSid)) {
30
- throw new Error("Parameter 'serviceSid' is not valid.");
31
- }
32
- if (!(0, utility_1.isValidPathParam)(sid)) {
33
- throw new Error("Parameter 'sid' is not valid.");
39
+ if (!(0, utility_1.isValidPathParam)(id)) {
40
+ throw new Error("Parameter 'id' is not valid.");
34
41
  }
35
- this._solution = { serviceSid, sid };
36
- this._uri = `/Services/${serviceSid}/Documents/${sid}`;
42
+ this._solution = { id };
43
+ this._uri = `/Knowledge/${id}`;
37
44
  }
38
- get documentPermissions() {
39
- this._documentPermissions =
40
- this._documentPermissions ||
41
- (0, documentPermission_1.DocumentPermissionListInstance)(this._version, this._solution.serviceSid, this._solution.sid);
42
- return this._documentPermissions;
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;
43
55
  }
44
56
  remove(callback) {
45
57
  const headers = {};
@@ -61,32 +73,33 @@ class DocumentContextImpl {
61
73
  method: "get",
62
74
  headers,
63
75
  });
64
- operationPromise = operationPromise.then((payload) => new DocumentInstance(operationVersion, payload, instance._solution.serviceSid, instance._solution.sid));
76
+ operationPromise = operationPromise.then((payload) => new KnowledgeInstance(operationVersion, payload, instance._solution.id));
65
77
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
66
78
  return operationPromise;
67
79
  }
68
- update(params, callback) {
69
- if (params === null || params === undefined) {
70
- throw new Error('Required parameter "params" missing.');
80
+ update(params, headers, callback) {
81
+ if (params instanceof Function) {
82
+ callback = params;
83
+ params = {};
71
84
  }
72
- if (params["data"] === null || params["data"] === undefined) {
73
- throw new Error("Required parameter \"params['data']\" missing.");
85
+ else {
86
+ params = params || {};
74
87
  }
75
88
  let data = {};
76
- data["Data"] = serialize.object(params["data"]);
77
- const headers = {};
78
- headers["Content-Type"] = "application/x-www-form-urlencoded";
89
+ data = params;
90
+ if (headers === null || headers === undefined) {
91
+ headers = {};
92
+ }
93
+ headers["Content-Type"] = "application/json";
79
94
  headers["Accept"] = "application/json";
80
- if (params["ifMatch"] !== undefined)
81
- headers["If-Match"] = params["ifMatch"];
82
95
  const instance = this;
83
96
  let operationVersion = instance._version, operationPromise = operationVersion.update({
84
97
  uri: instance._uri,
85
- method: "post",
98
+ method: "put",
86
99
  data,
87
100
  headers,
88
101
  });
89
- operationPromise = operationPromise.then((payload) => new DocumentInstance(operationVersion, payload, instance._solution.serviceSid, instance._solution.sid));
102
+ operationPromise = operationPromise.then((payload) => new KnowledgeInstance(operationVersion, payload, instance._solution.id));
90
103
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
91
104
  return operationPromise;
92
105
  }
@@ -102,31 +115,31 @@ class DocumentContextImpl {
102
115
  return (0, util_1.inspect)(this.toJSON(), options);
103
116
  }
104
117
  }
105
- exports.DocumentContextImpl = DocumentContextImpl;
106
- class DocumentInstance {
107
- constructor(_version, payload, serviceSid, sid) {
118
+ exports.KnowledgeContextImpl = KnowledgeContextImpl;
119
+ class KnowledgeInstance {
120
+ constructor(_version, payload, id) {
108
121
  this._version = _version;
109
- this.sid = payload.sid;
110
- this.uniqueName = payload.unique_name;
122
+ this.description = payload.description;
123
+ this.id = payload.id;
111
124
  this.accountSid = payload.account_sid;
112
- this.serviceSid = payload.service_sid;
125
+ this.knowledgeSourceDetails = payload.knowledge_source_details;
126
+ this.name = payload.name;
127
+ this.status = payload.status;
128
+ this.type = payload.type;
113
129
  this.url = payload.url;
114
- this.links = payload.links;
115
- this.revision = payload.revision;
116
- this.data = payload.data;
130
+ this.embeddingModel = payload.embedding_model;
117
131
  this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
118
132
  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
119
- this.createdBy = payload.created_by;
120
- this._solution = { serviceSid, sid: sid || this.sid };
133
+ this._solution = { id: id || this.id };
121
134
  }
122
135
  get _proxy() {
123
136
  this._context =
124
137
  this._context ||
125
- new DocumentContextImpl(this._version, this._solution.serviceSid, this._solution.sid);
138
+ new KnowledgeContextImpl(this._version, this._solution.id);
126
139
  return this._context;
127
140
  }
128
141
  /**
129
- * Remove a DocumentInstance
142
+ * Remove a KnowledgeInstance
130
143
  *
131
144
  * @param callback - Callback to handle processed record
132
145
  *
@@ -136,11 +149,11 @@ class DocumentInstance {
136
149
  return this._proxy.remove(callback);
137
150
  }
138
151
  /**
139
- * Fetch a DocumentInstance
152
+ * Fetch a KnowledgeInstance
140
153
  *
141
154
  * @param callback - Callback to handle processed record
142
155
  *
143
- * @returns Resolves to processed DocumentInstance
156
+ * @returns Resolves to processed KnowledgeInstance
144
157
  */
145
158
  fetch(callback) {
146
159
  return this._proxy.fetch(callback);
@@ -149,10 +162,16 @@ class DocumentInstance {
149
162
  return this._proxy.update(params, callback);
150
163
  }
151
164
  /**
152
- * Access the documentPermissions.
165
+ * Access the chunks.
166
+ */
167
+ chunks() {
168
+ return this._proxy.chunks;
169
+ }
170
+ /**
171
+ * Access the knowledgeStatus.
153
172
  */
154
- documentPermissions() {
155
- return this._proxy.documentPermissions;
173
+ knowledgeStatus() {
174
+ return this._proxy.knowledgeStatus;
156
175
  }
157
176
  /**
158
177
  * Provide a user-friendly representation
@@ -161,50 +180,42 @@ class DocumentInstance {
161
180
  */
162
181
  toJSON() {
163
182
  return {
164
- sid: this.sid,
165
- uniqueName: this.uniqueName,
183
+ description: this.description,
184
+ id: this.id,
166
185
  accountSid: this.accountSid,
167
- serviceSid: this.serviceSid,
186
+ knowledgeSourceDetails: this.knowledgeSourceDetails,
187
+ name: this.name,
188
+ status: this.status,
189
+ type: this.type,
168
190
  url: this.url,
169
- links: this.links,
170
- revision: this.revision,
171
- data: this.data,
191
+ embeddingModel: this.embeddingModel,
172
192
  dateCreated: this.dateCreated,
173
193
  dateUpdated: this.dateUpdated,
174
- createdBy: this.createdBy,
175
194
  };
176
195
  }
177
196
  [util_1.inspect.custom](_depth, options) {
178
197
  return (0, util_1.inspect)(this.toJSON(), options);
179
198
  }
180
199
  }
181
- exports.DocumentInstance = DocumentInstance;
182
- function DocumentListInstance(version, serviceSid) {
183
- if (!(0, utility_1.isValidPathParam)(serviceSid)) {
184
- throw new Error("Parameter 'serviceSid' is not valid.");
185
- }
186
- const instance = ((sid) => instance.get(sid));
187
- instance.get = function get(sid) {
188
- return new DocumentContextImpl(version, serviceSid, sid);
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);
189
205
  };
190
206
  instance._version = version;
191
- instance._solution = { serviceSid };
192
- instance._uri = `/Services/${serviceSid}/Documents`;
193
- instance.create = function create(params, callback) {
194
- if (params instanceof Function) {
195
- callback = params;
196
- params = {};
197
- }
198
- else {
199
- params = params || {};
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.');
200
212
  }
201
213
  let data = {};
202
- if (params["uniqueName"] !== undefined)
203
- data["UniqueName"] = params["uniqueName"];
204
- if (params["data"] !== undefined)
205
- data["Data"] = serialize.object(params["data"]);
206
- const headers = {};
207
- headers["Content-Type"] = "application/x-www-form-urlencoded";
214
+ data = params;
215
+ if (headers === null || headers === undefined) {
216
+ headers = {};
217
+ }
218
+ headers["Content-Type"] = "application/json";
208
219
  headers["Accept"] = "application/json";
209
220
  let operationVersion = version, operationPromise = operationVersion.create({
210
221
  uri: instance._uri,
@@ -212,7 +223,7 @@ function DocumentListInstance(version, serviceSid) {
212
223
  data,
213
224
  headers,
214
225
  });
215
- operationPromise = operationPromise.then((payload) => new DocumentInstance(operationVersion, payload, instance._solution.serviceSid));
226
+ operationPromise = operationPromise.then((payload) => new KnowledgeInstance(operationVersion, payload));
216
227
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
217
228
  return operationPromise;
218
229
  };
@@ -239,7 +250,7 @@ function DocumentListInstance(version, serviceSid) {
239
250
  params: data,
240
251
  headers,
241
252
  });
242
- operationPromise = operationPromise.then((payload) => new DocumentPage(operationVersion, payload, instance._solution));
253
+ operationPromise = operationPromise.then((payload) => new KnowledgePage(operationVersion, payload, instance._solution));
243
254
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
244
255
  return operationPromise;
245
256
  };
@@ -250,7 +261,7 @@ function DocumentListInstance(version, serviceSid) {
250
261
  method: "get",
251
262
  uri: targetUrl,
252
263
  });
253
- let pagePromise = operationPromise.then((payload) => new DocumentPage(instance._version, payload, instance._solution));
264
+ let pagePromise = operationPromise.then((payload) => new KnowledgePage(instance._version, payload, instance._solution));
254
265
  pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
255
266
  return pagePromise;
256
267
  };
@@ -262,10 +273,10 @@ function DocumentListInstance(version, serviceSid) {
262
273
  };
263
274
  return instance;
264
275
  }
265
- exports.DocumentListInstance = DocumentListInstance;
266
- class DocumentPage extends Page_1.default {
276
+ exports.KnowledgeListInstance = KnowledgeListInstance;
277
+ class KnowledgePage extends Page_1.default {
267
278
  /**
268
- * Initialize the DocumentPage
279
+ * Initialize the KnowledgePage
269
280
  *
270
281
  * @param version - Version of the resource
271
282
  * @param response - Response from the API
@@ -275,15 +286,15 @@ class DocumentPage extends Page_1.default {
275
286
  super(version, response, solution);
276
287
  }
277
288
  /**
278
- * Build an instance of DocumentInstance
289
+ * Build an instance of KnowledgeInstance
279
290
  *
280
291
  * @param payload - Payload response from the API
281
292
  */
282
293
  getInstance(payload) {
283
- return new DocumentInstance(this._version, payload, this._solution.serviceSid);
294
+ return new KnowledgeInstance(this._version, payload);
284
295
  }
285
296
  [util_1.inspect.custom](depth, options) {
286
297
  return (0, util_1.inspect)(this.toJSON(), options);
287
298
  }
288
299
  }
289
- exports.DocumentPage = DocumentPage;
300
+ exports.KnowledgePage = KnowledgePage;
@@ -7,7 +7,7 @@ import V1 from "../V1";
7
7
  export interface PhoneNumberContextFetchOptions {
8
8
  /** The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format. */
9
9
  countryCode?: string;
10
- /** The type of information to return. Can be: `carrier` or `caller-name`. The default is null. Carrier information costs $0.005 per phone number looked up. Caller Name information is currently available only in the US and costs $0.01 per phone number looked up. To retrieve both types on information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value. */
10
+ /** The type of information to return. Can be: `carrier` or `caller-name`. The default is null. To retrieve both types of information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value. */
11
11
  type?: Array<string>;
12
12
  /** The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons). */
13
13
  addOns?: Array<string>;
@@ -3,6 +3,9 @@ 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
+ /**
7
+ * The third-party provider that has conducted the vetting. One of “CampaignVerify” (Campaign Verify tokens) or “AEGIS” (Secondary Vetting).
8
+ */
6
9
  export type BrandVettingVettingProvider = "campaign-verify" | "aegis";
7
10
  /**
8
11
  * Options to pass to create a BrandVettingInstance
@@ -5,8 +5,17 @@ import Response from "../../../http/response";
5
5
  import V1 from "../V1";
6
6
  import { BrandRegistrationOtpListInstance } from "./brandRegistration/brandRegistrationOtp";
7
7
  import { BrandVettingListInstance } from "./brandRegistration/brandVetting";
8
+ /**
9
+ * DEPRECATED. Feedback on how to improve brand score
10
+ */
8
11
  export type BrandRegistrationBrandFeedback = "TAX_ID" | "STOCK_SYMBOL" | "NONPROFIT" | "GOVERNMENT_ENTITY" | "OTHERS";
12
+ /**
13
+ * When a brand is registered, TCR will attempt to verify the identity of the brand based on the supplied information.
14
+ */
9
15
  export type BrandRegistrationIdentityStatus = "SELF_DECLARED" | "UNVERIFIED" | "VERIFIED" | "VETTED_VERIFIED";
16
+ /**
17
+ * Brand Registration status. One of \"PENDING\", \"APPROVED\", \"FAILED\", \"IN_REVIEW\", \"DELETION_PENDING\", \"DELETION_FAILED\", \"SUSPENDED\".
18
+ */
10
19
  export type BrandRegistrationStatus = "PENDING" | "APPROVED" | "FAILED" | "IN_REVIEW" | "DELETION_PENDING" | "DELETION_FAILED" | "SUSPENDED";
11
20
  /**
12
21
  * Options to pass to create a BrandRegistrationInstance
@@ -10,6 +10,9 @@ import { PhoneNumberListInstance } from "./service/phoneNumber";
10
10
  import { ShortCodeListInstance } from "./service/shortCode";
11
11
  import { UsAppToPersonListInstance } from "./service/usAppToPerson";
12
12
  import { UsAppToPersonUsecaseListInstance } from "./service/usAppToPersonUsecase";
13
+ /**
14
+ * Reserved.
15
+ */
13
16
  export type ServiceScanMessageContent = "inherit" | "enable" | "disable";
14
17
  /**
15
18
  * Options to pass to update a ServiceInstance
@@ -3,7 +3,13 @@ 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
+ /**
7
+ * Describe how a user opts-in to text messages.
8
+ */
6
9
  export type TollfreeVerificationOptInType = "VERBAL" | "WEB_FORM" | "PAPER_FORM" | "VIA_TEXT" | "MOBILE_QR_CODE" | "IMPORT" | "IMPORT_PLEASE_REPLACE";
10
+ /**
11
+ * The compliance status of the Tollfree Verification record.
12
+ */
7
13
  export type TollfreeVerificationStatus = "PENDING_REVIEW" | "IN_REVIEW" | "TWILIO_APPROVED" | "TWILIO_REJECTED";
8
14
  /**
9
15
  * Options to pass to update a TollfreeVerificationInstance
@@ -133,7 +133,7 @@ export declare class EventInstance {
133
133
  */
134
134
  accountSid: string;
135
135
  /**
136
- * The SID of the actor that caused the event, if available. Can be `null`.
136
+ * The SID of the actor that caused the event, if available. This can be either a User ID (matching the pattern `^US[0-9a-fA-F]{32}$`) or an Account SID (matching the pattern `^AC[0-9a-fA-F]{32}$`). If the actor\'s SID isn\'t available, this field will be `null`.
137
137
  */
138
138
  actorSid: string;
139
139
  /**
@@ -3,6 +3,9 @@ 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
+ /**
7
+ * The transport technology to use for the Binding. Can be: `apn`, `fcm`, `gcm`, `sms`, or `facebook-messenger`.
8
+ */
6
9
  export type BindingBindingType = "apn" | "gcm" | "sms" | "fcm" | "facebook-messenger" | "alexa";
7
10
  /**
8
11
  * Options to pass to create a BindingInstance
@@ -1,6 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V1 from "../../V1";
4
+ /**
5
+ * The priority of the notification. Can be: `low` or `high` and the default is `high`. A value of `low` optimizes the client app\'s battery consumption; however, notifications may be delivered with unspecified delay. For FCM and GCM, `low` priority is the same as `Normal` priority. For APNS `low` priority is the same as `5`. A value of `high` sends the notification immediately, and can wake up a sleeping device. For FCM and GCM, `high` is the same as `High` priority. For APNS, `high` is a priority `10`. SMS does not support this property.
6
+ */
4
7
  export type NotificationPriority = "high" | "low";
5
8
  /**
6
9
  * Options to pass to create a NotificationInstance
@@ -1,6 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V1 from "../V1";
4
+ /**
5
+ * The type of the requested phone number. One of `LOCAL`, `UNKNOWN`, `MOBILE`, `TOLL-FREE`.
6
+ */
4
7
  export type PortingPortabilityNumberType = "LOCAL" | "UNKNOWN" | "MOBILE" | "TOLL-FREE";
5
8
  /**
6
9
  * Options to pass to fetch a PortingPortabilityInstance
@@ -1,6 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V1 from "../V1";
4
+ /**
5
+ * The of the webhook type of the configuration to be deleted
6
+ */
4
7
  export type PortingWebhookConfigurationDeleteWebhookType = "PORT_IN" | "PORT_OUT";
5
8
  export interface PortingWebhookConfigurationDeleteContext {
6
9
  /**
@@ -4,6 +4,9 @@ import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V2 from "../../V2";
6
6
  import { PhoneNumberCapabilities } from "../../../../interfaces";
7
+ /**
8
+ * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.
9
+ */
7
10
  export type DependentHostedNumberOrderStatus = "received" | "verified" | "pending-loa" | "carrier-processing" | "completed" | "failed" | "action-required";
8
11
  /**
9
12
  * Options to pass to each
@@ -4,6 +4,9 @@ import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V2 from "../V2";
6
6
  import { DependentHostedNumberOrderListInstance } from "./authorizationDocument/dependentHostedNumberOrder";
7
+ /**
8
+ * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.
9
+ */
7
10
  export type AuthorizationDocumentStatus = "opened" | "signing" | "signed" | "canceled" | "failed";
8
11
  /**
9
12
  * Options to pass to create a AuthorizationDocumentInstance
@@ -1,6 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V2 from "../V2";
4
+ /**
5
+ * A string that shows the status of the current Bulk Hosting request, it can vary between these values: \'QUEUED\',\'IN_PROGRESS\',\'PROCESSED\'
6
+ */
4
7
  export type BulkHostedNumberOrderRequestStatus = "QUEUED" | "IN_PROGRESS" | "PROCESSED";
5
8
  /**
6
9
  * Options to pass to fetch a BulkHostedNumberOrderInstance
@@ -1,6 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V2 from "../V2";
4
+ /**
5
+ * The verification status of the Bundle resource.
6
+ */
4
7
  export type BundleCloneStatus = "draft" | "pending-review" | "in-review" | "twilio-rejected" | "twilio-approved" | "provisionally-approved";
5
8
  /**
6
9
  * Options to pass to create a BundleCloneInstance
@@ -4,7 +4,13 @@ import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V2 from "../V2";
6
6
  import { PhoneNumberCapabilities } from "../../../interfaces";
7
+ /**
8
+ * Status of this resource. It can hold one of the values: 1. Twilio Processing 2. Received, 3. Pending LOA, 4. Carrier Processing, 5. Completed, 6. Action Required, 7. Failed. See the [HostedNumberOrders Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/hosted-number-order-resource#status-values) section for more information on each of these statuses.
9
+ */
7
10
  export type HostedNumberOrderStatus = "twilio-processing" | "received" | "pending-verification" | "verified" | "pending-loa" | "carrier-processing" | "testing" | "completed" | "failed" | "action-required";
11
+ /**
12
+ * The method used to verify ownership of the number to be hosted. Can be: `phone-call` or `phone-bill` and the default is `phone-call`.
13
+ */
8
14
  export type HostedNumberOrderVerificationType = "phone-call";
9
15
  /**
10
16
  * Options to pass to update a HostedNumberOrderInstance
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../../base/Page";
4
4
  import Response from "../../../../../http/response";
5
5
  import V2 from "../../../V2";
6
+ /**
7
+ * The verification status of the Bundle resource.
8
+ */
6
9
  export type BundleCopyStatus = "draft" | "pending-review" | "in-review" | "twilio-rejected" | "twilio-approved" | "provisionally-approved";
7
10
  /**
8
11
  * Options to pass to create a BundleCopyInstance
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../../base/Page";
4
4
  import Response from "../../../../../http/response";
5
5
  import V2 from "../../../V2";
6
+ /**
7
+ * The compliance status of the Evaluation resource.
8
+ */
6
9
  export type EvaluationStatus = "compliant" | "noncompliant";
7
10
  /**
8
11
  * Options to pass to each
@@ -1,6 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V2 from "../../../V2";
4
+ /**
5
+ * The verification status of the Bundle resource.
6
+ */
4
7
  export type ReplaceItemsStatus = "draft" | "pending-review" | "in-review" | "twilio-rejected" | "twilio-approved" | "provisionally-approved";
5
8
  /**
6
9
  * Options to pass to create a ReplaceItemsInstance
@@ -10,6 +10,9 @@ import { ReplaceItemsListInstance } from "./bundle/replaceItems";
10
10
  export type BundleEndUserType = "individual" | "business";
11
11
  export type BundleSortBy = "valid-until" | "date-updated";
12
12
  export type BundleSortDirection = "ASC" | "DESC";
13
+ /**
14
+ * The verification status of the Bundle resource.
15
+ */
13
16
  export type BundleStatus = "draft" | "pending-review" | "in-review" | "twilio-rejected" | "twilio-approved" | "provisionally-approved";
14
17
  /**
15
18
  * Options to pass to update a BundleInstance
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V2 from "../../V2";
6
+ /**
7
+ * The type of end user of the Bundle resource - can be `individual` or `business`.
8
+ */
6
9
  export type EndUserType = "individual" | "business";
7
10
  /**
8
11
  * Options to pass to update a EndUserInstance
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V2 from "../../V2";
6
+ /**
7
+ * The type of End User the regulation requires - can be `individual` or `business`.
8
+ */
6
9
  export type RegulationEndUserType = "individual" | "business";
7
10
  /**
8
11
  * Options to pass to fetch a RegulationInstance
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V2 from "../../V2";
6
+ /**
7
+ * The verification status of the Supporting Document resource.
8
+ */
6
9
  export type SupportingDocumentStatus = "draft" | "pending-review" | "rejected" | "approved" | "expired" | "provisionally-approved";
7
10
  /**
8
11
  * Options to pass to update a SupportingDocumentInstance
@@ -7,6 +7,9 @@ import { EndUserTypeListInstance } from "./regulatoryCompliance/endUserType";
7
7
  import { RegulationListInstance } from "./regulatoryCompliance/regulation";
8
8
  import { SupportingDocumentListInstance } from "./regulatoryCompliance/supportingDocument";
9
9
  import { SupportingDocumentTypeListInstance } from "./regulatoryCompliance/supportingDocumentType";
10
+ /**
11
+ * The type of End User the regulation requires - can be `individual` or `business`.
12
+ */
10
13
  export type RegulatoryComplianceEndUserType = "individual" | "business";
11
14
  export interface RegulatoryComplianceSolution {
12
15
  }
@@ -4,7 +4,13 @@ import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import HostedNumbers from "../../HostedNumbers";
6
6
  import { PhoneNumberCapabilities } from "../../../../interfaces";
7
+ /**
8
+ * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.
9
+ */
7
10
  export type DependentHostedNumberOrderStatus = "received" | "pending-verification" | "verified" | "pending-loa" | "carrier-processing" | "testing" | "completed" | "failed" | "action-required";
11
+ /**
12
+ * The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill.
13
+ */
8
14
  export type DependentHostedNumberOrderVerificationType = "phone-call" | "phone-bill";
9
15
  /**
10
16
  * Options to pass to each
@@ -4,6 +4,9 @@ import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import HostedNumbers from "../HostedNumbers";
6
6
  import { DependentHostedNumberOrderListInstance } from "./authorizationDocument/dependentHostedNumberOrder";
7
+ /**
8
+ * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.
9
+ */
7
10
  export type AuthorizationDocumentStatus = "opened" | "signing" | "signed" | "canceled" | "failed";
8
11
  /**
9
12
  * Options to pass to update a AuthorizationDocumentInstance