@credal/sdk 0.1.17 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (552) hide show
  1. package/README.md +242 -91
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +16 -16
  4. package/dist/cjs/Client.js +70 -23
  5. package/dist/cjs/api/errors/BadRequestError.d.ts +5 -0
  6. package/dist/cjs/api/errors/BadRequestError.js +54 -0
  7. package/dist/cjs/api/errors/ForbiddenError.d.ts +5 -0
  8. package/dist/cjs/api/errors/ForbiddenError.js +54 -0
  9. package/dist/cjs/api/errors/InternalServerError.d.ts +5 -0
  10. package/dist/cjs/api/errors/InternalServerError.js +54 -0
  11. package/dist/cjs/api/errors/NotFoundError.d.ts +5 -0
  12. package/dist/cjs/api/errors/NotFoundError.js +54 -0
  13. package/dist/cjs/api/errors/UnauthorizedError.d.ts +5 -0
  14. package/dist/cjs/api/errors/UnauthorizedError.js +54 -0
  15. package/dist/cjs/api/errors/index.d.ts +5 -0
  16. package/dist/cjs/api/{resources/documentCatalog/client → errors}/index.js +5 -1
  17. package/dist/cjs/api/index.d.ts +1 -0
  18. package/dist/cjs/api/index.js +1 -0
  19. package/dist/cjs/api/resources/agents/client/Client.d.ts +50 -0
  20. package/dist/cjs/api/resources/agents/client/Client.js +187 -0
  21. package/dist/cjs/api/resources/agents/client/requests/FetchResponseAgentsRequest.d.ts +9 -0
  22. package/dist/cjs/api/resources/agents/client/requests/SendMessageAgentsRequest.d.ts +16 -0
  23. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/agents/exports.d.ts +2 -0
  25. package/dist/cjs/api/resources/{documentCatalog/index.js → agents/exports.js} +4 -1
  26. package/dist/cjs/api/resources/agents/types/FetchResponseAgentsResponse.d.ts +20 -0
  27. package/dist/cjs/api/resources/agents/types/SendMessageAgentsRequestConversation.d.ts +12 -0
  28. package/dist/cjs/api/resources/agents/types/SendMessageAgentsResponse.d.ts +3 -0
  29. package/dist/cjs/api/resources/agents/types/index.d.ts +3 -0
  30. package/dist/cjs/api/resources/{common → agents/types}/index.js +3 -1
  31. package/dist/cjs/api/resources/index.d.ts +3 -16
  32. package/dist/cjs/api/resources/index.js +7 -20
  33. package/dist/cjs/auth/BearerAuthProvider.d.ts +3 -3
  34. package/dist/cjs/auth/BearerAuthProvider.js +7 -10
  35. package/dist/cjs/core/exports.d.ts +0 -1
  36. package/dist/cjs/core/exports.js +0 -1
  37. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
  38. package/dist/cjs/core/fetcher/Fetcher.js +8 -2
  39. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  40. package/dist/cjs/core/fetcher/index.js +3 -1
  41. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
  42. package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
  43. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  44. package/dist/cjs/core/fetcher/makeRequest.js +30 -9
  45. package/dist/cjs/core/index.d.ts +0 -3
  46. package/dist/cjs/core/index.js +1 -4
  47. package/dist/cjs/core/runtime/runtime.js +8 -7
  48. package/dist/cjs/environments.d.ts +2 -2
  49. package/dist/cjs/environments.js +1 -1
  50. package/dist/cjs/version.d.ts +1 -1
  51. package/dist/cjs/version.js +1 -1
  52. package/dist/esm/BaseClient.mjs +2 -2
  53. package/dist/esm/Client.d.mts +16 -16
  54. package/dist/esm/Client.mjs +37 -23
  55. package/dist/esm/api/errors/BadRequestError.d.mts +5 -0
  56. package/dist/esm/api/errors/BadRequestError.mjs +17 -0
  57. package/dist/esm/api/errors/ForbiddenError.d.mts +5 -0
  58. package/dist/esm/api/errors/ForbiddenError.mjs +17 -0
  59. package/dist/esm/api/errors/InternalServerError.d.mts +5 -0
  60. package/dist/esm/api/errors/InternalServerError.mjs +17 -0
  61. package/dist/esm/api/errors/NotFoundError.d.mts +5 -0
  62. package/dist/esm/api/errors/NotFoundError.mjs +17 -0
  63. package/dist/esm/api/errors/UnauthorizedError.d.mts +5 -0
  64. package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
  65. package/dist/esm/api/errors/index.d.mts +5 -0
  66. package/dist/esm/api/errors/index.mjs +5 -0
  67. package/dist/esm/api/index.d.mts +1 -0
  68. package/dist/esm/api/index.mjs +1 -0
  69. package/dist/esm/api/resources/agents/client/Client.d.mts +50 -0
  70. package/dist/esm/api/resources/agents/client/Client.mjs +150 -0
  71. package/dist/esm/api/resources/agents/client/requests/FetchResponseAgentsRequest.d.mts +9 -0
  72. package/dist/esm/api/resources/agents/client/requests/SendMessageAgentsRequest.d.mts +16 -0
  73. package/dist/esm/api/resources/agents/client/requests/index.d.mts +2 -0
  74. package/dist/esm/api/resources/agents/exports.d.mts +2 -0
  75. package/dist/esm/api/resources/agents/exports.mjs +3 -0
  76. package/dist/esm/api/resources/agents/types/FetchResponseAgentsResponse.d.mts +20 -0
  77. package/dist/esm/api/resources/agents/types/SendMessageAgentsRequestConversation.d.mts +12 -0
  78. package/dist/esm/api/resources/agents/types/SendMessageAgentsResponse.d.mts +3 -0
  79. package/dist/esm/api/resources/agents/types/index.d.mts +3 -0
  80. package/dist/esm/api/resources/agents/types/index.mjs +3 -0
  81. package/dist/esm/api/resources/index.d.mts +3 -16
  82. package/dist/esm/api/resources/index.mjs +3 -16
  83. package/dist/esm/auth/BearerAuthProvider.d.mts +3 -3
  84. package/dist/esm/auth/BearerAuthProvider.mjs +7 -10
  85. package/dist/esm/core/exports.d.mts +0 -1
  86. package/dist/esm/core/exports.mjs +0 -1
  87. package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
  88. package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
  89. package/dist/esm/core/fetcher/index.d.mts +2 -0
  90. package/dist/esm/core/fetcher/index.mjs +1 -0
  91. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
  92. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
  93. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  94. package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
  95. package/dist/esm/core/index.d.mts +0 -3
  96. package/dist/esm/core/index.mjs +0 -3
  97. package/dist/esm/core/runtime/runtime.mjs +8 -7
  98. package/dist/esm/environments.d.mts +2 -2
  99. package/dist/esm/environments.mjs +1 -1
  100. package/dist/esm/version.d.mts +1 -1
  101. package/dist/esm/version.mjs +1 -1
  102. package/package.json +16 -5
  103. package/reference.md +15 -1444
  104. package/dist/cjs/api/resources/common/index.d.ts +0 -1
  105. package/dist/cjs/api/resources/common/types/Collaborator.d.ts +0 -5
  106. package/dist/cjs/api/resources/common/types/CustomMetadataValue.d.ts +0 -1
  107. package/dist/cjs/api/resources/common/types/ExternalResourceId.d.ts +0 -5
  108. package/dist/cjs/api/resources/common/types/Operator.d.ts +0 -10
  109. package/dist/cjs/api/resources/common/types/Operator.js +0 -13
  110. package/dist/cjs/api/resources/common/types/ResourceIdentifier.d.ts +0 -10
  111. package/dist/cjs/api/resources/common/types/ResourceType.d.ts +0 -22
  112. package/dist/cjs/api/resources/common/types/ResourceType.js +0 -25
  113. package/dist/cjs/api/resources/common/types/Role.d.ts +0 -5
  114. package/dist/cjs/api/resources/common/types/Role.js +0 -8
  115. package/dist/cjs/api/resources/common/types/Url.d.ts +0 -3
  116. package/dist/cjs/api/resources/common/types/index.d.ts +0 -8
  117. package/dist/cjs/api/resources/common/types/index.js +0 -24
  118. package/dist/cjs/api/resources/copilots/client/Client.d.ts +0 -169
  119. package/dist/cjs/api/resources/copilots/client/Client.js +0 -556
  120. package/dist/cjs/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +0 -13
  121. package/dist/cjs/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.js +0 -3
  122. package/dist/cjs/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +0 -13
  123. package/dist/cjs/api/resources/copilots/client/requests/CreateConversationRequest.js +0 -3
  124. package/dist/cjs/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +0 -20
  125. package/dist/cjs/api/resources/copilots/client/requests/CreateCopilotRequest.js +0 -3
  126. package/dist/cjs/api/resources/copilots/client/requests/DeleteCopilotRequest.d.ts +0 -10
  127. package/dist/cjs/api/resources/copilots/client/requests/DeleteCopilotRequest.js +0 -3
  128. package/dist/cjs/api/resources/copilots/client/requests/ExportCopilotsRequest.d.ts +0 -21
  129. package/dist/cjs/api/resources/copilots/client/requests/ExportCopilotsRequest.js +0 -3
  130. package/dist/cjs/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +0 -24
  131. package/dist/cjs/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.js +0 -3
  132. package/dist/cjs/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +0 -13
  133. package/dist/cjs/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.js +0 -3
  134. package/dist/cjs/api/resources/copilots/client/requests/SendMessageRequest.d.ts +0 -28
  135. package/dist/cjs/api/resources/copilots/client/requests/SendMessageRequest.js +0 -3
  136. package/dist/cjs/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +0 -56
  137. package/dist/cjs/api/resources/copilots/client/requests/StreamMessageRequest.js +0 -3
  138. package/dist/cjs/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +0 -21
  139. package/dist/cjs/api/resources/copilots/client/requests/UpdateConfigurationRequest.js +0 -3
  140. package/dist/cjs/api/resources/copilots/client/requests/index.d.ts +0 -10
  141. package/dist/cjs/api/resources/copilots/types/AiEndpointConfiguration.d.ts +0 -4
  142. package/dist/cjs/api/resources/copilots/types/AiEndpointConfiguration.js +0 -3
  143. package/dist/cjs/api/resources/copilots/types/BlockedChunk.d.ts +0 -5
  144. package/dist/cjs/api/resources/copilots/types/BlockedChunk.js +0 -3
  145. package/dist/cjs/api/resources/copilots/types/BooleanFieldSchema.d.ts +0 -5
  146. package/dist/cjs/api/resources/copilots/types/BooleanFieldSchema.js +0 -3
  147. package/dist/cjs/api/resources/copilots/types/CollectionFilteredData.d.ts +0 -6
  148. package/dist/cjs/api/resources/copilots/types/CollectionFilteredData.js +0 -3
  149. package/dist/cjs/api/resources/copilots/types/Configuration.d.ts +0 -7
  150. package/dist/cjs/api/resources/copilots/types/Configuration.js +0 -3
  151. package/dist/cjs/api/resources/copilots/types/CreateConversationResponse.d.ts +0 -3
  152. package/dist/cjs/api/resources/copilots/types/CreateConversationResponse.js +0 -3
  153. package/dist/cjs/api/resources/copilots/types/CreateCopilotResponse.d.ts +0 -3
  154. package/dist/cjs/api/resources/copilots/types/CreateCopilotResponse.js +0 -3
  155. package/dist/cjs/api/resources/copilots/types/DataChunk.d.ts +0 -3
  156. package/dist/cjs/api/resources/copilots/types/DataChunk.js +0 -3
  157. package/dist/cjs/api/resources/copilots/types/DataFilter.d.ts +0 -6
  158. package/dist/cjs/api/resources/copilots/types/DataFilter.js +0 -3
  159. package/dist/cjs/api/resources/copilots/types/DatetimeFieldSchema.d.ts +0 -6
  160. package/dist/cjs/api/resources/copilots/types/DatetimeFieldSchema.js +0 -3
  161. package/dist/cjs/api/resources/copilots/types/DeleteCopilotResponse.d.ts +0 -3
  162. package/dist/cjs/api/resources/copilots/types/DeleteCopilotResponse.js +0 -3
  163. package/dist/cjs/api/resources/copilots/types/EndOfMessageChunk.d.ts +0 -1
  164. package/dist/cjs/api/resources/copilots/types/EndOfMessageChunk.js +0 -3
  165. package/dist/cjs/api/resources/copilots/types/ErrorChunk.d.ts +0 -4
  166. package/dist/cjs/api/resources/copilots/types/ErrorChunk.js +0 -3
  167. package/dist/cjs/api/resources/copilots/types/ErrorChunkData.d.ts +0 -3
  168. package/dist/cjs/api/resources/copilots/types/ErrorChunkData.js +0 -3
  169. package/dist/cjs/api/resources/copilots/types/ExportCopilotsResponse.d.ts +0 -9
  170. package/dist/cjs/api/resources/copilots/types/ExportCopilotsResponse.js +0 -3
  171. package/dist/cjs/api/resources/copilots/types/ExportedCopilot.d.ts +0 -24
  172. package/dist/cjs/api/resources/copilots/types/ExportedCopilot.js +0 -3
  173. package/dist/cjs/api/resources/copilots/types/FeedbackEnum.d.ts +0 -5
  174. package/dist/cjs/api/resources/copilots/types/FeedbackEnum.js +0 -8
  175. package/dist/cjs/api/resources/copilots/types/Filter.d.ts +0 -16
  176. package/dist/cjs/api/resources/copilots/types/Filter.js +0 -3
  177. package/dist/cjs/api/resources/copilots/types/FinalChunk.d.ts +0 -4
  178. package/dist/cjs/api/resources/copilots/types/FinalChunk.js +0 -3
  179. package/dist/cjs/api/resources/copilots/types/InitialChunk.d.ts +0 -7
  180. package/dist/cjs/api/resources/copilots/types/InitialChunk.js +0 -3
  181. package/dist/cjs/api/resources/copilots/types/InputVariable.d.ts +0 -4
  182. package/dist/cjs/api/resources/copilots/types/InputVariable.js +0 -3
  183. package/dist/cjs/api/resources/copilots/types/InsertedAuditLog.d.ts +0 -3
  184. package/dist/cjs/api/resources/copilots/types/InsertedAuditLog.js +0 -3
  185. package/dist/cjs/api/resources/copilots/types/MessageBlocked.d.ts +0 -7
  186. package/dist/cjs/api/resources/copilots/types/MessageBlocked.js +0 -3
  187. package/dist/cjs/api/resources/copilots/types/MessageFeedback.d.ts +0 -6
  188. package/dist/cjs/api/resources/copilots/types/MessageFeedback.js +0 -3
  189. package/dist/cjs/api/resources/copilots/types/MessageReply.d.ts +0 -11
  190. package/dist/cjs/api/resources/copilots/types/MessageReply.js +0 -3
  191. package/dist/cjs/api/resources/copilots/types/NumberFieldSchema.d.ts +0 -6
  192. package/dist/cjs/api/resources/copilots/types/NumberFieldSchema.js +0 -3
  193. package/dist/cjs/api/resources/copilots/types/ReferencedSource.d.ts +0 -7
  194. package/dist/cjs/api/resources/copilots/types/ReferencedSource.js +0 -3
  195. package/dist/cjs/api/resources/copilots/types/ResponseChunk.d.ts +0 -5
  196. package/dist/cjs/api/resources/copilots/types/ResponseChunk.js +0 -3
  197. package/dist/cjs/api/resources/copilots/types/SendAgentMessageResponse.d.ts +0 -4
  198. package/dist/cjs/api/resources/copilots/types/SendAgentMessageResponse.js +0 -3
  199. package/dist/cjs/api/resources/copilots/types/SendMessageResponse.d.ts +0 -18
  200. package/dist/cjs/api/resources/copilots/types/SendMessageResponse.js +0 -3
  201. package/dist/cjs/api/resources/copilots/types/StreamingChunk.d.ts +0 -22
  202. package/dist/cjs/api/resources/copilots/types/StreamingChunk.js +0 -3
  203. package/dist/cjs/api/resources/copilots/types/StringFieldSchema.d.ts +0 -6
  204. package/dist/cjs/api/resources/copilots/types/StringFieldSchema.js +0 -3
  205. package/dist/cjs/api/resources/copilots/types/WebSearchResult.d.ts +0 -5
  206. package/dist/cjs/api/resources/copilots/types/WebSearchResult.js +0 -3
  207. package/dist/cjs/api/resources/copilots/types/index.d.ts +0 -33
  208. package/dist/cjs/api/resources/copilots/types/index.js +0 -49
  209. package/dist/cjs/api/resources/documentCatalog/client/Client.d.ts +0 -84
  210. package/dist/cjs/api/resources/documentCatalog/client/Client.js +0 -293
  211. package/dist/cjs/api/resources/documentCatalog/client/index.d.ts +0 -1
  212. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +0 -35
  213. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.js +0 -3
  214. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadFileRequest.d.ts +0 -27
  215. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadFileRequest.js +0 -3
  216. package/dist/cjs/api/resources/documentCatalog/client/requests/index.d.ts +0 -2
  217. package/dist/cjs/api/resources/documentCatalog/client/requests/index.js +0 -2
  218. package/dist/cjs/api/resources/documentCatalog/index.d.ts +0 -2
  219. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.d.ts +0 -7
  220. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.js +0 -3
  221. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.ts +0 -5
  222. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.js +0 -3
  223. package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlRequest.d.ts +0 -4
  224. package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlRequest.js +0 -3
  225. package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlResponse.d.ts +0 -3
  226. package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlResponse.js +0 -3
  227. package/dist/cjs/api/resources/documentCatalog/types/UploadDocumentResponse.d.ts +0 -3
  228. package/dist/cjs/api/resources/documentCatalog/types/UploadDocumentResponse.js +0 -3
  229. package/dist/cjs/api/resources/documentCatalog/types/index.d.ts +0 -5
  230. package/dist/cjs/api/resources/documentCatalog/types/index.js +0 -21
  231. package/dist/cjs/api/resources/documentCollections/client/Client.d.ts +0 -159
  232. package/dist/cjs/api/resources/documentCollections/client/Client.js +0 -439
  233. package/dist/cjs/api/resources/documentCollections/client/index.d.ts +0 -1
  234. package/dist/cjs/api/resources/documentCollections/client/index.js +0 -17
  235. package/dist/cjs/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +0 -22
  236. package/dist/cjs/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.js +0 -3
  237. package/dist/cjs/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +0 -20
  238. package/dist/cjs/api/resources/documentCollections/client/requests/CreateCollectionRequest.js +0 -3
  239. package/dist/cjs/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +0 -28
  240. package/dist/cjs/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +0 -3
  241. package/dist/cjs/api/resources/documentCollections/client/requests/DeleteCollectionRequest.d.ts +0 -9
  242. package/dist/cjs/api/resources/documentCollections/client/requests/DeleteCollectionRequest.js +0 -3
  243. package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.ts +0 -10
  244. package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.js +0 -3
  245. package/dist/cjs/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +0 -22
  246. package/dist/cjs/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.js +0 -3
  247. package/dist/cjs/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +0 -28
  248. package/dist/cjs/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +0 -3
  249. package/dist/cjs/api/resources/documentCollections/client/requests/index.d.ts +0 -7
  250. package/dist/cjs/api/resources/documentCollections/client/requests/index.js +0 -2
  251. package/dist/cjs/api/resources/documentCollections/index.d.ts +0 -2
  252. package/dist/cjs/api/resources/documentCollections/index.js +0 -18
  253. package/dist/cjs/api/resources/documentCollections/types/CreateCollectionResponse.d.ts +0 -3
  254. package/dist/cjs/api/resources/documentCollections/types/CreateCollectionResponse.js +0 -3
  255. package/dist/cjs/api/resources/documentCollections/types/DeleteCollectionResponse.d.ts +0 -3
  256. package/dist/cjs/api/resources/documentCollections/types/DeleteCollectionResponse.js +0 -3
  257. package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.ts +0 -4
  258. package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.js +0 -3
  259. package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +0 -7
  260. package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncConfig.js +0 -3
  261. package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +0 -5
  262. package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncResponse.js +0 -3
  263. package/dist/cjs/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +0 -6
  264. package/dist/cjs/api/resources/documentCollections/types/MongoSourceFieldsConfig.js +0 -3
  265. package/dist/cjs/api/resources/documentCollections/types/index.d.ts +0 -6
  266. package/dist/cjs/api/resources/documentCollections/types/index.js +0 -22
  267. package/dist/cjs/api/resources/search/client/Client.d.ts +0 -41
  268. package/dist/cjs/api/resources/search/client/Client.js +0 -122
  269. package/dist/cjs/api/resources/search/client/index.d.ts +0 -1
  270. package/dist/cjs/api/resources/search/client/index.js +0 -17
  271. package/dist/cjs/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +0 -33
  272. package/dist/cjs/api/resources/search/client/requests/SearchDocumentCollectionRequest.js +0 -3
  273. package/dist/cjs/api/resources/search/client/requests/index.d.ts +0 -1
  274. package/dist/cjs/api/resources/search/client/requests/index.js +0 -2
  275. package/dist/cjs/api/resources/search/index.d.ts +0 -2
  276. package/dist/cjs/api/resources/search/index.js +0 -18
  277. package/dist/cjs/api/resources/search/types/DocumentCollectionSearchOptions.d.ts +0 -17
  278. package/dist/cjs/api/resources/search/types/DocumentCollectionSearchOptions.js +0 -3
  279. package/dist/cjs/api/resources/search/types/DocumentCollectionSearchResult.d.ts +0 -10
  280. package/dist/cjs/api/resources/search/types/DocumentCollectionSearchResult.js +0 -3
  281. package/dist/cjs/api/resources/search/types/SearchDocumentCollectionResponse.d.ts +0 -7
  282. package/dist/cjs/api/resources/search/types/SearchDocumentCollectionResponse.js +0 -3
  283. package/dist/cjs/api/resources/search/types/SearchResultChunk.d.ts +0 -7
  284. package/dist/cjs/api/resources/search/types/SearchResultChunk.js +0 -3
  285. package/dist/cjs/api/resources/search/types/SingleFieldFilter.d.ts +0 -6
  286. package/dist/cjs/api/resources/search/types/SingleFieldFilter.js +0 -3
  287. package/dist/cjs/api/resources/search/types/index.d.ts +0 -5
  288. package/dist/cjs/api/resources/search/types/index.js +0 -21
  289. package/dist/cjs/api/resources/users/client/Client.d.ts +0 -36
  290. package/dist/cjs/api/resources/users/client/Client.js +0 -114
  291. package/dist/cjs/api/resources/users/client/index.d.ts +0 -1
  292. package/dist/cjs/api/resources/users/client/index.js +0 -2
  293. package/dist/cjs/api/resources/users/index.d.ts +0 -2
  294. package/dist/cjs/api/resources/users/index.js +0 -18
  295. package/dist/cjs/api/resources/users/types/UserMetadataPatch.d.ts +0 -5
  296. package/dist/cjs/api/resources/users/types/UserMetadataPatch.js +0 -3
  297. package/dist/cjs/api/resources/users/types/index.d.ts +0 -1
  298. package/dist/cjs/api/resources/users/types/index.js +0 -17
  299. package/dist/cjs/core/file/exports.d.ts +0 -1
  300. package/dist/cjs/core/file/exports.js +0 -2
  301. package/dist/cjs/core/file/file.d.ts +0 -10
  302. package/dist/cjs/core/file/file.js +0 -221
  303. package/dist/cjs/core/file/index.d.ts +0 -2
  304. package/dist/cjs/core/file/index.js +0 -18
  305. package/dist/cjs/core/file/types.d.ts +0 -66
  306. package/dist/cjs/core/file/types.js +0 -2
  307. package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +0 -15
  308. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +0 -185
  309. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +0 -1
  310. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +0 -12
  311. package/dist/cjs/core/form-data-utils/index.d.ts +0 -2
  312. package/dist/cjs/core/form-data-utils/index.js +0 -20
  313. package/dist/cjs/core/stream/Stream.d.ts +0 -47
  314. package/dist/cjs/core/stream/Stream.js +0 -172
  315. package/dist/cjs/core/stream/index.d.ts +0 -1
  316. package/dist/cjs/core/stream/index.js +0 -5
  317. package/dist/esm/api/resources/common/index.d.mts +0 -1
  318. package/dist/esm/api/resources/common/index.mjs +0 -1
  319. package/dist/esm/api/resources/common/types/Collaborator.d.mts +0 -5
  320. package/dist/esm/api/resources/common/types/CustomMetadataValue.d.mts +0 -1
  321. package/dist/esm/api/resources/common/types/ExternalResourceId.d.mts +0 -5
  322. package/dist/esm/api/resources/common/types/Operator.d.mts +0 -10
  323. package/dist/esm/api/resources/common/types/Operator.mjs +0 -10
  324. package/dist/esm/api/resources/common/types/ResourceIdentifier.d.mts +0 -10
  325. package/dist/esm/api/resources/common/types/ResourceType.d.mts +0 -22
  326. package/dist/esm/api/resources/common/types/ResourceType.mjs +0 -22
  327. package/dist/esm/api/resources/common/types/Role.d.mts +0 -5
  328. package/dist/esm/api/resources/common/types/Role.mjs +0 -5
  329. package/dist/esm/api/resources/common/types/Url.d.mts +0 -3
  330. package/dist/esm/api/resources/common/types/index.d.mts +0 -8
  331. package/dist/esm/api/resources/common/types/index.mjs +0 -8
  332. package/dist/esm/api/resources/copilots/client/Client.d.mts +0 -169
  333. package/dist/esm/api/resources/copilots/client/Client.mjs +0 -519
  334. package/dist/esm/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.mts +0 -13
  335. package/dist/esm/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.mjs +0 -2
  336. package/dist/esm/api/resources/copilots/client/requests/CreateConversationRequest.d.mts +0 -13
  337. package/dist/esm/api/resources/copilots/client/requests/CreateConversationRequest.mjs +0 -2
  338. package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.d.mts +0 -20
  339. package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.mjs +0 -2
  340. package/dist/esm/api/resources/copilots/client/requests/DeleteCopilotRequest.d.mts +0 -10
  341. package/dist/esm/api/resources/copilots/client/requests/DeleteCopilotRequest.mjs +0 -2
  342. package/dist/esm/api/resources/copilots/client/requests/ExportCopilotsRequest.d.mts +0 -21
  343. package/dist/esm/api/resources/copilots/client/requests/ExportCopilotsRequest.mjs +0 -2
  344. package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.mts +0 -24
  345. package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.mjs +0 -2
  346. package/dist/esm/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.mts +0 -13
  347. package/dist/esm/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.mjs +0 -2
  348. package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.d.mts +0 -28
  349. package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.mjs +0 -2
  350. package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.d.mts +0 -56
  351. package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.mjs +0 -2
  352. package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.mts +0 -21
  353. package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.mjs +0 -2
  354. package/dist/esm/api/resources/copilots/client/requests/index.d.mts +0 -10
  355. package/dist/esm/api/resources/copilots/types/AiEndpointConfiguration.d.mts +0 -4
  356. package/dist/esm/api/resources/copilots/types/AiEndpointConfiguration.mjs +0 -2
  357. package/dist/esm/api/resources/copilots/types/BlockedChunk.d.mts +0 -5
  358. package/dist/esm/api/resources/copilots/types/BlockedChunk.mjs +0 -2
  359. package/dist/esm/api/resources/copilots/types/BooleanFieldSchema.d.mts +0 -5
  360. package/dist/esm/api/resources/copilots/types/BooleanFieldSchema.mjs +0 -2
  361. package/dist/esm/api/resources/copilots/types/CollectionFilteredData.d.mts +0 -6
  362. package/dist/esm/api/resources/copilots/types/CollectionFilteredData.mjs +0 -2
  363. package/dist/esm/api/resources/copilots/types/Configuration.d.mts +0 -7
  364. package/dist/esm/api/resources/copilots/types/Configuration.mjs +0 -2
  365. package/dist/esm/api/resources/copilots/types/CreateConversationResponse.d.mts +0 -3
  366. package/dist/esm/api/resources/copilots/types/CreateConversationResponse.mjs +0 -2
  367. package/dist/esm/api/resources/copilots/types/CreateCopilotResponse.d.mts +0 -3
  368. package/dist/esm/api/resources/copilots/types/CreateCopilotResponse.mjs +0 -2
  369. package/dist/esm/api/resources/copilots/types/DataChunk.d.mts +0 -3
  370. package/dist/esm/api/resources/copilots/types/DataChunk.mjs +0 -2
  371. package/dist/esm/api/resources/copilots/types/DataFilter.d.mts +0 -6
  372. package/dist/esm/api/resources/copilots/types/DataFilter.mjs +0 -2
  373. package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.d.mts +0 -6
  374. package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.mjs +0 -2
  375. package/dist/esm/api/resources/copilots/types/DeleteCopilotResponse.d.mts +0 -3
  376. package/dist/esm/api/resources/copilots/types/DeleteCopilotResponse.mjs +0 -2
  377. package/dist/esm/api/resources/copilots/types/EndOfMessageChunk.d.mts +0 -1
  378. package/dist/esm/api/resources/copilots/types/EndOfMessageChunk.mjs +0 -2
  379. package/dist/esm/api/resources/copilots/types/ErrorChunk.d.mts +0 -4
  380. package/dist/esm/api/resources/copilots/types/ErrorChunk.mjs +0 -2
  381. package/dist/esm/api/resources/copilots/types/ErrorChunkData.d.mts +0 -3
  382. package/dist/esm/api/resources/copilots/types/ErrorChunkData.mjs +0 -2
  383. package/dist/esm/api/resources/copilots/types/ExportCopilotsResponse.d.mts +0 -9
  384. package/dist/esm/api/resources/copilots/types/ExportCopilotsResponse.mjs +0 -2
  385. package/dist/esm/api/resources/copilots/types/ExportedCopilot.d.mts +0 -24
  386. package/dist/esm/api/resources/copilots/types/ExportedCopilot.mjs +0 -2
  387. package/dist/esm/api/resources/copilots/types/FeedbackEnum.d.mts +0 -5
  388. package/dist/esm/api/resources/copilots/types/FeedbackEnum.mjs +0 -5
  389. package/dist/esm/api/resources/copilots/types/Filter.d.mts +0 -16
  390. package/dist/esm/api/resources/copilots/types/Filter.mjs +0 -2
  391. package/dist/esm/api/resources/copilots/types/FinalChunk.d.mts +0 -4
  392. package/dist/esm/api/resources/copilots/types/FinalChunk.mjs +0 -2
  393. package/dist/esm/api/resources/copilots/types/InitialChunk.d.mts +0 -7
  394. package/dist/esm/api/resources/copilots/types/InitialChunk.mjs +0 -2
  395. package/dist/esm/api/resources/copilots/types/InputVariable.d.mts +0 -4
  396. package/dist/esm/api/resources/copilots/types/InputVariable.mjs +0 -2
  397. package/dist/esm/api/resources/copilots/types/InsertedAuditLog.d.mts +0 -3
  398. package/dist/esm/api/resources/copilots/types/InsertedAuditLog.mjs +0 -2
  399. package/dist/esm/api/resources/copilots/types/MessageBlocked.d.mts +0 -7
  400. package/dist/esm/api/resources/copilots/types/MessageBlocked.mjs +0 -2
  401. package/dist/esm/api/resources/copilots/types/MessageFeedback.d.mts +0 -6
  402. package/dist/esm/api/resources/copilots/types/MessageFeedback.mjs +0 -2
  403. package/dist/esm/api/resources/copilots/types/MessageReply.d.mts +0 -11
  404. package/dist/esm/api/resources/copilots/types/MessageReply.mjs +0 -2
  405. package/dist/esm/api/resources/copilots/types/NumberFieldSchema.d.mts +0 -6
  406. package/dist/esm/api/resources/copilots/types/NumberFieldSchema.mjs +0 -2
  407. package/dist/esm/api/resources/copilots/types/ReferencedSource.d.mts +0 -7
  408. package/dist/esm/api/resources/copilots/types/ReferencedSource.mjs +0 -2
  409. package/dist/esm/api/resources/copilots/types/ResponseChunk.d.mts +0 -5
  410. package/dist/esm/api/resources/copilots/types/ResponseChunk.mjs +0 -2
  411. package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.d.mts +0 -4
  412. package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.mjs +0 -2
  413. package/dist/esm/api/resources/copilots/types/SendMessageResponse.d.mts +0 -18
  414. package/dist/esm/api/resources/copilots/types/SendMessageResponse.mjs +0 -2
  415. package/dist/esm/api/resources/copilots/types/StreamingChunk.d.mts +0 -22
  416. package/dist/esm/api/resources/copilots/types/StreamingChunk.mjs +0 -2
  417. package/dist/esm/api/resources/copilots/types/StringFieldSchema.d.mts +0 -6
  418. package/dist/esm/api/resources/copilots/types/StringFieldSchema.mjs +0 -2
  419. package/dist/esm/api/resources/copilots/types/WebSearchResult.d.mts +0 -5
  420. package/dist/esm/api/resources/copilots/types/WebSearchResult.mjs +0 -2
  421. package/dist/esm/api/resources/copilots/types/index.d.mts +0 -33
  422. package/dist/esm/api/resources/copilots/types/index.mjs +0 -33
  423. package/dist/esm/api/resources/documentCatalog/client/Client.d.mts +0 -84
  424. package/dist/esm/api/resources/documentCatalog/client/Client.mjs +0 -256
  425. package/dist/esm/api/resources/documentCatalog/client/index.d.mts +0 -1
  426. package/dist/esm/api/resources/documentCatalog/client/index.mjs +0 -1
  427. package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts +0 -35
  428. package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.mjs +0 -2
  429. package/dist/esm/api/resources/documentCatalog/client/requests/UploadFileRequest.d.mts +0 -27
  430. package/dist/esm/api/resources/documentCatalog/client/requests/UploadFileRequest.mjs +0 -2
  431. package/dist/esm/api/resources/documentCatalog/client/requests/index.d.mts +0 -2
  432. package/dist/esm/api/resources/documentCatalog/client/requests/index.mjs +0 -1
  433. package/dist/esm/api/resources/documentCatalog/index.d.mts +0 -2
  434. package/dist/esm/api/resources/documentCatalog/index.mjs +0 -2
  435. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.d.mts +0 -7
  436. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.mjs +0 -2
  437. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.mts +0 -5
  438. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.mjs +0 -2
  439. package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlRequest.d.mts +0 -4
  440. package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlRequest.mjs +0 -2
  441. package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlResponse.d.mts +0 -3
  442. package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlResponse.mjs +0 -2
  443. package/dist/esm/api/resources/documentCatalog/types/UploadDocumentResponse.d.mts +0 -3
  444. package/dist/esm/api/resources/documentCatalog/types/UploadDocumentResponse.mjs +0 -2
  445. package/dist/esm/api/resources/documentCatalog/types/index.d.mts +0 -5
  446. package/dist/esm/api/resources/documentCatalog/types/index.mjs +0 -5
  447. package/dist/esm/api/resources/documentCollections/client/Client.d.mts +0 -159
  448. package/dist/esm/api/resources/documentCollections/client/Client.mjs +0 -402
  449. package/dist/esm/api/resources/documentCollections/client/index.d.mts +0 -1
  450. package/dist/esm/api/resources/documentCollections/client/index.mjs +0 -1
  451. package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.mts +0 -22
  452. package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.mjs +0 -2
  453. package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.mts +0 -20
  454. package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.mjs +0 -2
  455. package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.mts +0 -28
  456. package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.mjs +0 -2
  457. package/dist/esm/api/resources/documentCollections/client/requests/DeleteCollectionRequest.d.mts +0 -9
  458. package/dist/esm/api/resources/documentCollections/client/requests/DeleteCollectionRequest.mjs +0 -2
  459. package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.mts +0 -10
  460. package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.mjs +0 -2
  461. package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.mts +0 -22
  462. package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.mjs +0 -2
  463. package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.mts +0 -28
  464. package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.mjs +0 -2
  465. package/dist/esm/api/resources/documentCollections/client/requests/index.d.mts +0 -7
  466. package/dist/esm/api/resources/documentCollections/client/requests/index.mjs +0 -1
  467. package/dist/esm/api/resources/documentCollections/index.d.mts +0 -2
  468. package/dist/esm/api/resources/documentCollections/index.mjs +0 -2
  469. package/dist/esm/api/resources/documentCollections/types/CreateCollectionResponse.d.mts +0 -3
  470. package/dist/esm/api/resources/documentCollections/types/CreateCollectionResponse.mjs +0 -2
  471. package/dist/esm/api/resources/documentCollections/types/DeleteCollectionResponse.d.mts +0 -3
  472. package/dist/esm/api/resources/documentCollections/types/DeleteCollectionResponse.mjs +0 -2
  473. package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.mts +0 -4
  474. package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.mjs +0 -2
  475. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.mts +0 -7
  476. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.mjs +0 -2
  477. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.mts +0 -5
  478. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncResponse.mjs +0 -2
  479. package/dist/esm/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.mts +0 -6
  480. package/dist/esm/api/resources/documentCollections/types/MongoSourceFieldsConfig.mjs +0 -2
  481. package/dist/esm/api/resources/documentCollections/types/index.d.mts +0 -6
  482. package/dist/esm/api/resources/documentCollections/types/index.mjs +0 -6
  483. package/dist/esm/api/resources/search/client/Client.d.mts +0 -41
  484. package/dist/esm/api/resources/search/client/Client.mjs +0 -85
  485. package/dist/esm/api/resources/search/client/index.d.mts +0 -1
  486. package/dist/esm/api/resources/search/client/index.mjs +0 -1
  487. package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.mts +0 -33
  488. package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.mjs +0 -2
  489. package/dist/esm/api/resources/search/client/requests/index.d.mts +0 -1
  490. package/dist/esm/api/resources/search/client/requests/index.mjs +0 -1
  491. package/dist/esm/api/resources/search/index.d.mts +0 -2
  492. package/dist/esm/api/resources/search/index.mjs +0 -2
  493. package/dist/esm/api/resources/search/types/DocumentCollectionSearchOptions.d.mts +0 -17
  494. package/dist/esm/api/resources/search/types/DocumentCollectionSearchOptions.mjs +0 -2
  495. package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.d.mts +0 -10
  496. package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.mjs +0 -2
  497. package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.d.mts +0 -7
  498. package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.mjs +0 -2
  499. package/dist/esm/api/resources/search/types/SearchResultChunk.d.mts +0 -7
  500. package/dist/esm/api/resources/search/types/SearchResultChunk.mjs +0 -2
  501. package/dist/esm/api/resources/search/types/SingleFieldFilter.d.mts +0 -6
  502. package/dist/esm/api/resources/search/types/SingleFieldFilter.mjs +0 -2
  503. package/dist/esm/api/resources/search/types/index.d.mts +0 -5
  504. package/dist/esm/api/resources/search/types/index.mjs +0 -5
  505. package/dist/esm/api/resources/users/client/Client.d.mts +0 -36
  506. package/dist/esm/api/resources/users/client/Client.mjs +0 -77
  507. package/dist/esm/api/resources/users/client/index.d.mts +0 -1
  508. package/dist/esm/api/resources/users/client/index.mjs +0 -1
  509. package/dist/esm/api/resources/users/index.d.mts +0 -2
  510. package/dist/esm/api/resources/users/index.mjs +0 -2
  511. package/dist/esm/api/resources/users/types/UserMetadataPatch.d.mts +0 -5
  512. package/dist/esm/api/resources/users/types/UserMetadataPatch.mjs +0 -2
  513. package/dist/esm/api/resources/users/types/index.d.mts +0 -1
  514. package/dist/esm/api/resources/users/types/index.mjs +0 -1
  515. package/dist/esm/core/file/exports.d.mts +0 -1
  516. package/dist/esm/core/file/exports.mjs +0 -1
  517. package/dist/esm/core/file/file.d.mts +0 -10
  518. package/dist/esm/core/file/file.mjs +0 -184
  519. package/dist/esm/core/file/index.d.mts +0 -2
  520. package/dist/esm/core/file/index.mjs +0 -2
  521. package/dist/esm/core/file/types.d.mts +0 -66
  522. package/dist/esm/core/file/types.mjs +0 -1
  523. package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +0 -15
  524. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +0 -147
  525. package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +0 -1
  526. package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +0 -9
  527. package/dist/esm/core/form-data-utils/index.d.mts +0 -2
  528. package/dist/esm/core/form-data-utils/index.mjs +0 -2
  529. package/dist/esm/core/stream/Stream.d.mts +0 -47
  530. package/dist/esm/core/stream/Stream.mjs +0 -167
  531. package/dist/esm/core/stream/index.d.mts +0 -1
  532. package/dist/esm/core/stream/index.mjs +0 -1
  533. /package/dist/cjs/api/resources/{copilots → agents}/client/index.d.ts +0 -0
  534. /package/dist/cjs/api/resources/{copilots → agents}/client/index.js +0 -0
  535. /package/dist/cjs/api/resources/{common/types/Collaborator.js → agents/client/requests/FetchResponseAgentsRequest.js} +0 -0
  536. /package/dist/cjs/api/resources/{common/types/CustomMetadataValue.js → agents/client/requests/SendMessageAgentsRequest.js} +0 -0
  537. /package/dist/cjs/api/resources/{copilots → agents}/client/requests/index.js +0 -0
  538. /package/dist/cjs/api/resources/{copilots → agents}/index.d.ts +0 -0
  539. /package/dist/cjs/api/resources/{copilots → agents}/index.js +0 -0
  540. /package/dist/cjs/api/resources/{common/types/ExternalResourceId.js → agents/types/FetchResponseAgentsResponse.js} +0 -0
  541. /package/dist/cjs/api/resources/{common/types/ResourceIdentifier.js → agents/types/SendMessageAgentsRequestConversation.js} +0 -0
  542. /package/dist/cjs/api/resources/{common/types/Url.js → agents/types/SendMessageAgentsResponse.js} +0 -0
  543. /package/dist/esm/api/resources/{copilots → agents}/client/index.d.mts +0 -0
  544. /package/dist/esm/api/resources/{copilots → agents}/client/index.mjs +0 -0
  545. /package/dist/esm/api/resources/{common/types/Collaborator.mjs → agents/client/requests/FetchResponseAgentsRequest.mjs} +0 -0
  546. /package/dist/esm/api/resources/{common/types/CustomMetadataValue.mjs → agents/client/requests/SendMessageAgentsRequest.mjs} +0 -0
  547. /package/dist/esm/api/resources/{copilots → agents}/client/requests/index.mjs +0 -0
  548. /package/dist/esm/api/resources/{copilots → agents}/index.d.mts +0 -0
  549. /package/dist/esm/api/resources/{copilots → agents}/index.mjs +0 -0
  550. /package/dist/esm/api/resources/{common/types/ExternalResourceId.mjs → agents/types/FetchResponseAgentsResponse.mjs} +0 -0
  551. /package/dist/esm/api/resources/{common/types/ResourceIdentifier.mjs → agents/types/SendMessageAgentsRequestConversation.mjs} +0 -0
  552. /package/dist/esm/api/resources/{common/types/Url.mjs → agents/types/SendMessageAgentsResponse.mjs} +0 -0
