@getzep/zep-cloud 3.16.0 → 3.17.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 (329) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/errors/ForbiddenError.d.ts +9 -0
  3. package/dist/cjs/api/errors/ForbiddenError.js +52 -0
  4. package/dist/cjs/api/errors/index.d.ts +1 -0
  5. package/dist/cjs/api/errors/index.js +1 -0
  6. package/dist/cjs/api/index.d.ts +1 -1
  7. package/dist/cjs/api/index.js +1 -1
  8. package/dist/cjs/api/resources/graph/client/Client.d.ts +21 -2
  9. package/dist/cjs/api/resources/graph/client/Client.js +117 -3
  10. package/dist/cjs/api/resources/graph/client/requests/AddTripleRequest.d.ts +4 -0
  11. package/dist/cjs/api/resources/graph/client/requests/CreateGraphRequest.d.ts +0 -2
  12. package/dist/cjs/api/resources/graph/client/requests/DetectPatternsRequest.d.ts +37 -0
  13. package/dist/cjs/api/resources/graph/client/requests/GraphListAllRequest.d.ts +11 -1
  14. package/dist/cjs/api/resources/graph/client/requests/GraphSearchQuery.d.ts +0 -4
  15. package/dist/cjs/api/resources/graph/client/requests/UpdateGraphRequest.d.ts +0 -2
  16. package/dist/cjs/api/resources/graph/client/requests/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/graph/resources/edge/client/Client.d.ts +17 -0
  18. package/dist/cjs/api/resources/graph/resources/edge/client/Client.js +106 -0
  19. package/dist/cjs/api/resources/graph/resources/edge/client/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/graph/resources/edge/client/index.js +15 -0
  21. package/dist/cjs/api/resources/graph/resources/edge/client/requests/UpdateEdgeRequest.d.ts +21 -0
  22. package/dist/cjs/api/resources/graph/resources/edge/client/requests/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/graph/resources/edge/client/requests/index.js +2 -0
  24. package/dist/cjs/api/resources/graph/resources/index.d.ts +2 -0
  25. package/dist/cjs/api/resources/graph/resources/index.js +2 -0
  26. package/dist/cjs/api/resources/graph/resources/node/client/Client.d.ts +17 -0
  27. package/dist/cjs/api/resources/graph/resources/node/client/Client.js +106 -0
  28. package/dist/cjs/api/resources/graph/resources/node/client/index.d.ts +1 -0
  29. package/dist/cjs/api/resources/graph/resources/node/client/index.js +15 -0
  30. package/dist/cjs/api/resources/graph/resources/node/client/requests/UpdateNodeRequest.d.ts +17 -0
  31. package/dist/cjs/api/resources/graph/resources/node/client/requests/index.d.ts +1 -0
  32. package/dist/cjs/api/resources/graph/resources/node/client/requests/index.js +2 -0
  33. package/dist/cjs/api/resources/index.d.ts +1 -2
  34. package/dist/cjs/api/resources/index.js +2 -3
  35. package/dist/cjs/api/resources/thread/client/Client.d.ts +1 -3
  36. package/dist/cjs/api/resources/thread/client/Client.js +2 -13
  37. package/dist/cjs/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.ts +1 -12
  38. package/dist/cjs/api/resources/thread/index.d.ts +0 -1
  39. package/dist/cjs/api/resources/thread/index.js +0 -1
  40. package/dist/cjs/api/resources/user/client/Client.d.ts +4 -1
  41. package/dist/cjs/api/resources/user/client/Client.js +14 -2
  42. package/dist/cjs/api/resources/user/client/requests/CreateUserRequest.d.ts +0 -3
  43. package/dist/cjs/api/resources/user/client/requests/UpdateUserRequest.d.ts +0 -3
  44. package/dist/cjs/api/resources/user/client/requests/UserListOrderedRequest.d.ts +16 -1
  45. package/dist/cjs/api/types/ClusterDetectConfig.d.ts +4 -0
  46. package/dist/cjs/api/types/CoOccurrenceDetectConfig.d.ts +7 -0
  47. package/dist/cjs/api/types/CoOccurrenceDetectConfig.js +5 -0
  48. package/dist/cjs/api/types/DetectConfig.d.ts +16 -0
  49. package/dist/cjs/api/types/DetectConfig.js +5 -0
  50. package/dist/cjs/api/types/DetectPatternsResponse.d.ts +10 -0
  51. package/dist/cjs/api/types/DetectPatternsResponse.js +5 -0
  52. package/dist/cjs/api/types/Graph.d.ts +0 -2
  53. package/dist/cjs/api/types/HubDetectConfig.d.ts +7 -0
  54. package/dist/cjs/api/types/HubDetectConfig.js +5 -0
  55. package/dist/cjs/api/types/MessageListResponse.d.ts +2 -0
  56. package/dist/cjs/api/types/PathDetectConfig.d.ts +7 -0
  57. package/dist/cjs/api/types/PathDetectConfig.js +5 -0
  58. package/dist/cjs/api/types/PatternExample.d.ts +9 -0
  59. package/dist/cjs/api/types/PatternExample.js +5 -0
  60. package/dist/cjs/api/types/PatternMetadata.d.ts +11 -0
  61. package/dist/cjs/api/types/PatternMetadata.js +5 -0
  62. package/dist/cjs/api/types/PatternResult.d.ts +20 -0
  63. package/dist/cjs/api/types/PatternResult.js +5 -0
  64. package/dist/cjs/api/types/PatternSeeds.d.ts +11 -0
  65. package/dist/cjs/api/types/PatternSeeds.js +5 -0
  66. package/dist/cjs/api/types/RecencyWeight.d.ts +10 -0
  67. package/dist/cjs/api/types/RecencyWeight.js +12 -0
  68. package/dist/cjs/api/types/RelationshipDetectConfig.d.ts +4 -0
  69. package/dist/cjs/api/types/RelationshipDetectConfig.js +5 -0
  70. package/dist/cjs/api/types/User.d.ts +0 -2
  71. package/dist/cjs/api/types/index.d.ts +12 -4
  72. package/dist/cjs/api/types/index.js +12 -4
  73. package/dist/cjs/serialization/index.d.ts +1 -1
  74. package/dist/cjs/serialization/index.js +1 -1
  75. package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +2 -0
  76. package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.js +2 -0
  77. package/dist/cjs/serialization/resources/graph/client/requests/CreateGraphRequest.d.ts +0 -2
  78. package/dist/cjs/serialization/resources/graph/client/requests/CreateGraphRequest.js +0 -2
  79. package/dist/cjs/serialization/resources/graph/client/requests/DetectPatternsRequest.d.ts +24 -0
  80. package/dist/cjs/serialization/resources/graph/client/requests/DetectPatternsRequest.js +55 -0
  81. package/dist/cjs/serialization/resources/graph/client/requests/GraphSearchQuery.d.ts +0 -2
  82. package/dist/cjs/serialization/resources/graph/client/requests/GraphSearchQuery.js +0 -2
  83. package/dist/cjs/serialization/resources/graph/client/requests/UpdateGraphRequest.d.ts +0 -2
  84. package/dist/cjs/serialization/resources/graph/client/requests/UpdateGraphRequest.js +0 -2
  85. package/dist/cjs/serialization/resources/graph/client/requests/index.d.ts +1 -0
  86. package/dist/cjs/serialization/resources/graph/client/requests/index.js +3 -1
  87. package/dist/cjs/serialization/resources/graph/resources/edge/client/index.d.ts +1 -0
  88. package/dist/cjs/serialization/resources/graph/resources/edge/client/index.js +4 -0
  89. package/dist/cjs/serialization/resources/graph/resources/edge/client/requests/UpdateEdgeRequest.d.ts +17 -0
  90. package/dist/cjs/serialization/resources/graph/resources/edge/client/requests/UpdateEdgeRequest.js +48 -0
  91. package/dist/cjs/serialization/resources/graph/resources/edge/client/requests/index.d.ts +1 -0
  92. package/dist/cjs/serialization/resources/graph/resources/edge/client/requests/index.js +5 -0
  93. package/dist/cjs/serialization/resources/graph/resources/index.d.ts +2 -0
  94. package/dist/cjs/serialization/resources/graph/resources/index.js +5 -0
  95. package/dist/cjs/serialization/resources/graph/resources/node/client/index.d.ts +1 -0
  96. package/dist/cjs/serialization/resources/graph/resources/node/client/index.js +4 -0
  97. package/dist/cjs/serialization/resources/graph/resources/node/client/requests/UpdateNodeRequest.d.ts +15 -0
  98. package/dist/cjs/serialization/resources/graph/resources/node/client/requests/UpdateNodeRequest.js +46 -0
  99. package/dist/cjs/serialization/resources/graph/resources/node/client/requests/index.d.ts +1 -0
  100. package/dist/cjs/serialization/resources/graph/resources/node/client/requests/index.js +5 -0
  101. package/dist/cjs/serialization/resources/index.d.ts +1 -2
  102. package/dist/cjs/serialization/resources/index.js +2 -3
  103. package/dist/cjs/serialization/resources/thread/index.d.ts +0 -1
  104. package/dist/cjs/serialization/resources/thread/index.js +0 -1
  105. package/dist/cjs/serialization/resources/user/client/requests/CreateUserRequest.d.ts +0 -2
  106. package/dist/cjs/serialization/resources/user/client/requests/CreateUserRequest.js +0 -2
  107. package/dist/cjs/serialization/resources/user/client/requests/UpdateUserRequest.d.ts +0 -2
  108. package/dist/cjs/serialization/resources/user/client/requests/UpdateUserRequest.js +0 -2
  109. package/dist/cjs/serialization/types/ClusterDetectConfig.d.ts +10 -0
  110. package/dist/cjs/serialization/types/ClusterDetectConfig.js +41 -0
  111. package/dist/cjs/serialization/types/CoOccurrenceDetectConfig.d.ts +12 -0
  112. package/dist/cjs/serialization/types/{FactRatingExamples.js → CoOccurrenceDetectConfig.js} +3 -5
  113. package/dist/cjs/serialization/types/DetectConfig.d.ts +21 -0
  114. package/dist/cjs/serialization/types/DetectConfig.js +52 -0
  115. package/dist/cjs/serialization/types/DetectPatternsResponse.d.ts +15 -0
  116. package/dist/cjs/serialization/types/DetectPatternsResponse.js +46 -0
  117. package/dist/cjs/serialization/types/Graph.d.ts +0 -2
  118. package/dist/cjs/serialization/types/Graph.js +0 -2
  119. package/dist/cjs/serialization/types/HubDetectConfig.d.ts +12 -0
  120. package/dist/cjs/serialization/types/{ModelsFactRatingExamples.js → HubDetectConfig.js} +3 -5
  121. package/dist/cjs/serialization/types/MessageListResponse.d.ts +1 -0
  122. package/dist/cjs/serialization/types/MessageListResponse.js +1 -0
  123. package/dist/cjs/serialization/types/PathDetectConfig.d.ts +12 -0
  124. package/dist/cjs/serialization/types/{FactRatingInstruction.js → PathDetectConfig.js} +3 -5
  125. package/dist/cjs/serialization/types/PatternExample.d.ts +13 -0
  126. package/dist/cjs/serialization/types/{ModelsFactRatingInstruction.js → PatternExample.js} +4 -5
  127. package/dist/cjs/serialization/types/PatternMetadata.d.ts +14 -0
  128. package/dist/cjs/serialization/types/PatternMetadata.js +45 -0
  129. package/dist/cjs/serialization/types/PatternResult.d.ts +19 -0
  130. package/dist/cjs/serialization/types/PatternResult.js +50 -0
  131. package/dist/cjs/serialization/types/PatternSeeds.d.ts +14 -0
  132. package/dist/cjs/serialization/types/PatternSeeds.js +45 -0
  133. package/dist/cjs/serialization/types/RecencyWeight.d.ts +10 -0
  134. package/dist/cjs/serialization/{resources/thread/types/ThreadGetUserContextRequestMode.js → types/RecencyWeight.js} +3 -3
  135. package/dist/cjs/serialization/types/RelationshipDetectConfig.d.ts +10 -0
  136. package/dist/cjs/serialization/types/RelationshipDetectConfig.js +41 -0
  137. package/dist/cjs/serialization/types/User.d.ts +0 -2
  138. package/dist/cjs/serialization/types/User.js +0 -2
  139. package/dist/cjs/serialization/types/index.d.ts +12 -4
  140. package/dist/cjs/serialization/types/index.js +12 -4
  141. package/dist/cjs/version.d.ts +1 -1
  142. package/dist/cjs/version.js +1 -1
  143. package/dist/esm/Client.mjs +2 -2
  144. package/dist/esm/api/errors/ForbiddenError.d.mts +9 -0
  145. package/dist/esm/api/errors/ForbiddenError.mjs +15 -0
  146. package/dist/esm/api/errors/index.d.mts +1 -0
  147. package/dist/esm/api/errors/index.mjs +1 -0
  148. package/dist/esm/api/index.d.mts +1 -1
  149. package/dist/esm/api/index.mjs +1 -1
  150. package/dist/esm/api/resources/graph/client/Client.d.mts +21 -2
  151. package/dist/esm/api/resources/graph/client/Client.mjs +117 -3
  152. package/dist/esm/api/resources/graph/client/requests/AddTripleRequest.d.mts +4 -0
  153. package/dist/esm/api/resources/graph/client/requests/CreateGraphRequest.d.mts +0 -2
  154. package/dist/esm/api/resources/graph/client/requests/DetectPatternsRequest.d.mts +37 -0
  155. package/dist/esm/api/resources/graph/client/requests/GraphListAllRequest.d.mts +11 -1
  156. package/dist/esm/api/resources/graph/client/requests/GraphSearchQuery.d.mts +0 -4
  157. package/dist/esm/api/resources/graph/client/requests/UpdateGraphRequest.d.mts +0 -2
  158. package/dist/esm/api/resources/graph/client/requests/index.d.mts +1 -0
  159. package/dist/esm/api/resources/graph/resources/edge/client/Client.d.mts +17 -0
  160. package/dist/esm/api/resources/graph/resources/edge/client/Client.mjs +106 -0
  161. package/dist/esm/api/resources/graph/resources/edge/client/index.d.mts +1 -0
  162. package/dist/esm/api/resources/graph/resources/edge/client/index.mjs +1 -1
  163. package/dist/esm/api/resources/graph/resources/edge/client/requests/UpdateEdgeRequest.d.mts +21 -0
  164. package/dist/esm/api/resources/graph/resources/edge/client/requests/index.d.mts +1 -0
  165. package/dist/esm/api/resources/graph/resources/edge/client/requests/index.mjs +1 -0
  166. package/dist/esm/api/resources/graph/resources/index.d.mts +2 -0
  167. package/dist/esm/api/resources/graph/resources/index.mjs +2 -0
  168. package/dist/esm/api/resources/graph/resources/node/client/Client.d.mts +17 -0
  169. package/dist/esm/api/resources/graph/resources/node/client/Client.mjs +106 -0
  170. package/dist/esm/api/resources/graph/resources/node/client/index.d.mts +1 -0
  171. package/dist/esm/api/resources/graph/resources/node/client/index.mjs +1 -1
  172. package/dist/esm/api/resources/graph/resources/node/client/requests/UpdateNodeRequest.d.mts +17 -0
  173. package/dist/esm/api/resources/graph/resources/node/client/requests/index.d.mts +1 -0
  174. package/dist/esm/api/resources/graph/resources/node/client/requests/index.mjs +1 -0
  175. package/dist/esm/api/resources/index.d.mts +1 -2
  176. package/dist/esm/api/resources/index.mjs +1 -2
  177. package/dist/esm/api/resources/thread/client/Client.d.mts +1 -3
  178. package/dist/esm/api/resources/thread/client/Client.mjs +2 -13
  179. package/dist/esm/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.mts +1 -12
  180. package/dist/esm/api/resources/thread/index.d.mts +0 -1
  181. package/dist/esm/api/resources/thread/index.mjs +0 -1
  182. package/dist/esm/api/resources/user/client/Client.d.mts +4 -1
  183. package/dist/esm/api/resources/user/client/Client.mjs +14 -2
  184. package/dist/esm/api/resources/user/client/requests/CreateUserRequest.d.mts +0 -3
  185. package/dist/esm/api/resources/user/client/requests/UpdateUserRequest.d.mts +0 -3
  186. package/dist/esm/api/resources/user/client/requests/UserListOrderedRequest.d.mts +16 -1
  187. package/dist/esm/api/types/ClusterDetectConfig.d.mts +4 -0
  188. package/dist/esm/api/types/CoOccurrenceDetectConfig.d.mts +7 -0
  189. package/dist/esm/api/types/CoOccurrenceDetectConfig.mjs +4 -0
  190. package/dist/esm/api/types/DetectConfig.d.mts +16 -0
  191. package/dist/esm/api/types/DetectConfig.mjs +4 -0
  192. package/dist/esm/api/types/DetectPatternsResponse.d.mts +10 -0
  193. package/dist/esm/api/types/DetectPatternsResponse.mjs +4 -0
  194. package/dist/esm/api/types/Graph.d.mts +0 -2
  195. package/dist/esm/api/types/HubDetectConfig.d.mts +7 -0
  196. package/dist/esm/api/types/HubDetectConfig.mjs +4 -0
  197. package/dist/esm/api/types/MessageListResponse.d.mts +2 -0
  198. package/dist/esm/api/types/PathDetectConfig.d.mts +7 -0
  199. package/dist/esm/api/types/PathDetectConfig.mjs +4 -0
  200. package/dist/esm/api/types/PatternExample.d.mts +9 -0
  201. package/dist/esm/api/types/PatternExample.mjs +4 -0
  202. package/dist/esm/api/types/PatternMetadata.d.mts +11 -0
  203. package/dist/esm/api/types/PatternMetadata.mjs +4 -0
  204. package/dist/esm/api/types/PatternResult.d.mts +20 -0
  205. package/dist/esm/api/types/PatternResult.mjs +4 -0
  206. package/dist/esm/api/types/PatternSeeds.d.mts +11 -0
  207. package/dist/esm/api/types/PatternSeeds.mjs +4 -0
  208. package/dist/esm/api/types/RecencyWeight.d.mts +10 -0
  209. package/dist/esm/api/types/RecencyWeight.mjs +9 -0
  210. package/dist/esm/api/types/RelationshipDetectConfig.d.mts +4 -0
  211. package/dist/esm/api/types/RelationshipDetectConfig.mjs +4 -0
  212. package/dist/esm/api/types/User.d.mts +0 -2
  213. package/dist/esm/api/types/index.d.mts +12 -4
  214. package/dist/esm/api/types/index.mjs +12 -4
  215. package/dist/esm/serialization/index.d.mts +1 -1
  216. package/dist/esm/serialization/index.mjs +1 -1
  217. package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.d.mts +2 -0
  218. package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.mjs +2 -0
  219. package/dist/esm/serialization/resources/graph/client/requests/CreateGraphRequest.d.mts +0 -2
  220. package/dist/esm/serialization/resources/graph/client/requests/CreateGraphRequest.mjs +0 -2
  221. package/dist/esm/serialization/resources/graph/client/requests/DetectPatternsRequest.d.mts +24 -0
  222. package/dist/esm/serialization/resources/graph/client/requests/DetectPatternsRequest.mjs +19 -0
  223. package/dist/esm/serialization/resources/graph/client/requests/GraphSearchQuery.d.mts +0 -2
  224. package/dist/esm/serialization/resources/graph/client/requests/GraphSearchQuery.mjs +0 -2
  225. package/dist/esm/serialization/resources/graph/client/requests/UpdateGraphRequest.d.mts +0 -2
  226. package/dist/esm/serialization/resources/graph/client/requests/UpdateGraphRequest.mjs +0 -2
  227. package/dist/esm/serialization/resources/graph/client/requests/index.d.mts +1 -0
  228. package/dist/esm/serialization/resources/graph/client/requests/index.mjs +1 -0
  229. package/dist/esm/serialization/resources/graph/resources/edge/client/index.d.mts +1 -0
  230. package/dist/esm/serialization/resources/graph/resources/edge/client/index.mjs +1 -0
  231. package/dist/esm/serialization/resources/graph/resources/edge/client/requests/UpdateEdgeRequest.d.mts +17 -0
  232. package/dist/esm/serialization/resources/graph/resources/edge/client/requests/UpdateEdgeRequest.mjs +12 -0
  233. package/dist/esm/serialization/resources/graph/resources/edge/client/requests/index.d.mts +1 -0
  234. package/dist/esm/serialization/resources/graph/resources/edge/client/requests/index.mjs +1 -0
  235. package/dist/esm/serialization/resources/graph/resources/index.d.mts +2 -0
  236. package/dist/esm/serialization/resources/graph/resources/index.mjs +2 -0
  237. package/dist/esm/serialization/resources/graph/resources/node/client/index.d.mts +1 -0
  238. package/dist/esm/serialization/resources/graph/resources/node/client/index.mjs +1 -0
  239. package/dist/esm/serialization/resources/graph/resources/node/client/requests/UpdateNodeRequest.d.mts +15 -0
  240. package/dist/esm/serialization/resources/graph/resources/node/client/requests/UpdateNodeRequest.mjs +10 -0
  241. package/dist/esm/serialization/resources/graph/resources/node/client/requests/index.d.mts +1 -0
  242. package/dist/esm/serialization/resources/graph/resources/node/client/requests/index.mjs +1 -0
  243. package/dist/esm/serialization/resources/index.d.mts +1 -2
  244. package/dist/esm/serialization/resources/index.mjs +1 -2
  245. package/dist/esm/serialization/resources/thread/index.d.mts +0 -1
  246. package/dist/esm/serialization/resources/thread/index.mjs +0 -1
  247. package/dist/esm/serialization/resources/user/client/requests/CreateUserRequest.d.mts +0 -2
  248. package/dist/esm/serialization/resources/user/client/requests/CreateUserRequest.mjs +0 -2
  249. package/dist/esm/serialization/resources/user/client/requests/UpdateUserRequest.d.mts +0 -2
  250. package/dist/esm/serialization/resources/user/client/requests/UpdateUserRequest.mjs +0 -2
  251. package/dist/esm/serialization/types/ClusterDetectConfig.d.mts +10 -0
  252. package/dist/esm/serialization/types/ClusterDetectConfig.mjs +5 -0
  253. package/dist/esm/serialization/types/CoOccurrenceDetectConfig.d.mts +12 -0
  254. package/dist/esm/serialization/types/CoOccurrenceDetectConfig.mjs +7 -0
  255. package/dist/esm/serialization/types/DetectConfig.d.mts +21 -0
  256. package/dist/esm/serialization/types/DetectConfig.mjs +16 -0
  257. package/dist/esm/serialization/types/DetectPatternsResponse.d.mts +15 -0
  258. package/dist/esm/serialization/types/DetectPatternsResponse.mjs +10 -0
  259. package/dist/esm/serialization/types/Graph.d.mts +0 -2
  260. package/dist/esm/serialization/types/Graph.mjs +0 -2
  261. package/dist/esm/serialization/types/HubDetectConfig.d.mts +12 -0
  262. package/dist/esm/serialization/types/HubDetectConfig.mjs +7 -0
  263. package/dist/esm/serialization/types/MessageListResponse.d.mts +1 -0
  264. package/dist/esm/serialization/types/MessageListResponse.mjs +1 -0
  265. package/dist/esm/serialization/types/PathDetectConfig.d.mts +12 -0
  266. package/dist/esm/serialization/types/PathDetectConfig.mjs +7 -0
  267. package/dist/esm/serialization/types/PatternExample.d.mts +13 -0
  268. package/dist/esm/serialization/types/PatternExample.mjs +8 -0
  269. package/dist/esm/serialization/types/PatternMetadata.d.mts +14 -0
  270. package/dist/esm/serialization/types/PatternMetadata.mjs +9 -0
  271. package/dist/esm/serialization/types/PatternResult.d.mts +19 -0
  272. package/dist/esm/serialization/types/PatternResult.mjs +14 -0
  273. package/dist/esm/serialization/types/PatternSeeds.d.mts +14 -0
  274. package/dist/esm/serialization/types/PatternSeeds.mjs +9 -0
  275. package/dist/esm/serialization/types/RecencyWeight.d.mts +10 -0
  276. package/dist/esm/serialization/types/RecencyWeight.mjs +5 -0
  277. package/dist/esm/serialization/types/RelationshipDetectConfig.d.mts +10 -0
  278. package/dist/esm/serialization/types/RelationshipDetectConfig.mjs +5 -0
  279. package/dist/esm/serialization/types/User.d.mts +0 -2
  280. package/dist/esm/serialization/types/User.mjs +0 -2
  281. package/dist/esm/serialization/types/index.d.mts +12 -4
  282. package/dist/esm/serialization/types/index.mjs +12 -4
  283. package/dist/esm/version.d.mts +1 -1
  284. package/dist/esm/version.mjs +1 -1
  285. package/package.json +2 -2
  286. package/reference.md +212 -3
  287. package/dist/cjs/api/resources/thread/types/ThreadGetUserContextRequestMode.d.ts +0 -8
  288. package/dist/cjs/api/resources/thread/types/ThreadGetUserContextRequestMode.js +0 -10
  289. package/dist/cjs/api/resources/thread/types/index.d.ts +0 -1
  290. package/dist/cjs/api/resources/thread/types/index.js +0 -17
  291. package/dist/cjs/api/types/FactRatingExamples.d.ts +0 -8
  292. package/dist/cjs/api/types/FactRatingInstruction.d.ts +0 -21
  293. package/dist/cjs/api/types/ModelsFactRatingExamples.d.ts +0 -8
  294. package/dist/cjs/api/types/ModelsFactRatingInstruction.d.ts +0 -21
  295. package/dist/cjs/serialization/resources/thread/types/ThreadGetUserContextRequestMode.d.ts +0 -10
  296. package/dist/cjs/serialization/resources/thread/types/index.d.ts +0 -1
  297. package/dist/cjs/serialization/resources/thread/types/index.js +0 -17
  298. package/dist/cjs/serialization/types/FactRatingExamples.d.ts +0 -14
  299. package/dist/cjs/serialization/types/FactRatingInstruction.d.ts +0 -14
  300. package/dist/cjs/serialization/types/ModelsFactRatingExamples.d.ts +0 -14
  301. package/dist/cjs/serialization/types/ModelsFactRatingInstruction.d.ts +0 -14
  302. package/dist/esm/api/resources/thread/types/ThreadGetUserContextRequestMode.d.mts +0 -8
  303. package/dist/esm/api/resources/thread/types/ThreadGetUserContextRequestMode.mjs +0 -7
  304. package/dist/esm/api/resources/thread/types/index.d.mts +0 -1
  305. package/dist/esm/api/resources/thread/types/index.mjs +0 -1
  306. package/dist/esm/api/types/FactRatingExamples.d.mts +0 -8
  307. package/dist/esm/api/types/FactRatingInstruction.d.mts +0 -21
  308. package/dist/esm/api/types/ModelsFactRatingExamples.d.mts +0 -8
  309. package/dist/esm/api/types/ModelsFactRatingInstruction.d.mts +0 -21
  310. package/dist/esm/serialization/resources/thread/types/ThreadGetUserContextRequestMode.d.mts +0 -10
  311. package/dist/esm/serialization/resources/thread/types/ThreadGetUserContextRequestMode.mjs +0 -5
  312. package/dist/esm/serialization/resources/thread/types/index.d.mts +0 -1
  313. package/dist/esm/serialization/resources/thread/types/index.mjs +0 -1
  314. package/dist/esm/serialization/types/FactRatingExamples.d.mts +0 -14
  315. package/dist/esm/serialization/types/FactRatingExamples.mjs +0 -9
  316. package/dist/esm/serialization/types/FactRatingInstruction.d.mts +0 -14
  317. package/dist/esm/serialization/types/FactRatingInstruction.mjs +0 -9
  318. package/dist/esm/serialization/types/ModelsFactRatingExamples.d.mts +0 -14
  319. package/dist/esm/serialization/types/ModelsFactRatingExamples.mjs +0 -9
  320. package/dist/esm/serialization/types/ModelsFactRatingInstruction.d.mts +0 -14
  321. package/dist/esm/serialization/types/ModelsFactRatingInstruction.mjs +0 -9
  322. /package/dist/cjs/api/{types/FactRatingExamples.js → resources/graph/client/requests/DetectPatternsRequest.js} +0 -0
  323. /package/dist/cjs/api/{types/FactRatingInstruction.js → resources/graph/resources/edge/client/requests/UpdateEdgeRequest.js} +0 -0
  324. /package/dist/cjs/api/{types/ModelsFactRatingExamples.js → resources/graph/resources/node/client/requests/UpdateNodeRequest.js} +0 -0
  325. /package/dist/cjs/api/types/{ModelsFactRatingInstruction.js → ClusterDetectConfig.js} +0 -0
  326. /package/dist/esm/api/{types/FactRatingExamples.mjs → resources/graph/client/requests/DetectPatternsRequest.mjs} +0 -0
  327. /package/dist/esm/api/{types/FactRatingInstruction.mjs → resources/graph/resources/edge/client/requests/UpdateEdgeRequest.mjs} +0 -0
  328. /package/dist/esm/api/{types/ModelsFactRatingExamples.mjs → resources/graph/resources/node/client/requests/UpdateNodeRequest.mjs} +0 -0
  329. /package/dist/esm/api/types/{ModelsFactRatingInstruction.mjs → ClusterDetectConfig.mjs} +0 -0
