@credal/sdk 0.0.13 → 0.0.15

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 (332) hide show
  1. package/Client.d.ts +3 -0
  2. package/api/resources/common/types/index.d.ts +1 -0
  3. package/api/resources/common/types/index.js +1 -0
  4. package/api/resources/copilots/client/Client.d.ts +25 -11
  5. package/api/resources/copilots/client/Client.js +119 -37
  6. package/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +1 -1
  7. package/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
  8. package/api/resources/copilots/client/requests/SendMessageRequest.d.ts +14 -1
  9. package/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +60 -0
  10. package/api/resources/copilots/client/requests/StreamMessageRequest.js +5 -0
  11. package/api/resources/copilots/client/requests/index.d.ts +1 -0
  12. package/api/resources/copilots/types/BlockedChunk.d.ts +10 -0
  13. package/api/resources/copilots/types/BlockedChunk.js +5 -0
  14. package/api/resources/copilots/types/BooleanFieldSchema.d.ts +8 -0
  15. package/api/resources/copilots/types/BooleanFieldSchema.js +5 -0
  16. package/api/resources/copilots/types/CollectionFilteredData.d.ts +9 -0
  17. package/api/resources/copilots/types/CollectionFilteredData.js +5 -0
  18. package/api/resources/copilots/types/DataChunk.d.ts +6 -0
  19. package/api/resources/copilots/types/DataChunk.js +5 -0
  20. package/api/resources/copilots/types/DataFilter.d.ts +9 -0
  21. package/api/resources/copilots/types/DataFilter.js +5 -0
  22. package/api/resources/copilots/types/DatetimeFieldSchema.d.ts +9 -0
  23. package/api/resources/copilots/types/DatetimeFieldSchema.js +5 -0
  24. package/api/resources/copilots/types/Filter.d.ts +19 -0
  25. package/api/resources/copilots/types/Filter.js +5 -0
  26. package/api/resources/copilots/types/FinalChunk.d.ts +7 -0
  27. package/api/resources/copilots/types/FinalChunk.js +5 -0
  28. package/api/resources/copilots/types/InitialChunk.d.ts +10 -0
  29. package/api/resources/copilots/types/InitialChunk.js +5 -0
  30. package/api/resources/copilots/types/InputVariable.d.ts +7 -0
  31. package/api/resources/copilots/types/InputVariable.js +5 -0
  32. package/api/resources/copilots/types/MessageReply.d.ts +1 -0
  33. package/api/resources/copilots/types/NumberFieldSchema.d.ts +9 -0
  34. package/api/resources/copilots/types/NumberFieldSchema.js +5 -0
  35. package/api/resources/copilots/types/StreamingChunk.d.ts +5 -0
  36. package/api/resources/copilots/types/StreamingChunk.js +5 -0
  37. package/api/resources/copilots/types/StringFieldSchema.d.ts +9 -0
  38. package/api/resources/copilots/types/StringFieldSchema.js +5 -0
  39. package/api/resources/copilots/types/WebSearchResult.d.ts +8 -0
  40. package/api/resources/copilots/types/WebSearchResult.js +5 -0
  41. package/api/resources/copilots/types/index.d.ts +14 -0
  42. package/api/resources/copilots/types/index.js +14 -0
  43. package/api/resources/documentCatalog/client/Client.d.ts +7 -4
  44. package/api/resources/documentCatalog/client/Client.js +13 -13
  45. package/api/resources/documentCollections/client/Client.d.ts +14 -11
  46. package/api/resources/documentCollections/client/Client.js +39 -29
  47. package/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +2 -2
  48. package/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +1 -1
  49. package/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +2 -2
  50. package/api/resources/permissionsService/client/Client.d.ts +8 -5
  51. package/api/resources/permissionsService/client/Client.js +20 -14
  52. package/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +1 -1
  53. package/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +1 -1
  54. package/api/resources/search/client/Client.d.ts +5 -2
  55. package/api/resources/search/client/Client.js +7 -7
  56. package/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
  57. package/api/resources/search/types/index.d.ts +0 -1
  58. package/api/resources/search/types/index.js +0 -1
  59. package/api/resources/users/client/Client.d.ts +4 -1
  60. package/api/resources/users/client/Client.js +5 -3
  61. package/core/fetcher/Fetcher.d.ts +4 -1
  62. package/core/fetcher/Fetcher.js +19 -176
  63. package/core/fetcher/createRequestUrl.d.ts +1 -0
  64. package/core/fetcher/createRequestUrl.js +13 -0
  65. package/core/fetcher/getFetchFn.d.ts +4 -0
  66. package/core/fetcher/getFetchFn.js +59 -0
  67. package/core/fetcher/getRequestBody.d.ts +7 -0
  68. package/core/fetcher/getRequestBody.js +23 -0
  69. package/core/fetcher/getResponseBody.d.ts +1 -0
  70. package/core/fetcher/getResponseBody.js +55 -0
  71. package/core/fetcher/makeRequest.d.ts +1 -0
  72. package/core/fetcher/makeRequest.js +42 -0
  73. package/core/fetcher/requestWithRetries.d.ts +1 -0
  74. package/core/fetcher/requestWithRetries.js +41 -0
  75. package/core/fetcher/signals.d.ts +12 -0
  76. package/core/fetcher/signals.js +37 -0
  77. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  78. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  79. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  80. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
  81. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  82. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  83. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  84. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
  85. package/core/index.d.ts +1 -0
  86. package/core/index.js +1 -0
  87. package/core/runtime/runtime.d.ts +2 -1
  88. package/core/runtime/runtime.js +12 -1
  89. package/core/schemas/Schema.d.ts +8 -4
  90. package/core/schemas/Schema.js +1 -0
  91. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  92. package/core/schemas/builders/bigint/bigint.js +50 -0
  93. package/core/schemas/builders/bigint/index.d.ts +1 -0
  94. package/core/schemas/builders/bigint/index.js +5 -0
  95. package/core/schemas/builders/index.d.ts +1 -0
  96. package/core/schemas/builders/index.js +1 -0
  97. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  98. package/core/schemas/builders/lazy/lazy.js +8 -19
  99. package/core/schemas/builders/lazy/lazyObject.js +1 -10
  100. package/core/schemas/builders/list/list.js +31 -44
  101. package/core/schemas/builders/object/object.js +90 -111
  102. package/core/schemas/builders/object/types.d.ts +2 -2
  103. package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  104. package/core/schemas/builders/record/record.js +49 -60
  105. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  106. package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  107. package/core/schemas/builders/set/set.js +6 -15
  108. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  109. package/core/schemas/builders/union/union.js +51 -62
  110. package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  111. package/core/schemas/utils/maybeSkipValidation.js +3 -12
  112. package/core/streaming-fetcher/Stream.d.ts +48 -0
  113. package/core/streaming-fetcher/Stream.js +170 -0
  114. package/core/streaming-fetcher/index.d.ts +1 -0
  115. package/core/streaming-fetcher/index.js +5 -0
  116. package/dist/Client.d.ts +3 -0
  117. package/dist/api/resources/common/types/index.d.ts +1 -0
  118. package/dist/api/resources/common/types/index.js +1 -0
  119. package/dist/api/resources/copilots/client/Client.d.ts +25 -11
  120. package/dist/api/resources/copilots/client/Client.js +119 -37
  121. package/dist/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +1 -1
  122. package/dist/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
  123. package/dist/api/resources/copilots/client/requests/SendMessageRequest.d.ts +14 -1
  124. package/dist/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +60 -0
  125. package/dist/api/resources/copilots/client/requests/StreamMessageRequest.js +5 -0
  126. package/dist/api/resources/copilots/client/requests/index.d.ts +1 -0
  127. package/dist/api/resources/copilots/types/BlockedChunk.d.ts +10 -0
  128. package/dist/api/resources/copilots/types/BlockedChunk.js +5 -0
  129. package/dist/api/resources/copilots/types/BooleanFieldSchema.d.ts +8 -0
  130. package/dist/api/resources/copilots/types/BooleanFieldSchema.js +5 -0
  131. package/dist/api/resources/copilots/types/CollectionFilteredData.d.ts +9 -0
  132. package/dist/api/resources/copilots/types/CollectionFilteredData.js +5 -0
  133. package/dist/api/resources/copilots/types/DataChunk.d.ts +6 -0
  134. package/dist/api/resources/copilots/types/DataChunk.js +5 -0
  135. package/dist/api/resources/copilots/types/DataFilter.d.ts +9 -0
  136. package/dist/api/resources/copilots/types/DataFilter.js +5 -0
  137. package/dist/api/resources/copilots/types/DatetimeFieldSchema.d.ts +9 -0
  138. package/dist/api/resources/copilots/types/DatetimeFieldSchema.js +5 -0
  139. package/dist/api/resources/copilots/types/Filter.d.ts +19 -0
  140. package/dist/api/resources/copilots/types/Filter.js +5 -0
  141. package/dist/api/resources/copilots/types/FinalChunk.d.ts +7 -0
  142. package/dist/api/resources/copilots/types/FinalChunk.js +5 -0
  143. package/dist/api/resources/copilots/types/InitialChunk.d.ts +10 -0
  144. package/dist/api/resources/copilots/types/InitialChunk.js +5 -0
  145. package/dist/api/resources/copilots/types/InputVariable.d.ts +7 -0
  146. package/dist/api/resources/copilots/types/InputVariable.js +5 -0
  147. package/dist/api/resources/copilots/types/MessageReply.d.ts +1 -0
  148. package/dist/api/resources/copilots/types/NumberFieldSchema.d.ts +9 -0
  149. package/dist/api/resources/copilots/types/NumberFieldSchema.js +5 -0
  150. package/dist/api/resources/copilots/types/StreamingChunk.d.ts +5 -0
  151. package/dist/api/resources/copilots/types/StreamingChunk.js +5 -0
  152. package/dist/api/resources/copilots/types/StringFieldSchema.d.ts +9 -0
  153. package/dist/api/resources/copilots/types/StringFieldSchema.js +5 -0
  154. package/dist/api/resources/copilots/types/WebSearchResult.d.ts +8 -0
  155. package/dist/api/resources/copilots/types/WebSearchResult.js +5 -0
  156. package/dist/api/resources/copilots/types/index.d.ts +14 -0
  157. package/dist/api/resources/copilots/types/index.js +14 -0
  158. package/dist/api/resources/documentCatalog/client/Client.d.ts +7 -4
  159. package/dist/api/resources/documentCatalog/client/Client.js +13 -13
  160. package/dist/api/resources/documentCollections/client/Client.d.ts +14 -11
  161. package/dist/api/resources/documentCollections/client/Client.js +39 -29
  162. package/dist/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +2 -2
  163. package/dist/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +1 -1
  164. package/dist/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +2 -2
  165. package/dist/api/resources/permissionsService/client/Client.d.ts +8 -5
  166. package/dist/api/resources/permissionsService/client/Client.js +20 -14
  167. package/dist/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +1 -1
  168. package/dist/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +1 -1
  169. package/dist/api/resources/search/client/Client.d.ts +5 -2
  170. package/dist/api/resources/search/client/Client.js +7 -7
  171. package/dist/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
  172. package/dist/api/resources/search/types/index.d.ts +0 -1
  173. package/dist/api/resources/search/types/index.js +0 -1
  174. package/dist/api/resources/users/client/Client.d.ts +4 -1
  175. package/dist/api/resources/users/client/Client.js +5 -3
  176. package/dist/core/fetcher/Fetcher.d.ts +4 -1
  177. package/dist/core/fetcher/Fetcher.js +19 -176
  178. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  179. package/dist/core/fetcher/createRequestUrl.js +13 -0
  180. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  181. package/dist/core/fetcher/getFetchFn.js +59 -0
  182. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  183. package/dist/core/fetcher/getRequestBody.js +23 -0
  184. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  185. package/dist/core/fetcher/getResponseBody.js +55 -0
  186. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  187. package/dist/core/fetcher/makeRequest.js +42 -0
  188. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  189. package/dist/core/fetcher/requestWithRetries.js +41 -0
  190. package/dist/core/fetcher/signals.d.ts +12 -0
  191. package/dist/core/fetcher/signals.js +37 -0
  192. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  193. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  194. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  195. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
  196. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  197. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  198. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  199. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
  200. package/dist/core/index.d.ts +1 -0
  201. package/dist/core/index.js +1 -0
  202. package/dist/core/runtime/runtime.d.ts +2 -1
  203. package/dist/core/runtime/runtime.js +12 -1
  204. package/dist/core/schemas/Schema.d.ts +8 -4
  205. package/dist/core/schemas/Schema.js +1 -0
  206. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  207. package/dist/core/schemas/builders/bigint/bigint.js +50 -0
  208. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  209. package/dist/core/schemas/builders/bigint/index.js +5 -0
  210. package/dist/core/schemas/builders/index.d.ts +1 -0
  211. package/dist/core/schemas/builders/index.js +1 -0
  212. package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
  213. package/dist/core/schemas/builders/lazy/lazy.js +8 -19
  214. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
  215. package/dist/core/schemas/builders/list/list.js +31 -44
  216. package/dist/core/schemas/builders/object/object.js +90 -111
  217. package/dist/core/schemas/builders/object/types.d.ts +2 -2
  218. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  219. package/dist/core/schemas/builders/record/record.js +49 -60
  220. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  221. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  222. package/dist/core/schemas/builders/set/set.js +6 -15
  223. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  224. package/dist/core/schemas/builders/union/union.js +51 -62
  225. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  226. package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
  227. package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
  228. package/dist/core/streaming-fetcher/Stream.js +170 -0
  229. package/dist/core/streaming-fetcher/index.d.ts +1 -0
  230. package/dist/core/streaming-fetcher/index.js +5 -0
  231. package/dist/serialization/resources/common/types/index.d.ts +1 -0
  232. package/dist/serialization/resources/common/types/index.js +1 -0
  233. package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -0
  234. package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.js +2 -0
  235. package/dist/serialization/resources/copilots/client/requests/StreamMessageRequest.d.ts +17 -0
  236. package/dist/serialization/resources/copilots/client/requests/StreamMessageRequest.js +38 -0
  237. package/dist/serialization/resources/copilots/client/requests/index.d.ts +1 -0
  238. package/dist/serialization/resources/copilots/client/requests/index.js +3 -1
  239. package/dist/serialization/resources/copilots/types/BlockedChunk.d.ts +16 -0
  240. package/dist/serialization/resources/copilots/types/BlockedChunk.js +37 -0
  241. package/dist/serialization/resources/copilots/types/BooleanFieldSchema.d.ts +14 -0
  242. package/dist/serialization/resources/copilots/types/BooleanFieldSchema.js +35 -0
  243. package/dist/serialization/resources/copilots/types/CollectionFilteredData.d.ts +15 -0
  244. package/dist/serialization/resources/copilots/types/CollectionFilteredData.js +36 -0
  245. package/dist/serialization/resources/copilots/types/DataChunk.d.ts +12 -0
  246. package/dist/serialization/resources/copilots/types/DataChunk.js +33 -0
  247. package/dist/serialization/resources/copilots/types/DataFilter.d.ts +15 -0
  248. package/dist/serialization/resources/copilots/types/DataFilter.js +36 -0
  249. package/dist/serialization/resources/copilots/types/DatetimeFieldSchema.d.ts +15 -0
  250. package/dist/serialization/resources/copilots/types/DatetimeFieldSchema.js +36 -0
  251. package/dist/serialization/resources/copilots/types/Filter.d.ts +26 -0
  252. package/dist/serialization/resources/copilots/types/Filter.js +45 -0
  253. package/dist/serialization/resources/copilots/types/FinalChunk.d.ts +13 -0
  254. package/dist/serialization/resources/copilots/types/FinalChunk.js +34 -0
  255. package/dist/serialization/resources/copilots/types/InitialChunk.d.ts +17 -0
  256. package/dist/serialization/resources/copilots/types/InitialChunk.js +38 -0
  257. package/dist/serialization/resources/copilots/types/InputVariable.d.ts +13 -0
  258. package/dist/serialization/resources/copilots/types/InputVariable.js +34 -0
  259. package/dist/serialization/resources/copilots/types/MessageReply.d.ts +2 -0
  260. package/dist/serialization/resources/copilots/types/MessageReply.js +2 -0
  261. package/dist/serialization/resources/copilots/types/NumberFieldSchema.d.ts +15 -0
  262. package/dist/serialization/resources/copilots/types/NumberFieldSchema.js +36 -0
  263. package/dist/serialization/resources/copilots/types/StreamingChunk.d.ts +14 -0
  264. package/dist/serialization/resources/copilots/types/StreamingChunk.js +35 -0
  265. package/dist/serialization/resources/copilots/types/StringFieldSchema.d.ts +15 -0
  266. package/dist/serialization/resources/copilots/types/StringFieldSchema.js +36 -0
  267. package/dist/serialization/resources/copilots/types/WebSearchResult.d.ts +14 -0
  268. package/dist/serialization/resources/copilots/types/WebSearchResult.js +35 -0
  269. package/dist/serialization/resources/copilots/types/index.d.ts +14 -0
  270. package/dist/serialization/resources/copilots/types/index.js +14 -0
  271. package/dist/serialization/resources/search/types/SingleFieldFilter.d.ts +1 -1
  272. package/dist/serialization/resources/search/types/SingleFieldFilter.js +1 -1
  273. package/dist/serialization/resources/search/types/index.d.ts +0 -1
  274. package/dist/serialization/resources/search/types/index.js +0 -1
  275. package/dist/version.d.ts +1 -0
  276. package/dist/version.js +4 -0
  277. package/package.json +12 -2
  278. package/reference.md +203 -511
  279. package/serialization/resources/common/types/index.d.ts +1 -0
  280. package/serialization/resources/common/types/index.js +1 -0
  281. package/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -0
  282. package/serialization/resources/copilots/client/requests/SendMessageRequest.js +2 -0
  283. package/serialization/resources/copilots/client/requests/StreamMessageRequest.d.ts +17 -0
  284. package/serialization/resources/copilots/client/requests/StreamMessageRequest.js +38 -0
  285. package/serialization/resources/copilots/client/requests/index.d.ts +1 -0
  286. package/serialization/resources/copilots/client/requests/index.js +3 -1
  287. package/serialization/resources/copilots/types/BlockedChunk.d.ts +16 -0
  288. package/serialization/resources/copilots/types/BlockedChunk.js +37 -0
  289. package/serialization/resources/copilots/types/BooleanFieldSchema.d.ts +14 -0
  290. package/serialization/resources/copilots/types/BooleanFieldSchema.js +35 -0
  291. package/serialization/resources/copilots/types/CollectionFilteredData.d.ts +15 -0
  292. package/serialization/resources/copilots/types/CollectionFilteredData.js +36 -0
  293. package/serialization/resources/copilots/types/DataChunk.d.ts +12 -0
  294. package/serialization/resources/copilots/types/DataChunk.js +33 -0
  295. package/serialization/resources/copilots/types/DataFilter.d.ts +15 -0
  296. package/serialization/resources/copilots/types/DataFilter.js +36 -0
  297. package/serialization/resources/copilots/types/DatetimeFieldSchema.d.ts +15 -0
  298. package/serialization/resources/copilots/types/DatetimeFieldSchema.js +36 -0
  299. package/serialization/resources/copilots/types/Filter.d.ts +26 -0
  300. package/serialization/resources/copilots/types/Filter.js +45 -0
  301. package/serialization/resources/copilots/types/FinalChunk.d.ts +13 -0
  302. package/serialization/resources/copilots/types/FinalChunk.js +34 -0
  303. package/serialization/resources/copilots/types/InitialChunk.d.ts +17 -0
  304. package/serialization/resources/copilots/types/InitialChunk.js +38 -0
  305. package/serialization/resources/copilots/types/InputVariable.d.ts +13 -0
  306. package/serialization/resources/copilots/types/InputVariable.js +34 -0
  307. package/serialization/resources/copilots/types/MessageReply.d.ts +2 -0
  308. package/serialization/resources/copilots/types/MessageReply.js +2 -0
  309. package/serialization/resources/copilots/types/NumberFieldSchema.d.ts +15 -0
  310. package/serialization/resources/copilots/types/NumberFieldSchema.js +36 -0
  311. package/serialization/resources/copilots/types/StreamingChunk.d.ts +14 -0
  312. package/serialization/resources/copilots/types/StreamingChunk.js +35 -0
  313. package/serialization/resources/copilots/types/StringFieldSchema.d.ts +15 -0
  314. package/serialization/resources/copilots/types/StringFieldSchema.js +36 -0
  315. package/serialization/resources/copilots/types/WebSearchResult.d.ts +14 -0
  316. package/serialization/resources/copilots/types/WebSearchResult.js +35 -0
  317. package/serialization/resources/copilots/types/index.d.ts +14 -0
  318. package/serialization/resources/copilots/types/index.js +14 -0
  319. package/serialization/resources/search/types/SingleFieldFilter.d.ts +1 -1
  320. package/serialization/resources/search/types/SingleFieldFilter.js +1 -1
  321. package/serialization/resources/search/types/index.d.ts +0 -1
  322. package/serialization/resources/search/types/index.js +0 -1
  323. package/version.d.ts +1 -0
  324. package/version.js +4 -0
  325. /package/api/resources/{search → common}/types/Operator.d.ts +0 -0
  326. /package/api/resources/{search → common}/types/Operator.js +0 -0
  327. /package/dist/api/resources/{search → common}/types/Operator.d.ts +0 -0
  328. /package/dist/api/resources/{search → common}/types/Operator.js +0 -0
  329. /package/dist/serialization/resources/{search → common}/types/Operator.d.ts +0 -0
  330. /package/dist/serialization/resources/{search → common}/types/Operator.js +0 -0
  331. /package/serialization/resources/{search → common}/types/Operator.d.ts +0 -0
  332. /package/serialization/resources/{search → common}/types/Operator.js +0 -0
