@credal/sdk 0.1.16 → 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 (558) 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 +14 -10
  34. package/dist/cjs/auth/BearerAuthProvider.js +17 -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/EndpointSupplier.d.ts +2 -2
  39. package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -2
  40. package/dist/cjs/core/fetcher/Fetcher.js +8 -2
  41. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  42. package/dist/cjs/core/fetcher/index.js +3 -1
  43. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
  44. package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
  45. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  46. package/dist/cjs/core/fetcher/makeRequest.js +30 -9
  47. package/dist/cjs/core/headers.d.ts +2 -2
  48. package/dist/cjs/core/index.d.ts +0 -3
  49. package/dist/cjs/core/index.js +1 -4
  50. package/dist/cjs/core/runtime/runtime.js +8 -7
  51. package/dist/cjs/environments.d.ts +2 -2
  52. package/dist/cjs/environments.js +1 -1
  53. package/dist/cjs/version.d.ts +1 -1
  54. package/dist/cjs/version.js +1 -1
  55. package/dist/esm/BaseClient.mjs +2 -2
  56. package/dist/esm/Client.d.mts +16 -16
  57. package/dist/esm/Client.mjs +37 -23
  58. package/dist/esm/api/errors/BadRequestError.d.mts +5 -0
  59. package/dist/esm/api/errors/BadRequestError.mjs +17 -0
  60. package/dist/esm/api/errors/ForbiddenError.d.mts +5 -0
  61. package/dist/esm/api/errors/ForbiddenError.mjs +17 -0
  62. package/dist/esm/api/errors/InternalServerError.d.mts +5 -0
  63. package/dist/esm/api/errors/InternalServerError.mjs +17 -0
  64. package/dist/esm/api/errors/NotFoundError.d.mts +5 -0
  65. package/dist/esm/api/errors/NotFoundError.mjs +17 -0
  66. package/dist/esm/api/errors/UnauthorizedError.d.mts +5 -0
  67. package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
  68. package/dist/esm/api/errors/index.d.mts +5 -0
  69. package/dist/esm/api/errors/index.mjs +5 -0
  70. package/dist/esm/api/index.d.mts +1 -0
  71. package/dist/esm/api/index.mjs +1 -0
  72. package/dist/esm/api/resources/agents/client/Client.d.mts +50 -0
  73. package/dist/esm/api/resources/agents/client/Client.mjs +150 -0
  74. package/dist/esm/api/resources/agents/client/requests/FetchResponseAgentsRequest.d.mts +9 -0
  75. package/dist/esm/api/resources/agents/client/requests/SendMessageAgentsRequest.d.mts +16 -0
  76. package/dist/esm/api/resources/agents/client/requests/index.d.mts +2 -0
  77. package/dist/esm/api/resources/agents/exports.d.mts +2 -0
  78. package/dist/esm/api/resources/agents/exports.mjs +3 -0
  79. package/dist/esm/api/resources/agents/types/FetchResponseAgentsResponse.d.mts +20 -0
  80. package/dist/esm/api/resources/agents/types/SendMessageAgentsRequestConversation.d.mts +12 -0
  81. package/dist/esm/api/resources/agents/types/SendMessageAgentsResponse.d.mts +3 -0
  82. package/dist/esm/api/resources/agents/types/index.d.mts +3 -0
  83. package/dist/esm/api/resources/agents/types/index.mjs +3 -0
  84. package/dist/esm/api/resources/index.d.mts +3 -16
  85. package/dist/esm/api/resources/index.mjs +3 -16
  86. package/dist/esm/auth/BearerAuthProvider.d.mts +14 -10
  87. package/dist/esm/auth/BearerAuthProvider.mjs +17 -10
  88. package/dist/esm/core/exports.d.mts +0 -1
  89. package/dist/esm/core/exports.mjs +0 -1
  90. package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
  91. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
  92. package/dist/esm/core/fetcher/Fetcher.d.mts +1 -2
  93. package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
  94. package/dist/esm/core/fetcher/index.d.mts +2 -0
  95. package/dist/esm/core/fetcher/index.mjs +1 -0
  96. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
  97. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
  98. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  99. package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
  100. package/dist/esm/core/headers.d.mts +2 -2
  101. package/dist/esm/core/index.d.mts +0 -3
  102. package/dist/esm/core/index.mjs +0 -3
  103. package/dist/esm/core/runtime/runtime.mjs +8 -7
  104. package/dist/esm/environments.d.mts +2 -2
  105. package/dist/esm/environments.mjs +1 -1
  106. package/dist/esm/version.d.mts +1 -1
  107. package/dist/esm/version.mjs +1 -1
  108. package/package.json +16 -5
  109. package/reference.md +15 -1444
  110. package/dist/cjs/api/resources/common/index.d.ts +0 -1
  111. package/dist/cjs/api/resources/common/types/Collaborator.d.ts +0 -5
  112. package/dist/cjs/api/resources/common/types/CustomMetadataValue.d.ts +0 -1
  113. package/dist/cjs/api/resources/common/types/ExternalResourceId.d.ts +0 -5
  114. package/dist/cjs/api/resources/common/types/Operator.d.ts +0 -10
  115. package/dist/cjs/api/resources/common/types/Operator.js +0 -13
  116. package/dist/cjs/api/resources/common/types/ResourceIdentifier.d.ts +0 -10
  117. package/dist/cjs/api/resources/common/types/ResourceType.d.ts +0 -22
  118. package/dist/cjs/api/resources/common/types/ResourceType.js +0 -25
  119. package/dist/cjs/api/resources/common/types/Role.d.ts +0 -5
  120. package/dist/cjs/api/resources/common/types/Role.js +0 -8
  121. package/dist/cjs/api/resources/common/types/Url.d.ts +0 -3
  122. package/dist/cjs/api/resources/common/types/index.d.ts +0 -8
  123. package/dist/cjs/api/resources/common/types/index.js +0 -24
  124. package/dist/cjs/api/resources/copilots/client/Client.d.ts +0 -169
  125. package/dist/cjs/api/resources/copilots/client/Client.js +0 -556
  126. package/dist/cjs/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +0 -13
  127. package/dist/cjs/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.js +0 -3
  128. package/dist/cjs/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +0 -13
  129. package/dist/cjs/api/resources/copilots/client/requests/CreateConversationRequest.js +0 -3
  130. package/dist/cjs/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +0 -20
  131. package/dist/cjs/api/resources/copilots/client/requests/CreateCopilotRequest.js +0 -3
  132. package/dist/cjs/api/resources/copilots/client/requests/DeleteCopilotRequest.d.ts +0 -10
  133. package/dist/cjs/api/resources/copilots/client/requests/DeleteCopilotRequest.js +0 -3
  134. package/dist/cjs/api/resources/copilots/client/requests/ExportCopilotsRequest.d.ts +0 -21
  135. package/dist/cjs/api/resources/copilots/client/requests/ExportCopilotsRequest.js +0 -3
  136. package/dist/cjs/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +0 -24
  137. package/dist/cjs/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.js +0 -3
  138. package/dist/cjs/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +0 -13
  139. package/dist/cjs/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.js +0 -3
  140. package/dist/cjs/api/resources/copilots/client/requests/SendMessageRequest.d.ts +0 -28
  141. package/dist/cjs/api/resources/copilots/client/requests/SendMessageRequest.js +0 -3
  142. package/dist/cjs/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +0 -56
  143. package/dist/cjs/api/resources/copilots/client/requests/StreamMessageRequest.js +0 -3
  144. package/dist/cjs/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +0 -21
  145. package/dist/cjs/api/resources/copilots/client/requests/UpdateConfigurationRequest.js +0 -3
  146. package/dist/cjs/api/resources/copilots/client/requests/index.d.ts +0 -10
  147. package/dist/cjs/api/resources/copilots/types/AiEndpointConfiguration.d.ts +0 -4
  148. package/dist/cjs/api/resources/copilots/types/AiEndpointConfiguration.js +0 -3
  149. package/dist/cjs/api/resources/copilots/types/BlockedChunk.d.ts +0 -5
  150. package/dist/cjs/api/resources/copilots/types/BlockedChunk.js +0 -3
  151. package/dist/cjs/api/resources/copilots/types/BooleanFieldSchema.d.ts +0 -5
  152. package/dist/cjs/api/resources/copilots/types/BooleanFieldSchema.js +0 -3
  153. package/dist/cjs/api/resources/copilots/types/CollectionFilteredData.d.ts +0 -6
  154. package/dist/cjs/api/resources/copilots/types/CollectionFilteredData.js +0 -3
  155. package/dist/cjs/api/resources/copilots/types/Configuration.d.ts +0 -7
  156. package/dist/cjs/api/resources/copilots/types/Configuration.js +0 -3
  157. package/dist/cjs/api/resources/copilots/types/CreateConversationResponse.d.ts +0 -3
  158. package/dist/cjs/api/resources/copilots/types/CreateConversationResponse.js +0 -3
  159. package/dist/cjs/api/resources/copilots/types/CreateCopilotResponse.d.ts +0 -3
  160. package/dist/cjs/api/resources/copilots/types/CreateCopilotResponse.js +0 -3
  161. package/dist/cjs/api/resources/copilots/types/DataChunk.d.ts +0 -3
  162. package/dist/cjs/api/resources/copilots/types/DataChunk.js +0 -3
  163. package/dist/cjs/api/resources/copilots/types/DataFilter.d.ts +0 -6
  164. package/dist/cjs/api/resources/copilots/types/DataFilter.js +0 -3
  165. package/dist/cjs/api/resources/copilots/types/DatetimeFieldSchema.d.ts +0 -6
  166. package/dist/cjs/api/resources/copilots/types/DatetimeFieldSchema.js +0 -3
  167. package/dist/cjs/api/resources/copilots/types/DeleteCopilotResponse.d.ts +0 -3
  168. package/dist/cjs/api/resources/copilots/types/DeleteCopilotResponse.js +0 -3
  169. package/dist/cjs/api/resources/copilots/types/EndOfMessageChunk.d.ts +0 -1
  170. package/dist/cjs/api/resources/copilots/types/EndOfMessageChunk.js +0 -3
  171. package/dist/cjs/api/resources/copilots/types/ErrorChunk.d.ts +0 -4
  172. package/dist/cjs/api/resources/copilots/types/ErrorChunk.js +0 -3
  173. package/dist/cjs/api/resources/copilots/types/ErrorChunkData.d.ts +0 -3
  174. package/dist/cjs/api/resources/copilots/types/ErrorChunkData.js +0 -3
  175. package/dist/cjs/api/resources/copilots/types/ExportCopilotsResponse.d.ts +0 -9
  176. package/dist/cjs/api/resources/copilots/types/ExportCopilotsResponse.js +0 -3
  177. package/dist/cjs/api/resources/copilots/types/ExportedCopilot.d.ts +0 -24
  178. package/dist/cjs/api/resources/copilots/types/ExportedCopilot.js +0 -3
  179. package/dist/cjs/api/resources/copilots/types/FeedbackEnum.d.ts +0 -5
  180. package/dist/cjs/api/resources/copilots/types/FeedbackEnum.js +0 -8
  181. package/dist/cjs/api/resources/copilots/types/Filter.d.ts +0 -16
  182. package/dist/cjs/api/resources/copilots/types/Filter.js +0 -3
  183. package/dist/cjs/api/resources/copilots/types/FinalChunk.d.ts +0 -4
  184. package/dist/cjs/api/resources/copilots/types/FinalChunk.js +0 -3
  185. package/dist/cjs/api/resources/copilots/types/InitialChunk.d.ts +0 -7
  186. package/dist/cjs/api/resources/copilots/types/InitialChunk.js +0 -3
  187. package/dist/cjs/api/resources/copilots/types/InputVariable.d.ts +0 -4
  188. package/dist/cjs/api/resources/copilots/types/InputVariable.js +0 -3
  189. package/dist/cjs/api/resources/copilots/types/InsertedAuditLog.d.ts +0 -3
  190. package/dist/cjs/api/resources/copilots/types/InsertedAuditLog.js +0 -3
  191. package/dist/cjs/api/resources/copilots/types/MessageBlocked.d.ts +0 -7
  192. package/dist/cjs/api/resources/copilots/types/MessageBlocked.js +0 -3
  193. package/dist/cjs/api/resources/copilots/types/MessageFeedback.d.ts +0 -6
  194. package/dist/cjs/api/resources/copilots/types/MessageFeedback.js +0 -3
  195. package/dist/cjs/api/resources/copilots/types/MessageReply.d.ts +0 -11
  196. package/dist/cjs/api/resources/copilots/types/MessageReply.js +0 -3
  197. package/dist/cjs/api/resources/copilots/types/NumberFieldSchema.d.ts +0 -6
  198. package/dist/cjs/api/resources/copilots/types/NumberFieldSchema.js +0 -3
  199. package/dist/cjs/api/resources/copilots/types/ReferencedSource.d.ts +0 -7
  200. package/dist/cjs/api/resources/copilots/types/ReferencedSource.js +0 -3
  201. package/dist/cjs/api/resources/copilots/types/ResponseChunk.d.ts +0 -5
  202. package/dist/cjs/api/resources/copilots/types/ResponseChunk.js +0 -3
  203. package/dist/cjs/api/resources/copilots/types/SendAgentMessageResponse.d.ts +0 -4
  204. package/dist/cjs/api/resources/copilots/types/SendAgentMessageResponse.js +0 -3
  205. package/dist/cjs/api/resources/copilots/types/SendMessageResponse.d.ts +0 -18
  206. package/dist/cjs/api/resources/copilots/types/SendMessageResponse.js +0 -3
  207. package/dist/cjs/api/resources/copilots/types/StreamingChunk.d.ts +0 -22
  208. package/dist/cjs/api/resources/copilots/types/StreamingChunk.js +0 -3
  209. package/dist/cjs/api/resources/copilots/types/StringFieldSchema.d.ts +0 -6
  210. package/dist/cjs/api/resources/copilots/types/StringFieldSchema.js +0 -3
  211. package/dist/cjs/api/resources/copilots/types/WebSearchResult.d.ts +0 -5
  212. package/dist/cjs/api/resources/copilots/types/WebSearchResult.js +0 -3
  213. package/dist/cjs/api/resources/copilots/types/index.d.ts +0 -33
  214. package/dist/cjs/api/resources/copilots/types/index.js +0 -49
  215. package/dist/cjs/api/resources/documentCatalog/client/Client.d.ts +0 -84
  216. package/dist/cjs/api/resources/documentCatalog/client/Client.js +0 -293
  217. package/dist/cjs/api/resources/documentCatalog/client/index.d.ts +0 -1
  218. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +0 -35
  219. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.js +0 -3
  220. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadFileRequest.d.ts +0 -27
  221. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadFileRequest.js +0 -3
  222. package/dist/cjs/api/resources/documentCatalog/client/requests/index.d.ts +0 -2
  223. package/dist/cjs/api/resources/documentCatalog/client/requests/index.js +0 -2
  224. package/dist/cjs/api/resources/documentCatalog/index.d.ts +0 -2
  225. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.d.ts +0 -7
  226. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.js +0 -3
  227. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.ts +0 -5
  228. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.js +0 -3
  229. package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlRequest.d.ts +0 -4
  230. package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlRequest.js +0 -3
  231. package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlResponse.d.ts +0 -3
  232. package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlResponse.js +0 -3
  233. package/dist/cjs/api/resources/documentCatalog/types/UploadDocumentResponse.d.ts +0 -3
  234. package/dist/cjs/api/resources/documentCatalog/types/UploadDocumentResponse.js +0 -3
  235. package/dist/cjs/api/resources/documentCatalog/types/index.d.ts +0 -5
  236. package/dist/cjs/api/resources/documentCatalog/types/index.js +0 -21
  237. package/dist/cjs/api/resources/documentCollections/client/Client.d.ts +0 -159
  238. package/dist/cjs/api/resources/documentCollections/client/Client.js +0 -438
  239. package/dist/cjs/api/resources/documentCollections/client/index.d.ts +0 -1
  240. package/dist/cjs/api/resources/documentCollections/client/index.js +0 -17
  241. package/dist/cjs/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +0 -22
  242. package/dist/cjs/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.js +0 -3
  243. package/dist/cjs/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +0 -20
  244. package/dist/cjs/api/resources/documentCollections/client/requests/CreateCollectionRequest.js +0 -3
  245. package/dist/cjs/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +0 -28
  246. package/dist/cjs/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +0 -3
  247. package/dist/cjs/api/resources/documentCollections/client/requests/DeleteCollectionRequest.d.ts +0 -9
  248. package/dist/cjs/api/resources/documentCollections/client/requests/DeleteCollectionRequest.js +0 -3
  249. package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.ts +0 -10
  250. package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.js +0 -3
  251. package/dist/cjs/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +0 -22
  252. package/dist/cjs/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.js +0 -3
  253. package/dist/cjs/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +0 -28
  254. package/dist/cjs/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +0 -3
  255. package/dist/cjs/api/resources/documentCollections/client/requests/index.d.ts +0 -7
  256. package/dist/cjs/api/resources/documentCollections/client/requests/index.js +0 -2
  257. package/dist/cjs/api/resources/documentCollections/index.d.ts +0 -2
  258. package/dist/cjs/api/resources/documentCollections/index.js +0 -18
  259. package/dist/cjs/api/resources/documentCollections/types/CreateCollectionResponse.d.ts +0 -3
  260. package/dist/cjs/api/resources/documentCollections/types/CreateCollectionResponse.js +0 -3
  261. package/dist/cjs/api/resources/documentCollections/types/DeleteCollectionResponse.d.ts +0 -3
  262. package/dist/cjs/api/resources/documentCollections/types/DeleteCollectionResponse.js +0 -3
  263. package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.ts +0 -4
  264. package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.js +0 -3
  265. package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +0 -7
  266. package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncConfig.js +0 -3
  267. package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +0 -5
  268. package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncResponse.js +0 -3
  269. package/dist/cjs/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +0 -6
  270. package/dist/cjs/api/resources/documentCollections/types/MongoSourceFieldsConfig.js +0 -3
  271. package/dist/cjs/api/resources/documentCollections/types/index.d.ts +0 -6
  272. package/dist/cjs/api/resources/documentCollections/types/index.js +0 -22
  273. package/dist/cjs/api/resources/search/client/Client.d.ts +0 -41
  274. package/dist/cjs/api/resources/search/client/Client.js +0 -122
  275. package/dist/cjs/api/resources/search/client/index.d.ts +0 -1
  276. package/dist/cjs/api/resources/search/client/index.js +0 -17
  277. package/dist/cjs/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +0 -33
  278. package/dist/cjs/api/resources/search/client/requests/SearchDocumentCollectionRequest.js +0 -3
  279. package/dist/cjs/api/resources/search/client/requests/index.d.ts +0 -1
  280. package/dist/cjs/api/resources/search/client/requests/index.js +0 -2
  281. package/dist/cjs/api/resources/search/index.d.ts +0 -2
  282. package/dist/cjs/api/resources/search/index.js +0 -18
  283. package/dist/cjs/api/resources/search/types/DocumentCollectionSearchOptions.d.ts +0 -17
  284. package/dist/cjs/api/resources/search/types/DocumentCollectionSearchOptions.js +0 -3
  285. package/dist/cjs/api/resources/search/types/DocumentCollectionSearchResult.d.ts +0 -10
  286. package/dist/cjs/api/resources/search/types/DocumentCollectionSearchResult.js +0 -3
  287. package/dist/cjs/api/resources/search/types/SearchDocumentCollectionResponse.d.ts +0 -7
  288. package/dist/cjs/api/resources/search/types/SearchDocumentCollectionResponse.js +0 -3
  289. package/dist/cjs/api/resources/search/types/SearchResultChunk.d.ts +0 -7
  290. package/dist/cjs/api/resources/search/types/SearchResultChunk.js +0 -3
  291. package/dist/cjs/api/resources/search/types/SingleFieldFilter.d.ts +0 -6
  292. package/dist/cjs/api/resources/search/types/SingleFieldFilter.js +0 -3
  293. package/dist/cjs/api/resources/search/types/index.d.ts +0 -5
  294. package/dist/cjs/api/resources/search/types/index.js +0 -21
  295. package/dist/cjs/api/resources/users/client/Client.d.ts +0 -36
  296. package/dist/cjs/api/resources/users/client/Client.js +0 -114
  297. package/dist/cjs/api/resources/users/client/index.d.ts +0 -1
  298. package/dist/cjs/api/resources/users/client/index.js +0 -2
  299. package/dist/cjs/api/resources/users/index.d.ts +0 -2
  300. package/dist/cjs/api/resources/users/index.js +0 -18
  301. package/dist/cjs/api/resources/users/types/UserMetadataPatch.d.ts +0 -5
  302. package/dist/cjs/api/resources/users/types/UserMetadataPatch.js +0 -3
  303. package/dist/cjs/api/resources/users/types/index.d.ts +0 -1
  304. package/dist/cjs/api/resources/users/types/index.js +0 -17
  305. package/dist/cjs/core/file/exports.d.ts +0 -1
  306. package/dist/cjs/core/file/exports.js +0 -2
  307. package/dist/cjs/core/file/file.d.ts +0 -10
  308. package/dist/cjs/core/file/file.js +0 -221
  309. package/dist/cjs/core/file/index.d.ts +0 -2
  310. package/dist/cjs/core/file/index.js +0 -18
  311. package/dist/cjs/core/file/types.d.ts +0 -66
  312. package/dist/cjs/core/file/types.js +0 -2
  313. package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +0 -15
  314. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +0 -185
  315. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +0 -1
  316. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +0 -12
  317. package/dist/cjs/core/form-data-utils/index.d.ts +0 -2
  318. package/dist/cjs/core/form-data-utils/index.js +0 -20
  319. package/dist/cjs/core/stream/Stream.d.ts +0 -47
  320. package/dist/cjs/core/stream/Stream.js +0 -172
  321. package/dist/cjs/core/stream/index.d.ts +0 -1
  322. package/dist/cjs/core/stream/index.js +0 -5
  323. package/dist/esm/api/resources/common/index.d.mts +0 -1
  324. package/dist/esm/api/resources/common/index.mjs +0 -1
  325. package/dist/esm/api/resources/common/types/Collaborator.d.mts +0 -5
  326. package/dist/esm/api/resources/common/types/CustomMetadataValue.d.mts +0 -1
  327. package/dist/esm/api/resources/common/types/ExternalResourceId.d.mts +0 -5
  328. package/dist/esm/api/resources/common/types/Operator.d.mts +0 -10
  329. package/dist/esm/api/resources/common/types/Operator.mjs +0 -10
  330. package/dist/esm/api/resources/common/types/ResourceIdentifier.d.mts +0 -10
  331. package/dist/esm/api/resources/common/types/ResourceType.d.mts +0 -22
  332. package/dist/esm/api/resources/common/types/ResourceType.mjs +0 -22
  333. package/dist/esm/api/resources/common/types/Role.d.mts +0 -5
  334. package/dist/esm/api/resources/common/types/Role.mjs +0 -5
  335. package/dist/esm/api/resources/common/types/Url.d.mts +0 -3
  336. package/dist/esm/api/resources/common/types/index.d.mts +0 -8
  337. package/dist/esm/api/resources/common/types/index.mjs +0 -8
  338. package/dist/esm/api/resources/copilots/client/Client.d.mts +0 -169
  339. package/dist/esm/api/resources/copilots/client/Client.mjs +0 -519
  340. package/dist/esm/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.mts +0 -13
  341. package/dist/esm/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.mjs +0 -2
  342. package/dist/esm/api/resources/copilots/client/requests/CreateConversationRequest.d.mts +0 -13
  343. package/dist/esm/api/resources/copilots/client/requests/CreateConversationRequest.mjs +0 -2
  344. package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.d.mts +0 -20
  345. package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.mjs +0 -2
  346. package/dist/esm/api/resources/copilots/client/requests/DeleteCopilotRequest.d.mts +0 -10
  347. package/dist/esm/api/resources/copilots/client/requests/DeleteCopilotRequest.mjs +0 -2
  348. package/dist/esm/api/resources/copilots/client/requests/ExportCopilotsRequest.d.mts +0 -21
  349. package/dist/esm/api/resources/copilots/client/requests/ExportCopilotsRequest.mjs +0 -2
  350. package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.mts +0 -24
  351. package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.mjs +0 -2
  352. package/dist/esm/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.mts +0 -13
  353. package/dist/esm/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.mjs +0 -2
  354. package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.d.mts +0 -28
  355. package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.mjs +0 -2
  356. package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.d.mts +0 -56
  357. package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.mjs +0 -2
  358. package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.mts +0 -21
  359. package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.mjs +0 -2
  360. package/dist/esm/api/resources/copilots/client/requests/index.d.mts +0 -10
  361. package/dist/esm/api/resources/copilots/types/AiEndpointConfiguration.d.mts +0 -4
  362. package/dist/esm/api/resources/copilots/types/AiEndpointConfiguration.mjs +0 -2
  363. package/dist/esm/api/resources/copilots/types/BlockedChunk.d.mts +0 -5
  364. package/dist/esm/api/resources/copilots/types/BlockedChunk.mjs +0 -2
  365. package/dist/esm/api/resources/copilots/types/BooleanFieldSchema.d.mts +0 -5
  366. package/dist/esm/api/resources/copilots/types/BooleanFieldSchema.mjs +0 -2
  367. package/dist/esm/api/resources/copilots/types/CollectionFilteredData.d.mts +0 -6
  368. package/dist/esm/api/resources/copilots/types/CollectionFilteredData.mjs +0 -2
  369. package/dist/esm/api/resources/copilots/types/Configuration.d.mts +0 -7
  370. package/dist/esm/api/resources/copilots/types/Configuration.mjs +0 -2
  371. package/dist/esm/api/resources/copilots/types/CreateConversationResponse.d.mts +0 -3
  372. package/dist/esm/api/resources/copilots/types/CreateConversationResponse.mjs +0 -2
  373. package/dist/esm/api/resources/copilots/types/CreateCopilotResponse.d.mts +0 -3
  374. package/dist/esm/api/resources/copilots/types/CreateCopilotResponse.mjs +0 -2
  375. package/dist/esm/api/resources/copilots/types/DataChunk.d.mts +0 -3
  376. package/dist/esm/api/resources/copilots/types/DataChunk.mjs +0 -2
  377. package/dist/esm/api/resources/copilots/types/DataFilter.d.mts +0 -6
  378. package/dist/esm/api/resources/copilots/types/DataFilter.mjs +0 -2
  379. package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.d.mts +0 -6
  380. package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.mjs +0 -2
  381. package/dist/esm/api/resources/copilots/types/DeleteCopilotResponse.d.mts +0 -3
  382. package/dist/esm/api/resources/copilots/types/DeleteCopilotResponse.mjs +0 -2
  383. package/dist/esm/api/resources/copilots/types/EndOfMessageChunk.d.mts +0 -1
  384. package/dist/esm/api/resources/copilots/types/EndOfMessageChunk.mjs +0 -2
  385. package/dist/esm/api/resources/copilots/types/ErrorChunk.d.mts +0 -4
  386. package/dist/esm/api/resources/copilots/types/ErrorChunk.mjs +0 -2
  387. package/dist/esm/api/resources/copilots/types/ErrorChunkData.d.mts +0 -3
  388. package/dist/esm/api/resources/copilots/types/ErrorChunkData.mjs +0 -2
  389. package/dist/esm/api/resources/copilots/types/ExportCopilotsResponse.d.mts +0 -9
  390. package/dist/esm/api/resources/copilots/types/ExportCopilotsResponse.mjs +0 -2
  391. package/dist/esm/api/resources/copilots/types/ExportedCopilot.d.mts +0 -24
  392. package/dist/esm/api/resources/copilots/types/ExportedCopilot.mjs +0 -2
  393. package/dist/esm/api/resources/copilots/types/FeedbackEnum.d.mts +0 -5
  394. package/dist/esm/api/resources/copilots/types/FeedbackEnum.mjs +0 -5
  395. package/dist/esm/api/resources/copilots/types/Filter.d.mts +0 -16
  396. package/dist/esm/api/resources/copilots/types/Filter.mjs +0 -2
  397. package/dist/esm/api/resources/copilots/types/FinalChunk.d.mts +0 -4
  398. package/dist/esm/api/resources/copilots/types/FinalChunk.mjs +0 -2
  399. package/dist/esm/api/resources/copilots/types/InitialChunk.d.mts +0 -7
  400. package/dist/esm/api/resources/copilots/types/InitialChunk.mjs +0 -2
  401. package/dist/esm/api/resources/copilots/types/InputVariable.d.mts +0 -4
  402. package/dist/esm/api/resources/copilots/types/InputVariable.mjs +0 -2
  403. package/dist/esm/api/resources/copilots/types/InsertedAuditLog.d.mts +0 -3
  404. package/dist/esm/api/resources/copilots/types/InsertedAuditLog.mjs +0 -2
  405. package/dist/esm/api/resources/copilots/types/MessageBlocked.d.mts +0 -7
  406. package/dist/esm/api/resources/copilots/types/MessageBlocked.mjs +0 -2
  407. package/dist/esm/api/resources/copilots/types/MessageFeedback.d.mts +0 -6
  408. package/dist/esm/api/resources/copilots/types/MessageFeedback.mjs +0 -2
  409. package/dist/esm/api/resources/copilots/types/MessageReply.d.mts +0 -11
  410. package/dist/esm/api/resources/copilots/types/MessageReply.mjs +0 -2
  411. package/dist/esm/api/resources/copilots/types/NumberFieldSchema.d.mts +0 -6
  412. package/dist/esm/api/resources/copilots/types/NumberFieldSchema.mjs +0 -2
  413. package/dist/esm/api/resources/copilots/types/ReferencedSource.d.mts +0 -7
  414. package/dist/esm/api/resources/copilots/types/ReferencedSource.mjs +0 -2
  415. package/dist/esm/api/resources/copilots/types/ResponseChunk.d.mts +0 -5
  416. package/dist/esm/api/resources/copilots/types/ResponseChunk.mjs +0 -2
  417. package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.d.mts +0 -4
  418. package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.mjs +0 -2
  419. package/dist/esm/api/resources/copilots/types/SendMessageResponse.d.mts +0 -18
  420. package/dist/esm/api/resources/copilots/types/SendMessageResponse.mjs +0 -2
  421. package/dist/esm/api/resources/copilots/types/StreamingChunk.d.mts +0 -22
  422. package/dist/esm/api/resources/copilots/types/StreamingChunk.mjs +0 -2
  423. package/dist/esm/api/resources/copilots/types/StringFieldSchema.d.mts +0 -6
  424. package/dist/esm/api/resources/copilots/types/StringFieldSchema.mjs +0 -2
  425. package/dist/esm/api/resources/copilots/types/WebSearchResult.d.mts +0 -5
  426. package/dist/esm/api/resources/copilots/types/WebSearchResult.mjs +0 -2
  427. package/dist/esm/api/resources/copilots/types/index.d.mts +0 -33
  428. package/dist/esm/api/resources/copilots/types/index.mjs +0 -33
  429. package/dist/esm/api/resources/documentCatalog/client/Client.d.mts +0 -84
  430. package/dist/esm/api/resources/documentCatalog/client/Client.mjs +0 -256
  431. package/dist/esm/api/resources/documentCatalog/client/index.d.mts +0 -1
  432. package/dist/esm/api/resources/documentCatalog/client/index.mjs +0 -1
  433. package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts +0 -35
  434. package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.mjs +0 -2
  435. package/dist/esm/api/resources/documentCatalog/client/requests/UploadFileRequest.d.mts +0 -27
  436. package/dist/esm/api/resources/documentCatalog/client/requests/UploadFileRequest.mjs +0 -2
  437. package/dist/esm/api/resources/documentCatalog/client/requests/index.d.mts +0 -2
  438. package/dist/esm/api/resources/documentCatalog/client/requests/index.mjs +0 -1
  439. package/dist/esm/api/resources/documentCatalog/index.d.mts +0 -2
  440. package/dist/esm/api/resources/documentCatalog/index.mjs +0 -2
  441. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.d.mts +0 -7
  442. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.mjs +0 -2
  443. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.mts +0 -5
  444. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.mjs +0 -2
  445. package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlRequest.d.mts +0 -4
  446. package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlRequest.mjs +0 -2
  447. package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlResponse.d.mts +0 -3
  448. package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlResponse.mjs +0 -2
  449. package/dist/esm/api/resources/documentCatalog/types/UploadDocumentResponse.d.mts +0 -3
  450. package/dist/esm/api/resources/documentCatalog/types/UploadDocumentResponse.mjs +0 -2
  451. package/dist/esm/api/resources/documentCatalog/types/index.d.mts +0 -5
  452. package/dist/esm/api/resources/documentCatalog/types/index.mjs +0 -5
  453. package/dist/esm/api/resources/documentCollections/client/Client.d.mts +0 -159
  454. package/dist/esm/api/resources/documentCollections/client/Client.mjs +0 -401
  455. package/dist/esm/api/resources/documentCollections/client/index.d.mts +0 -1
  456. package/dist/esm/api/resources/documentCollections/client/index.mjs +0 -1
  457. package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.mts +0 -22
  458. package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.mjs +0 -2
  459. package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.mts +0 -20
  460. package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.mjs +0 -2
  461. package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.mts +0 -28
  462. package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.mjs +0 -2
  463. package/dist/esm/api/resources/documentCollections/client/requests/DeleteCollectionRequest.d.mts +0 -9
  464. package/dist/esm/api/resources/documentCollections/client/requests/DeleteCollectionRequest.mjs +0 -2
  465. package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.mts +0 -10
  466. package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.mjs +0 -2
  467. package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.mts +0 -22
  468. package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.mjs +0 -2
  469. package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.mts +0 -28
  470. package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.mjs +0 -2
  471. package/dist/esm/api/resources/documentCollections/client/requests/index.d.mts +0 -7
  472. package/dist/esm/api/resources/documentCollections/client/requests/index.mjs +0 -1
  473. package/dist/esm/api/resources/documentCollections/index.d.mts +0 -2
  474. package/dist/esm/api/resources/documentCollections/index.mjs +0 -2
  475. package/dist/esm/api/resources/documentCollections/types/CreateCollectionResponse.d.mts +0 -3
  476. package/dist/esm/api/resources/documentCollections/types/CreateCollectionResponse.mjs +0 -2
  477. package/dist/esm/api/resources/documentCollections/types/DeleteCollectionResponse.d.mts +0 -3
  478. package/dist/esm/api/resources/documentCollections/types/DeleteCollectionResponse.mjs +0 -2
  479. package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.mts +0 -4
  480. package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.mjs +0 -2
  481. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.mts +0 -7
  482. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.mjs +0 -2
  483. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.mts +0 -5
  484. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncResponse.mjs +0 -2
  485. package/dist/esm/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.mts +0 -6
  486. package/dist/esm/api/resources/documentCollections/types/MongoSourceFieldsConfig.mjs +0 -2
  487. package/dist/esm/api/resources/documentCollections/types/index.d.mts +0 -6
  488. package/dist/esm/api/resources/documentCollections/types/index.mjs +0 -6
  489. package/dist/esm/api/resources/search/client/Client.d.mts +0 -41
  490. package/dist/esm/api/resources/search/client/Client.mjs +0 -85
  491. package/dist/esm/api/resources/search/client/index.d.mts +0 -1
  492. package/dist/esm/api/resources/search/client/index.mjs +0 -1
  493. package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.mts +0 -33
  494. package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.mjs +0 -2
  495. package/dist/esm/api/resources/search/client/requests/index.d.mts +0 -1
  496. package/dist/esm/api/resources/search/client/requests/index.mjs +0 -1
  497. package/dist/esm/api/resources/search/index.d.mts +0 -2
  498. package/dist/esm/api/resources/search/index.mjs +0 -2
  499. package/dist/esm/api/resources/search/types/DocumentCollectionSearchOptions.d.mts +0 -17
  500. package/dist/esm/api/resources/search/types/DocumentCollectionSearchOptions.mjs +0 -2
  501. package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.d.mts +0 -10
  502. package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.mjs +0 -2
  503. package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.d.mts +0 -7
  504. package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.mjs +0 -2
  505. package/dist/esm/api/resources/search/types/SearchResultChunk.d.mts +0 -7
  506. package/dist/esm/api/resources/search/types/SearchResultChunk.mjs +0 -2
  507. package/dist/esm/api/resources/search/types/SingleFieldFilter.d.mts +0 -6
  508. package/dist/esm/api/resources/search/types/SingleFieldFilter.mjs +0 -2
  509. package/dist/esm/api/resources/search/types/index.d.mts +0 -5
  510. package/dist/esm/api/resources/search/types/index.mjs +0 -5
  511. package/dist/esm/api/resources/users/client/Client.d.mts +0 -36
  512. package/dist/esm/api/resources/users/client/Client.mjs +0 -77
  513. package/dist/esm/api/resources/users/client/index.d.mts +0 -1
  514. package/dist/esm/api/resources/users/client/index.mjs +0 -1
  515. package/dist/esm/api/resources/users/index.d.mts +0 -2
  516. package/dist/esm/api/resources/users/index.mjs +0 -2
  517. package/dist/esm/api/resources/users/types/UserMetadataPatch.d.mts +0 -5
  518. package/dist/esm/api/resources/users/types/UserMetadataPatch.mjs +0 -2
  519. package/dist/esm/api/resources/users/types/index.d.mts +0 -1
  520. package/dist/esm/api/resources/users/types/index.mjs +0 -1
  521. package/dist/esm/core/file/exports.d.mts +0 -1
  522. package/dist/esm/core/file/exports.mjs +0 -1
  523. package/dist/esm/core/file/file.d.mts +0 -10
  524. package/dist/esm/core/file/file.mjs +0 -184
  525. package/dist/esm/core/file/index.d.mts +0 -2
  526. package/dist/esm/core/file/index.mjs +0 -2
  527. package/dist/esm/core/file/types.d.mts +0 -66
  528. package/dist/esm/core/file/types.mjs +0 -1
  529. package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +0 -15
  530. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +0 -147
  531. package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +0 -1
  532. package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +0 -9
  533. package/dist/esm/core/form-data-utils/index.d.mts +0 -2
  534. package/dist/esm/core/form-data-utils/index.mjs +0 -2
  535. package/dist/esm/core/stream/Stream.d.mts +0 -47
  536. package/dist/esm/core/stream/Stream.mjs +0 -167
  537. package/dist/esm/core/stream/index.d.mts +0 -1
  538. package/dist/esm/core/stream/index.mjs +0 -1
  539. /package/dist/cjs/api/resources/{copilots → agents}/client/index.d.ts +0 -0
  540. /package/dist/cjs/api/resources/{copilots → agents}/client/index.js +0 -0
  541. /package/dist/cjs/api/resources/{common/types/Collaborator.js → agents/client/requests/FetchResponseAgentsRequest.js} +0 -0
  542. /package/dist/cjs/api/resources/{common/types/CustomMetadataValue.js → agents/client/requests/SendMessageAgentsRequest.js} +0 -0
  543. /package/dist/cjs/api/resources/{copilots → agents}/client/requests/index.js +0 -0
  544. /package/dist/cjs/api/resources/{copilots → agents}/index.d.ts +0 -0
  545. /package/dist/cjs/api/resources/{copilots → agents}/index.js +0 -0
  546. /package/dist/cjs/api/resources/{common/types/ExternalResourceId.js → agents/types/FetchResponseAgentsResponse.js} +0 -0
  547. /package/dist/cjs/api/resources/{common/types/ResourceIdentifier.js → agents/types/SendMessageAgentsRequestConversation.js} +0 -0
  548. /package/dist/cjs/api/resources/{common/types/Url.js → agents/types/SendMessageAgentsResponse.js} +0 -0
  549. /package/dist/esm/api/resources/{copilots → agents}/client/index.d.mts +0 -0
  550. /package/dist/esm/api/resources/{copilots → agents}/client/index.mjs +0 -0
  551. /package/dist/esm/api/resources/{common/types/Collaborator.mjs → agents/client/requests/FetchResponseAgentsRequest.mjs} +0 -0
  552. /package/dist/esm/api/resources/{common/types/CustomMetadataValue.mjs → agents/client/requests/SendMessageAgentsRequest.mjs} +0 -0
  553. /package/dist/esm/api/resources/{copilots → agents}/client/requests/index.mjs +0 -0
  554. /package/dist/esm/api/resources/{copilots → agents}/index.d.mts +0 -0
  555. /package/dist/esm/api/resources/{copilots → agents}/index.mjs +0 -0
  556. /package/dist/esm/api/resources/{common/types/ExternalResourceId.mjs → agents/types/FetchResponseAgentsResponse.mjs} +0 -0
  557. /package/dist/esm/api/resources/{common/types/ResourceIdentifier.mjs → agents/types/SendMessageAgentsRequestConversation.mjs} +0 -0
  558. /package/dist/esm/api/resources/{common/types/Url.mjs → agents/types/SendMessageAgentsResponse.mjs} +0 -0