@@ -50,8 +50,8 @@ class ZepClient {
50
50
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
51
51
  "X-Fern-Language": "JavaScript",
52
52
  "X-Fern-SDK-Name": "zep-cloud",
53
- "X-Fern-SDK-Version": "3.16.0",
54
- "User-Agent": "zep-cloud/3.16.0",
53
+ "X-Fern-SDK-Version": "3.17.0",
54
+ "User-Agent": "zep-cloud/3.17.0",
55
55
  "X-Fern-Runtime": core.RUNTIME.type,
56
56
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
57
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.js";
5
+ import * as Zep from "../index.js";
6
+ import * as core from "../../core/index.js";
7
+ export declare class ForbiddenError extends errors.ZepError {
8
+ constructor(body: Zep.ApiError, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,52 @@
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 () {
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
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.ForbiddenError = void 0;
40
+ const errors = __importStar(require("../../errors/index.js"));
41
+ class ForbiddenError extends errors.ZepError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "ForbiddenError",
45
+ statusCode: 403,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, ForbiddenError.prototype);
50
+ }
51
+ }
52
+ exports.ForbiddenError = ForbiddenError;
@@ -1,3 +1,4 @@
1
1
  export * from "./BadRequestError.js";
2
2
  export * from "./InternalServerError.js";
3
3
  export * from "./NotFoundError.js";
4
+ export * from "./ForbiddenError.js";
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BadRequestError.js"), exports);
18
18
  __exportStar(require("./InternalServerError.js"), exports);
19
19
  __exportStar(require("./NotFoundError.js"), exports);
20
+ __exportStar(require("./ForbiddenError.js"), exports);
@@ -1,3 +1,3 @@
1
- export * from "./resources/index.js";
2
1
  export * from "./types/index.js";
3
2
  export * from "./errors/index.js";
3
+ export * from "./resources/index.js";
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./resources/index.js"), exports);
18
17
  __exportStar(require("./types/index.js"), exports);
19
18
  __exportStar(require("./errors/index.js"), exports);
19
+ __exportStar(require("./resources/index.js"), exports);
@@ -137,7 +137,7 @@ export declare class Graph {
137
137
  add(request: Zep.AddDataRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.Episode>;
138
138
  private __add;
139
139
  /**
140
- * Add data to the graph in batch mode, processing episodes concurrently. Use only for data that is insensitive to processing order.
140
+ * Add data to the graph in batch mode. Episodes are processed sequentially in the order provided.
141
141
  *
142
142
  * @param {Zep.AddDataBatchRequest} request
143
143
  * @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
@@ -214,11 +214,30 @@ export declare class Graph {
214
214
  * @example
215
215
  * await client.graph.listAll({
216
216
  * pageNumber: 1,
217
- * pageSize: 1
217
+ * pageSize: 1,
218
+ * orderBy: "order_by",
219
+ * asc: true
218
220
  * })
219
221
  */
220
222
  listAll(request?: Zep.GraphListAllRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.GraphListResponse>;
221
223
  private __listAll;
224
+ /**
225
+ * Detects structural patterns in a knowledge graph including relationship frequencies,
226
+ * multi-hop paths, co-occurrences, hubs, and clusters.
227
+ *
228
+ * @param {Zep.DetectPatternsRequest} request
229
+ * @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
230
+ *
231
+ * @throws {@link Zep.BadRequestError}
232
+ * @throws {@link Zep.ForbiddenError}
233
+ * @throws {@link Zep.NotFoundError}
234
+ * @throws {@link Zep.InternalServerError}
235
+ *
236
+ * @example
237
+ * await client.graph.detectPatterns()
238
+ */
239
+ detectPatterns(request?: Zep.DetectPatternsRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.DetectPatternsResponse>;
240
+ private __detectPatterns;
222
241
  /**
223
242
  * Perform a graph search query.
224
243
  *
@@ -623,7 +623,7 @@ class Graph {
623
623
  });
624
624
  }
625
625
  /**
626
- * Add data to the graph in batch mode, processing episodes concurrently. Use only for data that is insensitive to processing order.
626
+ * Add data to the graph in batch mode. Episodes are processed sequentially in the order provided.
627
627
  *
628
628
  * @param {Zep.AddDataBatchRequest} request
629
629
  * @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
@@ -992,7 +992,9 @@ class Graph {
992
992
  * @example
993
993
  * await client.graph.listAll({
994
994
  * pageNumber: 1,
995
- * pageSize: 1
995
+ * pageSize: 1,
996
+ * orderBy: "order_by",
997
+ * asc: true
996
998
  * })
997
999
  */
998
1000
  listAll(request = {}, requestOptions) {
@@ -1001,7 +1003,7 @@ class Graph {
1001
1003
  __listAll() {
1002
1004
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1003
1005
  var _a, _b, _c, _d;
1004
- const { pageNumber, pageSize } = request;
1006
+ const { pageNumber, pageSize, orderBy, asc } = request;
1005
1007
  const _queryParams = {};
1006
1008
  if (pageNumber != null) {
1007
1009
  _queryParams["pageNumber"] = pageNumber.toString();
@@ -1009,6 +1011,12 @@ class Graph {
1009
1011
  if (pageSize != null) {
1010
1012
  _queryParams["pageSize"] = pageSize.toString();
1011
1013
  }
1014
+ if (orderBy != null) {
1015
+ _queryParams["order_by"] = orderBy;
1016
+ }
1017
+ if (asc != null) {
1018
+ _queryParams["asc"] = asc.toString();
1019
+ }
1012
1020
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1013
1021
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/list-all"),
1014
1022
  method: "GET",
@@ -1073,6 +1081,112 @@ class Graph {
1073
1081
  }
1074
1082
  });
1075
1083
  }
1084
+ /**
1085
+ * Detects structural patterns in a knowledge graph including relationship frequencies,
1086
+ * multi-hop paths, co-occurrences, hubs, and clusters.
1087
+ *
1088
+ * @param {Zep.DetectPatternsRequest} request
1089
+ * @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
1090
+ *
1091
+ * @throws {@link Zep.BadRequestError}
1092
+ * @throws {@link Zep.ForbiddenError}
1093
+ * @throws {@link Zep.NotFoundError}
1094
+ * @throws {@link Zep.InternalServerError}
1095
+ *
1096
+ * @example
1097
+ * await client.graph.detectPatterns()
1098
+ */
1099
+ detectPatterns(request = {}, requestOptions) {
1100
+ return core.HttpResponsePromise.fromPromise(this.__detectPatterns(request, requestOptions));
1101
+ }
1102
+ __detectPatterns() {
1103
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1104
+ var _a, _b, _c, _d;
1105
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1106
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/patterns"),
1107
+ method: "POST",
1108
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1109
+ contentType: "application/json",
1110
+ requestType: "json",
1111
+ body: serializers.DetectPatternsRequest.jsonOrThrow(request, {
1112
+ unrecognizedObjectKeys: "strip",
1113
+ omitUndefined: true,
1114
+ }),
1115
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1116
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1117
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1118
+ });
1119
+ if (_response.ok) {
1120
+ return {
1121
+ data: serializers.DetectPatternsResponse.parseOrThrow(_response.body, {
1122
+ unrecognizedObjectKeys: "passthrough",
1123
+ allowUnrecognizedUnionMembers: true,
1124
+ allowUnrecognizedEnumValues: true,
1125
+ skipValidation: true,
1126
+ breadcrumbsPrefix: ["response"],
1127
+ }),
1128
+ rawResponse: _response.rawResponse,
1129
+ };
1130
+ }
1131
+ if (_response.error.reason === "status-code") {
1132
+ switch (_response.error.statusCode) {
1133
+ case 400:
1134
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
1135
+ unrecognizedObjectKeys: "passthrough",
1136
+ allowUnrecognizedUnionMembers: true,
1137
+ allowUnrecognizedEnumValues: true,
1138
+ skipValidation: true,
1139
+ breadcrumbsPrefix: ["response"],
1140
+ }), _response.rawResponse);
1141
+ case 403:
1142
+ throw new Zep.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
1143
+ unrecognizedObjectKeys: "passthrough",
1144
+ allowUnrecognizedUnionMembers: true,
1145
+ allowUnrecognizedEnumValues: true,
1146
+ skipValidation: true,
1147
+ breadcrumbsPrefix: ["response"],
1148
+ }), _response.rawResponse);
1149
+ case 404:
1150
+ throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
1151
+ unrecognizedObjectKeys: "passthrough",
1152
+ allowUnrecognizedUnionMembers: true,
1153
+ allowUnrecognizedEnumValues: true,
1154
+ skipValidation: true,
1155
+ breadcrumbsPrefix: ["response"],
1156
+ }), _response.rawResponse);
1157
+ case 500:
1158
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
1159
+ unrecognizedObjectKeys: "passthrough",
1160
+ allowUnrecognizedUnionMembers: true,
1161
+ allowUnrecognizedEnumValues: true,
1162
+ skipValidation: true,
1163
+ breadcrumbsPrefix: ["response"],
1164
+ }), _response.rawResponse);
1165
+ default:
1166
+ throw new errors.ZepError({
1167
+ statusCode: _response.error.statusCode,
1168
+ body: _response.error.body,
1169
+ rawResponse: _response.rawResponse,
1170
+ });
1171
+ }
1172
+ }
1173
+ switch (_response.error.reason) {
1174
+ case "non-json":
1175
+ throw new errors.ZepError({
1176
+ statusCode: _response.error.statusCode,
1177
+ body: _response.error.rawBody,
1178
+ rawResponse: _response.rawResponse,
1179
+ });
1180
+ case "timeout":
1181
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/patterns.");
1182
+ case "unknown":
1183
+ throw new errors.ZepError({
1184
+ message: _response.error.errorMessage,
1185
+ rawResponse: _response.rawResponse,
1186
+ });
1187
+ }
1188
+ });
1189
+ }
1076
1190
  /**
1077
1191
  * Perform a graph search query.
1078
1192
  *
@@ -32,6 +32,8 @@ export interface AddTripleRequest {
32
32
  * Nested objects and arrays are not allowed.
33
33
  */