@@ -10,5 +10,6 @@ export interface MessageReply {
10
10
  insertedAuditLog: Credal.InsertedAuditLog;
11
11
  referencedSources: Credal.ReferencedSource[];
12
12
  sourcesInDataContext: Credal.ReferencedSource[];
13
+ webSearchResults: Credal.WebSearchResult[];
13
14
  messageId: string;
14
15
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface NumberFieldSchema {
6
+ field: string;
7
+ operator: Credal.Operator;
8
+ value: number;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export declare type StreamingChunk = Credal.InitialChunk | Credal.DataChunk | Credal.FinalChunk | Credal.BlockedChunk;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index";
5
+ export interface StringFieldSchema {
6
+ field: string;
7
+ operator: Credal.Operator;
8
+ value: string;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface WebSearchResult {
5
+ title: string;
6
+ url: string;
7
+ content: string;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,10 @@
1
1
  export * from "./CreateConversationResponse";
2
2
  export * from "./SendAgentMessageResponse";
3
3
  export * from "./SendMessageResponse";
4
+ export * from "./InputVariable";
4
5
  export * from "./MessageReply";
5
6
  export * from "./ReferencedSource";
7
+ export * from "./WebSearchResult";
6
8
  export * from "./ResponseChunk";
7
9
  export * from "./InsertedAuditLog";
8
10
  export * from "./MessageBlocked";
@@ -13,3 +15,15 @@ export * from "./Configuration";
13
15
  export * from "./AiEndpointConfiguration";
14
16
  export * from "./CreateCopilotResponse";
15
17
  export * from "./DeleteCopilotResponse";
18
+ export * from "./StringFieldSchema";
19
+ export * from "./NumberFieldSchema";
20
+ export * from "./BooleanFieldSchema";
21
+ export * from "./DatetimeFieldSchema";
22
+ export * from "./Filter";
23
+ export * from "./CollectionFilteredData";
24
+ export * from "./DataFilter";
25
+ export * from "./InitialChunk";
26
+ export * from "./DataChunk";
27
+ export * from "./FinalChunk";
28
+ export * from "./BlockedChunk";
29
+ export * from "./StreamingChunk";
@@ -17,8 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CreateConversationResponse"), exports);
18
18
  __exportStar(require("./SendAgentMessageResponse"), exports);
19
19
  __exportStar(require("./SendMessageResponse"), exports);
20
+ __exportStar(require("./InputVariable"), exports);
20
21
  __exportStar(require("./MessageReply"), exports);
21
22
  __exportStar(require("./ReferencedSource"), exports);
23
+ __exportStar(require("./WebSearchResult"), exports);
22
24
  __exportStar(require("./ResponseChunk"), exports);
23
25
  __exportStar(require("./InsertedAuditLog"), exports);
24
26
  __exportStar(require("./MessageBlocked"), exports);
@@ -29,3 +31,15 @@ __exportStar(require("./Configuration"), exports);
29
31
  __exportStar(require("./AiEndpointConfiguration"), exports);
30
32
  __exportStar(require("./CreateCopilotResponse"), exports);
31
33
  __exportStar(require("./DeleteCopilotResponse"), exports);
34
+ __exportStar(require("./StringFieldSchema"), exports);
35
+ __exportStar(require("./NumberFieldSchema"), exports);
36
+ __exportStar(require("./BooleanFieldSchema"), exports);
37
+ __exportStar(require("./DatetimeFieldSchema"), exports);
38
+ __exportStar(require("./Filter"), exports);
39
+ __exportStar(require("./CollectionFilteredData"), exports);
40
+ __exportStar(require("./DataFilter"), exports);
41
+ __exportStar(require("./InitialChunk"), exports);
42
+ __exportStar(require("./DataChunk"), exports);
43
+ __exportStar(require("./FinalChunk"), exports);
44
+ __exportStar(require("./BlockedChunk"), exports);
45
+ __exportStar(require("./StreamingChunk"), exports);
@@ -11,8 +11,11 @@ export declare namespace DocumentCatalog {
11
11
  fetcher?: core.FetchFunction;
12
12
  }
13
13
  interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
14
15
  timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
15
17
  maxRetries?: number;
18
+ /** A hook to abort the request. */
16
19
  abortSignal?: AbortSignal;
17
20
  }
18
21
  }
@@ -24,7 +27,7 @@ export declare class DocumentCatalog {
24
27
  * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
25
28
  *
26
29
  * @example
27
- * await credal.documentCatalog.uploadDocumentContents({
30
+ * await client.documentCatalog.uploadDocumentContents({
28
31
  * documentName: "My Document",
29
32
  * documentContents: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
30
33
  * documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
@@ -40,7 +43,7 @@ export declare class DocumentCatalog {
40
43
  * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
41
44
  *
42
45
  * @example
43
- * await credal.documentCatalog.metadata({
46
+ * await client.documentCatalog.metadata({
44
47
  * sources: [{
45
48
  * metadata: {
46
49
  * "Department": "HR",
@@ -49,7 +52,7 @@ export declare class DocumentCatalog {
49
52
  * resourceIdentifier: {
50
53
  * type: "external-resource-id",
51
54
  * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
52
- * resourceType: Credal.ResourceType.GoogleDriveItem
55
+ * resourceType: "GOOGLE_DRIVE_ITEM"
53
56
  * }
54
57
  * }, {
55
58
  * metadata: {
@@ -59,7 +62,7 @@ export declare class DocumentCatalog {
59
62
  * resourceIdentifier: {
60
63
  * type: "external-resource-id",
61
64
  * externalResourceId: "123456",
62
- * resourceType: Credal.ResourceType.ZendeskTicket
65
+ * resourceType: "ZENDESK_TICKET"
63
66
  * }
64
67
  * }],
65
68
  * uploadAsUserEmail: "ben@credal.ai"
@@ -53,7 +53,7 @@ class DocumentCatalog {
53
53
  * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
54
54
  *
55
55
  * @example
56
- * await credal.documentCatalog.uploadDocumentContents({
56
+ * await client.documentCatalog.uploadDocumentContents({
57
57
  * documentName: "My Document",
58
58
  * documentContents: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
59
59
  * documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
@@ -71,20 +71,20 @@ class DocumentCatalog {
71
71
  Authorization: yield this._getAuthorizationHeader(),
72
72
  "X-Fern-Language": "JavaScript",
73
73
  "X-Fern-SDK-Name": "@credal/sdk",
74
- "X-Fern-SDK-Version": "0.0.13",
74
+ "X-Fern-SDK-Version": "0.0.15",
75
+ "User-Agent": "@credal/sdk/0.0.15",
75
76
  "X-Fern-Runtime": core.RUNTIME.type,
76
77
  "X-Fern-Runtime-Version": core.RUNTIME.version,
77
78
  },
78
79
  contentType: "application/json",
79
- body: yield serializers.UploadDocumentContentsRequest.jsonOrThrow(request, {
80
- unrecognizedObjectKeys: "strip",
81
- }),
80
+ requestType: "json",
81
+ body: serializers.UploadDocumentContentsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
83
83
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
84
84
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
85
  });
86
86
  if (_response.ok) {
87
- return yield serializers.UploadDocumentResponse.parseOrThrow(_response.body, {
87
+ return serializers.UploadDocumentResponse.parseOrThrow(_response.body, {
88
88
  unrecognizedObjectKeys: "passthrough",
89
89
  allowUnrecognizedUnionMembers: true,
90
90
  allowUnrecognizedEnumValues: true,
@@ -119,7 +119,7 @@ class DocumentCatalog {
119
119
  * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
120
120
  *
121
121
  * @example
122
- * await credal.documentCatalog.metadata({
122
+ * await client.documentCatalog.metadata({
123
123
  * sources: [{
124
124
  * metadata: {
125
125
  * "Department": "HR",
@@ -128,7 +128,7 @@ class DocumentCatalog {
128
128
  * resourceIdentifier: {
129
129
  * type: "external-resource-id",
130
130
  * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
131
- * resourceType: Credal.ResourceType.GoogleDriveItem
131
+ * resourceType: "GOOGLE_DRIVE_ITEM"
132
132
  * }
133
133
  * }, {
134
134
  * metadata: {
@@ -138,7 +138,7 @@ class DocumentCatalog {
138
138
  * resourceIdentifier: {
139
139
  * type: "external-resource-id",
140
140
  * externalResourceId: "123456",
141
- * resourceType: Credal.ResourceType.ZendeskTicket
141
+ * resourceType: "ZENDESK_TICKET"
142
142
  * }
143
143
  * }],
144
144
  * uploadAsUserEmail: "ben@credal.ai"
@@ -154,14 +154,14 @@ class DocumentCatalog {
154
154
  Authorization: yield this._getAuthorizationHeader(),
155
155
  "X-Fern-Language": "JavaScript",
156
156
  "X-Fern-SDK-Name": "@credal/sdk",
157
- "X-Fern-SDK-Version": "0.0.13",
157
+ "X-Fern-SDK-Version": "0.0.15",
158
+ "User-Agent": "@credal/sdk/0.0.15",
158
159
  "X-Fern-Runtime": core.RUNTIME.type,
159
160
  "X-Fern-Runtime-Version": core.RUNTIME.version,
160
161
  },
161
162
  contentType: "application/json",
162
- body: yield serializers.DocumentMetadataPatchRequest.jsonOrThrow(request, {
163
- unrecognizedObjectKeys: "strip",
164
- }),
163
+ requestType: "json",
164
+ body: serializers.DocumentMetadataPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
165
165
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
166
166
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
167
167
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -11,8 +11,11 @@ export declare namespace DocumentCollections {
11
11
  fetcher?: core.FetchFunction;
12
12
  }
13
13
  interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
14
15
  timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
15
17
  maxRetries?: number;
18
+ /** A hook to abort the request. */
16
19
  abortSignal?: AbortSignal;
17
20
  }
18
21
  }
@@ -26,16 +29,16 @@ export declare class DocumentCollections {
26
29
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
27
30
  *
28
31
  * @example
29
- * await credal.documentCollections.addDocumentsToCollection({
32
+ * await client.documentCollections.addDocumentsToCollection({
30
33
  * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
31
34
  * resourceIdentifiers: [{
32
35
  * type: "external-resource-id",
33
36
  * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
34
- * resourceType: Credal.ResourceType.GoogleDriveItem
37
+ * resourceType: "GOOGLE_DRIVE_ITEM"
35
38
  * }, {
36
39
  * type: "external-resource-id",
37
40
  * externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
38
- * resourceType: Credal.ResourceType.GoogleDriveItem
41
+ * resourceType: "GOOGLE_DRIVE_ITEM"
39
42
  * }]
40
43
  * })
41
44
  */
@@ -47,16 +50,16 @@ export declare class DocumentCollections {
47
50
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
48
51
  *
49
52
  * @example
50
- * await credal.documentCollections.removeDocumentsFromCollection({
53
+ * await client.documentCollections.removeDocumentsFromCollection({
51
54
  * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
52
55
  * resourceIdentifiers: [{
53
56
  * type: "external-resource-id",
54
57
  * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
55
- * resourceType: Credal.ResourceType.GoogleDriveItem
58
+ * resourceType: "GOOGLE_DRIVE_ITEM"
56
59
  * }, {
57
60
  * type: "external-resource-id",
58
61
  * externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
59
- * resourceType: Credal.ResourceType.GoogleDriveItem
62
+ * resourceType: "GOOGLE_DRIVE_ITEM"
60
63
  * }]
61
64
  * })
62
65
  */
@@ -68,12 +71,12 @@ export declare class DocumentCollections {
68
71
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
69
72
  *
70
73
  * @example
71
- * await credal.documentCollections.createCollection({
74
+ * await client.documentCollections.createCollection({
72
75
  * name: "Customer Collection",
73
76
  * description: "This collection is used to answer customer requests based on internal documentation.",
74
77
  * collaborators: [{
75
78
  * email: "test@gmail.com",
76
- * role: Credal.Role.Editor
79
+ * role: "editor"
77
80
  * }]
78
81
  * })
79
82
  */
@@ -85,7 +88,7 @@ export declare class DocumentCollections {
85
88
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
86
89
  *
87
90
  * @example
88
- * await credal.documentCollections.deleteCollection({
91
+ * await client.documentCollections.deleteCollection({
89
92
  * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
90
93
  * })
91
94
  */
@@ -97,7 +100,7 @@ export declare class DocumentCollections {
97
100
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
98
101
  *
99
102
  * @example
100
- * await credal.documentCollections.createMongoCollectionSync({
103
+ * await client.documentCollections.createMongoCollectionSync({
101
104
  * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
102
105
  * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
103
106
  * config: {
@@ -125,7 +128,7 @@ export declare class DocumentCollections {
125
128
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
126
129
  *
127
130
  * @example
128
- * await credal.documentCollections.updateMongoCollectionSync({
131
+ * await client.documentCollections.updateMongoCollectionSync({
129
132
  * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
130
133
  * mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
131
134
  * config: {
@@ -55,16 +55,16 @@ class DocumentCollections {
55
55
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
56
56
  *
57
57
  * @example
58
- * await credal.documentCollections.addDocumentsToCollection({
58
+ * await client.documentCollections.addDocumentsToCollection({
59
59
  * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
60
60
  * resourceIdentifiers: [{
61
61
  * type: "external-resource-id",
62
62
  * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
63
- * resourceType: Credal.ResourceType.GoogleDriveItem
63
+ * resourceType: "GOOGLE_DRIVE_ITEM"
64
64
  * }, {
65
65
  * type: "external-resource-id",
66
66
  * externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
67
- * resourceType: Credal.ResourceType.GoogleDriveItem
67
+ * resourceType: "GOOGLE_DRIVE_ITEM"
68
68
  * }]
69
69
  * })
70
70
  */
@@ -78,14 +78,14 @@ class DocumentCollections {
78
78
  Authorization: yield this._getAuthorizationHeader(),
79
79
  "X-Fern-Language": "JavaScript",
80
80
  "X-Fern-SDK-Name": "@credal/sdk",
81
- "X-Fern-SDK-Version": "0.0.13",
81
+ "X-Fern-SDK-Version": "0.0.15",
82
+ "User-Agent": "@credal/sdk/0.0.15",
82
83
  "X-Fern-Runtime": core.RUNTIME.type,
83
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
84
85
  },
85
86
  contentType: "application/json",
86
- body: yield serializers.AddDocumentsToCollectionRequest.jsonOrThrow(request, {
87
- unrecognizedObjectKeys: "strip",
88
- }),
87
+ requestType: "json",
88
+ body: serializers.AddDocumentsToCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
89
89
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
90
90
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
91
91
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -121,16 +121,16 @@ class DocumentCollections {
121
121
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
122
122
  *
123
123
  * @example
124
- * await credal.documentCollections.removeDocumentsFromCollection({
124
+ * await client.documentCollections.removeDocumentsFromCollection({
125
125
  * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
126
126
  * resourceIdentifiers: [{
127
127
  * type: "external-resource-id",
128
128
  * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
129
- * resourceType: Credal.ResourceType.GoogleDriveItem
129
+ * resourceType: "GOOGLE_DRIVE_ITEM"
130
130
  * }, {
131
131
  * type: "external-resource-id",
132
132
  * externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
133
- * resourceType: Credal.ResourceType.GoogleDriveItem
133
+ * resourceType: "GOOGLE_DRIVE_ITEM"
134
134
  * }]
135
135
  * })
136
136
  */
@@ -144,12 +144,14 @@ class DocumentCollections {
144
144
  Authorization: yield this._getAuthorizationHeader(),
145
145
  "X-Fern-Language": "JavaScript",
146
146
  "X-Fern-SDK-Name": "@credal/sdk",
147
- "X-Fern-SDK-Version": "0.0.13",
147
+ "X-Fern-SDK-Version": "0.0.15",
148
+ "User-Agent": "@credal/sdk/0.0.15",
148
149
  "X-Fern-Runtime": core.RUNTIME.type,
149
150
  "X-Fern-Runtime-Version": core.RUNTIME.version,
150
151
  },
151
152
  contentType: "application/json",
152
- body: yield serializers.RemoveDocumentsFromCollectionRequest.jsonOrThrow(request, {
153
+ requestType: "json",
154
+ body: serializers.RemoveDocumentsFromCollectionRequest.jsonOrThrow(request, {
153
155
  unrecognizedObjectKeys: "strip",
154
156
  }),
155
157
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -187,12 +189,12 @@ class DocumentCollections {
187
189
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
188
190
  *
189
191
  * @example
190
- * await credal.documentCollections.createCollection({
192
+ * await client.documentCollections.createCollection({
191
193
  * name: "Customer Collection",
192
194
  * description: "This collection is used to answer customer requests based on internal documentation.",
193
195
  * collaborators: [{
194
196
  * email: "test@gmail.com",
195
- * role: Credal.Role.Editor
197
+ * role: "editor"
196
198
  * }]
197
199
  * })
198
200
  */
@@ -206,18 +208,20 @@ class DocumentCollections {
206
208
  Authorization: yield this._getAuthorizationHeader(),
207
209
  "X-Fern-Language": "JavaScript",
208
210
  "X-Fern-SDK-Name": "@credal/sdk",
209
- "X-Fern-SDK-Version": "0.0.13",
211
+ "X-Fern-SDK-Version": "0.0.15",
212
+ "User-Agent": "@credal/sdk/0.0.15",
210
213
  "X-Fern-Runtime": core.RUNTIME.type,
211
214
  "X-Fern-Runtime-Version": core.RUNTIME.version,
212
215
  },
213
216
  contentType: "application/json",
214
- body: yield serializers.CreateCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
217
+ requestType: "json",
218
+ body: serializers.CreateCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
215
219
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
216
220
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
217
221
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
218
222
  });
219
223
  if (_response.ok) {
220
- return yield serializers.CreateCollectionResponse.parseOrThrow(_response.body, {
224
+ return serializers.CreateCollectionResponse.parseOrThrow(_response.body, {
221
225
  unrecognizedObjectKeys: "passthrough",
222
226
  allowUnrecognizedUnionMembers: true,
223
227
  allowUnrecognizedEnumValues: true,
@@ -252,7 +256,7 @@ class DocumentCollections {
252
256
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
253
257
  *
254
258
  * @example
255
- * await credal.documentCollections.deleteCollection({
259
+ * await client.documentCollections.deleteCollection({
256
260
  * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
257
261
  * })
258
262
  */
@@ -266,18 +270,20 @@ class DocumentCollections {
266
270
  Authorization: yield this._getAuthorizationHeader(),
267
271
  "X-Fern-Language": "JavaScript",
268
272
  "X-Fern-SDK-Name": "@credal/sdk",
269
- "X-Fern-SDK-Version": "0.0.13",
273
+ "X-Fern-SDK-Version": "0.0.15",
274
+ "User-Agent": "@credal/sdk/0.0.15",
270
275
  "X-Fern-Runtime": core.RUNTIME.type,
271
276
  "X-Fern-Runtime-Version": core.RUNTIME.version,
272
277
  },
273
278
  contentType: "application/json",
274
- body: yield serializers.DeleteCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
279
+ requestType: "json",
280
+ body: serializers.DeleteCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
275
281
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
276
282
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
277
283
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
278
284
  });
279
285
  if (_response.ok) {
280
- return yield serializers.DeleteCollectionResponse.parseOrThrow(_response.body, {
286
+ return serializers.DeleteCollectionResponse.parseOrThrow(_response.body, {
281
287
  unrecognizedObjectKeys: "passthrough",
282
288
  allowUnrecognizedUnionMembers: true,
283
289
  allowUnrecognizedEnumValues: true,
@@ -312,7 +318,7 @@ class DocumentCollections {
312
318
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
313
319
  *
314
320
  * @example
315
- * await credal.documentCollections.createMongoCollectionSync({
321
+ * await client.documentCollections.createMongoCollectionSync({
316
322
  * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
317
323
  * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
318
324
  * config: {
@@ -342,12 +348,14 @@ class DocumentCollections {
342
348
  Authorization: yield this._getAuthorizationHeader(),
343
349
  "X-Fern-Language": "JavaScript",
344
350
  "X-Fern-SDK-Name": "@credal/sdk",
345
- "X-Fern-SDK-Version": "0.0.13",
351
+ "X-Fern-SDK-Version": "0.0.15",
352
+ "User-Agent": "@credal/sdk/0.0.15",
346
353
  "X-Fern-Runtime": core.RUNTIME.type,
347
354
  "X-Fern-Runtime-Version": core.RUNTIME.version,
348
355
  },
349
356
  contentType: "application/json",
350
- body: yield serializers.CreateMongoCollectionSyncRequest.jsonOrThrow(request, {
357
+ requestType: "json",
358
+ body: serializers.CreateMongoCollectionSyncRequest.jsonOrThrow(request, {
351
359
  unrecognizedObjectKeys: "strip",
352
360
  }),
353
361
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -355,7 +363,7 @@ class DocumentCollections {
355
363
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
356
364
  });
357
365
  if (_response.ok) {
358
- return yield serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
366
+ return serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
359
367
  unrecognizedObjectKeys: "passthrough",
360
368
  allowUnrecognizedUnionMembers: true,
361
369
  allowUnrecognizedEnumValues: true,
@@ -390,7 +398,7 @@ class DocumentCollections {
390
398
  * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
391
399
  *
392
400
  * @example
393
- * await credal.documentCollections.updateMongoCollectionSync({
401
+ * await client.documentCollections.updateMongoCollectionSync({
394
402
  * mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
395
403
  * mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
396
404
  * config: {
@@ -420,12 +428,14 @@ class DocumentCollections {
420
428
  Authorization: yield this._getAuthorizationHeader(),
421
429
  "X-Fern-Language": "JavaScript",
422
430
  "X-Fern-SDK-Name": "@credal/sdk",
423
- "X-Fern-SDK-Version": "0.0.13",
431
+ "X-Fern-SDK-Version": "0.0.15",
432
+ "User-Agent": "@credal/sdk/0.0.15",
424
433
  "X-Fern-Runtime": core.RUNTIME.type,
425
434
  "X-Fern-Runtime-Version": core.RUNTIME.version,
426
435
  },
427
436
  contentType: "application/json",
428
- body: yield serializers.UpdateMongoCollectionSyncRequest.jsonOrThrow(request, {
437
+ requestType: "json",
438
+ body: serializers.UpdateMongoCollectionSyncRequest.jsonOrThrow(request, {
429
439
  unrecognizedObjectKeys: "strip",
430
440
  }),
431
441
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -433,7 +443,7 @@ class DocumentCollections {
433
443
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
434
444
  });
435
445
  if (_response.ok) {
436
- return yield serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
446
+ return serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
437
447
  unrecognizedObjectKeys: "passthrough",
438
448
  allowUnrecognizedUnionMembers: true,
439
449
  allowUnrecognizedEnumValues: true,
@@ -9,11 +9,11 @@ import * as Credal from "../../../../index";
9
9
  * resourceIdentifiers: [{
10
10
  * type: "external-resource-id",
11
11
  * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
12
- * resourceType: Credal.ResourceType.GoogleDriveItem
12
+ * resourceType: "GOOGLE_DRIVE_ITEM"
13
13
  * }, {
14
14
  * type: "external-resource-id",
15
15
  * externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
16
- * resourceType: Credal.ResourceType.GoogleDriveItem
16
+ * resourceType: "GOOGLE_DRIVE_ITEM"
17
17
  * }]
18
18
  * }
19
19
  */
@@ -9,7 +9,7 @@ import * as Credal from "../../../../index";
9
9
  * description: "This collection is used to answer customer requests based on internal documentation.",
10
10
  * collaborators: [{
11
11
  * email: "test@gmail.com",
12
- * role: Credal.Role.Editor
12
+ * role: "editor"
13
13
  * }]
14
14
  * }
15
15
  */
@@ -9,11 +9,11 @@ import * as Credal from "../../../../index";
9
9
  * resourceIdentifiers: [{
10
10
  * type: "external-resource-id",
11
11
  * externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
12
- * resourceType: Credal.ResourceType.GoogleDriveItem
12
+ * resourceType: "GOOGLE_DRIVE_ITEM"
13
13
  * }, {
14
14
  * type: "external-resource-id",
15
15
  * externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
16
- * resourceType: Credal.ResourceType.GoogleDriveItem
16
+ * resourceType: "GOOGLE_DRIVE_ITEM"
17
17
  * }]
18
18
  * }
19
19
  */