@getzep/zep-cloud 2.1.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/Client.d.ts +10 -5
  2. package/api/errors/BadRequestError.js +17 -7
  3. package/api/errors/ConflictError.js +17 -7
  4. package/api/errors/InternalServerError.js +17 -7
  5. package/api/errors/NotFoundError.js +17 -7
  6. package/api/errors/UnauthorizedError.js +17 -7
  7. package/api/resources/document/client/Client.d.ts +18 -13
  8. package/api/resources/document/client/Client.js +158 -141
  9. package/api/resources/graph/client/Client.d.ts +14 -9
  10. package/api/resources/graph/client/Client.js +51 -39
  11. package/api/resources/graph/client/requests/GraphSearchQuery.d.ts +2 -2
  12. package/api/resources/graph/resources/edge/client/Client.d.ts +9 -4
  13. package/api/resources/graph/resources/edge/client/Client.js +51 -37
  14. package/api/resources/graph/resources/episode/client/Client.d.ts +8 -3
  15. package/api/resources/graph/resources/episode/client/Client.js +46 -33
  16. package/api/resources/graph/resources/index.js +17 -7
  17. package/api/resources/graph/resources/node/client/Client.d.ts +8 -3
  18. package/api/resources/graph/resources/node/client/Client.js +43 -30
  19. package/api/resources/group/client/Client.d.ts +10 -3
  20. package/api/resources/group/client/Client.js +39 -25
  21. package/api/resources/group/client/requests/CreateGroupRequest.d.ts +4 -2
  22. package/api/resources/index.js +17 -7
  23. package/api/resources/memory/client/Client.d.ts +29 -24
  24. package/api/resources/memory/client/Client.js +225 -195
  25. package/api/resources/memory/client/requests/AddMemoryRequest.d.ts +3 -1
  26. package/api/resources/user/client/Client.d.ts +12 -7
  27. package/api/resources/user/client/Client.js +82 -65
  28. package/api/types/AddMemoryResponse.d.ts +6 -0
  29. package/api/types/AddMemoryResponse.js +5 -0
  30. package/api/types/GraphDataType.d.ts +1 -1
  31. package/api/types/GraphSearchScope.d.ts +1 -1
  32. package/api/types/Reranker.d.ts +1 -1
  33. package/api/types/RoleType.d.ts +1 -1
  34. package/api/types/SearchScope.d.ts +1 -1
  35. package/api/types/SearchType.d.ts +1 -1
  36. package/api/types/User.d.ts +2 -0
  37. package/api/types/index.d.ts +1 -0
  38. package/api/types/index.js +1 -0
  39. package/core/fetcher/APIResponse.d.ts +1 -1
  40. package/core/fetcher/Fetcher.d.ts +5 -2
  41. package/core/fetcher/Fetcher.js +18 -175
  42. package/core/fetcher/Supplier.d.ts +1 -1
  43. package/core/fetcher/createRequestUrl.d.ts +1 -0
  44. package/core/fetcher/createRequestUrl.js +12 -0
  45. package/core/fetcher/getFetchFn.d.ts +4 -0
  46. package/core/fetcher/getFetchFn.js +68 -0
  47. package/core/fetcher/getHeader.js +1 -2
  48. package/core/fetcher/getRequestBody.d.ts +7 -0
  49. package/core/fetcher/getRequestBody.js +22 -0
  50. package/core/fetcher/getResponseBody.d.ts +1 -0
  51. package/core/fetcher/getResponseBody.js +54 -0
  52. package/core/fetcher/makeRequest.d.ts +1 -0
  53. package/core/fetcher/makeRequest.js +42 -0
  54. package/core/fetcher/requestWithRetries.d.ts +1 -0
  55. package/core/fetcher/requestWithRetries.js +40 -0
  56. package/core/fetcher/signals.d.ts +11 -0
  57. package/core/fetcher/signals.js +36 -0
  58. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  59. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  60. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  61. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  62. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  63. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  64. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  65. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  66. package/core/index.js +17 -7
  67. package/core/runtime/runtime.d.ts +2 -1
  68. package/core/runtime/runtime.js +12 -1
  69. package/core/schemas/Schema.d.ts +13 -9
  70. package/core/schemas/Schema.js +1 -0
  71. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  72. package/core/schemas/builders/bigint/bigint.js +49 -0
  73. package/core/schemas/builders/bigint/index.d.ts +1 -0
  74. package/core/schemas/builders/bigint/index.js +5 -0
  75. package/core/schemas/builders/date/date.js +1 -2
  76. package/core/schemas/builders/enum/enum.js +1 -2
  77. package/core/schemas/builders/index.d.ts +1 -0
  78. package/core/schemas/builders/index.js +1 -0
  79. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  80. package/core/schemas/builders/lazy/lazy.js +11 -23
  81. package/core/schemas/builders/lazy/lazyObject.js +2 -12
  82. package/core/schemas/builders/list/list.js +32 -46
  83. package/core/schemas/builders/literals/booleanLiteral.js +1 -2
  84. package/core/schemas/builders/literals/stringLiteral.js +1 -2
  85. package/core/schemas/builders/object/object.d.ts +1 -1
  86. package/core/schemas/builders/object/object.js +120 -114
  87. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  88. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  89. package/core/schemas/builders/object/property.js +2 -3
  90. package/core/schemas/builders/object/types.d.ts +18 -13
  91. package/core/schemas/builders/object-like/getObjectLikeUtils.js +5 -15
  92. package/core/schemas/builders/object-like/types.d.ts +1 -1
  93. package/core/schemas/builders/record/record.js +50 -62
  94. package/core/schemas/builders/record/types.d.ts +2 -2
  95. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  96. package/core/schemas/builders/schema-utils/getSchemaUtils.js +21 -25
  97. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  98. package/core/schemas/builders/set/set.js +7 -17
  99. package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  100. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +22 -34
  101. package/core/schemas/builders/union/discriminant.js +1 -2
  102. package/core/schemas/builders/union/types.d.ts +6 -6
  103. package/core/schemas/builders/union/union.d.ts +1 -1
  104. package/core/schemas/builders/union/union.js +52 -64
  105. package/core/schemas/utils/MaybePromise.d.ts +1 -1
  106. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
  107. package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  108. package/core/schemas/utils/entries.d.ts +1 -1
  109. package/core/schemas/utils/entries.js +1 -2
  110. package/core/schemas/utils/filterObject.d.ts +1 -1
  111. package/core/schemas/utils/filterObject.js +1 -2
  112. package/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
  113. package/core/schemas/utils/isPlainObject.js +1 -2
  114. package/core/schemas/utils/keys.d.ts +1 -1
  115. package/core/schemas/utils/keys.js +1 -2
  116. package/core/schemas/utils/maybeSkipValidation.js +4 -14
  117. package/core/schemas/utils/partition.js +1 -2
  118. package/dist/Client.d.ts +10 -5
  119. package/dist/api/errors/BadRequestError.js +17 -7
  120. package/dist/api/errors/ConflictError.js +17 -7
  121. package/dist/api/errors/InternalServerError.js +17 -7
  122. package/dist/api/errors/NotFoundError.js +17 -7
  123. package/dist/api/errors/UnauthorizedError.js +17 -7
  124. package/dist/api/resources/document/client/Client.d.ts +18 -13
  125. package/dist/api/resources/document/client/Client.js +158 -141
  126. package/dist/api/resources/graph/client/Client.d.ts +14 -9
  127. package/dist/api/resources/graph/client/Client.js +51 -39
  128. package/dist/api/resources/graph/client/requests/GraphSearchQuery.d.ts +2 -2
  129. package/dist/api/resources/graph/resources/edge/client/Client.d.ts +9 -4
  130. package/dist/api/resources/graph/resources/edge/client/Client.js +51 -37
  131. package/dist/api/resources/graph/resources/episode/client/Client.d.ts +8 -3
  132. package/dist/api/resources/graph/resources/episode/client/Client.js +46 -33
  133. package/dist/api/resources/graph/resources/index.js +17 -7
  134. package/dist/api/resources/graph/resources/node/client/Client.d.ts +8 -3
  135. package/dist/api/resources/graph/resources/node/client/Client.js +43 -30
  136. package/dist/api/resources/group/client/Client.d.ts +10 -3
  137. package/dist/api/resources/group/client/Client.js +39 -25
  138. package/dist/api/resources/group/client/requests/CreateGroupRequest.d.ts +4 -2
  139. package/dist/api/resources/index.js +17 -7
  140. package/dist/api/resources/memory/client/Client.d.ts +29 -24
  141. package/dist/api/resources/memory/client/Client.js +225 -195
  142. package/dist/api/resources/memory/client/requests/AddMemoryRequest.d.ts +3 -1
  143. package/dist/api/resources/user/client/Client.d.ts +12 -7
  144. package/dist/api/resources/user/client/Client.js +82 -65
  145. package/dist/api/types/AddMemoryResponse.d.ts +6 -0
  146. package/dist/api/types/AddMemoryResponse.js +5 -0
  147. package/dist/api/types/GraphDataType.d.ts +1 -1
  148. package/dist/api/types/GraphSearchScope.d.ts +1 -1
  149. package/dist/api/types/Reranker.d.ts +1 -1
  150. package/dist/api/types/RoleType.d.ts +1 -1
  151. package/dist/api/types/SearchScope.d.ts +1 -1
  152. package/dist/api/types/SearchType.d.ts +1 -1
  153. package/dist/api/types/User.d.ts +2 -0
  154. package/dist/api/types/index.d.ts +1 -0
  155. package/dist/api/types/index.js +1 -0
  156. package/dist/core/fetcher/APIResponse.d.ts +1 -1
  157. package/dist/core/fetcher/Fetcher.d.ts +5 -2
  158. package/dist/core/fetcher/Fetcher.js +18 -175
  159. package/dist/core/fetcher/Supplier.d.ts +1 -1
  160. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  161. package/dist/core/fetcher/createRequestUrl.js +12 -0
  162. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  163. package/dist/core/fetcher/getFetchFn.js +68 -0
  164. package/dist/core/fetcher/getHeader.js +1 -2
  165. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  166. package/dist/core/fetcher/getRequestBody.js +22 -0
  167. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  168. package/dist/core/fetcher/getResponseBody.js +54 -0
  169. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  170. package/dist/core/fetcher/makeRequest.js +42 -0
  171. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  172. package/dist/core/fetcher/requestWithRetries.js +40 -0
  173. package/dist/core/fetcher/signals.d.ts +11 -0
  174. package/dist/core/fetcher/signals.js +36 -0
  175. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  176. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  177. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  178. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  179. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  180. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  181. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  182. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  183. package/dist/core/index.js +17 -7
  184. package/dist/core/runtime/runtime.d.ts +2 -1
  185. package/dist/core/runtime/runtime.js +12 -1
  186. package/dist/core/schemas/Schema.d.ts +13 -9
  187. package/dist/core/schemas/Schema.js +1 -0
  188. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  189. package/dist/core/schemas/builders/bigint/bigint.js +49 -0
  190. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  191. package/dist/core/schemas/builders/bigint/index.js +5 -0
  192. package/dist/core/schemas/builders/date/date.js +1 -2
  193. package/dist/core/schemas/builders/enum/enum.js +1 -2
  194. package/dist/core/schemas/builders/index.d.ts +1 -0
  195. package/dist/core/schemas/builders/index.js +1 -0
  196. package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
  197. package/dist/core/schemas/builders/lazy/lazy.js +11 -23
  198. package/dist/core/schemas/builders/lazy/lazyObject.js +2 -12
  199. package/dist/core/schemas/builders/list/list.js +32 -46
  200. package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
  201. package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
  202. package/dist/core/schemas/builders/object/object.d.ts +1 -1
  203. package/dist/core/schemas/builders/object/object.js +120 -114
  204. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  205. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  206. package/dist/core/schemas/builders/object/property.js +2 -3
  207. package/dist/core/schemas/builders/object/types.d.ts +18 -13
  208. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +5 -15
  209. package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
  210. package/dist/core/schemas/builders/record/record.js +50 -62
  211. package/dist/core/schemas/builders/record/types.d.ts +2 -2
  212. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  213. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +21 -25
  214. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  215. package/dist/core/schemas/builders/set/set.js +7 -17
  216. package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  217. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +22 -34
  218. package/dist/core/schemas/builders/union/discriminant.js +1 -2
  219. package/dist/core/schemas/builders/union/types.d.ts +6 -6
  220. package/dist/core/schemas/builders/union/union.d.ts +1 -1
  221. package/dist/core/schemas/builders/union/union.js +52 -64
  222. package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
  223. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
  224. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  225. package/dist/core/schemas/utils/entries.d.ts +1 -1
  226. package/dist/core/schemas/utils/entries.js +1 -2
  227. package/dist/core/schemas/utils/filterObject.d.ts +1 -1
  228. package/dist/core/schemas/utils/filterObject.js +1 -2
  229. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
  230. package/dist/core/schemas/utils/isPlainObject.js +1 -2
  231. package/dist/core/schemas/utils/keys.d.ts +1 -1
  232. package/dist/core/schemas/utils/keys.js +1 -2
  233. package/dist/core/schemas/utils/maybeSkipValidation.js +4 -14
  234. package/dist/core/schemas/utils/partition.js +1 -2
  235. package/dist/environments.d.ts +1 -1
  236. package/dist/errors/ZepTimeoutError.d.ts +1 -1
  237. package/dist/errors/ZepTimeoutError.js +2 -2
  238. package/dist/extractor/base.js +1 -1
  239. package/dist/extractor/index.d.ts +2 -2
  240. package/dist/index.js +17 -7
  241. package/dist/serialization/resources/document/client/addDocuments.js +17 -7
  242. package/dist/serialization/resources/document/client/batchDeleteDocuments.js +17 -7
  243. package/dist/serialization/resources/document/client/batchGetDocuments.js +17 -7
  244. package/dist/serialization/resources/document/client/batchUpdateDocuments.js +17 -7
  245. package/dist/serialization/resources/document/client/index.js +17 -7
  246. package/dist/serialization/resources/document/client/listCollections.js +17 -7
  247. package/dist/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.js +17 -7
  248. package/dist/serialization/resources/document/client/requests/DocumentSearchPayload.js +17 -7
  249. package/dist/serialization/resources/document/client/requests/GetDocumentListRequest.js +17 -7
  250. package/dist/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.js +17 -7
  251. package/dist/serialization/resources/document/client/requests/UpdateDocumentRequest.js +17 -7
  252. package/dist/serialization/resources/graph/client/requests/AddDataRequest.js +17 -7
  253. package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.js +17 -7
  254. package/dist/serialization/resources/graph/resources/edge/client/getByGroupId.js +17 -7
  255. package/dist/serialization/resources/graph/resources/edge/client/getByUserId.js +17 -7
  256. package/dist/serialization/resources/graph/resources/edge/client/index.js +17 -7
  257. package/dist/serialization/resources/graph/resources/index.js +17 -7
  258. package/dist/serialization/resources/graph/resources/node/client/getByGroupId.js +17 -7
  259. package/dist/serialization/resources/graph/resources/node/client/getByUserId.js +17 -7
  260. package/dist/serialization/resources/graph/resources/node/client/index.js +17 -7
  261. package/dist/serialization/resources/group/client/requests/CreateGroupRequest.d.ts +1 -1
  262. package/dist/serialization/resources/group/client/requests/CreateGroupRequest.js +18 -8
  263. package/dist/serialization/resources/index.js +17 -7
  264. package/dist/serialization/resources/memory/client/extractData.js +17 -7
  265. package/dist/serialization/resources/memory/client/index.js +17 -7
  266. package/dist/serialization/resources/memory/client/requests/AddFactsRequest.js +17 -7
  267. package/dist/serialization/resources/memory/client/requests/AddMemoryRequest.d.ts +1 -0
  268. package/dist/serialization/resources/memory/client/requests/AddMemoryRequest.js +18 -7
  269. package/dist/serialization/resources/memory/client/requests/CreateSessionRequest.js +17 -7
  270. package/dist/serialization/resources/memory/client/requests/EndSessionRequest.js +17 -7
  271. package/dist/serialization/resources/memory/client/requests/EndSessionsRequest.js +17 -7
  272. package/dist/serialization/resources/memory/client/requests/ExtractDataRequest.js +17 -7
  273. package/dist/serialization/resources/memory/client/requests/MemorySearchPayload.js +17 -7
  274. package/dist/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +17 -7
  275. package/dist/serialization/resources/memory/client/requests/SessionSearchQuery.js +17 -7
  276. package/dist/serialization/resources/memory/client/requests/UpdateSessionRequest.js +17 -7
  277. package/dist/serialization/resources/memory/client/search.js +17 -7
  278. package/dist/serialization/resources/user/client/getSessions.js +17 -7
  279. package/dist/serialization/resources/user/client/index.js +17 -7
  280. package/dist/serialization/resources/user/client/requests/CreateUserRequest.js +17 -7
  281. package/dist/serialization/resources/user/client/requests/UpdateUserRequest.js +17 -7
  282. package/dist/serialization/types/AddMemoryResponse.d.ts +12 -0
  283. package/dist/serialization/types/AddMemoryResponse.js +43 -0
  284. package/dist/serialization/types/ApiError.js +17 -7
  285. package/dist/serialization/types/ApidataDocument.js +17 -7
  286. package/dist/serialization/types/ApidataDocumentCollection.js +17 -7
  287. package/dist/serialization/types/ApidataDocumentSearchResponse.js +17 -7
  288. package/dist/serialization/types/ApidataDocumentWithScore.js +17 -7
  289. package/dist/serialization/types/ApidataFactRatingExamples.js +17 -7
  290. package/dist/serialization/types/ApidataFactRatingInstruction.js +17 -7
  291. package/dist/serialization/types/ClassifySessionRequest.js +17 -7
  292. package/dist/serialization/types/CreateDocumentRequest.js +17 -7
  293. package/dist/serialization/types/EndSessionResponse.js +17 -7
  294. package/dist/serialization/types/EndSessionsResponse.js +17 -7
  295. package/dist/serialization/types/EntityEdge.js +17 -7
  296. package/dist/serialization/types/EntityNode.js +17 -7
  297. package/dist/serialization/types/Episode.js +17 -7
  298. package/dist/serialization/types/EpisodeResponse.js +17 -7
  299. package/dist/serialization/types/Fact.js +17 -7
  300. package/dist/serialization/types/FactRatingExamples.js +17 -7
  301. package/dist/serialization/types/FactRatingInstruction.js +17 -7
  302. package/dist/serialization/types/FactResponse.js +17 -7
  303. package/dist/serialization/types/FactsResponse.js +17 -7
  304. package/dist/serialization/types/GraphDataType.js +17 -7
  305. package/dist/serialization/types/GraphSearchResults.js +17 -7
  306. package/dist/serialization/types/GraphSearchScope.js +17 -7
  307. package/dist/serialization/types/Group.js +17 -7
  308. package/dist/serialization/types/Memory.js +17 -7
  309. package/dist/serialization/types/MemorySearchResult.js +17 -7
  310. package/dist/serialization/types/Message.js +17 -7
  311. package/dist/serialization/types/MessageListResponse.js +17 -7
  312. package/dist/serialization/types/NewFact.js +17 -7
  313. package/dist/serialization/types/Question.js +17 -7
  314. package/dist/serialization/types/Reranker.js +17 -7
  315. package/dist/serialization/types/RoleType.js +17 -7
  316. package/dist/serialization/types/SearchScope.js +17 -7
  317. package/dist/serialization/types/SearchType.js +17 -7
  318. package/dist/serialization/types/Session.js +17 -7
  319. package/dist/serialization/types/SessionClassification.js +17 -7
  320. package/dist/serialization/types/SessionListResponse.js +17 -7
  321. package/dist/serialization/types/SessionSearchResponse.js +17 -7
  322. package/dist/serialization/types/SessionSearchResult.js +17 -7
  323. package/dist/serialization/types/SuccessResponse.js +17 -7
  324. package/dist/serialization/types/Summary.js +17 -7
  325. package/dist/serialization/types/SummaryListResponse.js +17 -7
  326. package/dist/serialization/types/UpdateDocumentListRequest.js +17 -7
  327. package/dist/serialization/types/User.d.ts +2 -0
  328. package/dist/serialization/types/User.js +19 -7
  329. package/dist/serialization/types/UserListResponse.js +17 -7
  330. package/dist/serialization/types/index.d.ts +1 -0
  331. package/dist/serialization/types/index.js +1 -0
  332. package/dist/version.d.ts +1 -0
  333. package/dist/version.js +4 -0
  334. package/environments.d.ts +1 -1
  335. package/errors/ZepTimeoutError.d.ts +1 -1
  336. package/errors/ZepTimeoutError.js +2 -2
  337. package/extractor/base.js +1 -1
  338. package/extractor/index.d.ts +2 -2
  339. package/index.js +17 -7
  340. package/{jest.config.js → jest.config.mjs} +4 -1
  341. package/package.json +25 -16
  342. package/reference.md +3801 -0
  343. package/scripts/rename-to-esm-files.js +115 -0
  344. package/serialization/resources/document/client/addDocuments.js +17 -7
  345. package/serialization/resources/document/client/batchDeleteDocuments.js +17 -7
  346. package/serialization/resources/document/client/batchGetDocuments.js +17 -7
  347. package/serialization/resources/document/client/batchUpdateDocuments.js +17 -7
  348. package/serialization/resources/document/client/index.js +17 -7
  349. package/serialization/resources/document/client/listCollections.js +17 -7
  350. package/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.js +17 -7
  351. package/serialization/resources/document/client/requests/DocumentSearchPayload.js +17 -7
  352. package/serialization/resources/document/client/requests/GetDocumentListRequest.js +17 -7
  353. package/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.js +17 -7
  354. package/serialization/resources/document/client/requests/UpdateDocumentRequest.js +17 -7
  355. package/serialization/resources/graph/client/requests/AddDataRequest.js +17 -7
  356. package/serialization/resources/graph/client/requests/GraphSearchQuery.js +17 -7
  357. package/serialization/resources/graph/resources/edge/client/getByGroupId.js +17 -7
  358. package/serialization/resources/graph/resources/edge/client/getByUserId.js +17 -7
  359. package/serialization/resources/graph/resources/edge/client/index.js +17 -7
  360. package/serialization/resources/graph/resources/index.js +17 -7
  361. package/serialization/resources/graph/resources/node/client/getByGroupId.js +17 -7
  362. package/serialization/resources/graph/resources/node/client/getByUserId.js +17 -7
  363. package/serialization/resources/graph/resources/node/client/index.js +17 -7
  364. package/serialization/resources/group/client/requests/CreateGroupRequest.d.ts +1 -1
  365. package/serialization/resources/group/client/requests/CreateGroupRequest.js +18 -8
  366. package/serialization/resources/index.js +17 -7
  367. package/serialization/resources/memory/client/extractData.js +17 -7
  368. package/serialization/resources/memory/client/index.js +17 -7
  369. package/serialization/resources/memory/client/requests/AddFactsRequest.js +17 -7
  370. package/serialization/resources/memory/client/requests/AddMemoryRequest.d.ts +1 -0
  371. package/serialization/resources/memory/client/requests/AddMemoryRequest.js +18 -7
  372. package/serialization/resources/memory/client/requests/CreateSessionRequest.js +17 -7
  373. package/serialization/resources/memory/client/requests/EndSessionRequest.js +17 -7
  374. package/serialization/resources/memory/client/requests/EndSessionsRequest.js +17 -7
  375. package/serialization/resources/memory/client/requests/ExtractDataRequest.js +17 -7
  376. package/serialization/resources/memory/client/requests/MemorySearchPayload.js +17 -7
  377. package/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +17 -7
  378. package/serialization/resources/memory/client/requests/SessionSearchQuery.js +17 -7
  379. package/serialization/resources/memory/client/requests/UpdateSessionRequest.js +17 -7
  380. package/serialization/resources/memory/client/search.js +17 -7
  381. package/serialization/resources/user/client/getSessions.js +17 -7
  382. package/serialization/resources/user/client/index.js +17 -7
  383. package/serialization/resources/user/client/requests/CreateUserRequest.js +17 -7
  384. package/serialization/resources/user/client/requests/UpdateUserRequest.js +17 -7
  385. package/serialization/types/AddMemoryResponse.d.ts +12 -0
  386. package/serialization/types/AddMemoryResponse.js +43 -0
  387. package/serialization/types/ApiError.js +17 -7
  388. package/serialization/types/ApidataDocument.js +17 -7
  389. package/serialization/types/ApidataDocumentCollection.js +17 -7
  390. package/serialization/types/ApidataDocumentSearchResponse.js +17 -7
  391. package/serialization/types/ApidataDocumentWithScore.js +17 -7
  392. package/serialization/types/ApidataFactRatingExamples.js +17 -7
  393. package/serialization/types/ApidataFactRatingInstruction.js +17 -7
  394. package/serialization/types/ClassifySessionRequest.js +17 -7
  395. package/serialization/types/CreateDocumentRequest.js +17 -7
  396. package/serialization/types/EndSessionResponse.js +17 -7
  397. package/serialization/types/EndSessionsResponse.js +17 -7
  398. package/serialization/types/EntityEdge.js +17 -7
  399. package/serialization/types/EntityNode.js +17 -7
  400. package/serialization/types/Episode.js +17 -7
  401. package/serialization/types/EpisodeResponse.js +17 -7
  402. package/serialization/types/Fact.js +17 -7
  403. package/serialization/types/FactRatingExamples.js +17 -7
  404. package/serialization/types/FactRatingInstruction.js +17 -7
  405. package/serialization/types/FactResponse.js +17 -7
  406. package/serialization/types/FactsResponse.js +17 -7
  407. package/serialization/types/GraphDataType.js +17 -7
  408. package/serialization/types/GraphSearchResults.js +17 -7
  409. package/serialization/types/GraphSearchScope.js +17 -7
  410. package/serialization/types/Group.js +17 -7
  411. package/serialization/types/Memory.js +17 -7
  412. package/serialization/types/MemorySearchResult.js +17 -7
  413. package/serialization/types/Message.js +17 -7
  414. package/serialization/types/MessageListResponse.js +17 -7
  415. package/serialization/types/NewFact.js +17 -7
  416. package/serialization/types/Question.js +17 -7
  417. package/serialization/types/Reranker.js +17 -7
  418. package/serialization/types/RoleType.js +17 -7
  419. package/serialization/types/SearchScope.js +17 -7
  420. package/serialization/types/SearchType.js +17 -7
  421. package/serialization/types/Session.js +17 -7
  422. package/serialization/types/SessionClassification.js +17 -7
  423. package/serialization/types/SessionListResponse.js +17 -7
  424. package/serialization/types/SessionSearchResponse.js +17 -7
  425. package/serialization/types/SessionSearchResult.js +17 -7
  426. package/serialization/types/SuccessResponse.js +17 -7
  427. package/serialization/types/Summary.js +17 -7
  428. package/serialization/types/SummaryListResponse.js +17 -7
  429. package/serialization/types/UpdateDocumentListRequest.js +17 -7
  430. package/serialization/types/User.d.ts +2 -0
  431. package/serialization/types/User.js +19 -7
  432. package/serialization/types/UserListResponse.js +17 -7
  433. package/serialization/types/index.d.ts +1 -0
  434. package/serialization/types/index.js +1 -0
  435. package/version.d.ts +1 -0
  436. package/version.js +4 -0
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
39
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
40
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -60,11 +70,11 @@ class Episode {
60
70
  * @throws {@link Zep.InternalServerError}
61
71
  *
62
72
  * @example
63
- * await zep.graph.episode.getByGroupId("group_id")
73
+ * await client.graph.episode.getByGroupId("group_id")
64
74
  */
65
- getByGroupId(groupId, request = {}, requestOptions) {
66
- var _a, _b;
67
- return __awaiter(this, void 0, void 0, function* () {
75
+ getByGroupId(groupId_1) {
76
+ return __awaiter(this, arguments, void 0, function* (groupId, request = {}, requestOptions) {
77
+ var _a, _b;
68
78
  const { lastn } = request;
69
79
  const _queryParams = {};
70
80
  if (lastn != null) {
@@ -73,15 +83,16 @@ class Episode {
73
83
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
74
84
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/group/${encodeURIComponent(groupId)}`),
75
85
  method: "GET",
76
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
86
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
77
87
  contentType: "application/json",
78
88
  queryParameters: _queryParams,
89
+ requestType: "json",
79
90
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
80
91
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
81
92
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
82
93
  });
83
94
  if (_response.ok) {
84
- return yield serializers.EpisodeResponse.parseOrThrow(_response.body, {
95
+ return serializers.EpisodeResponse.parseOrThrow(_response.body, {
85
96
  unrecognizedObjectKeys: "passthrough",
86
97
  allowUnrecognizedUnionMembers: true,
87
98
  allowUnrecognizedEnumValues: true,
@@ -92,7 +103,7 @@ class Episode {
92
103
  if (_response.error.reason === "status-code") {
93
104
  switch (_response.error.statusCode) {
94
105
  case 400:
95
- throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
106
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
96
107
  unrecognizedObjectKeys: "passthrough",
97
108
  allowUnrecognizedUnionMembers: true,
98
109
  allowUnrecognizedEnumValues: true,
@@ -100,7 +111,7 @@ class Episode {
100
111
  breadcrumbsPrefix: ["response"],
101
112
  }));
102
113
  case 500:
103
- throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
114
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
104
115
  unrecognizedObjectKeys: "passthrough",
105
116
  allowUnrecognizedUnionMembers: true,
106
117
  allowUnrecognizedEnumValues: true,
@@ -121,7 +132,7 @@ class Episode {
121
132
  body: _response.error.rawBody,
122
133
  });
123
134
  case "timeout":
124
- throw new errors.ZepTimeoutError();
135
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/episodes/group/{group_id}.");
125
136
  case "unknown":
126
137
  throw new errors.ZepError({
127
138
  message: _response.error.errorMessage,
@@ -140,11 +151,11 @@ class Episode {
140
151
  * @throws {@link Zep.InternalServerError}
141
152
  *
142
153
  * @example
143
- * await zep.graph.episode.getByUserId("user_id")
154
+ * await client.graph.episode.getByUserId("user_id")
144
155
  */
145
- getByUserId(userId, request = {}, requestOptions) {
146
- var _a, _b;
147
- return __awaiter(this, void 0, void 0, function* () {
156
+ getByUserId(userId_1) {
157
+ return __awaiter(this, arguments, void 0, function* (userId, request = {}, requestOptions) {
158
+ var _a, _b;
148
159
  const { lastn } = request;
149
160
  const _queryParams = {};
150
161
  if (lastn != null) {
@@ -153,15 +164,16 @@ class Episode {
153
164
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
154
165
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/user/${encodeURIComponent(userId)}`),
155
166
  method: "GET",
156
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
167
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
157
168
  contentType: "application/json",
158
169
  queryParameters: _queryParams,
170
+ requestType: "json",
159
171
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
160
172
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
161
173
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
162
174
  });
163
175
  if (_response.ok) {
164
- return yield serializers.EpisodeResponse.parseOrThrow(_response.body, {
176
+ return serializers.EpisodeResponse.parseOrThrow(_response.body, {
165
177
  unrecognizedObjectKeys: "passthrough",
166
178
  allowUnrecognizedUnionMembers: true,
167
179
  allowUnrecognizedEnumValues: true,
@@ -172,7 +184,7 @@ class Episode {
172
184
  if (_response.error.reason === "status-code") {
173
185
  switch (_response.error.statusCode) {
174
186
  case 400:
175
- throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
187
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
176
188
  unrecognizedObjectKeys: "passthrough",
177
189
  allowUnrecognizedUnionMembers: true,
178
190
  allowUnrecognizedEnumValues: true,
@@ -180,7 +192,7 @@ class Episode {
180
192
  breadcrumbsPrefix: ["response"],
181
193
  }));
182
194
  case 500:
183
- throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
195
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
184
196
  unrecognizedObjectKeys: "passthrough",
185
197
  allowUnrecognizedUnionMembers: true,
186
198
  allowUnrecognizedEnumValues: true,
@@ -201,7 +213,7 @@ class Episode {
201
213
  body: _response.error.rawBody,
202
214
  });
203
215
  case "timeout":
204
- throw new errors.ZepTimeoutError();
216
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/episodes/user/{user_id}.");
205
217
  case "unknown":
206
218
  throw new errors.ZepError({
207
219
  message: _response.error.errorMessage,
@@ -219,22 +231,23 @@ class Episode {
219
231
  * @throws {@link Zep.InternalServerError}
220
232
  *
221
233
  * @example
222
- * await zep.graph.episode.get("uuid")
234
+ * await client.graph.episode.get("uuid")
223
235
  */
224
236
  get(uuid, requestOptions) {
225
- var _a, _b;
226
237
  return __awaiter(this, void 0, void 0, function* () {
238
+ var _a, _b;
227
239
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
228
240
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/${encodeURIComponent(uuid)}`),
229
241
  method: "GET",
230
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
242
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
243
  contentType: "application/json",
244
+ requestType: "json",
232
245
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
233
246
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
234
247
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
235
248
  });
236
249
  if (_response.ok) {
237
- return yield serializers.Episode.parseOrThrow(_response.body, {
250
+ return serializers.Episode.parseOrThrow(_response.body, {
238
251
  unrecognizedObjectKeys: "passthrough",
239
252
  allowUnrecognizedUnionMembers: true,
240
253
  allowUnrecognizedEnumValues: true,
@@ -245,7 +258,7 @@ class Episode {
245
258
  if (_response.error.reason === "status-code") {
246
259
  switch (_response.error.statusCode) {
247
260
  case 400:
248
- throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
261
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
249
262
  unrecognizedObjectKeys: "passthrough",
250
263
  allowUnrecognizedUnionMembers: true,
251
264
  allowUnrecognizedEnumValues: true,
@@ -253,7 +266,7 @@ class Episode {
253
266
  breadcrumbsPrefix: ["response"],
254
267
  }));
255
268
  case 500:
256
- throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
269
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
257
270
  unrecognizedObjectKeys: "passthrough",
258
271
  allowUnrecognizedUnionMembers: true,
259
272
  allowUnrecognizedEnumValues: true,
@@ -274,7 +287,7 @@ class Episode {
274
287
  body: _response.error.rawBody,
275
288
  });
276
289
  case "timeout":
277
- throw new errors.ZepTimeoutError();
290
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/episodes/{uuid}.");
278
291
  case "unknown":
279
292
  throw new errors.ZepError({
280
293
  message: _response.error.errorMessage,
@@ -283,8 +296,8 @@ class Episode {
283
296
  });
284
297
  }
285
298
  _getCustomAuthorizationHeaders() {
286
- var _a;
287
299
  return __awaiter(this, void 0, void 0, function* () {
300
+ var _a;
288
301
  const apiKeyValue = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["ZEP_API_KEY"];
289
302
  return { Authorization: `Api-Key ${apiKeyValue}` };
290
303
  });
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
37
  };
@@ -11,9 +11,14 @@ export declare namespace Node {
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;
20
+ /** Additional headers to include in the request. */
21
+ headers?: Record<string, string>;
17
22
  }
18
23
  }
19
24
  export declare class Node {
@@ -29,7 +34,7 @@ export declare class Node {
29
34
  * @throws {@link Zep.InternalServerError}
30
35
  *
31
36
  * @example
32
- * await zep.graph.node.getByGroupId("group_id")
37
+ * await client.graph.node.getByGroupId("group_id")
33
38
  */
34
39
  getByGroupId(groupId: string, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode[]>;
35
40
  /**
@@ -42,7 +47,7 @@ export declare class Node {
42
47
  * @throws {@link Zep.InternalServerError}
43
48
  *
44
49
  * @example
45
- * await zep.graph.node.getByUserId("user_id")
50
+ * await client.graph.node.getByUserId("user_id")
46
51
  */
47
52
  getByUserId(userId: string, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode[]>;
48
53
  /**
@@ -56,7 +61,7 @@ export declare class Node {
56
61
  * @throws {@link Zep.InternalServerError}
57
62
  *
58
63
  * @example
59
- * await zep.graph.node.get("uuid")
64
+ * await client.graph.node.get("uuid")
60
65
  */
61
66
  get(uuid: string, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode>;
62
67
  protected _getCustomAuthorizationHeaders(): Promise<{
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
39
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
40
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -59,22 +69,23 @@ class Node {
59
69
  * @throws {@link Zep.InternalServerError}
60
70
  *
61
71
  * @example
62
- * await zep.graph.node.getByGroupId("group_id")
72
+ * await client.graph.node.getByGroupId("group_id")
63
73
  */
64
74
  getByGroupId(groupId, requestOptions) {
65
- var _a, _b;
66
75
  return __awaiter(this, void 0, void 0, function* () {
76
+ var _a, _b;
67
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
68
78
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/node/group/${encodeURIComponent(groupId)}`),
69
79
  method: "GET",
70
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
80
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
71
81
  contentType: "application/json",
82
+ requestType: "json",
72
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
73
84
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
74
85
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
75
86
  });
76
87
  if (_response.ok) {
77
- return yield serializers.graph.node.getByGroupId.Response.parseOrThrow(_response.body, {
88
+ return serializers.graph.node.getByGroupId.Response.parseOrThrow(_response.body, {
78
89
  unrecognizedObjectKeys: "passthrough",
79
90
  allowUnrecognizedUnionMembers: true,
80
91
  allowUnrecognizedEnumValues: true,
@@ -85,7 +96,7 @@ class Node {
85
96
  if (_response.error.reason === "status-code") {
86
97
  switch (_response.error.statusCode) {
87
98
  case 400:
88
- throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
99
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
89
100
  unrecognizedObjectKeys: "passthrough",
90
101
  allowUnrecognizedUnionMembers: true,
91
102
  allowUnrecognizedEnumValues: true,
@@ -93,7 +104,7 @@ class Node {
93
104
  breadcrumbsPrefix: ["response"],
94
105
  }));
95
106
  case 500:
96
- throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
107
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
97
108
  unrecognizedObjectKeys: "passthrough",
98
109
  allowUnrecognizedUnionMembers: true,
99
110
  allowUnrecognizedEnumValues: true,
@@ -114,7 +125,7 @@ class Node {
114
125
  body: _response.error.rawBody,
115
126
  });
116
127
  case "timeout":
117
- throw new errors.ZepTimeoutError();
128
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/node/group/{group_id}.");
118
129
  case "unknown":
119
130
  throw new errors.ZepError({
120
131
  message: _response.error.errorMessage,
@@ -132,22 +143,23 @@ class Node {
132
143
  * @throws {@link Zep.InternalServerError}
133
144
  *
134
145
  * @example
135
- * await zep.graph.node.getByUserId("user_id")
146
+ * await client.graph.node.getByUserId("user_id")
136
147
  */
137
148
  getByUserId(userId, requestOptions) {
138
- var _a, _b;
139
149
  return __awaiter(this, void 0, void 0, function* () {
150
+ var _a, _b;
140
151
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
141
152
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/node/user/${encodeURIComponent(userId)}`),
142
153
  method: "GET",
143
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
154
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
144
155
  contentType: "application/json",
156
+ requestType: "json",
145
157
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
146
158
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
147
159
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
148
160
  });
149
161
  if (_response.ok) {
150
- return yield serializers.graph.node.getByUserId.Response.parseOrThrow(_response.body, {
162
+ return serializers.graph.node.getByUserId.Response.parseOrThrow(_response.body, {
151
163
  unrecognizedObjectKeys: "passthrough",
152
164
  allowUnrecognizedUnionMembers: true,
153
165
  allowUnrecognizedEnumValues: true,
@@ -158,7 +170,7 @@ class Node {
158
170
  if (_response.error.reason === "status-code") {
159
171
  switch (_response.error.statusCode) {
160
172
  case 400:
161
- throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
173
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
162
174
  unrecognizedObjectKeys: "passthrough",
163
175
  allowUnrecognizedUnionMembers: true,
164
176
  allowUnrecognizedEnumValues: true,
@@ -166,7 +178,7 @@ class Node {
166
178
  breadcrumbsPrefix: ["response"],
167
179
  }));
168
180
  case 500:
169
- throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
181
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
170
182
  unrecognizedObjectKeys: "passthrough",
171
183
  allowUnrecognizedUnionMembers: true,
172
184
  allowUnrecognizedEnumValues: true,
@@ -187,7 +199,7 @@ class Node {
187
199
  body: _response.error.rawBody,
188
200
  });
189
201
  case "timeout":
190
- throw new errors.ZepTimeoutError();
202
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/node/user/{user_id}.");
191
203
  case "unknown":
192
204
  throw new errors.ZepError({
193
205
  message: _response.error.errorMessage,
@@ -206,22 +218,23 @@ class Node {
206
218
  * @throws {@link Zep.InternalServerError}
207
219
  *
208
220
  * @example
209
- * await zep.graph.node.get("uuid")
221
+ * await client.graph.node.get("uuid")
210
222
  */
211
223
  get(uuid, requestOptions) {
212
- var _a, _b;
213
224
  return __awaiter(this, void 0, void 0, function* () {
225
+ var _a, _b;
214
226
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
215
227
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/node/${encodeURIComponent(uuid)}`),
216
228
  method: "GET",
217
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
229
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
218
230
  contentType: "application/json",
231
+ requestType: "json",
219
232
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
220
233
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
221
234
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
222
235
  });
223
236
  if (_response.ok) {
224
- return yield serializers.EntityNode.parseOrThrow(_response.body, {
237
+ return serializers.EntityNode.parseOrThrow(_response.body, {
225
238
  unrecognizedObjectKeys: "passthrough",
226
239
  allowUnrecognizedUnionMembers: true,
227
240
  allowUnrecognizedEnumValues: true,
@@ -232,7 +245,7 @@ class Node {
232
245
  if (_response.error.reason === "status-code") {
233
246
  switch (_response.error.statusCode) {
234
247
  case 400:
235
- throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
248
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
236
249
  unrecognizedObjectKeys: "passthrough",
237
250
  allowUnrecognizedUnionMembers: true,
238
251
  allowUnrecognizedEnumValues: true,
@@ -240,7 +253,7 @@ class Node {
240
253
  breadcrumbsPrefix: ["response"],
241
254
  }));
242
255
  case 404:
243
- throw new Zep.NotFoundError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
256
+ throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
244
257
  unrecognizedObjectKeys: "passthrough",
245
258
  allowUnrecognizedUnionMembers: true,
246
259
  allowUnrecognizedEnumValues: true,
@@ -248,7 +261,7 @@ class Node {
248
261
  breadcrumbsPrefix: ["response"],
249
262
  }));
250
263
  case 500:
251
- throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
264
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
252
265
  unrecognizedObjectKeys: "passthrough",
253
266
  allowUnrecognizedUnionMembers: true,
254
267
  allowUnrecognizedEnumValues: true,
@@ -269,7 +282,7 @@ class Node {
269
282
  body: _response.error.rawBody,
270
283
  });
271
284
  case "timeout":
272
- throw new errors.ZepTimeoutError();
285
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/node/{uuid}.");
273
286
  case "unknown":
274
287
  throw new errors.ZepError({
275
288
  message: _response.error.errorMessage,
@@ -278,8 +291,8 @@ class Node {
278
291
  });
279
292
  }
280
293
  _getCustomAuthorizationHeaders() {
281
- var _a;
282
294
  return __awaiter(this, void 0, void 0, function* () {
295
+ var _a;
283
296
  const apiKeyValue = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["ZEP_API_KEY"];
284
297
  return { Authorization: `Api-Key ${apiKeyValue}` };
285
298
  });
@@ -11,9 +11,14 @@ export declare namespace Group {
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;
20
+ /** Additional headers to include in the request. */
21
+ headers?: Record<string, string>;
17
22
  }
18
23
  }
19
24
  export declare class Group {
@@ -29,9 +34,11 @@ export declare class Group {
29
34
  * @throws {@link Zep.InternalServerError}
30
35
  *
31
36
  * @example
32
- * await zep.group.add()
37
+ * await client.group.add({
38
+ * groupId: "group_id"
39
+ * })
33
40
  */
34
- add(request?: Zep.CreateGroupRequest, requestOptions?: Group.RequestOptions): Promise<Zep.Group>;
41
+ add(request: Zep.CreateGroupRequest, requestOptions?: Group.RequestOptions): Promise<Zep.Group>;
35
42
  /**
36
43
  * Delete group
37
44
  *
@@ -43,7 +50,7 @@ export declare class Group {
43
50
  * @throws {@link Zep.InternalServerError}
44
51
  *
45
52
  * @example
46
- * await zep.group.delete("groupId")
53
+ * await client.group.delete("groupId")
47
54
  */
48
55
  delete(groupId: string, requestOptions?: Group.RequestOptions): Promise<Zep.SuccessResponse>;
49
56
  protected _getCustomAuthorizationHeaders(): Promise<{