34
34
  sourceNodeAttributes?: Record<string, unknown>;
35
+ /** The labels for the source node */
36
+ sourceNodeLabels?: string[];
35
37
  /** The name of the source node to add */
36
38
  sourceNodeName?: string;
37
39
  /** The summary of the source node to add */
@@ -43,6 +45,8 @@ export interface AddTripleRequest {
43
45
  * Nested objects and arrays are not allowed.
44
46
  */
45
47
  targetNodeAttributes?: Record<string, unknown>;
48
+ /** The labels for the target node */
49
+ targetNodeLabels?: string[];
46
50
  /** The name of the target node to add */
47
51
  targetNodeName?: string;
48
52
  /** The summary of the target node to add */
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Zep from "../../../../index.js";
5
4
  /**
6
5
  * @example
7
6
  * {
@@ -10,7 +9,6 @@ import * as Zep from "../../../../index.js";
10
9
  */
11
10
  export interface CreateGraphRequest {
12
11
  description?: string;
13
- factRatingInstruction?: Zep.FactRatingInstruction;
14
12
  graphId: string;
15
13
  name?: string;
16
14
  }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Zep from "../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface DetectPatternsRequest {
10
+ /**
11
+ * Which pattern types to detect with type-specific configuration.
12
+ * Omit to detect all types with defaults.
13
+ */
14
+ detect?: Zep.DetectConfig;
15
+ /** Graph ID when detecting patterns on a named graph */
16
+ graphId?: string;
17
+ /** Include example node/edge UUIDs per pattern. Default: false */
18
+ includeExamples?: boolean;
19
+ /** Max patterns to return. Default: 50, Max: 200 */
20
+ limit?: number;
21
+ /** Minimum occurrence count to report a pattern. Default: 2 */
22
+ minOccurrences?: number;
23
+ /**
24
+ * Exponential half-life decay applied to edge created_at timestamps.
25
+ * Valid values: none, 7_days, 30_days, 90_days. Default: none
26
+ */
27
+ recencyWeight?: Zep.RecencyWeight;
28
+ /**
29
+ * Filters which edges/nodes participate in pattern detection.
30
+ * Reuses the same filter format as /graph/search.
31
+ */
32
+ searchFilters?: Zep.SearchFilters;
33
+ /** Seed selection. If omitted, analyzes the entire graph. */
34
+ seeds?: Zep.PatternSeeds;
35
+ /** User ID when detecting patterns on a user graph */
36
+ userId?: string;
37
+ }
@@ -5,7 +5,9 @@
5
5
  * @example