@@ -1,114 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
- return new (P || (P = Promise))(function (resolve, reject) {
39
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
- step((generator = generator.apply(thisArg, _arguments || [])).next());
43
- });
44
- };
45
- Object.defineProperty(exports, "__esModule", { value: true });
46
- exports.UsersClient = void 0;
47
- const BaseClient_js_1 = require("../../../../BaseClient.js");
48
- const headers_js_1 = require("../../../../core/headers.js");
49
- const core = __importStar(require("../../../../core/index.js"));
50
- const environments = __importStar(require("../../../../environments.js"));
51
- const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
- const errors = __importStar(require("../../../../errors/index.js"));
53
- class UsersClient {
54
- constructor(options = {}) {
55
- this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
56
- }
57
- /**
58
- * Bulk patch metadata for users
59
- *
60
- * @param {Credal.UserMetadataPatch[]} request
61
- * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
62
- *
63
- * @example
64
- * await client.users.metadata([{
65
- * metadata: {
66
- * "State": "NY",
67
- * "Job Role": "CEO"
68
- * },
69
- * userEmail: "ravin@credal.ai"
70
- * }, {
71
- * metadata: {
72
- * "State": "NY",
73
- * "Department": "Engineering"
74
- * },
75
- * userEmail: "jack@credal.ai"
76
- * }])
77
- */
78
- metadata(request, requestOptions) {
79
- return core.HttpResponsePromise.fromPromise(this.__metadata(request, requestOptions));
80
- }
81
- __metadata(request, requestOptions) {
82
- return __awaiter(this, void 0, void 0, function* () {
83
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
84
- const _authRequest = yield this._options.authProvider.getAuthRequest();
85
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
86
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
87
- 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/users/metadata"),
88
- method: "PATCH",
89
- headers: _headers,
90
- contentType: "application/json",
91
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
92
- requestType: "json",
93
- body: request,
94
- 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,
95
- 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,
96
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
97
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
98
- logging: this._options.logging,
99
- });
100
- if (_response.ok) {
101
- return { data: undefined, rawResponse: _response.rawResponse };
102
- }
103
- if (_response.error.reason === "status-code") {
104
- throw new errors.CredalError({
105
- statusCode: _response.error.statusCode,
106
- body: _response.error.body,
107
- rawResponse: _response.rawResponse,
108
- });
109
- }
110
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v0/users/metadata");
111
- });
112
- }
113
- }
114
- exports.UsersClient = UsersClient;
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from "./client/index.js";
2
- export * from "./types/index.js";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client/index.js"), exports);
18
- __exportStar(require("./types/index.js"), exports);
@@ -1,5 +0,0 @@
1
- export interface UserMetadataPatch {
2
- userEmail: string;
3
- /** Key-value object of metadata for user. Keys will be merged with any existing values but can also be set to `null` to effectively remove */
4
- metadata: Record<string, unknown>;
5
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export * from "./UserMetadataPatch.js";
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./UserMetadataPatch.js"), exports);
@@ -1 +0,0 @@
1
- export type { Uploadable } from "./types.js";
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- import type { Uploadable } from "./types.js";
2
- export declare function toBinaryUploadRequest(file: Uploadable): Promise<{
3
- body: Uploadable.FileLike;
4
- headers?: Record<string, string>;
5
- }>;
6
- export declare function toMultipartDataPart(file: Uploadable): Promise<{
7
- data: Uploadable.FileLike;
8
- filename?: string;
9
- contentType?: string;
10
- }>;
@@ -1,221 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.toBinaryUploadRequest = toBinaryUploadRequest;
46
- exports.toMultipartDataPart = toMultipartDataPart;
47
- function toBinaryUploadRequest(file) {
48
- return __awaiter(this, void 0, void 0, function* () {
49
- const { data, filename, contentLength, contentType } = yield getFileWithMetadata(file);
50
- const request = {
51
- body: data,
52
- headers: {},
53
- };
54
- if (filename) {
55
- request.headers["Content-Disposition"] = `attachment; filename="${filename}"`;
56
- }
57
- if (contentType) {
58
- request.headers["Content-Type"] = contentType;
59
- }
60
- if (contentLength != null) {
61
- request.headers["Content-Length"] = contentLength.toString();
62
- }
63
- return request;
64
- });
65
- }
66
- function toMultipartDataPart(file) {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- const { data, filename, contentType } = yield getFileWithMetadata(file, {
69
- noSniffFileSize: true,
70
- });
71
- return {
72
- data,
73
- filename,
74
- contentType,
75
- };
76
- });
77
- }
78
- function getFileWithMetadata(file_1) {
79
- return __awaiter(this, arguments, void 0, function* (file, { noSniffFileSize } = {}) {
80
- var _a, _b, _c, _d, _e;
81
- if (isFileLike(file)) {
82
- return getFileWithMetadata({
83
- data: file,
84
- }, { noSniffFileSize });
85
- }
86
- if ("path" in file) {
87
- const fs = yield Promise.resolve().then(() => __importStar(require("fs")));
88
- if (!fs || !fs.createReadStream) {
89
- throw new Error("File path uploads are not supported in this environment.");
90
- }
91
- const data = fs.createReadStream(file.path);
92
- const contentLength = (_a = file.contentLength) !== null && _a !== void 0 ? _a : (noSniffFileSize === true ? undefined : yield tryGetFileSizeFromPath(file.path));
93
- const filename = (_b = file.filename) !== null && _b !== void 0 ? _b : getNameFromPath(file.path);
94
- return {
95
- data,
96
- filename,
97
- contentType: file.contentType,
98
- contentLength,
99
- };
100
- }
101
- if ("data" in file) {
102
- const data = file.data;
103
- const contentLength = (_c = file.contentLength) !== null && _c !== void 0 ? _c : (yield tryGetContentLengthFromFileLike(data, {
104
- noSniffFileSize,
105
- }));
106
- const filename = (_d = file.filename) !== null && _d !== void 0 ? _d : tryGetNameFromFileLike(data);
107
- return {
108
- data,
109
- filename,
110
- contentType: (_e = file.contentType) !== null && _e !== void 0 ? _e : tryGetContentTypeFromFileLike(data),
111
- contentLength,
112
- };
113
- }
114
- throw new Error(`Invalid FileUpload of type ${typeof file}: ${JSON.stringify(file)}`);
115
- });
116
- }
117
- function isFileLike(value) {
118
- return (isBuffer(value) ||
119
- isArrayBufferView(value) ||
120
- isArrayBuffer(value) ||
121
- isUint8Array(value) ||
122
- isBlob(value) ||
123
- isFile(value) ||
124
- isStreamLike(value) ||
125
- isReadableStream(value));
126
- }
127
- function tryGetFileSizeFromPath(path) {
128
- return __awaiter(this, void 0, void 0, function* () {
129
- try {
130
- const fs = yield Promise.resolve().then(() => __importStar(require("fs")));
131
- if (!fs || !fs.promises || !fs.promises.stat) {
132
- return undefined;
133
- }
134
- const fileStat = yield fs.promises.stat(path);
135
- return fileStat.size;
136
- }
137
- catch (_fallbackError) {
138
- return undefined;
139
- }
140
- });
141
- }
142
- function tryGetNameFromFileLike(data) {
143
- if (isNamedValue(data)) {
144
- return data.name;
145
- }
146
- if (isPathedValue(data)) {
147
- return getNameFromPath(data.path.toString());
148
- }
149
- return undefined;
150
- }
151
- function tryGetContentLengthFromFileLike(data_1) {
152
- return __awaiter(this, arguments, void 0, function* (data, { noSniffFileSize } = {}) {
153
- if (isBuffer(data)) {
154
- return data.length;
155
- }
156
- if (isArrayBufferView(data)) {
157
- return data.byteLength;
158
- }
159
- if (isArrayBuffer(data)) {
160
- return data.byteLength;
161
- }
162
- if (isBlob(data)) {
163
- return data.size;
164
- }
165
- if (isFile(data)) {
166
- return data.size;
167
- }
168
- if (noSniffFileSize === true) {
169
- return undefined;
170
- }
171
- if (isPathedValue(data)) {
172
- return yield tryGetFileSizeFromPath(data.path.toString());
173
- }
174
- return undefined;
175
- });
176
- }
177
- function tryGetContentTypeFromFileLike(data) {
178
- if (isBlob(data)) {
179
- return data.type;
180
- }
181
- if (isFile(data)) {
182
- return data.type;
183
- }
184
- return undefined;
185
- }
186
- function getNameFromPath(path) {
187
- const lastForwardSlash = path.lastIndexOf("/");
188
- const lastBackSlash = path.lastIndexOf("\\");
189
- const lastSlashIndex = Math.max(lastForwardSlash, lastBackSlash);
190
- return lastSlashIndex >= 0 ? path.substring(lastSlashIndex + 1) : path;
191
- }
192
- function isNamedValue(value) {
193
- return typeof value === "object" && value != null && "name" in value;
194
- }
195
- function isPathedValue(value) {
196
- return typeof value === "object" && value != null && "path" in value;
197
- }
198
- function isStreamLike(value) {
199
- return typeof value === "object" && value != null && ("read" in value || "pipe" in value);
200
- }
201
- function isReadableStream(value) {
202
- return typeof value === "object" && value != null && "getReader" in value;
203
- }
204
- function isBuffer(value) {
205
- return typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(value);
206
- }
207
- function isArrayBufferView(value) {
208
- return typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView(value);
209
- }
210
- function isArrayBuffer(value) {
211
- return typeof ArrayBuffer !== "undefined" && value instanceof ArrayBuffer;
212
- }
213
- function isUint8Array(value) {
214
- return typeof Uint8Array !== "undefined" && value instanceof Uint8Array;
215
- }
216
- function isBlob(value) {
217
- return typeof Blob !== "undefined" && value instanceof Blob;
218
- }
219
- function isFile(value) {
220
- return typeof File !== "undefined" && value instanceof File;
221
- }
@@ -1,2 +0,0 @@
1
- export * from "./file.js";
2
- export * from "./types.js";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./file.js"), exports);
18
- __exportStar(require("./types.js"), exports);
@@ -1,66 +0,0 @@
1
- /**
2
- * A file that can be uploaded. Can be a file-like object (stream, buffer, blob, etc.),
3
- * a path to a file, or an object with a file-like object and metadata.
4
- */
5
- export type Uploadable = Uploadable.FileLike | Uploadable.FromPath | Uploadable.WithMetadata;
6
- export declare namespace Uploadable {
7
- /**
8
- * Various file-like objects that can be used to upload a file.
9
- */
10
- type FileLike = ArrayBuffer | ArrayBufferLike | ArrayBufferView | Uint8Array | import("buffer").Buffer | import("buffer").Blob | import("buffer").File | import("stream").Readable | import("stream/web").ReadableStream | globalThis.Blob | globalThis.File | ReadableStream;
11
- /**
12
- * A file path with optional metadata, used for uploading a file from the file system.
13
- */
14
- type FromPath = {
15
- /** The path to the file to upload */
16
- path: string;
17
- /**
18
- * Optional override for the file name (defaults to basename of path).
19
- * This is used to set the `Content-Disposition` header in upload requests.
20
- */
21
- filename?: string;
22
- /**
23
- * Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
24
- * This is used to set the `Content-Type` header in upload requests.
25
- */
26
- contentType?: string;
27
- /**
28
- * Optional file size in bytes.
29
- * If not provided, the file size will be determined from the file system.
30
- * The content length is used to set the `Content-Length` header in upload requests.
31
- */
32
- contentLength?: number;
33
- };
34
- /**
35
- * A file-like object with metadata, used for uploading files.
36
- */
37
- type WithMetadata = {
38
- /** The file data */
39
- data: FileLike;
40
- /**
41
- * Optional override for the file name (defaults to basename of path).
42
- * This is used to set the `Content-Disposition` header in upload requests.
43
- */
44
- filename?: string;
45
- /**
46
- * Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
47
- * This is used to set the `Content-Type` header in upload requests.
48
- *
49
- * If not provided, the content type may be determined from the data itself.
50
- * * If the data is a `File`, `Blob`, or similar, the content type will be determined from the file itself, if the type is set.
51
- * * Any other data type will not have a content type set, and the upload request will use `Content-Type: application/octet-stream` instead.
52
- */
53
- contentType?: string;
54
- /**
55
- * Optional file size in bytes.
56
- * The content length is used to set the `Content-Length` header in upload requests.
57
- * If the content length is not provided and cannot be determined, the upload request will not include the `Content-Length` header, but will use `Transfer-Encoding: chunked` instead.
58
- *
59
- * If not provided, the file size will be determined depending on the data type.
60
- * * If the data is of type `fs.ReadStream` (`createReadStream`), the size will be determined from the file system.
61
- * * If the data is a `Buffer`, `ArrayBuffer`, `Uint8Array`, `Blob`, `File`, or similar, the size will be determined from the data itself.
62
- * * If the data is a `Readable` or `ReadableStream`, the size will not be determined.
63
- */
64
- contentLength?: number;
65
- };
66
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- import { type Uploadable } from "../../core/file/index.js";
2
- interface FormDataRequest<Body> {
3
- body: Body;
4
- headers: Record<string, string>;
5
- duplex?: "half";
6
- }
7
- export declare function newFormData(): Promise<FormDataWrapper>;
8
- export declare class FormDataWrapper {
9
- private fd;
10
- setup(): Promise<void>;
11
- append(key: string, value: unknown): void;
12
- appendFile(key: string, value: Uploadable): Promise<void>;
13
- getRequest(): FormDataRequest<FormData>;
14
- }
15
- export {};