@@ -1,33 +0,0 @@
1
- export * from "./AiEndpointConfiguration.mjs";
2
- export * from "./BlockedChunk.mjs";
3
- export * from "./BooleanFieldSchema.mjs";
4
- export * from "./CollectionFilteredData.mjs";
5
- export * from "./Configuration.mjs";
6
- export * from "./CreateConversationResponse.mjs";
7
- export * from "./CreateCopilotResponse.mjs";
8
- export * from "./DataChunk.mjs";
9
- export * from "./DataFilter.mjs";
10
- export * from "./DatetimeFieldSchema.mjs";
11
- export * from "./DeleteCopilotResponse.mjs";
12
- export * from "./EndOfMessageChunk.mjs";
13
- export * from "./ErrorChunk.mjs";
14
- export * from "./ErrorChunkData.mjs";
15
- export * from "./ExportCopilotsResponse.mjs";
16
- export * from "./ExportedCopilot.mjs";
17
- export * from "./FeedbackEnum.mjs";
18
- export * from "./Filter.mjs";
19
- export * from "./FinalChunk.mjs";
20
- export * from "./InitialChunk.mjs";
21
- export * from "./InputVariable.mjs";
22
- export * from "./InsertedAuditLog.mjs";
23
- export * from "./MessageBlocked.mjs";
24
- export * from "./MessageFeedback.mjs";
25
- export * from "./MessageReply.mjs";
26
- export * from "./NumberFieldSchema.mjs";
27
- export * from "./ReferencedSource.mjs";
28
- export * from "./ResponseChunk.mjs";
29
- export * from "./SendAgentMessageResponse.mjs";
30
- export * from "./SendMessageResponse.mjs";
31
- export * from "./StreamingChunk.mjs";
32
- export * from "./StringFieldSchema.mjs";
33
- export * from "./WebSearchResult.mjs";
@@ -1,33 +0,0 @@
1
- export * from "./AiEndpointConfiguration.mjs";
2
- export * from "./BlockedChunk.mjs";
3
- export * from "./BooleanFieldSchema.mjs";
4
- export * from "./CollectionFilteredData.mjs";
5
- export * from "./Configuration.mjs";
6
- export * from "./CreateConversationResponse.mjs";
7
- export * from "./CreateCopilotResponse.mjs";
8
- export * from "./DataChunk.mjs";
9
- export * from "./DataFilter.mjs";
10
- export * from "./DatetimeFieldSchema.mjs";
11
- export * from "./DeleteCopilotResponse.mjs";
12
- export * from "./EndOfMessageChunk.mjs";
13
- export * from "./ErrorChunk.mjs";
14
- export * from "./ErrorChunkData.mjs";
15
- export * from "./ExportCopilotsResponse.mjs";
16
- export * from "./ExportedCopilot.mjs";
17
- export * from "./FeedbackEnum.mjs";
18
- export * from "./Filter.mjs";
19
- export * from "./FinalChunk.mjs";
20
- export * from "./InitialChunk.mjs";
21
- export * from "./InputVariable.mjs";
22
- export * from "./InsertedAuditLog.mjs";
23
- export * from "./MessageBlocked.mjs";
24
- export * from "./MessageFeedback.mjs";
25
- export * from "./MessageReply.mjs";
26
- export * from "./NumberFieldSchema.mjs";
27
- export * from "./ReferencedSource.mjs";
28
- export * from "./ResponseChunk.mjs";
29
- export * from "./SendAgentMessageResponse.mjs";
30
- export * from "./SendMessageResponse.mjs";
31
- export * from "./StreamingChunk.mjs";
32
- export * from "./StringFieldSchema.mjs";
33
- export * from "./WebSearchResult.mjs";
@@ -1,84 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
- import * as core from "../../../../core/index.mjs";
4
- import type * as Credal from "../../../index.mjs";
5
- export declare namespace DocumentCatalogClient {
6
- type Options = BaseClientOptions;
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- export declare class DocumentCatalogClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<DocumentCatalogClient.Options>;
12
- constructor(options?: DocumentCatalogClient.Options);
13
- /**
14
- * @param {Credal.UploadDocumentContentsRequest} request
15
- * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
16
- *
17
- * @example
18
- * await client.documentCatalog.uploadDocumentContents({
19
- * documentName: "My Document",
20
- * documentContents: "Lorem ipsum...",
21
- * documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
22
- * allowedUsersEmailAddresses: ["jack@credal.ai", "ravin@credal.ai"],
23
- * uploadAsUserEmail: "jack@credal.ai"
24
- * })
25
- */
26
- uploadDocumentContents(request: Credal.UploadDocumentContentsRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<Credal.UploadDocumentResponse>;
27
- private __uploadDocumentContents;
28
- /**
29
- * Upload a file (PDF, Word, Excel, CSV, PowerPoint) to Credal. Unlike uploadDocumentContents which requires pre-parsed text, this endpoint accepts actual file uploads and automatically parses them using Credal's parsing service.
30
- *
31
- * @param {Credal.UploadFileRequest} request
32
- * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
33
- */
34
- uploadFile(request: Credal.UploadFileRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<Credal.UploadDocumentResponse>;
35
- private __uploadFile;
36
- /**
37
- * Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access.
38
- *
39
- * @param {Credal.SyncSourceByUrlRequest} request
40
- * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
41
- *
42
- * @example
43
- * await client.documentCatalog.syncSourceByUrl({
44
- * sourceUrl: "https://drive.google.com/file/d/123456/view",
45
- * uploadAsUserEmail: "ria@credal.ai"
46
- * })
47
- */
48
- syncSourceByUrl(request: Credal.SyncSourceByUrlRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<Credal.SyncSourceByUrlResponse>;
49
- private __syncSourceByUrl;
50
- /**
51
- * Bulk patch metadata for documents, synced natively by Credal or manual API uploads
52
- *
53
- * @param {Credal.DocumentMetadataPatchRequest} request
54
- * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
55
- *
56
- * @example
57
- * await client.documentCatalog.metadata({
58
- * sources: [{
59
- * metadata: {
60
- * "Department": "HR",
61
- * "Country": "United States"
62
- * },
63
- * resourceIdentifier: {
64
- * type: "external-resource-id",
65
- * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
66
- * resourceType: "GOOGLE_DRIVE_ITEM"
67
- * }
68
- * }, {
69
- * metadata: {
70
- * "Department": "Sales",
71
- * "Vertical": "Healthcare"
72
- * },
73
- * resourceIdentifier: {
74
- * type: "external-resource-id",
75
- * externalResourceId: "123456",
76
- * resourceType: "ZENDESK_TICKET"
77
- * }
78
- * }],
79
- * uploadAsUserEmail: "ben@credal.ai"
80
- * })
81
- */
82
- metadata(request: Credal.DocumentMetadataPatchRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<void>;
83
- private __metadata;
84
- }
@@ -1,256 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
- import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
13
- import * as core from "../../../../core/index.mjs";
14
- import * as environments from "../../../../environments.mjs";
15
- import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
- import * as errors from "../../../../errors/index.mjs";
17
- export class DocumentCatalogClient {
18
- constructor(options = {}) {
19
- this._options = normalizeClientOptionsWithAuth(options);
20
- }
21
- /**
22
- * @param {Credal.UploadDocumentContentsRequest} request
23
- * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
24
- *
25
- * @example
26
- * await client.documentCatalog.uploadDocumentContents({
27
- * documentName: "My Document",
28
- * documentContents: "Lorem ipsum...",
29
- * documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
30
- * allowedUsersEmailAddresses: ["jack@credal.ai", "ravin@credal.ai"],
31
- * uploadAsUserEmail: "jack@credal.ai"
32
- * })
33
- */
34
- uploadDocumentContents(request, requestOptions) {
35
- return core.HttpResponsePromise.fromPromise(this.__uploadDocumentContents(request, requestOptions));
36
- }
37
- __uploadDocumentContents(request, requestOptions) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
40
- const _authRequest = yield this._options.authProvider.getAuthRequest();
41
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
42
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
43
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/uploadDocumentContents"),
44
- method: "POST",
45
- headers: _headers,
46
- contentType: "application/json",
47
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
48
- requestType: "json",
49
- body: request,
50
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
51
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
52
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
53
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
54
- logging: this._options.logging,
55
- });
56
- if (_response.ok) {
57
- return { data: _response.body, rawResponse: _response.rawResponse };
58
- }
59
- if (_response.error.reason === "status-code") {
60
- throw new errors.CredalError({
61
- statusCode: _response.error.statusCode,
62
- body: _response.error.body,
63
- rawResponse: _response.rawResponse,
64
- });
65
- }
66
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/catalog/uploadDocumentContents");
67
- });
68
- }
69
- /**
70
- * Upload a file (PDF, Word, Excel, CSV, PowerPoint) to Credal. Unlike uploadDocumentContents which requires pre-parsed text, this endpoint accepts actual file uploads and automatically parses them using Credal's parsing service.
71
- *
72
- * @param {Credal.UploadFileRequest} request
73
- * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
74
- */
75
- uploadFile(request, requestOptions) {
76
- return core.HttpResponsePromise.fromPromise(this.__uploadFile(request, requestOptions));
77
- }
78
- __uploadFile(request, requestOptions) {
79
- return __awaiter(this, void 0, void 0, function* () {
80
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
81
- const _body = yield core.newFormData();
82
- yield _body.appendFile("file", request.file);
83
- if (request.documentName != null) {
84
- _body.append("documentName", request.documentName);
85
- }
86
- _body.append("uploadAsUserEmail", request.uploadAsUserEmail);
87
- _body.append("documentExternalId", request.documentExternalId);
88
- if (request.allowedUsersEmailAddresses != null) {
89
- _body.append("allowedUsersEmailAddresses", request.allowedUsersEmailAddresses);
90
- }
91
- if (request.documentExternalUrl != null) {
92
- _body.append("documentExternalUrl", request.documentExternalUrl);
93
- }
94
- if (request.customMetadata != null) {
95
- _body.append("customMetadata", request.customMetadata);
96
- }
97
- if (request.collectionId != null) {
98
- _body.append("collectionId", request.collectionId);
99
- }
100
- if (request.forceUpdate != null) {
101
- _body.append("forceUpdate", request.forceUpdate);
102
- }
103
- if (request.internalPublic != null) {
104
- _body.append("internalPublic", request.internalPublic);
105
- }
106
- if (request.sourceSystemUpdated != null) {
107
- _body.append("sourceSystemUpdated", request.sourceSystemUpdated);
108
- }
109
- if (request.awaitVectorStoreSync != null) {
110
- _body.append("awaitVectorStoreSync", request.awaitVectorStoreSync);
111
- }
112
- const _maybeEncodedRequest = yield _body.getRequest();
113
- const _authRequest = yield this._options.authProvider.getAuthRequest();
114
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
115
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
116
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/uploadFile"),
117
- method: "POST",
118
- headers: _headers,
119
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
120
- requestType: "file",
121
- duplex: _maybeEncodedRequest.duplex,
122
- body: _maybeEncodedRequest.body,
123
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
124
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
125
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
126
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
127
- logging: this._options.logging,
128
- });
129
- if (_response.ok) {
130
- return { data: _response.body, rawResponse: _response.rawResponse };
131
- }
132
- if (_response.error.reason === "status-code") {
133
- throw new errors.CredalError({
134
- statusCode: _response.error.statusCode,
135
- body: _response.error.body,
136
- rawResponse: _response.rawResponse,
137
- });
138
- }
139
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/catalog/uploadFile");
140
- });
141
- }
142
- /**
143
- * Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access.
144
- *
145
- * @param {Credal.SyncSourceByUrlRequest} request
146
- * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
147
- *
148
- * @example
149
- * await client.documentCatalog.syncSourceByUrl({
150
- * sourceUrl: "https://drive.google.com/file/d/123456/view",
151
- * uploadAsUserEmail: "ria@credal.ai"
152
- * })
153
- */
154
- syncSourceByUrl(request, requestOptions) {
155
- return core.HttpResponsePromise.fromPromise(this.__syncSourceByUrl(request, requestOptions));
156
- }
157
- __syncSourceByUrl(request, requestOptions) {
158
- return __awaiter(this, void 0, void 0, function* () {
159
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
160
- const _authRequest = yield this._options.authProvider.getAuthRequest();
161
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
162
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
163
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/syncSourceByUrl"),
164
- method: "POST",
165
- headers: _headers,
166
- contentType: "application/json",
167
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
168
- requestType: "json",
169
- body: request,
170
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
171
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
172
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
173
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
174
- logging: this._options.logging,
175
- });
176
- if (_response.ok) {
177
- return { data: _response.body, rawResponse: _response.rawResponse };
178
- }
179
- if (_response.error.reason === "status-code") {
180
- throw new errors.CredalError({
181
- statusCode: _response.error.statusCode,
182
- body: _response.error.body,
183
- rawResponse: _response.rawResponse,
184
- });
185
- }
186
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/catalog/syncSourceByUrl");
187
- });
188
- }
189
- /**
190
- * Bulk patch metadata for documents, synced natively by Credal or manual API uploads
191
- *
192
- * @param {Credal.DocumentMetadataPatchRequest} request
193
- * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
194
- *
195
- * @example
196
- * await client.documentCatalog.metadata({
197
- * sources: [{
198
- * metadata: {
199
- * "Department": "HR",
200
- * "Country": "United States"
201
- * },
202
- * resourceIdentifier: {
203
- * type: "external-resource-id",
204
- * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
205
- * resourceType: "GOOGLE_DRIVE_ITEM"
206
- * }
207
- * }, {
208
- * metadata: {
209
- * "Department": "Sales",
210
- * "Vertical": "Healthcare"
211
- * },
212
- * resourceIdentifier: {
213
- * type: "external-resource-id",
214
- * externalResourceId: "123456",
215
- * resourceType: "ZENDESK_TICKET"
216
- * }
217
- * }],
218
- * uploadAsUserEmail: "ben@credal.ai"
219
- * })
220
- */
221
- metadata(request, requestOptions) {
222
- return core.HttpResponsePromise.fromPromise(this.__metadata(request, requestOptions));
223
- }
224
- __metadata(request, requestOptions) {
225
- return __awaiter(this, void 0, void 0, function* () {
226
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
227
- const _authRequest = yield this._options.authProvider.getAuthRequest();
228
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
229
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
230
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/metadata"),
231
- method: "PATCH",
232
- headers: _headers,
233
- contentType: "application/json",
234
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
235
- requestType: "json",
236
- body: request,
237
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
238
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
239
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
240
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
241
- logging: this._options.logging,
242
- });
243
- if (_response.ok) {
244
- return { data: undefined, rawResponse: _response.rawResponse };
245
- }
246
- if (_response.error.reason === "status-code") {
247
- throw new errors.CredalError({
248
- statusCode: _response.error.statusCode,
249
- body: _response.error.body,
250
- rawResponse: _response.rawResponse,
251
- });
252
- }
253
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v0/catalog/metadata");
254
- });
255
- }
256
- }
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1,35 +0,0 @@
1
- import type * as Credal from "../../../../index.mjs";
2
- /**
3
- * @example
4
- * {
5
- * documentName: "My Document",
6
- * documentContents: "Lorem ipsum...",
7
- * documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
8
- * allowedUsersEmailAddresses: ["jack@credal.ai", "ravin@credal.ai"],
9
- * uploadAsUserEmail: "jack@credal.ai"
10
- * }
11
- */
12
- export interface UploadDocumentContentsRequest {
13
- /** The name of the document you want to upload. */
14
- documentName: string;
15
- /** The full LLM-formatted text contents of the document you want to upload. */
16
- documentContents: string;
17
- /** Users allowed to access the document. Unlike Credal's out of the box connectors which reconcile various permissions models from 3rd party software, for custom uploads the caller is responsible for specifying who can access the document and currently flattening groups if applicable. Documents can also be marked as internal public. */
18
- allowedUsersEmailAddresses: string[];
19
- /** [Legacy] The user on behalf of whom the document should be uploaded. In most cases, this can simply be the email of the developer making the API call. This field will be removed in the future in favor of purely specifying permissions via allowedUsersEmailAddresses. */
20
- uploadAsUserEmail: string;
21
- /** The external ID of the document. This is typically the ID as it exists in its original external system. Uploads to the same external ID will update the document in Credal. */
22
- documentExternalId: string;
23
- /** The external URL of the document you want to upload. If provided Credal will link to this URL. */
24
- documentExternalUrl?: string;
25
- /** Optional JSON representing any custom metadata for this document */
26
- customMetadata?: Record<string, Credal.CustomMetadataValue>;
27
- /** If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter. */
28
- collectionId?: string;
29
- /** If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal */
30
- forceUpdate?: boolean;
31
- /** If specified, document will be accessible to everyone within the organization of the uploader */
32
- internalPublic?: boolean;
33
- /** Document uploads are eventually consistent by default. If specified `true` the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. */
34
- awaitVectorStoreSync?: boolean;
35
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,27 +0,0 @@
1
- import type * as core from "../../../../../core/index.mjs";
2
- export interface UploadFileRequest {
3
- /** The file to upload. Supported formats: PDF (.pdf), Word (.docx), Excel (.xlsx, .xls), PowerPoint (.pptx, .ppt), CSV (.csv), and text files. */
4
- file: core.file.Uploadable;
5
- /** The name of the document you want to upload. If not provided, the original filename will be used. */
6
- documentName?: string;
7
- /** [Legacy] The user on behalf of whom the document should be uploaded. In most cases, this can simply be the email of the developer making the API call. This field will be removed in the future in favor of purely specifying permissions via allowedUsersEmailAddresses. */
8
- uploadAsUserEmail: string;
9
- /** The external ID of the document. This is typically the ID as it exists in its original external system. Uploads to the same external ID will update the document in Credal. */
10
- documentExternalId: string;
11
- /** Users allowed to access the document. Can be provided as a JSON array string (e.g., ["user1@example.com","user2@example.com"]) or comma-separated list (e.g., "user1@example.com,user2@example.com"). Unlike Credal's out of the box connectors which reconcile various permissions models from 3rd party software, for custom uploads the caller is responsible for specifying who can access the document and currently flattening groups if applicable. Documents can also be marked as internal public. */
12
- allowedUsersEmailAddresses?: string;
13
- /** The external URL of the document you want to upload. If provided Credal will link to this URL. */
14
- documentExternalUrl?: string;
15
- /** Optional JSON string representing any custom metadata for this document (e.g., '{"key1":"value1","key2":"value2"}'). */
16
- customMetadata?: string;
17
- /** If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter. */
18
- collectionId?: string;
19
- /** If set to "true", document contents will be re-uploaded and re-embedded even if the document already exists in Credal. */
20
- forceUpdate?: string;
21
- /** If set to "true", document will be accessible to everyone within the organization of the uploader. */
22
- internalPublic?: string;
23
- /** ISO 8601 date string indicating when the document was last updated in the source system (e.g., "2025-11-03T21:15:00Z"). */
24
- sourceSystemUpdated?: string;
25
- /** Document uploads are eventually consistent by default. If set to "true" the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. */
26
- awaitVectorStoreSync?: string;
27
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,2 +0,0 @@
1
- export type { UploadDocumentContentsRequest } from "./UploadDocumentContentsRequest.mjs";
2
- export type { UploadFileRequest } from "./UploadFileRequest.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./client/index.mjs";
2
- export * from "./types/index.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./client/index.mjs";
2
- export * from "./types/index.mjs";
@@ -1,7 +0,0 @@
1
- import type * as Credal from "../../../index.mjs";
2
- export interface DocumentMetadataPatch {
3
- /** The identifier for the resource you want to patch */
4
- resourceIdentifier: Credal.ResourceIdentifier;
5
- /** Key-value object of metadata for document. Keys will be merged with any existing values but can also be set to `null` to effectively remove */
6
- metadata: Record<string, unknown>;
7
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,5 +0,0 @@
1
- import type * as Credal from "../../../index.mjs";
2
- export interface DocumentMetadataPatchRequest {
3
- sources: Credal.DocumentMetadataPatch[];
4
- uploadAsUserEmail: string;
5
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,4 +0,0 @@
1
- export interface SyncSourceByUrlRequest {
2
- uploadAsUserEmail: string;
3
- sourceUrl: string;
4
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,3 +0,0 @@
1
- export interface SyncSourceByUrlResponse {
2
- sourceId: string;
3
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,3 +0,0 @@
1
- export interface UploadDocumentResponse {
2
- documentId: string;
3
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};
@@ -1,5 +0,0 @@
1
- export * from "./DocumentMetadataPatch.mjs";
2
- export * from "./DocumentMetadataPatchRequest.mjs";
3
- export * from "./SyncSourceByUrlRequest.mjs";
4
- export * from "./SyncSourceByUrlResponse.mjs";
5
- export * from "./UploadDocumentResponse.mjs";
@@ -1,5 +0,0 @@
1
- export * from "./DocumentMetadataPatch.mjs";
2
- export * from "./DocumentMetadataPatchRequest.mjs";
3
- export * from "./SyncSourceByUrlRequest.mjs";
4
- export * from "./SyncSourceByUrlResponse.mjs";
5
- export * from "./UploadDocumentResponse.mjs";