6
6
  * {
7
7
  * pageNumber: 1,
8
- * pageSize: 1
8
+ * pageSize: 1,
9
+ * orderBy: "order_by",
10
+ * asc: true
9
11
  * }
10
12
  */
11
13
  export interface GraphListAllRequest {
@@ -17,4 +19,12 @@ export interface GraphListAllRequest {
17
19
  * Number of graphs to retrieve per page.
18
20
  */
19
21
  pageSize?: number;
22
+ /**
23
+ * Column to sort by (created_at, group_id, name).
24
+ */
25
+ orderBy?: string;
26
+ /**
27
+ * Sort in ascending order.
28
+ */
29
+ asc?: boolean;
20
30
  }
@@ -17,10 +17,6 @@ export interface GraphSearchQuery {
17
17
  graphId?: string;
18
18
  /** The maximum number of facts to retrieve. Defaults to 10. Limited to 50. */
19
19
  limit?: number;
20
- /** The minimum rating by which to filter relevant facts */
21
- minFactRating?: number;
22
- /** Deprecated */
23
- minScore?: number;
24
20
  /** weighting for maximal marginal relevance */
25
21
  mmrLambda?: number;
26
22
  /** The string to search for (required) */
@@ -1,13 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Zep from "../../../../index.js";
5
4
  /**
6
5
  * @example
7
6
  * {}
8
7
  */
9
8
  export interface UpdateGraphRequest {
10
9
  description?: string;
11
- factRatingInstruction?: Zep.FactRatingInstruction;
12
10
  name?: string;
13
11
  }
@@ -9,5 +9,6 @@ export { type AddTripleRequest } from "./AddTripleRequest.js";
9
9
  export { type CloneGraphRequest } from "./CloneGraphRequest.js";
10
10
  export { type CreateGraphRequest } from "./CreateGraphRequest.js";
11
11
  export { type GraphListAllRequest } from "./GraphListAllRequest.js";
12
+ export { type DetectPatternsRequest } from "./DetectPatternsRequest.js";
12
13
  export { type GraphSearchQuery } from "./GraphSearchQuery.js";
13
14
  export { type UpdateGraphRequest } from "./UpdateGraphRequest.js";
@@ -80,6 +80,7 @@ export declare class Edge {
80
80
  * @param {Edge.RequestOptions} requestOptions - Request-specific configuration.
81
81
  *
82
82
  * @throws {@link Zep.BadRequestError}
83
+ * @throws {@link Zep.NotFoundError}
83
84
  * @throws {@link Zep.InternalServerError}
84
85
  *
85
86
  * @example
@@ -87,6 +88,22 @@ export declare class Edge {
87
88
  */
88
89
  delete(uuid: string, requestOptions?: Edge.RequestOptions): core.HttpResponsePromise<Zep.SuccessResponse>;
89
90
  private __delete;
91
+ /**
92
+ * Updates an entity edge by UUID.
93
+ *
94
+ * @param {string} uuid - Edge UUID
95
+ * @param {Zep.graph.UpdateEdgeRequest} request
96
+ * @param {Edge.RequestOptions} requestOptions - Request-specific configuration.
97
+ *
98
+ * @throws {@link Zep.BadRequestError}
99
+ * @throws {@link Zep.NotFoundError}
100
+ * @throws {@link Zep.InternalServerError}
101
+ *
102
+ * @example
103
+ * await client.graph.edge.update("uuid")
104
+ */
105
+ update(uuid: string, request?: Zep.graph.UpdateEdgeRequest, requestOptions?: Edge.RequestOptions): core.HttpResponsePromise<Zep.EntityEdge>;
106
+ private __update;
90
107
  protected _getCustomAuthorizationHeaders(): Promise<{
91
108
  Authorization: string;
92
109
  }>;
@@ -329,6 +329,7 @@ class Edge {
329
329
  * @param {Edge.RequestOptions} requestOptions - Request-specific configuration.
330
330
  *
331
331
  * @throws {@link Zep.BadRequestError}
332
+ * @throws {@link Zep.NotFoundError}
332
333
  * @throws {@link Zep.InternalServerError}
333
334
  *
334
335
  * @example
@@ -370,6 +371,14 @@ class Edge {
370
371
  skipValidation: true,
371
372
  breadcrumbsPrefix: ["response"],
372
373
  }), _response.rawResponse);
374
+ case 404:
375
+ throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
376
+ unrecognizedObjectKeys: "passthrough",
377
+ allowUnrecognizedUnionMembers: true,
378
+ allowUnrecognizedEnumValues: true,
379
+ skipValidation: true,
380
+ breadcrumbsPrefix: ["response"],
381
+ }), _response.rawResponse);
373
382
  case 500:
