@getzep/zep-cloud 1.0.12 → 2.0.0-rc.2

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 (438) hide show
  1. package/Client.d.ts +6 -0
  2. package/Client.js +12 -2
  3. package/LICENSE +201 -0
  4. package/api/resources/document/client/Client.d.ts +9 -9
  5. package/api/resources/document/client/Client.js +20 -20
  6. package/api/resources/graph/client/Client.d.ts +62 -0
  7. package/api/resources/graph/client/Client.js +225 -0
  8. package/api/resources/graph/client/index.d.ts +1 -0
  9. package/{dist/langchain → api/resources/graph/client}/index.js +1 -3
  10. package/api/resources/graph/client/requests/AddDataRequest.d.ts +14 -0
  11. package/api/resources/graph/client/requests/GraphSearchQuery.d.ts +30 -0
  12. package/api/resources/graph/client/requests/index.d.ts +2 -0
  13. package/api/resources/graph/client/requests/index.js +2 -0
  14. package/api/resources/graph/index.d.ts +2 -0
  15. package/{langchain → api/resources/graph}/index.js +2 -3
  16. package/api/resources/graph/resources/edge/client/Client.d.ts +78 -0
  17. package/api/resources/graph/resources/edge/client/Client.js +361 -0
  18. package/api/resources/graph/resources/edge/client/index.d.ts +1 -0
  19. package/api/resources/graph/resources/edge/client/index.js +2 -0
  20. package/api/resources/graph/resources/edge/index.d.ts +1 -0
  21. package/api/resources/graph/resources/edge/index.js +17 -0
  22. package/api/resources/graph/resources/episode/client/Client.d.ts +66 -0
  23. package/api/resources/graph/resources/episode/client/Client.js +293 -0
  24. package/api/resources/graph/resources/episode/client/index.d.ts +1 -0
  25. package/api/resources/graph/resources/episode/client/index.js +17 -0
  26. package/api/resources/graph/resources/episode/client/requests/EpisodeGetByGroupIdRequest.d.ts +13 -0
  27. package/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.ts +13 -0
  28. package/api/resources/graph/resources/episode/client/requests/index.d.ts +2 -0
  29. package/api/resources/graph/resources/episode/client/requests/index.js +2 -0
  30. package/api/resources/graph/resources/episode/index.d.ts +1 -0
  31. package/api/resources/graph/resources/episode/index.js +17 -0
  32. package/api/resources/graph/resources/index.d.ts +4 -0
  33. package/api/resources/graph/resources/index.js +33 -0
  34. package/api/resources/graph/resources/node/client/Client.d.ts +65 -0
  35. package/api/resources/graph/resources/node/client/Client.js +288 -0
  36. package/api/resources/graph/resources/node/client/index.d.ts +1 -0
  37. package/api/resources/graph/resources/node/client/index.js +2 -0
  38. package/api/resources/graph/resources/node/index.d.ts +1 -0
  39. package/api/resources/graph/resources/node/index.js +17 -0
  40. package/api/resources/group/client/Client.d.ts +52 -0
  41. package/api/resources/group/client/Client.js +216 -0
  42. package/api/resources/group/client/index.d.ts +1 -0
  43. package/api/resources/group/client/index.js +17 -0
  44. package/api/resources/group/client/requests/CreateGroupRequest.d.ts +12 -0
  45. package/api/resources/group/client/requests/index.d.ts +1 -0
  46. package/api/resources/group/client/requests/index.js +2 -0
  47. package/api/resources/group/index.d.ts +1 -0
  48. package/api/resources/group/index.js +17 -0
  49. package/api/resources/index.d.ts +4 -0
  50. package/api/resources/index.js +5 -1
  51. package/api/resources/memory/client/Client.d.ts +22 -12
  52. package/api/resources/memory/client/Client.js +45 -38
  53. package/api/resources/memory/client/requests/AddFactsRequest.d.ts +1 -1
  54. package/api/resources/memory/client/requests/AddMemoryRequest.d.ts +6 -3
  55. package/api/resources/memory/client/requests/CreateSessionRequest.d.ts +3 -2
  56. package/api/resources/memory/client/requests/MemoryGetRequest.d.ts +0 -5
  57. package/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.d.ts +1 -1
  58. package/api/resources/memory/client/requests/ModelsMessageMetadataUpdate.d.ts +3 -1
  59. package/api/resources/memory/client/requests/SessionSearchQuery.d.ts +12 -3
  60. package/api/resources/memory/client/requests/UpdateSessionRequest.d.ts +3 -1
  61. package/api/resources/user/client/Client.d.ts +13 -0
  62. package/api/resources/user/client/Client.js +79 -6
  63. package/{dist/api/types/DocumentResponse.d.ts → api/types/ApidataDocument.d.ts} +1 -1
  64. package/api/types/{DocumentCollectionResponse.d.ts → ApidataDocumentCollection.d.ts} +1 -3
  65. package/api/types/{DocumentSearchResultPage.d.ts → ApidataDocumentSearchResponse.d.ts} +2 -2
  66. package/api/types/{DocumentSearchResult.d.ts → ApidataDocumentWithScore.d.ts} +1 -1
  67. package/api/types/EndSessionResponse.d.ts +1 -1
  68. package/api/types/EntityEdge.d.ts +25 -0
  69. package/api/types/EntityNode.d.ts +15 -0
  70. package/api/types/Episode.d.ts +12 -0
  71. package/api/types/EpisodeResponse.d.ts +7 -0
  72. package/api/types/EpisodeResponse.js +5 -0
  73. package/api/types/Fact.d.ts +9 -3
  74. package/api/types/GraphDataType.d.ts +9 -0
  75. package/api/types/GraphDataType.js +11 -0
  76. package/api/types/GraphSearchResults.d.ts +8 -0
  77. package/api/types/GraphSearchResults.js +5 -0
  78. package/api/types/GraphSearchScope.d.ts +8 -0
  79. package/api/types/GraphSearchScope.js +10 -0
  80. package/api/types/Group.d.ts +12 -0
  81. package/api/types/Group.js +5 -0
  82. package/api/types/Memory.d.ts +4 -5
  83. package/api/types/Message.d.ts +2 -2
  84. package/api/types/{AddedFact.d.ts → NewFact.d.ts} +1 -1
  85. package/api/types/NewFact.js +5 -0
  86. package/api/types/Reranker.d.ts +10 -0
  87. package/api/types/Reranker.js +12 -0
  88. package/api/types/Session.d.ts +1 -2
  89. package/api/types/{ClassifySessionResponse.d.ts → SessionClassification.d.ts} +2 -2
  90. package/api/types/SessionClassification.js +5 -0
  91. package/api/types/SessionFactRatingExamples.d.ts +8 -0
  92. package/api/types/SessionFactRatingExamples.js +5 -0
  93. package/api/types/SessionFactRatingInstruction.d.ts +21 -0
  94. package/api/types/SessionFactRatingInstruction.js +5 -0
  95. package/api/types/index.d.ts +24 -14
  96. package/api/types/index.js +24 -14
  97. package/dist/Client.d.ts +6 -0
  98. package/dist/Client.js +12 -2
  99. package/dist/api/resources/document/client/Client.d.ts +9 -9
  100. package/dist/api/resources/document/client/Client.js +20 -20
  101. package/dist/api/resources/graph/client/Client.d.ts +62 -0
  102. package/dist/api/resources/graph/client/Client.js +225 -0
  103. package/dist/api/resources/graph/client/index.d.ts +1 -0
  104. package/dist/api/resources/graph/client/index.js +17 -0
  105. package/dist/api/resources/graph/client/requests/AddDataRequest.d.ts +14 -0
  106. package/dist/api/resources/graph/client/requests/AddDataRequest.js +5 -0
  107. package/dist/api/resources/graph/client/requests/GraphSearchQuery.d.ts +30 -0
  108. package/dist/api/resources/graph/client/requests/GraphSearchQuery.js +5 -0
  109. package/dist/api/resources/graph/client/requests/index.d.ts +2 -0
  110. package/dist/api/resources/graph/client/requests/index.js +2 -0
  111. package/dist/api/resources/graph/index.d.ts +2 -0
  112. package/dist/api/resources/graph/index.js +18 -0
  113. package/dist/api/resources/graph/resources/edge/client/Client.d.ts +78 -0
  114. package/dist/api/resources/graph/resources/edge/client/Client.js +361 -0
  115. package/dist/api/resources/graph/resources/edge/client/index.d.ts +1 -0
  116. package/dist/api/resources/graph/resources/edge/client/index.js +2 -0
  117. package/dist/api/resources/graph/resources/edge/index.d.ts +1 -0
  118. package/dist/api/resources/graph/resources/edge/index.js +17 -0
  119. package/dist/api/resources/graph/resources/episode/client/Client.d.ts +66 -0
  120. package/dist/api/resources/graph/resources/episode/client/Client.js +293 -0
  121. package/dist/api/resources/graph/resources/episode/client/index.d.ts +1 -0
  122. package/dist/api/resources/graph/resources/episode/client/index.js +17 -0
  123. package/dist/api/resources/graph/resources/episode/client/requests/EpisodeGetByGroupIdRequest.d.ts +13 -0
  124. package/dist/api/resources/graph/resources/episode/client/requests/EpisodeGetByGroupIdRequest.js +5 -0
  125. package/dist/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.ts +13 -0
  126. package/dist/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.js +5 -0
  127. package/dist/api/resources/graph/resources/episode/client/requests/index.d.ts +2 -0
  128. package/dist/api/resources/graph/resources/episode/client/requests/index.js +2 -0
  129. package/dist/api/resources/graph/resources/episode/index.d.ts +1 -0
  130. package/dist/api/resources/graph/resources/episode/index.js +17 -0
  131. package/dist/api/resources/graph/resources/index.d.ts +4 -0
  132. package/dist/api/resources/graph/resources/index.js +33 -0
  133. package/dist/api/resources/graph/resources/node/client/Client.d.ts +65 -0
  134. package/dist/api/resources/graph/resources/node/client/Client.js +288 -0
  135. package/dist/api/resources/graph/resources/node/client/index.d.ts +1 -0
  136. package/dist/api/resources/graph/resources/node/client/index.js +2 -0
  137. package/dist/api/resources/graph/resources/node/index.d.ts +1 -0
  138. package/dist/api/resources/graph/resources/node/index.js +17 -0
  139. package/dist/api/resources/group/client/Client.d.ts +52 -0
  140. package/dist/api/resources/group/client/Client.js +216 -0
  141. package/dist/api/resources/group/client/index.d.ts +1 -0
  142. package/dist/api/resources/group/client/index.js +17 -0
  143. package/dist/api/resources/group/client/requests/CreateGroupRequest.d.ts +12 -0
  144. package/dist/api/resources/group/client/requests/CreateGroupRequest.js +5 -0
  145. package/dist/api/resources/group/client/requests/index.d.ts +1 -0
  146. package/dist/api/resources/group/client/requests/index.js +2 -0
  147. package/dist/api/resources/group/index.d.ts +1 -0
  148. package/dist/api/resources/group/index.js +17 -0
  149. package/dist/api/resources/index.d.ts +4 -0
  150. package/dist/api/resources/index.js +5 -1
  151. package/dist/api/resources/memory/client/Client.d.ts +22 -12
  152. package/dist/api/resources/memory/client/Client.js +45 -38
  153. package/dist/api/resources/memory/client/requests/AddFactsRequest.d.ts +1 -1
  154. package/dist/api/resources/memory/client/requests/AddMemoryRequest.d.ts +6 -3
  155. package/dist/api/resources/memory/client/requests/CreateSessionRequest.d.ts +3 -2
  156. package/dist/api/resources/memory/client/requests/MemoryGetRequest.d.ts +0 -5
  157. package/dist/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.d.ts +1 -1
  158. package/dist/api/resources/memory/client/requests/ModelsMessageMetadataUpdate.d.ts +3 -1
  159. package/dist/api/resources/memory/client/requests/SessionSearchQuery.d.ts +12 -3
  160. package/dist/api/resources/memory/client/requests/UpdateSessionRequest.d.ts +3 -1
  161. package/dist/api/resources/user/client/Client.d.ts +13 -0
  162. package/dist/api/resources/user/client/Client.js +79 -6
  163. package/{api/types/DocumentResponse.d.ts → dist/api/types/ApidataDocument.d.ts} +1 -1
  164. package/dist/api/types/ApidataDocument.js +5 -0
  165. package/dist/api/types/{DocumentCollectionResponse.d.ts → ApidataDocumentCollection.d.ts} +1 -3
  166. package/dist/api/types/ApidataDocumentCollection.js +5 -0
  167. package/dist/api/types/{DocumentSearchResultPage.d.ts → ApidataDocumentSearchResponse.d.ts} +2 -2
  168. package/dist/api/types/ApidataDocumentSearchResponse.js +5 -0
  169. package/dist/api/types/{DocumentSearchResult.d.ts → ApidataDocumentWithScore.d.ts} +1 -1
  170. package/dist/api/types/ApidataDocumentWithScore.js +5 -0
  171. package/dist/api/types/EndSessionResponse.d.ts +1 -1
  172. package/dist/api/types/EntityEdge.d.ts +25 -0
  173. package/dist/api/types/EntityEdge.js +5 -0
  174. package/dist/api/types/EntityNode.d.ts +15 -0
  175. package/dist/api/types/EntityNode.js +5 -0
  176. package/dist/api/types/Episode.d.ts +12 -0
  177. package/dist/api/types/Episode.js +5 -0
  178. package/dist/api/types/EpisodeResponse.d.ts +7 -0
  179. package/dist/api/types/EpisodeResponse.js +5 -0
  180. package/dist/api/types/Fact.d.ts +9 -3
  181. package/dist/api/types/GraphDataType.d.ts +9 -0
  182. package/dist/api/types/GraphDataType.js +11 -0
  183. package/dist/api/types/GraphSearchResults.d.ts +8 -0
  184. package/dist/api/types/GraphSearchResults.js +5 -0
  185. package/dist/api/types/GraphSearchScope.d.ts +8 -0
  186. package/dist/api/types/GraphSearchScope.js +10 -0
  187. package/dist/api/types/Group.d.ts +12 -0
  188. package/dist/api/types/Group.js +5 -0
  189. package/dist/api/types/Memory.d.ts +4 -5
  190. package/dist/api/types/Message.d.ts +2 -2
  191. package/dist/api/types/{AddedFact.d.ts → NewFact.d.ts} +1 -1
  192. package/dist/api/types/NewFact.js +5 -0
  193. package/dist/api/types/Reranker.d.ts +10 -0
  194. package/dist/api/types/Reranker.js +12 -0
  195. package/dist/api/types/Session.d.ts +1 -2
  196. package/dist/api/types/{ClassifySessionResponse.d.ts → SessionClassification.d.ts} +2 -2
  197. package/dist/api/types/SessionClassification.js +5 -0
  198. package/dist/api/types/SessionFactRatingExamples.d.ts +8 -0
  199. package/dist/api/types/SessionFactRatingExamples.js +5 -0
  200. package/dist/api/types/SessionFactRatingInstruction.d.ts +21 -0
  201. package/dist/api/types/SessionFactRatingInstruction.js +5 -0
  202. package/dist/api/types/index.d.ts +24 -14
  203. package/dist/api/types/index.js +24 -14
  204. package/dist/serialization/resources/document/client/addDocuments.d.ts +2 -2
  205. package/dist/serialization/resources/document/client/addDocuments.js +1 -1
  206. package/dist/serialization/resources/document/client/batchGetDocuments.d.ts +3 -3
  207. package/dist/serialization/resources/document/client/batchGetDocuments.js +2 -2
  208. package/dist/serialization/resources/document/client/listCollections.d.ts +3 -3
  209. package/dist/serialization/resources/document/client/listCollections.js +2 -2
  210. package/dist/serialization/resources/graph/client/index.d.ts +1 -0
  211. package/dist/serialization/resources/graph/client/index.js +17 -0
  212. package/dist/serialization/resources/graph/client/requests/AddDataRequest.d.ts +16 -0
  213. package/dist/serialization/resources/graph/client/requests/AddDataRequest.js +37 -0
  214. package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.d.ts +22 -0
  215. package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.js +43 -0
  216. package/dist/serialization/resources/graph/client/requests/index.d.ts +2 -0
  217. package/dist/serialization/resources/graph/client/requests/index.js +7 -0
  218. package/dist/serialization/resources/graph/index.d.ts +2 -0
  219. package/dist/serialization/resources/graph/index.js +18 -0
  220. package/dist/serialization/resources/graph/resources/edge/client/getByGroupId.d.ts +11 -0
  221. package/dist/serialization/resources/graph/resources/edge/client/getByGroupId.js +32 -0
  222. package/dist/serialization/resources/graph/resources/edge/client/getByUserId.d.ts +11 -0
  223. package/dist/serialization/resources/graph/resources/edge/client/getByUserId.js +32 -0
  224. package/dist/serialization/resources/graph/resources/edge/client/index.d.ts +2 -0
  225. package/dist/serialization/resources/graph/resources/edge/client/index.js +28 -0
  226. package/dist/serialization/resources/graph/resources/edge/index.d.ts +1 -0
  227. package/dist/serialization/resources/graph/resources/edge/index.js +17 -0
  228. package/dist/serialization/resources/graph/resources/index.d.ts +2 -0
  229. package/dist/serialization/resources/graph/resources/index.js +28 -0
  230. package/dist/serialization/resources/graph/resources/node/client/getByGroupId.d.ts +11 -0
  231. package/dist/serialization/resources/graph/resources/node/client/getByGroupId.js +32 -0
  232. package/dist/serialization/resources/graph/resources/node/client/getByUserId.d.ts +11 -0
  233. package/dist/serialization/resources/graph/resources/node/client/getByUserId.js +32 -0
  234. package/dist/serialization/resources/graph/resources/node/client/index.d.ts +2 -0
  235. package/dist/serialization/resources/graph/resources/node/client/index.js +28 -0
  236. package/dist/serialization/resources/graph/resources/node/index.d.ts +1 -0
  237. package/dist/serialization/resources/graph/resources/node/index.js +17 -0
  238. package/dist/serialization/resources/group/client/index.d.ts +1 -0
  239. package/dist/serialization/resources/group/client/index.js +17 -0
  240. package/dist/serialization/resources/group/client/requests/CreateGroupRequest.d.ts +14 -0
  241. package/dist/serialization/resources/group/client/requests/CreateGroupRequest.js +35 -0
  242. package/dist/serialization/resources/group/client/requests/index.d.ts +1 -0
  243. package/dist/serialization/resources/group/client/requests/index.js +5 -0
  244. package/dist/serialization/resources/group/index.d.ts +1 -0
  245. package/dist/serialization/resources/group/index.js +17 -0
  246. package/dist/serialization/resources/index.d.ts +4 -0
  247. package/dist/serialization/resources/index.js +5 -1
  248. package/dist/serialization/resources/memory/client/requests/AddFactsRequest.d.ts +2 -2
  249. package/dist/serialization/resources/memory/client/requests/AddFactsRequest.js +2 -2
  250. package/dist/serialization/resources/memory/client/requests/CreateSessionRequest.d.ts +1 -1
  251. package/dist/serialization/resources/memory/client/requests/CreateSessionRequest.js +1 -1
  252. package/dist/serialization/resources/memory/client/requests/SessionSearchQuery.d.ts +1 -1
  253. package/dist/serialization/resources/memory/client/requests/SessionSearchQuery.js +1 -1
  254. package/{serialization/types/DocumentResponse.d.ts → dist/serialization/types/ApidataDocument.d.ts} +2 -2
  255. package/{serialization/types/DocumentResponse.js → dist/serialization/types/ApidataDocument.js} +2 -2
  256. package/dist/serialization/types/{DocumentCollectionResponse.d.ts → ApidataDocumentCollection.d.ts} +2 -2
  257. package/{serialization/types/DocumentCollectionResponse.js → dist/serialization/types/ApidataDocumentCollection.js} +2 -2
  258. package/dist/serialization/types/{DocumentSearchResultPage.d.ts → ApidataDocumentSearchResponse.d.ts} +4 -4
  259. package/dist/serialization/types/{DocumentSearchResultPage.js → ApidataDocumentSearchResponse.js} +4 -4
  260. package/dist/serialization/types/{DocumentSearchResult.d.ts → ApidataDocumentWithScore.d.ts} +2 -2
  261. package/dist/serialization/types/{DocumentSearchResult.js → ApidataDocumentWithScore.js} +2 -2
  262. package/dist/serialization/types/EndSessionResponse.d.ts +2 -2
  263. package/dist/serialization/types/EndSessionResponse.js +2 -2
  264. package/dist/serialization/types/EntityEdge.d.ts +21 -0
  265. package/dist/serialization/types/EntityEdge.js +42 -0
  266. package/dist/serialization/types/EntityNode.d.ts +16 -0
  267. package/dist/serialization/types/EntityNode.js +37 -0
  268. package/dist/serialization/types/Episode.d.ts +18 -0
  269. package/dist/serialization/types/Episode.js +39 -0
  270. package/dist/serialization/types/EpisodeResponse.d.ts +13 -0
  271. package/dist/serialization/types/EpisodeResponse.js +34 -0
  272. package/dist/serialization/types/Fact.d.ts +9 -3
  273. package/dist/serialization/types/Fact.js +9 -3
  274. package/dist/serialization/types/GraphDataType.d.ts +10 -0
  275. package/dist/serialization/types/{MemoryType.js → GraphDataType.js} +2 -2
  276. package/dist/serialization/types/GraphSearchResults.d.ts +15 -0
  277. package/dist/serialization/types/GraphSearchResults.js +36 -0
  278. package/dist/serialization/types/GraphSearchScope.d.ts +10 -0
  279. package/{serialization/types/MemoryType.js → dist/serialization/types/GraphSearchScope.js} +2 -2
  280. package/dist/serialization/types/Group.d.ts +18 -0
  281. package/dist/serialization/types/Group.js +39 -0
  282. package/dist/serialization/types/Memory.d.ts +0 -1
  283. package/dist/serialization/types/Memory.js +0 -1
  284. package/dist/serialization/types/Message.d.ts +2 -2
  285. package/dist/serialization/types/Message.js +2 -2
  286. package/dist/serialization/types/{AddedFact.d.ts → NewFact.d.ts} +2 -2
  287. package/{serialization/types/AddedFact.js → dist/serialization/types/NewFact.js} +2 -2
  288. package/dist/serialization/types/Reranker.d.ts +10 -0
  289. package/dist/serialization/types/Reranker.js +36 -0
  290. package/dist/serialization/types/Session.d.ts +2 -3
  291. package/dist/serialization/types/Session.js +2 -3
  292. package/dist/serialization/types/{ClassifySessionResponse.d.ts → SessionClassification.d.ts} +3 -3
  293. package/{serialization/types/ClassifySessionResponse.js → dist/serialization/types/SessionClassification.js} +3 -3
  294. package/dist/serialization/types/SessionFactRatingExamples.d.ts +14 -0
  295. package/dist/serialization/types/SessionFactRatingExamples.js +35 -0
  296. package/dist/serialization/types/SessionFactRatingInstruction.d.ts +14 -0
  297. package/dist/serialization/types/SessionFactRatingInstruction.js +35 -0
  298. package/dist/serialization/types/index.d.ts +24 -14
  299. package/dist/serialization/types/index.js +24 -14
  300. package/examples/graph/conversations.ts +297 -0
  301. package/examples/graph/group_graph_example.ts +61 -0
  302. package/examples/graph/user_graph_example.ts +158 -0
  303. package/package.json +11 -22
  304. package/serialization/resources/document/client/addDocuments.d.ts +2 -2
  305. package/serialization/resources/document/client/addDocuments.js +1 -1
  306. package/serialization/resources/document/client/batchGetDocuments.d.ts +3 -3
  307. package/serialization/resources/document/client/batchGetDocuments.js +2 -2
  308. package/serialization/resources/document/client/listCollections.d.ts +3 -3
  309. package/serialization/resources/document/client/listCollections.js +2 -2
  310. package/serialization/resources/graph/client/index.d.ts +1 -0
  311. package/serialization/resources/graph/client/index.js +17 -0
  312. package/serialization/resources/graph/client/requests/AddDataRequest.d.ts +16 -0
  313. package/serialization/resources/graph/client/requests/AddDataRequest.js +37 -0
  314. package/serialization/resources/graph/client/requests/GraphSearchQuery.d.ts +22 -0
  315. package/serialization/resources/graph/client/requests/GraphSearchQuery.js +43 -0
  316. package/serialization/resources/graph/client/requests/index.d.ts +2 -0
  317. package/serialization/resources/graph/client/requests/index.js +7 -0
  318. package/serialization/resources/graph/index.d.ts +2 -0
  319. package/serialization/resources/graph/index.js +18 -0
  320. package/serialization/resources/graph/resources/edge/client/getByGroupId.d.ts +11 -0
  321. package/serialization/resources/graph/resources/edge/client/getByGroupId.js +32 -0
  322. package/serialization/resources/graph/resources/edge/client/getByUserId.d.ts +11 -0
  323. package/serialization/resources/graph/resources/edge/client/getByUserId.js +32 -0
  324. package/serialization/resources/graph/resources/edge/client/index.d.ts +2 -0
  325. package/serialization/resources/graph/resources/edge/client/index.js +28 -0
  326. package/serialization/resources/graph/resources/edge/index.d.ts +1 -0
  327. package/serialization/resources/graph/resources/edge/index.js +17 -0
  328. package/serialization/resources/graph/resources/index.d.ts +2 -0
  329. package/serialization/resources/graph/resources/index.js +28 -0
  330. package/serialization/resources/graph/resources/node/client/getByGroupId.d.ts +11 -0
  331. package/serialization/resources/graph/resources/node/client/getByGroupId.js +32 -0
  332. package/serialization/resources/graph/resources/node/client/getByUserId.d.ts +11 -0
  333. package/serialization/resources/graph/resources/node/client/getByUserId.js +32 -0
  334. package/serialization/resources/graph/resources/node/client/index.d.ts +2 -0
  335. package/serialization/resources/graph/resources/node/client/index.js +28 -0
  336. package/serialization/resources/graph/resources/node/index.d.ts +1 -0
  337. package/serialization/resources/graph/resources/node/index.js +17 -0
  338. package/serialization/resources/group/client/index.d.ts +1 -0
  339. package/serialization/resources/group/client/index.js +17 -0
  340. package/serialization/resources/group/client/requests/CreateGroupRequest.d.ts +14 -0
  341. package/serialization/resources/group/client/requests/CreateGroupRequest.js +35 -0
  342. package/serialization/resources/group/client/requests/index.d.ts +1 -0
  343. package/serialization/resources/group/client/requests/index.js +5 -0
  344. package/serialization/resources/group/index.d.ts +1 -0
  345. package/serialization/resources/group/index.js +17 -0
  346. package/serialization/resources/index.d.ts +4 -0
  347. package/serialization/resources/index.js +5 -1
  348. package/serialization/resources/memory/client/requests/AddFactsRequest.d.ts +2 -2
  349. package/serialization/resources/memory/client/requests/AddFactsRequest.js +2 -2
  350. package/serialization/resources/memory/client/requests/CreateSessionRequest.d.ts +1 -1
  351. package/serialization/resources/memory/client/requests/CreateSessionRequest.js +1 -1
  352. package/serialization/resources/memory/client/requests/SessionSearchQuery.d.ts +1 -1
  353. package/serialization/resources/memory/client/requests/SessionSearchQuery.js +1 -1
  354. package/{dist/serialization/types/DocumentResponse.d.ts → serialization/types/ApidataDocument.d.ts} +2 -2
  355. package/{dist/serialization/types/DocumentResponse.js → serialization/types/ApidataDocument.js} +2 -2
  356. package/serialization/types/{DocumentCollectionResponse.d.ts → ApidataDocumentCollection.d.ts} +2 -2
  357. package/{dist/serialization/types/DocumentCollectionResponse.js → serialization/types/ApidataDocumentCollection.js} +2 -2
  358. package/serialization/types/{DocumentSearchResultPage.d.ts → ApidataDocumentSearchResponse.d.ts} +4 -4
  359. package/serialization/types/{DocumentSearchResultPage.js → ApidataDocumentSearchResponse.js} +4 -4
  360. package/serialization/types/{DocumentSearchResult.d.ts → ApidataDocumentWithScore.d.ts} +2 -2
  361. package/serialization/types/{DocumentSearchResult.js → ApidataDocumentWithScore.js} +2 -2
  362. package/serialization/types/EndSessionResponse.d.ts +2 -2
  363. package/serialization/types/EndSessionResponse.js +2 -2
  364. package/serialization/types/EntityEdge.d.ts +21 -0
  365. package/serialization/types/EntityEdge.js +42 -0
  366. package/serialization/types/EntityNode.d.ts +16 -0
  367. package/serialization/types/EntityNode.js +37 -0
  368. package/serialization/types/Episode.d.ts +18 -0
  369. package/serialization/types/Episode.js +39 -0
  370. package/serialization/types/EpisodeResponse.d.ts +13 -0
  371. package/serialization/types/EpisodeResponse.js +34 -0
  372. package/serialization/types/Fact.d.ts +9 -3
  373. package/serialization/types/Fact.js +9 -3
  374. package/serialization/types/GraphDataType.d.ts +10 -0
  375. package/serialization/types/GraphDataType.js +31 -0
  376. package/serialization/types/GraphSearchResults.d.ts +15 -0
  377. package/serialization/types/GraphSearchResults.js +36 -0
  378. package/serialization/types/GraphSearchScope.d.ts +10 -0
  379. package/serialization/types/GraphSearchScope.js +31 -0
  380. package/serialization/types/Group.d.ts +18 -0
  381. package/serialization/types/Group.js +39 -0
  382. package/serialization/types/Memory.d.ts +0 -1
  383. package/serialization/types/Memory.js +0 -1
  384. package/serialization/types/Message.d.ts +2 -2
  385. package/serialization/types/Message.js +2 -2
  386. package/serialization/types/{AddedFact.d.ts → NewFact.d.ts} +2 -2
  387. package/{dist/serialization/types/AddedFact.js → serialization/types/NewFact.js} +2 -2
  388. package/serialization/types/Reranker.d.ts +10 -0
  389. package/serialization/types/Reranker.js +36 -0
  390. package/serialization/types/Session.d.ts +2 -3
  391. package/serialization/types/Session.js +2 -3
  392. package/serialization/types/{ClassifySessionResponse.d.ts → SessionClassification.d.ts} +3 -3
  393. package/{dist/serialization/types/ClassifySessionResponse.js → serialization/types/SessionClassification.js} +3 -3
  394. package/serialization/types/SessionFactRatingExamples.d.ts +14 -0
  395. package/serialization/types/SessionFactRatingExamples.js +35 -0
  396. package/serialization/types/SessionFactRatingInstruction.d.ts +14 -0
  397. package/serialization/types/SessionFactRatingInstruction.js +35 -0
  398. package/serialization/types/index.d.ts +24 -14
  399. package/serialization/types/index.js +24 -14
  400. package/api/types/MemoryType.d.ts +0 -9
  401. package/api/types/MemoryType.js +0 -11
  402. package/dist/api/types/MemoryType.d.ts +0 -9
  403. package/dist/api/types/MemoryType.js +0 -11
  404. package/dist/langchain/index.d.ts +0 -3
  405. package/dist/langchain/message_history.d.ts +0 -39
  406. package/dist/langchain/message_history.js +0 -109
  407. package/dist/langchain/utils.d.ts +0 -4
  408. package/dist/langchain/utils.js +0 -44
  409. package/dist/langchain/vector_store.d.ts +0 -142
  410. package/dist/langchain/vector_store.js +0 -327
  411. package/dist/langchain/zep_memory.d.ts +0 -78
  412. package/dist/langchain/zep_memory.js +0 -174
  413. package/dist/serialization/types/MemoryType.d.ts +0 -10
  414. package/examples/langchain/message_history_example.ts +0 -60
  415. package/examples/langchain/message_history_vector_store_example.ts +0 -122
  416. package/examples/langchain/vector_store_example.ts +0 -71
  417. package/langchain/index.d.ts +0 -3
  418. package/langchain/message_history.d.ts +0 -39
  419. package/langchain/message_history.js +0 -109
  420. package/langchain/utils.d.ts +0 -4
  421. package/langchain/utils.js +0 -44
  422. package/langchain/vector_store.d.ts +0 -142
  423. package/langchain/vector_store.js +0 -327
  424. package/langchain/zep_memory.d.ts +0 -78
  425. package/langchain/zep_memory.js +0 -174
  426. package/serialization/types/MemoryType.d.ts +0 -10
  427. /package/api/{types/AddedFact.js → resources/graph/client/requests/AddDataRequest.js} +0 -0
  428. /package/api/{types/ClassifySessionResponse.js → resources/graph/client/requests/GraphSearchQuery.js} +0 -0
  429. /package/api/{types/DocumentCollectionResponse.js → resources/graph/resources/episode/client/requests/EpisodeGetByGroupIdRequest.js} +0 -0
  430. /package/api/{types/DocumentResponse.js → resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.js} +0 -0
  431. /package/api/{types/DocumentSearchResult.js → resources/group/client/requests/CreateGroupRequest.js} +0 -0
  432. /package/api/types/{DocumentSearchResultPage.js → ApidataDocument.js} +0 -0
  433. /package/{dist/api/types/AddedFact.js → api/types/ApidataDocumentCollection.js} +0 -0
  434. /package/{dist/api/types/ClassifySessionResponse.js → api/types/ApidataDocumentSearchResponse.js} +0 -0
  435. /package/{dist/api/types/DocumentCollectionResponse.js → api/types/ApidataDocumentWithScore.js} +0 -0
  436. /package/{dist/api/types/DocumentResponse.js → api/types/EntityEdge.js} +0 -0
  437. /package/{dist/api/types/DocumentSearchResult.js → api/types/EntityNode.js} +0 -0
  438. /package/{dist/api/types/DocumentSearchResultPage.js → api/types/Episode.js} +0 -0
