@credal/sdk 0.1.8 → 0.1.9

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 (259) hide show
  1. package/dist/cjs/BaseClient.d.ts +2 -2
  2. package/dist/cjs/Client.d.ts +1 -1
  3. package/dist/cjs/Client.js +4 -4
  4. package/dist/cjs/api/resources/common/types/Collaborator.d.ts +1 -1
  5. package/dist/cjs/api/resources/common/types/ExternalResourceId.d.ts +1 -1
  6. package/dist/cjs/api/resources/common/types/ResourceIdentifier.d.ts +1 -1
  7. package/dist/cjs/api/resources/common/types/index.d.ts +5 -5
  8. package/dist/cjs/api/resources/common/types/index.js +5 -5
  9. package/dist/cjs/api/resources/copilots/client/Client.d.ts +1 -1
  10. package/dist/cjs/api/resources/copilots/client/Client.js +12 -12
  11. package/dist/cjs/api/resources/copilots/client/index.d.ts +0 -1
  12. package/dist/cjs/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +1 -1
  13. package/dist/cjs/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
  14. package/dist/cjs/api/resources/copilots/client/requests/SendMessageRequest.d.ts +1 -1
  15. package/dist/cjs/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +1 -1
  16. package/dist/cjs/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +1 -1
  17. package/dist/cjs/api/resources/copilots/client/requests/index.d.ts +9 -9
  18. package/dist/cjs/api/resources/copilots/index.d.ts +1 -1
  19. package/dist/cjs/api/resources/copilots/index.js +1 -1
  20. package/dist/cjs/api/resources/copilots/types/CollectionFilteredData.d.ts +1 -1
  21. package/dist/cjs/api/resources/copilots/types/Configuration.d.ts +1 -1
  22. package/dist/cjs/api/resources/copilots/types/DataFilter.d.ts +1 -1
  23. package/dist/cjs/api/resources/copilots/types/DatetimeFieldSchema.d.ts +1 -1
  24. package/dist/cjs/api/resources/copilots/types/EndOfMessageChunk.d.ts +1 -2
  25. package/dist/cjs/api/resources/copilots/types/ErrorChunk.d.ts +1 -1
  26. package/dist/cjs/api/resources/copilots/types/Filter.d.ts +1 -1
  27. package/dist/cjs/api/resources/copilots/types/FinalChunk.d.ts +1 -1
  28. package/dist/cjs/api/resources/copilots/types/InitialChunk.d.ts +1 -1
  29. package/dist/cjs/api/resources/copilots/types/MessageBlocked.d.ts +1 -1
  30. package/dist/cjs/api/resources/copilots/types/MessageFeedback.d.ts +1 -1
  31. package/dist/cjs/api/resources/copilots/types/MessageReply.d.ts +1 -1
  32. package/dist/cjs/api/resources/copilots/types/NumberFieldSchema.d.ts +1 -1
  33. package/dist/cjs/api/resources/copilots/types/ReferencedSource.d.ts +1 -1
  34. package/dist/cjs/api/resources/copilots/types/SendAgentMessageResponse.d.ts +1 -1
  35. package/dist/cjs/api/resources/copilots/types/SendMessageResponse.d.ts +1 -1
  36. package/dist/cjs/api/resources/copilots/types/StreamingChunk.d.ts +1 -1
  37. package/dist/cjs/api/resources/copilots/types/StringFieldSchema.d.ts +1 -1
  38. package/dist/cjs/api/resources/copilots/types/index.d.ts +24 -24
  39. package/dist/cjs/api/resources/copilots/types/index.js +24 -24
  40. package/dist/cjs/api/resources/documentCatalog/client/Client.d.ts +1 -1
  41. package/dist/cjs/api/resources/documentCatalog/client/Client.js +6 -6
  42. package/dist/cjs/api/resources/documentCatalog/client/index.d.ts +0 -1
  43. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +1 -1
  44. package/dist/cjs/api/resources/documentCatalog/client/requests/index.d.ts +1 -1
  45. package/dist/cjs/api/resources/documentCatalog/index.d.ts +1 -1
  46. package/dist/cjs/api/resources/documentCatalog/index.js +1 -1
  47. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.d.ts +1 -1
  48. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.ts +1 -1
  49. package/dist/cjs/api/resources/documentCatalog/types/index.d.ts +1 -1
  50. package/dist/cjs/api/resources/documentCatalog/types/index.js +1 -1
  51. package/dist/cjs/api/resources/documentCollections/client/Client.d.ts +1 -1
  52. package/dist/cjs/api/resources/documentCollections/client/Client.js +11 -11
  53. package/dist/cjs/api/resources/documentCollections/client/index.d.ts +0 -1
  54. package/dist/cjs/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +1 -1
  55. package/dist/cjs/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +1 -1
  56. package/dist/cjs/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +1 -1
  57. package/dist/cjs/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +1 -1
  58. package/dist/cjs/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +1 -1
  59. package/dist/cjs/api/resources/documentCollections/client/requests/index.d.ts +7 -7
  60. package/dist/cjs/api/resources/documentCollections/index.d.ts +1 -1
  61. package/dist/cjs/api/resources/documentCollections/index.js +1 -1
  62. package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.ts +1 -1
  63. package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +1 -1
  64. package/dist/cjs/api/resources/documentCollections/types/index.d.ts +1 -1
  65. package/dist/cjs/api/resources/documentCollections/types/index.js +1 -1
  66. package/dist/cjs/api/resources/index.d.ts +4 -4
  67. package/dist/cjs/api/resources/index.js +4 -4
  68. package/dist/cjs/api/resources/search/client/Client.d.ts +1 -1
  69. package/dist/cjs/api/resources/search/client/Client.js +4 -4
  70. package/dist/cjs/api/resources/search/client/index.d.ts +0 -1
  71. package/dist/cjs/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
  72. package/dist/cjs/api/resources/search/client/requests/index.d.ts +1 -1
  73. package/dist/cjs/api/resources/search/index.d.ts +1 -1
  74. package/dist/cjs/api/resources/search/index.js +1 -1
  75. package/dist/cjs/api/resources/search/types/DocumentCollectionSearchResult.d.ts +1 -1
  76. package/dist/cjs/api/resources/search/types/SearchDocumentCollectionResponse.d.ts +1 -1
  77. package/dist/cjs/api/resources/search/types/SingleFieldFilter.d.ts +1 -1
  78. package/dist/cjs/api/resources/search/types/index.d.ts +1 -1
  79. package/dist/cjs/api/resources/search/types/index.js +1 -1
  80. package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
  81. package/dist/cjs/api/resources/users/client/Client.js +4 -4
  82. package/dist/cjs/api/resources/users/index.d.ts +1 -1
  83. package/dist/cjs/api/resources/users/index.js +1 -1
  84. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +1 -1
  85. package/dist/cjs/core/fetcher/Fetcher.js +2 -1
  86. package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
  87. package/dist/cjs/core/fetcher/getResponseBody.js +3 -3
  88. package/dist/cjs/core/fetcher/makeRequest.js +2 -2
  89. package/dist/cjs/core/fetcher/requestWithRetries.js +3 -3
  90. package/dist/cjs/core/index.d.ts +3 -3
  91. package/dist/cjs/core/index.js +3 -3
  92. package/dist/cjs/core/stream/Stream.d.ts +1 -0
  93. package/dist/cjs/core/stream/Stream.js +8 -5
  94. package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
  95. package/dist/cjs/core/url/encodePathParam.js +21 -0
  96. package/dist/cjs/core/url/index.d.ts +1 -0
  97. package/dist/cjs/core/url/index.js +3 -1
  98. package/dist/cjs/core/url/join.js +3 -3
  99. package/dist/cjs/errors/CredalError.d.ts +1 -1
  100. package/dist/cjs/errors/CredalError.js +1 -1
  101. package/dist/cjs/index.d.ts +2 -2
  102. package/dist/cjs/index.js +4 -4
  103. package/dist/cjs/version.d.ts +1 -1
  104. package/dist/cjs/version.js +1 -1
  105. package/dist/esm/BaseClient.d.mts +2 -2
  106. package/dist/esm/BaseClient.mjs +1 -2
  107. package/dist/esm/Client.d.mts +1 -1
  108. package/dist/esm/Client.mjs +4 -5
  109. package/dist/esm/api/resources/common/types/Collaborator.d.mts +1 -1
  110. package/dist/esm/api/resources/common/types/Collaborator.mjs +1 -1
  111. package/dist/esm/api/resources/common/types/ExternalResourceId.d.mts +1 -1
  112. package/dist/esm/api/resources/common/types/ExternalResourceId.mjs +1 -1
  113. package/dist/esm/api/resources/common/types/ResourceIdentifier.d.mts +1 -1
  114. package/dist/esm/api/resources/common/types/ResourceIdentifier.mjs +1 -1
  115. package/dist/esm/api/resources/common/types/index.d.mts +5 -5
  116. package/dist/esm/api/resources/common/types/index.mjs +5 -5
  117. package/dist/esm/api/resources/copilots/client/Client.d.mts +1 -1
  118. package/dist/esm/api/resources/copilots/client/Client.mjs +12 -13
  119. package/dist/esm/api/resources/copilots/client/index.d.mts +0 -1
  120. package/dist/esm/api/resources/copilots/client/index.mjs +0 -1
  121. package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.d.mts +1 -1
  122. package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.mjs +1 -1
  123. package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.mts +1 -1
  124. package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.mjs +1 -1
  125. package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.d.mts +1 -1
  126. package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.mjs +1 -1
  127. package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.d.mts +1 -1
  128. package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.mjs +1 -1
  129. package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.mts +1 -1
  130. package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.mjs +1 -1
  131. package/dist/esm/api/resources/copilots/client/requests/index.d.mts +9 -9
  132. package/dist/esm/api/resources/copilots/client/requests/index.mjs +1 -9
  133. package/dist/esm/api/resources/copilots/index.d.mts +1 -1
  134. package/dist/esm/api/resources/copilots/index.mjs +1 -1
  135. package/dist/esm/api/resources/copilots/types/CollectionFilteredData.d.mts +1 -1
  136. package/dist/esm/api/resources/copilots/types/CollectionFilteredData.mjs +1 -1
  137. package/dist/esm/api/resources/copilots/types/Configuration.d.mts +1 -1
  138. package/dist/esm/api/resources/copilots/types/Configuration.mjs +1 -1
  139. package/dist/esm/api/resources/copilots/types/DataFilter.d.mts +1 -1
  140. package/dist/esm/api/resources/copilots/types/DataFilter.mjs +1 -1
  141. package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.d.mts +1 -1
  142. package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.mjs +1 -1
  143. package/dist/esm/api/resources/copilots/types/EndOfMessageChunk.d.mts +1 -2
  144. package/dist/esm/api/resources/copilots/types/ErrorChunk.d.mts +1 -1
  145. package/dist/esm/api/resources/copilots/types/ErrorChunk.mjs +1 -1
  146. package/dist/esm/api/resources/copilots/types/Filter.d.mts +1 -1
  147. package/dist/esm/api/resources/copilots/types/Filter.mjs +1 -1
  148. package/dist/esm/api/resources/copilots/types/FinalChunk.d.mts +1 -1
  149. package/dist/esm/api/resources/copilots/types/FinalChunk.mjs +1 -1
  150. package/dist/esm/api/resources/copilots/types/InitialChunk.d.mts +1 -1
  151. package/dist/esm/api/resources/copilots/types/InitialChunk.mjs +1 -1
  152. package/dist/esm/api/resources/copilots/types/MessageBlocked.d.mts +1 -1
  153. package/dist/esm/api/resources/copilots/types/MessageBlocked.mjs +1 -1
  154. package/dist/esm/api/resources/copilots/types/MessageFeedback.d.mts +1 -1
  155. package/dist/esm/api/resources/copilots/types/MessageFeedback.mjs +1 -1
  156. package/dist/esm/api/resources/copilots/types/MessageReply.d.mts +1 -1
  157. package/dist/esm/api/resources/copilots/types/MessageReply.mjs +1 -1
  158. package/dist/esm/api/resources/copilots/types/NumberFieldSchema.d.mts +1 -1
  159. package/dist/esm/api/resources/copilots/types/NumberFieldSchema.mjs +1 -1
  160. package/dist/esm/api/resources/copilots/types/ReferencedSource.d.mts +1 -1
  161. package/dist/esm/api/resources/copilots/types/ReferencedSource.mjs +1 -1
  162. package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.d.mts +1 -1
  163. package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.mjs +1 -1
  164. package/dist/esm/api/resources/copilots/types/SendMessageResponse.d.mts +1 -1
  165. package/dist/esm/api/resources/copilots/types/SendMessageResponse.mjs +1 -1
  166. package/dist/esm/api/resources/copilots/types/StreamingChunk.d.mts +1 -1
  167. package/dist/esm/api/resources/copilots/types/StreamingChunk.mjs +1 -1
  168. package/dist/esm/api/resources/copilots/types/StringFieldSchema.d.mts +1 -1
  169. package/dist/esm/api/resources/copilots/types/StringFieldSchema.mjs +1 -1
  170. package/dist/esm/api/resources/copilots/types/index.d.mts +24 -24
  171. package/dist/esm/api/resources/copilots/types/index.mjs +24 -24
  172. package/dist/esm/api/resources/documentCatalog/client/Client.d.mts +1 -1
  173. package/dist/esm/api/resources/documentCatalog/client/Client.mjs +6 -7
  174. package/dist/esm/api/resources/documentCatalog/client/index.d.mts +0 -1
  175. package/dist/esm/api/resources/documentCatalog/client/index.mjs +0 -1
  176. package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts +1 -1
  177. package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.mjs +1 -1
  178. package/dist/esm/api/resources/documentCatalog/client/requests/index.d.mts +1 -1
  179. package/dist/esm/api/resources/documentCatalog/client/requests/index.mjs +1 -1
  180. package/dist/esm/api/resources/documentCatalog/index.d.mts +1 -1
  181. package/dist/esm/api/resources/documentCatalog/index.mjs +1 -1
  182. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.d.mts +1 -1
  183. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.mjs +1 -1
  184. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.mts +1 -1
  185. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.mjs +1 -1
  186. package/dist/esm/api/resources/documentCatalog/types/index.d.mts +1 -1
  187. package/dist/esm/api/resources/documentCatalog/types/index.mjs +1 -1
  188. package/dist/esm/api/resources/documentCollections/client/Client.d.mts +1 -1
  189. package/dist/esm/api/resources/documentCollections/client/Client.mjs +11 -12
  190. package/dist/esm/api/resources/documentCollections/client/index.d.mts +0 -1
  191. package/dist/esm/api/resources/documentCollections/client/index.mjs +0 -1
  192. package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.mts +1 -1
  193. package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.mjs +1 -1
  194. package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.mts +1 -1
  195. package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.mjs +1 -1
  196. package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.mts +1 -1
  197. package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.mjs +1 -1
  198. package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.mts +1 -1
  199. package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.mjs +1 -1
  200. package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.mts +1 -1
  201. package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.mjs +1 -1
  202. package/dist/esm/api/resources/documentCollections/client/requests/index.d.mts +7 -7
  203. package/dist/esm/api/resources/documentCollections/client/requests/index.mjs +1 -7
  204. package/dist/esm/api/resources/documentCollections/index.d.mts +1 -1
  205. package/dist/esm/api/resources/documentCollections/index.mjs +1 -1
  206. package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.mts +1 -1
  207. package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.mjs +1 -1
  208. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.mts +1 -1
  209. package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.mjs +1 -1
  210. package/dist/esm/api/resources/documentCollections/types/index.d.mts +1 -1
  211. package/dist/esm/api/resources/documentCollections/types/index.mjs +1 -1
  212. package/dist/esm/api/resources/index.d.mts +4 -4
  213. package/dist/esm/api/resources/index.mjs +4 -4
  214. package/dist/esm/api/resources/search/client/Client.d.mts +1 -1
  215. package/dist/esm/api/resources/search/client/Client.mjs +4 -5
  216. package/dist/esm/api/resources/search/client/index.d.mts +0 -1
  217. package/dist/esm/api/resources/search/client/index.mjs +0 -1
  218. package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.mts +1 -1
  219. package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.mjs +1 -1
  220. package/dist/esm/api/resources/search/client/requests/index.d.mts +1 -1
  221. package/dist/esm/api/resources/search/client/requests/index.mjs +1 -1
  222. package/dist/esm/api/resources/search/index.d.mts +1 -1
  223. package/dist/esm/api/resources/search/index.mjs +1 -1
  224. package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.d.mts +1 -1
  225. package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.mjs +1 -1
  226. package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.d.mts +1 -1
  227. package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.mjs +1 -1
  228. package/dist/esm/api/resources/search/types/SingleFieldFilter.d.mts +1 -1
  229. package/dist/esm/api/resources/search/types/SingleFieldFilter.mjs +1 -1
  230. package/dist/esm/api/resources/search/types/index.d.mts +1 -1
  231. package/dist/esm/api/resources/search/types/index.mjs +1 -1
  232. package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
  233. package/dist/esm/api/resources/users/client/Client.mjs +4 -5
  234. package/dist/esm/api/resources/users/index.d.mts +1 -1
  235. package/dist/esm/api/resources/users/index.mjs +1 -1
  236. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +1 -1
  237. package/dist/esm/core/fetcher/EndpointSupplier.mjs +0 -1
  238. package/dist/esm/core/fetcher/Fetcher.mjs +2 -1
  239. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
  240. package/dist/esm/core/fetcher/getResponseBody.mjs +3 -3
  241. package/dist/esm/core/fetcher/makeRequest.mjs +2 -2
  242. package/dist/esm/core/fetcher/requestWithRetries.mjs +3 -3
  243. package/dist/esm/core/index.d.mts +3 -3
  244. package/dist/esm/core/index.mjs +3 -3
  245. package/dist/esm/core/stream/Stream.d.mts +1 -0
  246. package/dist/esm/core/stream/Stream.mjs +8 -5
  247. package/dist/esm/core/url/encodePathParam.d.mts +1 -0
  248. package/dist/esm/core/url/encodePathParam.mjs +18 -0
  249. package/dist/esm/core/url/index.d.mts +1 -0
  250. package/dist/esm/core/url/index.mjs +1 -0
  251. package/dist/esm/core/url/join.mjs +3 -3
  252. package/dist/esm/errors/CredalError.d.mts +1 -1
  253. package/dist/esm/errors/CredalError.mjs +1 -2
  254. package/dist/esm/index.d.mts +2 -2
  255. package/dist/esm/index.mjs +1 -2
  256. package/dist/esm/version.d.mts +1 -1
  257. package/dist/esm/version.mjs +1 -1
  258. package/package.json +9 -4
  259. package/reference.md +203 -229