374
383
  throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
375
384
  unrecognizedObjectKeys: "passthrough",
@@ -403,6 +412,103 @@ class Edge {
403
412
  }
404
413
  });
405
414
  }
415
+ /**
416
+ * Updates an entity edge by UUID.
417
+ *
418
+ * @param {string} uuid - Edge UUID
419
+ * @param {Zep.graph.UpdateEdgeRequest} request
420
+ * @param {Edge.RequestOptions} requestOptions - Request-specific configuration.
421
+ *
422
+ * @throws {@link Zep.BadRequestError}
423
+ * @throws {@link Zep.NotFoundError}
424
+ * @throws {@link Zep.InternalServerError}
425
+ *
426
+ * @example
427
+ * await client.graph.edge.update("uuid")
428
+ */
429
+ update(uuid, request = {}, requestOptions) {
430
+ return core.HttpResponsePromise.fromPromise(this.__update(uuid, request, requestOptions));
431
+ }
432
+ __update(uuid_1) {
433
+ return __awaiter(this, arguments, void 0, function* (uuid, request = {}, requestOptions) {
434
+ var _a, _b, _c, _d;
435
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
436
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `graph/edge/${encodeURIComponent(uuid)}`),
437
+ method: "PATCH",
438
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
439
+ contentType: "application/json",
440
+ requestType: "json",
441
+ body: serializers.graph.UpdateEdgeRequest.jsonOrThrow(request, {
442
+ unrecognizedObjectKeys: "strip",
443
+ omitUndefined: true,
444
+ }),
445
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
446
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
447
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
448
+ });
449
+ if (_response.ok) {
450
+ return {
451
+ data: serializers.EntityEdge.parseOrThrow(_response.body, {
452
+ unrecognizedObjectKeys: "passthrough",
453
+ allowUnrecognizedUnionMembers: true,
454
+ allowUnrecognizedEnumValues: true,
455
+ skipValidation: true,
456
+ breadcrumbsPrefix: ["response"],
457
+ }),
458
+ rawResponse: _response.rawResponse,
459
+ };
460
+ }
461
+ if (_response.error.reason === "status-code") {
462
+ switch (_response.error.statusCode) {
463
+ case 400:
464
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
465
+ unrecognizedObjectKeys: "passthrough",
466
+ allowUnrecognizedUnionMembers: true,
467
+ allowUnrecognizedEnumValues: true,
468
+ skipValidation: true,
469
+ breadcrumbsPrefix: ["response"],
470
+ }), _response.rawResponse);
471
+ case 404:
472
+ throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
473
+ unrecognizedObjectKeys: "passthrough",
474
+ allowUnrecognizedUnionMembers: true,
475
+ allowUnrecognizedEnumValues: true,
476
+ skipValidation: true,
477
+ breadcrumbsPrefix: ["response"],
478
+ }), _response.rawResponse);
479
+ case 500:
480
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
481
+ unrecognizedObjectKeys: "passthrough",
482
+ allowUnrecognizedUnionMembers: true,
483
+ allowUnrecognizedEnumValues: true,
484
+ skipValidation: true,
485
+ breadcrumbsPrefix: ["response"],
486
+ }), _response.rawResponse);
487
+ default:
488
+ throw new errors.ZepError({
489
+ statusCode: _response.error.statusCode,
490
+ body: _response.error.body,
491
+ rawResponse: _response.rawResponse,
492
+ });
493
+ }
494
+ }
495
+ switch (_response.error.reason) {
496
+ case "non-json":
497
+ throw new errors.ZepError({
498
+ statusCode: _response.error.statusCode,
499
+ body: _response.error.rawBody,
500
+ rawResponse: _response.rawResponse,
501
+ });
502
+ case "timeout":
503
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /graph/edge/{uuid}.");
504
+ case "unknown":
505
+ throw new errors.ZepError({
506
+ message: _response.error.errorMessage,
507
+ rawResponse: _response.rawResponse,
508
+ });
509
+ }
510
+ });
511
+ }
406
512
  _getCustomAuthorizationHeaders() {
407
513
  return __awaiter(this, void 0, void 0, function* () {
408
514
  var _a;
@@ -1 +1,2 @@
1
1
  export {};
2
+ export * from "./requests/index.js";
@@ -1,2 +1,17 @@
1
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
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface UpdateEdgeRequest {
9
+ /** Updated attributes. Merged with existing attributes. Set a key to null to delete it. */
10
+ attributes?: Record<string, unknown>;
11
+ /** Updated time at which the edge expires */
12
+ expiredAt?: string;
13
+ /** Updated fact for the edge */
14
+ fact?: string;
15
+ /** Updated time at which the fact stopped being true */
16
+ invalidAt?: string;
17
+ /** Updated name (relationship type) for the edge */
18
+ name?: string;
19
+ /** Updated time at which the fact becomes true */
20
+ validAt?: string;
21
+ }
@@ -0,0 +1 @@
1
+ export { type UpdateEdgeRequest } from "./UpdateEdgeRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,6 @@
1
1
  export * as edge from "./edge/index.js";
2
2
  export * as episode from "./episode/index.js";
3
3
  export * as node from "./node/index.js";
4
+ export * from "./edge/client/requests/index.js";
4
5
  export * from "./episode/client/requests/index.js";
6
+ export * from "./node/client/requests/index.js";
@@ -40,4 +40,6 @@ exports.node = exports.episode = exports.edge = void 0;
40
40
  exports.edge = __importStar(require("./edge/index.js"));
41
41
  exports.episode = __importStar(require("./episode/index.js"));
42
42
  exports.node = __importStar(require("./node/index.js"));
43
+ __exportStar(require("./edge/client/requests/index.js"), exports);
43
44
  __exportStar(require("./episode/client/requests/index.js"), exports);
45
+ __exportStar(require("./node/client/requests/index.js"), exports);