@@ -0,0 +1,288 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
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
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Node = void 0;
42
+ const environments = __importStar(require("../../../../../../environments"));
43
+ const core = __importStar(require("../../../../../../core"));
44
+ const Zep = __importStar(require("../../../../../index"));
45
+ const url_join_1 = __importDefault(require("url-join"));
46
+ const serializers = __importStar(require("../../../../../../serialization/index"));
47
+ const errors = __importStar(require("../../../../../../errors/index"));
48
+ class Node {
49
+ constructor(_options = {}) {
50
+ this._options = _options;
51
+ }
52
+ /**
53
+ * Get all nodes for a group
54
+ *
55
+ * @param {string} groupId - Group ID
56
+ * @param {Node.RequestOptions} requestOptions - Request-specific configuration.
57
+ *
58
+ * @throws {@link Zep.BadRequestError}
59
+ * @throws {@link Zep.InternalServerError}
60
+ *
61
+ * @example
62
+ * await zep.graph.node.getByGroupId("group_id")
63
+ */
64
+ getByGroupId(groupId, requestOptions) {
65
+ var _a, _b;
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
68
+ 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
+ method: "GET",
70
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.0.0-rc.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
71
+ contentType: "application/json",
72
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
73
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
74
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
75
+ });
76
+ if (_response.ok) {
77
+ return yield serializers.graph.node.getByGroupId.Response.parseOrThrow(_response.body, {
78
+ unrecognizedObjectKeys: "passthrough",
79
+ allowUnrecognizedUnionMembers: true,
80
+ allowUnrecognizedEnumValues: true,
81
+ skipValidation: true,
82
+ breadcrumbsPrefix: ["response"],
83
+ });
84
+ }
85
+ if (_response.error.reason === "status-code") {
86
+ switch (_response.error.statusCode) {
87
+ case 400:
88
+ throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
89
+ unrecognizedObjectKeys: "passthrough",
90
+ allowUnrecognizedUnionMembers: true,
91
+ allowUnrecognizedEnumValues: true,
92
+ skipValidation: true,
93
+ breadcrumbsPrefix: ["response"],
94
+ }));
95
+ case 500:
96
+ throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
97
+ unrecognizedObjectKeys: "passthrough",
98
+ allowUnrecognizedUnionMembers: true,
99
+ allowUnrecognizedEnumValues: true,
100
+ skipValidation: true,
101
+ breadcrumbsPrefix: ["response"],
102
+ }));
103
+ default:
104
+ throw new errors.ZepError({
105
+ statusCode: _response.error.statusCode,
106
+ body: _response.error.body,
107
+ });
108
+ }
109
+ }
110
+ switch (_response.error.reason) {
111
+ case "non-json":
112
+ throw new errors.ZepError({
113
+ statusCode: _response.error.statusCode,
114
+ body: _response.error.rawBody,
115
+ });
116
+ case "timeout":
117
+ throw new errors.ZepTimeoutError();
118
+ case "unknown":
119
+ throw new errors.ZepError({
120
+ message: _response.error.errorMessage,
121
+ });
122
+ }
123
+ });
124
+ }
125
+ /**
126
+ * Get all nodes for a user
127
+ *
128
+ * @param {string} userId - User ID
129
+ * @param {Node.RequestOptions} requestOptions - Request-specific configuration.
130
+ *
131
+ * @throws {@link Zep.BadRequestError}
132
+ * @throws {@link Zep.InternalServerError}
133
+ *
134
+ * @example
135
+ * await zep.graph.node.getByUserId("user_id")
136
+ */
137
+ getByUserId(userId, requestOptions) {
138
+ var _a, _b;
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
141
+ 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
+ method: "GET",
143
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.0.0-rc.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
144
+ contentType: "application/json",
145
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
146
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
147
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
148
+ });
149
+ if (_response.ok) {
150
+ return yield serializers.graph.node.getByUserId.Response.parseOrThrow(_response.body, {
151
+ unrecognizedObjectKeys: "passthrough",
152
+ allowUnrecognizedUnionMembers: true,
153
+ allowUnrecognizedEnumValues: true,
154
+ skipValidation: true,
155
+ breadcrumbsPrefix: ["response"],
156
+ });
157
+ }
158
+ if (_response.error.reason === "status-code") {
159
+ switch (_response.error.statusCode) {
160
+ case 400:
161
+ throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
162
+ unrecognizedObjectKeys: "passthrough",
163
+ allowUnrecognizedUnionMembers: true,
164
+ allowUnrecognizedEnumValues: true,
165
+ skipValidation: true,
166
+ breadcrumbsPrefix: ["response"],
167
+ }));
168
+ case 500:
169
+ throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
170
+ unrecognizedObjectKeys: "passthrough",
171
+ allowUnrecognizedUnionMembers: true,
172
+ allowUnrecognizedEnumValues: true,
173
+ skipValidation: true,
174
+ breadcrumbsPrefix: ["response"],
175
+ }));
176
+ default:
177
+ throw new errors.ZepError({
178
+ statusCode: _response.error.statusCode,
179
+ body: _response.error.body,
180
+ });
181
+ }
182
+ }
183
+ switch (_response.error.reason) {
184
+ case "non-json":
185
+ throw new errors.ZepError({
186
+ statusCode: _response.error.statusCode,
187
+ body: _response.error.rawBody,
188
+ });
189
+ case "timeout":
190
+ throw new errors.ZepTimeoutError();
191
+ case "unknown":
192
+ throw new errors.ZepError({
193
+ message: _response.error.errorMessage,
194
+ });
195
+ }
196
+ });
197
+ }
198
+ /**
199
+ * Get a specific node by its UUID
200
+ *
201
+ * @param {string} uuid - Node UUID
202
+ * @param {Node.RequestOptions} requestOptions - Request-specific configuration.
203
+ *
204
+ * @throws {@link Zep.BadRequestError}
205
+ * @throws {@link Zep.NotFoundError}
206
+ * @throws {@link Zep.InternalServerError}
207
+ *
208
+ * @example
209
+ * await zep.graph.node.get("uuid")
210
+ */
211
+ get(uuid, requestOptions) {
212
+ var _a, _b;
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
215
+ 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
+ method: "GET",
217
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.0.0-rc.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
218
+ contentType: "application/json",
219
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
220
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
221
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
222
+ });
223
+ if (_response.ok) {
224
+ return yield serializers.EntityNode.parseOrThrow(_response.body, {
225
+ unrecognizedObjectKeys: "passthrough",
226
+ allowUnrecognizedUnionMembers: true,
227
+ allowUnrecognizedEnumValues: true,
228
+ skipValidation: true,
229
+ breadcrumbsPrefix: ["response"],
230
+ });
231
+ }
232
+ if (_response.error.reason === "status-code") {
233
+ switch (_response.error.statusCode) {
234
+ case 400:
235
+ throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
236
+ unrecognizedObjectKeys: "passthrough",
237
+ allowUnrecognizedUnionMembers: true,
238
+ allowUnrecognizedEnumValues: true,
239
+ skipValidation: true,
240
+ breadcrumbsPrefix: ["response"],
241
+ }));
242
+ case 404:
243
+ throw new Zep.NotFoundError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
244
+ unrecognizedObjectKeys: "passthrough",
245
+ allowUnrecognizedUnionMembers: true,
246
+ allowUnrecognizedEnumValues: true,
247
+ skipValidation: true,
248
+ breadcrumbsPrefix: ["response"],
249
+ }));
250
+ case 500:
251
+ throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
252
+ unrecognizedObjectKeys: "passthrough",
253
+ allowUnrecognizedUnionMembers: true,
254
+ allowUnrecognizedEnumValues: true,
255
+ skipValidation: true,
256
+ breadcrumbsPrefix: ["response"],
257
+ }));
258
+ default:
259
+ throw new errors.ZepError({
260
+ statusCode: _response.error.statusCode,
261
+ body: _response.error.body,
262
+ });
263
+ }
264
+ }
265
+ switch (_response.error.reason) {
266
+ case "non-json":
267
+ throw new errors.ZepError({
268
+ statusCode: _response.error.statusCode,
269
+ body: _response.error.rawBody,
270
+ });
271
+ case "timeout":
272
+ throw new errors.ZepTimeoutError();
273
+ case "unknown":
274
+ throw new errors.ZepError({
275
+ message: _response.error.errorMessage,
276
+ });
277
+ }
278
+ });
279
+ }
280
+ _getCustomAuthorizationHeaders() {
281
+ var _a;
282
+ return __awaiter(this, void 0, void 0, function* () {
283
+ 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
+ return { Authorization: `Api-Key ${apiKeyValue}` };
285
+ });
286
+ }
287
+ }
288
+ exports.Node = Node;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -0,0 +1,52 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as Zep from "../../../index";
7
+ export declare namespace Group {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ZepEnvironment | string>;
10
+ apiKey?: core.Supplier<string | undefined>;
11
+ fetcher?: core.FetchFunction;
12
+ }
13
+ interface RequestOptions {
14
+ timeoutInSeconds?: number;
15
+ maxRetries?: number;
16
+ abortSignal?: AbortSignal;
17
+ }
18
+ }
19
+ export declare class Group {
20
+ protected readonly _options: Group.Options;
21
+ constructor(_options?: Group.Options);
22
+ /**
23
+ * Create a new user group
24
+ *
25
+ * @param {Zep.CreateGroupRequest} request
26
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Zep.BadRequestError}
29
+ * @throws {@link Zep.InternalServerError}
30
+ *
31
+ * @example
32
+ * await zep.group.add()
33
+ */
34
+ add(request?: Zep.CreateGroupRequest, requestOptions?: Group.RequestOptions): Promise<Zep.Group>;
35
+ /**
36
+ * Delete group
37
+ *
38
+ * @param {string} groupId - Group ID
39
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
40
+ *
41
+ * @throws {@link Zep.BadRequestError}
42
+ * @throws {@link Zep.NotFoundError}
43
+ * @throws {@link Zep.InternalServerError}
44
+ *
45
+ * @example
46
+ * await zep.group.delete("groupId")
47
+ */
48
+ delete(groupId: string, requestOptions?: Group.RequestOptions): Promise<Zep.SuccessResponse>;
49
+ protected _getCustomAuthorizationHeaders(): Promise<{
50
+ Authorization: string;
51
+ }>;
52
+ }
@@ -0,0 +1,216 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
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
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Group = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const Zep = __importStar(require("../../../index"));
45
+ const serializers = __importStar(require("../../../../serialization/index"));
46
+ const url_join_1 = __importDefault(require("url-join"));
47
+ const errors = __importStar(require("../../../../errors/index"));
48
+ class Group {
49
+ constructor(_options = {}) {
50
+ this._options = _options;
51
+ }
52
+ /**
53
+ * Create a new user group
54
+ *
55
+ * @param {Zep.CreateGroupRequest} request
56
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
57
+ *
58
+ * @throws {@link Zep.BadRequestError}
59
+ * @throws {@link Zep.InternalServerError}
60
+ *
61
+ * @example
62
+ * await zep.group.add()
63
+ */
64
+ add(request = {}, requestOptions) {
65
+ var _a, _b;
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
68
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "groups"),
69
+ method: "POST",
70
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.0.0-rc.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
71
+ contentType: "application/json",
72
+ body: yield serializers.CreateGroupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
73
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
74
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
75
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
76
+ });
77
+ if (_response.ok) {
78
+ return yield serializers.Group.parseOrThrow(_response.body, {
79
+ unrecognizedObjectKeys: "passthrough",
80
+ allowUnrecognizedUnionMembers: true,
81
+ allowUnrecognizedEnumValues: true,
82
+ skipValidation: true,
83
+ breadcrumbsPrefix: ["response"],
84
+ });
85
+ }
86
+ if (_response.error.reason === "status-code") {
87
+ switch (_response.error.statusCode) {
88
+ case 400:
89
+ throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
90
+ unrecognizedObjectKeys: "passthrough",
91
+ allowUnrecognizedUnionMembers: true,
92
+ allowUnrecognizedEnumValues: true,
93
+ skipValidation: true,
94
+ breadcrumbsPrefix: ["response"],
95
+ }));
96
+ case 500:
97
+ throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
98
+ unrecognizedObjectKeys: "passthrough",
99
+ allowUnrecognizedUnionMembers: true,
100
+ allowUnrecognizedEnumValues: true,
101
+ skipValidation: true,
102
+ breadcrumbsPrefix: ["response"],
103
+ }));
104
+ default:
105
+ throw new errors.ZepError({
106
+ statusCode: _response.error.statusCode,
107
+ body: _response.error.body,
108
+ });
109
+ }
110
+ }
111
+ switch (_response.error.reason) {
112
+ case "non-json":
113
+ throw new errors.ZepError({
114
+ statusCode: _response.error.statusCode,
115
+ body: _response.error.rawBody,
116
+ });
117
+ case "timeout":
118
+ throw new errors.ZepTimeoutError();
119
+ case "unknown":
120
+ throw new errors.ZepError({
121
+ message: _response.error.errorMessage,
122
+ });
123
+ }
124
+ });
125
+ }
126
+ /**
127
+ * Delete group
128
+ *
129
+ * @param {string} groupId - Group ID
130
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
131
+ *
132
+ * @throws {@link Zep.BadRequestError}
133
+ * @throws {@link Zep.NotFoundError}
134
+ * @throws {@link Zep.InternalServerError}
135
+ *
136
+ * @example
137
+ * await zep.group.delete("groupId")
138
+ */
139
+ delete(groupId, requestOptions) {
140
+ var _a, _b;
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
143
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}`),
144
+ method: "DELETE",
145
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.0.0-rc.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
146
+ contentType: "application/json",
147
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
148
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
149
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
150
+ });
151
+ if (_response.ok) {
152
+ return yield serializers.SuccessResponse.parseOrThrow(_response.body, {
153
+ unrecognizedObjectKeys: "passthrough",
154
+ allowUnrecognizedUnionMembers: true,
155
+ allowUnrecognizedEnumValues: true,
156
+ skipValidation: true,
157
+ breadcrumbsPrefix: ["response"],
158
+ });
159
+ }
160
+ if (_response.error.reason === "status-code") {
161
+ switch (_response.error.statusCode) {
162
+ case 400:
163
+ throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
164
+ unrecognizedObjectKeys: "passthrough",
165
+ allowUnrecognizedUnionMembers: true,
166
+ allowUnrecognizedEnumValues: true,
167
+ skipValidation: true,
168
+ breadcrumbsPrefix: ["response"],
169
+ }));
170
+ case 404:
171
+ throw new Zep.NotFoundError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
172
+ unrecognizedObjectKeys: "passthrough",
173
+ allowUnrecognizedUnionMembers: true,
174
+ allowUnrecognizedEnumValues: true,
175
+ skipValidation: true,
176
+ breadcrumbsPrefix: ["response"],
177
+ }));
178
+ case 500:
179
+ throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
180
+ unrecognizedObjectKeys: "passthrough",
181
+ allowUnrecognizedUnionMembers: true,
182
+ allowUnrecognizedEnumValues: true,
183
+ skipValidation: true,
184
+ breadcrumbsPrefix: ["response"],
185
+ }));
186
+ default:
187
+ throw new errors.ZepError({
188
+ statusCode: _response.error.statusCode,
189
+ body: _response.error.body,
190
+ });
191
+ }
192
+ }
193
+ switch (_response.error.reason) {
194
+ case "non-json":
195
+ throw new errors.ZepError({
196
+ statusCode: _response.error.statusCode,
197
+ body: _response.error.rawBody,
198
+ });
199
+ case "timeout":
200
+ throw new errors.ZepTimeoutError();
201
+ case "unknown":
202
+ throw new errors.ZepError({
203
+ message: _response.error.errorMessage,
204
+ });
205
+ }
206
+ });
207
+ }
208
+ _getCustomAuthorizationHeaders() {
209
+ var _a;
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ 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"];
212
+ return { Authorization: `Api-Key ${apiKeyValue}` };
213
+ });
214
+ }
215
+ }
216
+ exports.Group = Group;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface CreateGroupRequest {
9
+ description?: string;
10
+ groupId?: string;
11
+ name?: string;
12
+ }
@@ -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 @@
1
+ export { type CreateGroupRequest } from "./CreateGroupRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);