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
@@ -0,0 +1,406 @@
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 {};