@@ -1,4 +1,4 @@
1
- import * as Credal from "../../../index.mjs";
1
+ import type * as Credal from "../../../index.mjs";
2
2
  export interface ListDocumentsInCollectionResponse {
3
3
  resourceIdentifiers: Credal.ResourceIdentifier[];
4
4
  }
@@ -1,2 +1,2 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- import * as Credal from "../../../index.mjs";
2
+ export {};
@@ -1,4 +1,4 @@
1
- import * as Credal from "../../../index.mjs";
1
+ import type * as Credal from "../../../index.mjs";
2
2
  export interface MongoCollectionSyncConfig {
3
3
  syncName: string;
4
4
  collectionName: string;
@@ -1,2 +1,2 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- import * as Credal from "../../../index.mjs";
2
+ export {};
@@ -1,6 +1,6 @@
1
1
  export * from "./CreateCollectionResponse.mjs";
2
2
  export * from "./DeleteCollectionResponse.mjs";
3
3
  export * from "./ListDocumentsInCollectionResponse.mjs";
4
- export * from "./MongoSourceFieldsConfig.mjs";
5
4
  export * from "./MongoCollectionSyncConfig.mjs";
6
5
  export * from "./MongoCollectionSyncResponse.mjs";
6
+ export * from "./MongoSourceFieldsConfig.mjs";
@@ -1,6 +1,6 @@
1
1
  export * from "./CreateCollectionResponse.mjs";
2
2
  export * from "./DeleteCollectionResponse.mjs";
3
3
  export * from "./ListDocumentsInCollectionResponse.mjs";
4
- export * from "./MongoSourceFieldsConfig.mjs";
5
4
  export * from "./MongoCollectionSyncConfig.mjs";
6
5
  export * from "./MongoCollectionSyncResponse.mjs";
6
+ export * from "./MongoSourceFieldsConfig.mjs";
@@ -1,16 +1,16 @@
1
1
  export * as common from "./common/index.mjs";
2
2
  export * from "./common/types/index.mjs";
3
+ export * from "./copilots/client/requests/index.mjs";
3
4
  export * as copilots from "./copilots/index.mjs";
4
5
  export * from "./copilots/types/index.mjs";
6
+ export * from "./documentCatalog/client/requests/index.mjs";
5
7
  export * as documentCatalog from "./documentCatalog/index.mjs";
6
8
  export * from "./documentCatalog/types/index.mjs";
9
+ export * from "./documentCollections/client/requests/index.mjs";
7
10
  export * as documentCollections from "./documentCollections/index.mjs";
8
11
  export * from "./documentCollections/types/index.mjs";
12
+ export * from "./search/client/requests/index.mjs";
9
13
  export * as search from "./search/index.mjs";
10
14
  export * from "./search/types/index.mjs";
11
15
  export * as users from "./users/index.mjs";
12
16
  export * from "./users/types/index.mjs";
13
- export * from "./copilots/client/requests/index.mjs";
14
- export * from "./documentCatalog/client/requests/index.mjs";
15
- export * from "./documentCollections/client/requests/index.mjs";
16
- export * from "./search/client/requests/index.mjs";
@@ -1,16 +1,16 @@
1
1
  export * as common from "./common/index.mjs";
2
2
  export * from "./common/types/index.mjs";
3
+ export * from "./copilots/client/requests/index.mjs";
3
4
  export * as copilots from "./copilots/index.mjs";
4
5
  export * from "./copilots/types/index.mjs";
6
+ export * from "./documentCatalog/client/requests/index.mjs";
5
7
  export * as documentCatalog from "./documentCatalog/index.mjs";
6
8
  export * from "./documentCatalog/types/index.mjs";
9
+ export * from "./documentCollections/client/requests/index.mjs";
7
10
  export * as documentCollections from "./documentCollections/index.mjs";
8
11
  export * from "./documentCollections/types/index.mjs";
12
+ export * from "./search/client/requests/index.mjs";
9
13
  export * as search from "./search/index.mjs";
10
14
  export * from "./search/types/index.mjs";
11
15
  export * as users from "./users/index.mjs";
12
16
  export * from "./users/types/index.mjs";
13
- export * from "./copilots/client/requests/index.mjs";
14
- export * from "./documentCatalog/client/requests/index.mjs";
15
- export * from "./documentCollections/client/requests/index.mjs";
16
- export * from "./search/client/requests/index.mjs";
@@ -1,6 +1,6 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
- import * as Credal from "../../../index.mjs";
3
+ import type * as Credal from "../../../index.mjs";
4
4
  export declare namespace Search {
5
5
  interface Options extends BaseClientOptions {
6
6
  }
@@ -8,10 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import * as environments from "../../../../environments.mjs";
12
- import * as core from "../../../../core/index.mjs";
13
- import * as Credal from "../../../index.mjs";
14
11
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
12
+ import * as core from "../../../../core/index.mjs";
13
+ import * as environments from "../../../../environments.mjs";
15
14
  import * as errors from "../../../../errors/index.mjs";
16
15
  export class Search {
17
16
  constructor(_options = {}) {
@@ -49,7 +48,7 @@ export class Search {
49
48
  __searchDocumentCollection(request, requestOptions) {
50
49
  return __awaiter(this, void 0, void 0, function* () {
51
50
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
52
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
51
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
53
52
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
54
53
  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/search/searchDocumentCollection"),
55
54
  method: "POST",
@@ -95,7 +94,7 @@ export class Search {
95
94
  _getAuthorizationHeader() {
96
95
  return __awaiter(this, void 0, void 0, function* () {
97
96
  var _a;
98
- const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["CREDAL_API_KEY"];
97
+ const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env.CREDAL_API_KEY;
99
98
  if (bearer == null) {
100
99
  throw new errors.CredalError({
101
100
  message: "Please specify a bearer by either passing it in to the constructor or initializing a CREDAL_API_KEY environment variable",
@@ -1,2 +1 @@
1
- export {};
2
1
  export * from "./requests/index.mjs";
@@ -1,2 +1 @@
1
- export {};
2
1
  export * from "./requests/index.mjs";
@@ -1,4 +1,4 @@
1
- import * as Credal from "../../../../index.mjs";
1
+ import type * as Credal from "../../../../index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
@@ -1,2 +1,2 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- import * as Credal from "../../../../index.mjs";
2
+ export {};
@@ -1 +1 @@
1
- export { type SearchDocumentCollectionRequest } from "./SearchDocumentCollectionRequest.mjs";
1
+ export type { SearchDocumentCollectionRequest } from "./SearchDocumentCollectionRequest.mjs";
@@ -1 +1 @@
1
- export {} from "./SearchDocumentCollectionRequest.mjs";
1
+ export {};
@@ -1,2 +1,2 @@
1
- export * from "./types/index.mjs";
2
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -1,2 +1,2 @@
1
- export * from "./types/index.mjs";
2
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -1,4 +1,4 @@
1
- import * as Credal from "../../../index.mjs";
1
+ import type * as Credal from "../../../index.mjs";
2
2
  export interface DocumentCollectionSearchResult {
3
3
  documentId: string;
4
4
  documentName: string;
@@ -1,2 +1,2 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- import * as Credal from "../../../index.mjs";
2
+ export {};
@@ -1,4 +1,4 @@
1
- import * as Credal from "../../../index.mjs";
1
+ import type * as Credal from "../../../index.mjs";
2
2
  export interface SearchDocumentCollectionResponse {
3
3
  searchTermsUsed: string[];
4
4
  structuredFiltersApplied: Credal.SingleFieldFilter[];
@@ -1,2 +1,2 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- import * as Credal from "../../../index.mjs";
2
+ export {};
@@ -1,4 +1,4 @@
1
- import * as Credal from "../../../index.mjs";
1
+ import type * as Credal from "../../../index.mjs";
2
2
  export interface SingleFieldFilter {
3
3
  field: string;
4
4
  operator: Credal.Operator;
@@ -1,2 +1,2 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- import * as Credal from "../../../index.mjs";
2
+ export {};
@@ -1,5 +1,5 @@
1
1
  export * from "./DocumentCollectionSearchOptions.mjs";
2
- export * from "./SearchDocumentCollectionResponse.mjs";
3
2
  export * from "./DocumentCollectionSearchResult.mjs";
3
+ export * from "./SearchDocumentCollectionResponse.mjs";
4
4
  export * from "./SearchResultChunk.mjs";
5
5
  export * from "./SingleFieldFilter.mjs";
@@ -1,5 +1,5 @@
1
1
  export * from "./DocumentCollectionSearchOptions.mjs";
2
- export * from "./SearchDocumentCollectionResponse.mjs";
3
2
  export * from "./DocumentCollectionSearchResult.mjs";
3
+ export * from "./SearchDocumentCollectionResponse.mjs";
4
4
  export * from "./SearchResultChunk.mjs";
5
5
  export * from "./SingleFieldFilter.mjs";
@@ -1,6 +1,6 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
- import * as Credal from "../../../index.mjs";
3
+ import type * as Credal from "../../../index.mjs";
4
4
  export declare namespace Users {
5
5
  interface Options extends BaseClientOptions {
6
6
  }
@@ -8,10 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import * as environments from "../../../../environments.mjs";
12
- import * as core from "../../../../core/index.mjs";
13
- import * as Credal from "../../../index.mjs";
14
11
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
12
+ import * as core from "../../../../core/index.mjs";
13
+ import * as environments from "../../../../environments.mjs";
15
14
  import * as errors from "../../../../errors/index.mjs";
16
15
  export class Users {
17
16
  constructor(_options = {}) {
@@ -44,7 +43,7 @@ export class Users {
44
43
  __metadata(request, requestOptions) {
45
44
  return __awaiter(this, void 0, void 0, function* () {
46
45
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
47
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
46
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
48
47
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
49
48
  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"),
50
49
  method: "PATCH",
@@ -87,7 +86,7 @@ export class Users {
87
86
  _getAuthorizationHeader() {
88
87
  return __awaiter(this, void 0, void 0, function* () {
89
88
  var _a;
90
- const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["CREDAL_API_KEY"];
89
+ const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env.CREDAL_API_KEY;
91
90
  if (bearer == null) {
92
91
  throw new errors.CredalError({
93
92
  message: "Please specify a bearer by either passing it in to the constructor or initializing a CREDAL_API_KEY environment variable",
@@ -1,2 +1,2 @@
1
- export * from "./types/index.mjs";
2
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -1,2 +1,2 @@
1
- export * from "./types/index.mjs";
2
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -1,5 +1,5 @@
1
1
  import type { EndpointMetadata } from "./EndpointMetadata.mjs";
2
- import { Supplier } from "./Supplier.mjs";
2
+ import type { Supplier } from "./Supplier.mjs";
3
3
  type EndpointSupplierFn<T> = (arg: {
4
4
  endpointMetadata: EndpointMetadata;
5
5
  }) => T | Promise<T>;
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Supplier } from "./Supplier.mjs";
11
10
  export const EndpointSupplier = {
12
11
  get: (supplier, arg) => __awaiter(void 0, void 0, void 0, function* () {
13
12
  if (typeof supplier === "function") {
@@ -43,6 +43,7 @@ function getHeaders(args) {
43
43
  }
44
44
  export function fetcherImpl(args) {
45
45
  return __awaiter(this, void 0, void 0, function* () {
46
+ var _a;
46
47
  const url = createRequestUrl(args.url, args.queryParameters);
47
48
  const requestBody = yield getRequestBody({
48
49
  body: args.body,
@@ -74,7 +75,7 @@ export function fetcherImpl(args) {
74
75
  }
75
76
  }
76
77
  catch (error) {
77
- if (args.abortSignal != null && args.abortSignal.aborted) {
78
+ if ((_a = args.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {
78
79
  return {
79
80
  ok: false,
80
81
  error: {
@@ -25,9 +25,10 @@ export function getErrorResponseBody(response) {
25
25
  case "application/ld+json":
26
26
  case "application/problem+json":
27
27
  case "application/vnd.api+json":
28
- case "text/json":
28
+ case "text/json": {
29
29
  const text = yield response.text();
30
30
  return text.length > 0 ? fromJson(text) : undefined;
31
+ }
31
32
  default:
32
33
  if (contentType.startsWith("application/vnd.") && contentType.endsWith("+json")) {
33
34
  const text = yield response.text();
@@ -7,9 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { fromJson } from "../json.mjs";
10
11
  import { getBinaryResponse } from "./BinaryResponse.mjs";
11
12
  import { isResponseWithBody } from "./ResponseWithBody.mjs";
12
- import { fromJson } from "../json.mjs";
13
13
  export function getResponseBody(response, responseType) {
14
14
  return __awaiter(this, void 0, void 0, function* () {
15
15
  if (!isResponseWithBody(response)) {
@@ -33,10 +33,10 @@ export function getResponseBody(response, responseType) {
33
33
  const text = yield response.text();
34
34
  if (text.length > 0) {
35
35
  try {
36
- let responseBody = fromJson(text);
36
+ const responseBody = fromJson(text);
37
37
  return responseBody;
38
38
  }
39
- catch (err) {
39
+ catch (_err) {
40
40
  return {
41
41
  ok: false,
42
42
  error: {
@@ -11,7 +11,7 @@ import { anySignal, getTimeoutSignal } from "./signals.mjs";
11
11
  export const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutMs, abortSignal, withCredentials, duplex) => __awaiter(void 0, void 0, void 0, function* () {
12
12
  const signals = [];
13
13
  // Add timeout signal
14
- let timeoutAbortId = undefined;
14
+ let timeoutAbortId;
15
15
  if (timeoutMs != null) {
16
16
  const { signal, abortId } = getTimeoutSignal(timeoutMs);
17
17
  timeoutAbortId = abortId;
@@ -21,7 +21,7 @@ export const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutM
21
21
  if (abortSignal != null) {
22
22
  signals.push(abortSignal);
23
23
  }
24
- let newSignals = anySignal(signals);
24
+ const newSignals = anySignal(signals);
25
25
  const response = yield fetchFn(url, {
26
26
  method: method,
27
27
  headers,
@@ -27,12 +27,12 @@ function getRetryDelayFromHeaders(response, retryAttempt) {
27
27
  if (retryAfter) {
28
28
  // Parse as number of seconds...
29
29
  const retryAfterSeconds = parseInt(retryAfter, 10);
30
- if (!isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {
30
+ if (!Number.isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {
31
31
  return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY);
32
32
  }
33
33
  // ...or as an HTTP date; both are valid
34
34
  const retryAfterDate = new Date(retryAfter);
35
- if (!isNaN(retryAfterDate.getTime())) {
35
+ if (!Number.isNaN(retryAfterDate.getTime())) {
36
36
  const delay = retryAfterDate.getTime() - Date.now();
37
37
  if (delay > 0) {
38
38
  return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY);
@@ -43,7 +43,7 @@ function getRetryDelayFromHeaders(response, retryAttempt) {
43
43
  const rateLimitReset = response.headers.get("X-RateLimit-Reset");
44
44
  if (rateLimitReset) {
45
45
  const resetTime = parseInt(rateLimitReset, 10);
46
- if (!isNaN(resetTime)) {
46
+ if (!Number.isNaN(resetTime)) {
47
47
  // Assume Unix timestamp in epoch seconds
48
48
  const delay = resetTime * 1000 - Date.now();
49
49
  if (delay > 0) {
@@ -1,6 +1,6 @@
1
- export * from "./fetcher/index.mjs";
2
- export * from "./runtime/index.mjs";
3
- export * as url from "./url/index.mjs";
4
1
  export * from "./auth/index.mjs";
5
2
  export * from "./base64.mjs";
3
+ export * from "./fetcher/index.mjs";
4
+ export * from "./runtime/index.mjs";
6
5
  export * from "./stream/index.mjs";
6
+ export * as url from "./url/index.mjs";
@@ -1,6 +1,6 @@
1
- export * from "./fetcher/index.mjs";
2
- export * from "./runtime/index.mjs";
3
- export * as url from "./url/index.mjs";
4
1
  export * from "./auth/index.mjs";
5
2
  export * from "./base64.mjs";
3
+ export * from "./fetcher/index.mjs";
4
+ export * from "./runtime/index.mjs";
6
5
  export * from "./stream/index.mjs";
6
+ export * as url from "./url/index.mjs";
@@ -33,6 +33,7 @@ export declare class Stream<T> implements AsyncIterable<T> {
33
33
  private messageTerminator;
34
34
  private streamTerminator;
35
35
  private controller;
36
+ private decoder;
36
37
  constructor({ stream, parse, eventShape, signal }: Stream.Args & {
37
38
  parse: (val: unknown) => Promise<T>;
38
39
  });
@@ -43,6 +43,10 @@ export class Stream {
43
43
  this.messageTerminator = eventShape.messageTerminator;
44
44
  }
45
45
  signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", () => this.controller.abort());
46
+ // Initialize shared TextDecoder
47
+ if (typeof TextDecoder !== "undefined") {
48
+ this.decoder = new TextDecoder("utf-8");
49
+ }
46
50
  }
47
51
  iterMessages() {
48
52
  return __asyncGenerator(this, arguments, function* iterMessages_1() {
@@ -59,7 +63,7 @@ export class Stream {
59
63
  buf += this.decodeChunk(chunk);
60
64
  let terminatorIndex;
61
65
  while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
62
- let line = buf.slice(0, terminatorIndex + 1);
66
+ let line = buf.slice(0, terminatorIndex);
63
67
  buf = buf.slice(terminatorIndex + this.messageTerminator.length);
64
68
  if (!line.trim()) {
65
69
  continue;
@@ -112,10 +116,9 @@ export class Stream {
112
116
  }
113
117
  decodeChunk(chunk) {
114
118
  let decoded = "";
115
- // If TextDecoder is present, use it
116
- if (typeof TextDecoder !== "undefined") {
117
- const decoder = new TextDecoder("utf8");
118
- decoded += decoder.decode(chunk);
119
+ // If TextDecoder is available, use the streaming decoder instance
120
+ if (this.decoder != null) {
121
+ decoded += this.decoder.decode(chunk, { stream: true });
119
122
  }
120
123
  // Buffer is present in Node.js environment
121
124
  else if (RUNTIME.type === "node" && typeof chunk !== "undefined") {
@@ -0,0 +1 @@
1
+ export declare function encodePathParam(param: unknown): string;
@@ -0,0 +1,18 @@
1
+ export function encodePathParam(param) {
2
+ if (param === null) {
3
+ return "null";
4
+ }
5
+ const typeofParam = typeof param;
6
+ switch (typeofParam) {
7
+ case "undefined":
8
+ return "undefined";
9
+ case "string":
10
+ case "number":
11
+ case "boolean":
12
+ break;
13
+ default:
14
+ param = String(param);
15
+ break;
16
+ }
17
+ return encodeURIComponent(param);
18
+ }
@@ -1,2 +1,3 @@
1
+ export { encodePathParam } from "./encodePathParam.mjs";
1
2
  export { join } from "./join.mjs";
2
3
  export { toQueryString } from "./qs.mjs";
@@ -1,2 +1,3 @@
1
+ export { encodePathParam } from "./encodePathParam.mjs";
1
2
  export { join } from "./join.mjs";
2
3
  export { toQueryString } from "./qs.mjs";
@@ -15,7 +15,7 @@ export function join(base, ...segments) {
15
15
  return joinPath(base, ...segments);
16
16
  }
17
17
  const lastSegment = segments[segments.length - 1];
18
- const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith("/");
18
+ const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
19
19
  for (const segment of segments) {
20
20
  const cleanSegment = trimSlashes(segment);
21
21
  if (cleanSegment) {
@@ -35,7 +35,7 @@ function joinPath(base, ...segments) {
35
35
  }
36
36
  let result = base;
37
37
  const lastSegment = segments[segments.length - 1];
38
- const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith("/");
38
+ const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
39
39
  for (const segment of segments) {
40
40
  const cleanSegment = trimSlashes(segment);
41
41
  if (cleanSegment) {
@@ -51,7 +51,7 @@ function joinPathSegments(left, right) {
51
51
  if (left.endsWith("/")) {
52
52
  return left + right;
53
53
  }
54
- return left + "/" + right;
54
+ return `${left}/${right}`;
55
55
  }
56
56
  function trimSlashes(str) {
57
57
  if (!str)
@@ -1,4 +1,4 @@
1
- import * as core from "../core/index.mjs";
1
+ import type * as core from "../core/index.mjs";
2
2
  export declare class CredalError extends Error {
3
3
  readonly statusCode?: number;
4
4
  readonly body?: unknown;
@@ -1,5 +1,4 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- import * as core from "../core/index.mjs";
3
2
  import { toJson } from "../core/json.mjs";
4
3
  export class CredalError extends Error {
5
4
  constructor({ message, statusCode, body, rawResponse, }) {
@@ -11,7 +10,7 @@ export class CredalError extends Error {
11
10
  }
12
11
  }
13
12
  function buildMessage({ message, statusCode, body, }) {
14
- let lines = [];
13
+ const lines = [];
15
14
  if (message != null) {
16
15
  lines.push(message);
17
16
  }
@@ -1,5 +1,5 @@
1
1
  export * as Credal from "./api/index.mjs";
2
- export { CredalError, CredalTimeoutError } from "./errors/index.mjs";
3
- export { type BaseClientOptions, type BaseRequestOptions } from "./BaseClient.mjs";
2
+ export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
4
3
  export { CredalClient } from "./Client.mjs";
5
4
  export { CredalEnvironment } from "./environments.mjs";
5
+ export { CredalError, CredalTimeoutError } from "./errors/index.mjs";
@@ -1,5 +1,4 @@
1
1
  export * as Credal from "./api/index.mjs";
2
- export { CredalError, CredalTimeoutError } from "./errors/index.mjs";
3
- export {} from "./BaseClient.mjs";
4
2
  export { CredalClient } from "./Client.mjs";
5
3
  export { CredalEnvironment } from "./environments.mjs";
4
+ export { CredalError, CredalTimeoutError } from "./errors/index.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.8";
1
+ export declare const SDK_VERSION = "0.1.9";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.1.8";
1
+ export const SDK_VERSION = "0.1.9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/sdk",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "private": false,
5
5
  "repository": "github:credal-ai/credal-typescript-sdk",
6
6
  "type": "commonjs",
@@ -29,7 +29,12 @@
29
29
  "LICENSE"
30
30
  ],
31
31
  "scripts": {
32
- "format": "prettier . --write --ignore-unknown",
32
+ "format": "biome format --write --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
33
+ "format:check": "biome format --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
34
+ "lint": "biome lint --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
35
+ "lint:fix": "biome lint --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
36
+ "check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
37
+ "check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
33
38
  "build": "pnpm build:cjs && pnpm build:esm",
34
39
  "build:cjs": "tsc --project ./tsconfig.cjs.json",
35
40
  "build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm",
@@ -43,8 +48,8 @@
43
48
  "vitest": "^3.2.4",
44
49
  "msw": "2.11.2",
45
50
  "@types/node": "^18.19.70",
46
- "prettier": "^3.4.2",
47
- "typescript": "~5.7.2"
51
+ "typescript": "~5.7.2",
52
+ "@biomejs/biome": "2.3.1"
48
53
  },
49
54
  "browser": {
50
55
  "fs": false,