@getzep/zep-cloud 3.10.0 → 3.13.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 (190) hide show
  1. package/dist/cjs/Client.d.ts +6 -0
  2. package/dist/cjs/Client.js +20 -10
  3. package/dist/cjs/api/errors/index.d.ts +1 -1
  4. package/dist/cjs/api/errors/index.js +1 -1
  5. package/dist/cjs/api/resources/context/client/Client.d.ts +112 -0
  6. package/dist/cjs/api/resources/context/client/Client.js +516 -0
  7. package/dist/cjs/api/resources/context/client/index.d.ts +2 -0
  8. package/dist/cjs/api/resources/context/client/index.js +17 -0
  9. package/dist/cjs/api/resources/context/client/requests/CreateContextTemplateRequest.d.ts +16 -0
  10. package/dist/cjs/api/resources/context/client/requests/CreateContextTemplateRequest.js +5 -0
  11. package/dist/cjs/api/resources/context/client/requests/UpdateContextTemplateRequest.d.ts +13 -0
  12. package/dist/cjs/api/resources/context/client/requests/UpdateContextTemplateRequest.js +5 -0
  13. package/dist/cjs/api/resources/context/client/requests/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/context/client/requests/index.js +2 -0
  15. package/dist/cjs/api/resources/context/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/context/index.js +17 -0
  17. package/dist/cjs/api/resources/graph/client/Client.d.ts +9 -2
  18. package/dist/cjs/api/resources/graph/client/Client.js +9 -2
  19. package/dist/cjs/api/resources/graph/client/requests/AddTripleRequest.d.ts +2 -1
  20. package/dist/cjs/api/resources/graph/client/requests/GraphListAllRequest.d.ts +4 -1
  21. package/dist/cjs/api/resources/graph/client/requests/GraphListEntityTypesRequest.d.ts +4 -1
  22. package/dist/cjs/api/resources/graph/resources/episode/client/Client.d.ts +6 -2
  23. package/dist/cjs/api/resources/graph/resources/episode/client/Client.js +6 -2
  24. package/dist/cjs/api/resources/graph/resources/episode/client/requests/EpisodeGetByGraphIdRequest.d.ts +3 -1
  25. package/dist/cjs/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.ts +3 -1
  26. package/dist/cjs/api/resources/index.d.ts +3 -0
  27. package/dist/cjs/api/resources/index.js +4 -1
  28. package/dist/cjs/api/resources/task/client/Client.d.ts +48 -0
  29. package/dist/cjs/api/resources/task/client/Client.js +148 -0
  30. package/dist/cjs/api/resources/task/client/index.d.ts +1 -0
  31. package/dist/cjs/api/resources/task/client/index.js +2 -0
  32. package/dist/cjs/api/resources/task/index.d.ts +1 -0
  33. package/dist/cjs/api/resources/task/index.js +17 -0
  34. package/dist/cjs/api/resources/thread/client/Client.d.ts +16 -3
  35. package/dist/cjs/api/resources/thread/client/Client.js +20 -4
  36. package/dist/cjs/api/resources/thread/client/requests/ThreadGetRequest.d.ts +5 -1
  37. package/dist/cjs/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.ts +10 -2
  38. package/dist/cjs/api/resources/thread/client/requests/ThreadListAllRequest.d.ts +6 -1
  39. package/dist/cjs/api/resources/user/client/Client.d.ts +7 -2
  40. package/dist/cjs/api/resources/user/client/Client.js +7 -2
  41. package/dist/cjs/api/resources/user/client/requests/UserListOrderedRequest.d.ts +4 -1
  42. package/dist/cjs/api/resources/user/client/requests/UserListUserSummaryInstructionsRequest.d.ts +3 -1
  43. package/dist/cjs/api/types/AddThreadMessagesResponse.d.ts +1 -0
  44. package/dist/cjs/api/types/AddTripleResponse.d.ts +2 -0
  45. package/dist/cjs/api/types/CloneGraphResponse.d.ts +2 -0
  46. package/dist/cjs/api/types/ContextTemplateResponse.d.ts +11 -0
  47. package/dist/cjs/api/types/ContextTemplateResponse.js +5 -0
  48. package/dist/cjs/api/types/Episode.d.ts +2 -0
  49. package/dist/cjs/api/types/GetTaskResponse.d.ts +15 -0
  50. package/dist/cjs/api/types/GetTaskResponse.js +5 -0
  51. package/dist/cjs/api/types/ListContextTemplatesResponse.d.ts +7 -0
  52. package/dist/cjs/api/types/ListContextTemplatesResponse.js +5 -0
  53. package/dist/cjs/api/types/TaskErrorResponse.d.ts +8 -0
  54. package/dist/cjs/api/types/TaskErrorResponse.js +5 -0
  55. package/dist/cjs/api/types/TaskProgress.d.ts +7 -0
  56. package/dist/cjs/api/types/TaskProgress.js +5 -0
  57. package/dist/cjs/api/types/index.d.ts +5 -0
  58. package/dist/cjs/api/types/index.js +5 -0
  59. package/dist/cjs/serialization/resources/context/client/index.d.ts +1 -0
  60. package/dist/cjs/serialization/resources/context/client/index.js +17 -0
  61. package/dist/cjs/serialization/resources/context/client/requests/CreateContextTemplateRequest.d.ts +13 -0
  62. package/dist/cjs/serialization/resources/context/client/requests/CreateContextTemplateRequest.js +44 -0
  63. package/dist/cjs/serialization/resources/context/client/requests/UpdateContextTemplateRequest.d.ts +12 -0
  64. package/dist/cjs/serialization/resources/context/client/requests/UpdateContextTemplateRequest.js +43 -0
  65. package/dist/cjs/serialization/resources/context/client/requests/index.d.ts +2 -0
  66. package/dist/cjs/serialization/resources/context/client/requests/index.js +7 -0
  67. package/dist/cjs/serialization/resources/context/index.d.ts +1 -0
  68. package/dist/cjs/serialization/resources/context/index.js +17 -0
  69. package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +1 -1
  70. package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.js +1 -1
  71. package/dist/cjs/serialization/resources/index.d.ts +2 -0
  72. package/dist/cjs/serialization/resources/index.js +3 -1
  73. package/dist/cjs/serialization/types/AddThreadMessagesResponse.d.ts +1 -0
  74. package/dist/cjs/serialization/types/AddThreadMessagesResponse.js +1 -0
  75. package/dist/cjs/serialization/types/AddTripleResponse.d.ts +1 -0
  76. package/dist/cjs/serialization/types/AddTripleResponse.js +1 -0
  77. package/dist/cjs/serialization/types/CloneGraphResponse.d.ts +1 -0
  78. package/dist/cjs/serialization/types/CloneGraphResponse.js +1 -0
  79. package/dist/cjs/serialization/types/ContextTemplateResponse.d.ts +14 -0
  80. package/dist/cjs/serialization/types/ContextTemplateResponse.js +45 -0
  81. package/dist/cjs/serialization/types/Episode.d.ts +1 -0
  82. package/dist/cjs/serialization/types/Episode.js +1 -0
  83. package/dist/cjs/serialization/types/GetTaskResponse.d.ts +22 -0
  84. package/dist/cjs/serialization/types/GetTaskResponse.js +53 -0
  85. package/dist/cjs/serialization/types/ListContextTemplatesResponse.d.ts +13 -0
  86. package/dist/cjs/serialization/types/ListContextTemplatesResponse.js +44 -0
  87. package/dist/cjs/serialization/types/TaskErrorResponse.d.ts +14 -0
  88. package/dist/cjs/serialization/types/TaskErrorResponse.js +45 -0
  89. package/dist/cjs/serialization/types/TaskProgress.d.ts +13 -0
  90. package/dist/cjs/serialization/types/TaskProgress.js +44 -0
  91. package/dist/cjs/serialization/types/index.d.ts +5 -0
  92. package/dist/cjs/serialization/types/index.js +5 -0
  93. package/dist/cjs/version.d.ts +1 -1
  94. package/dist/cjs/version.js +1 -1
  95. package/dist/esm/Client.d.mts +6 -0
  96. package/dist/esm/Client.mjs +12 -2
  97. package/dist/esm/api/errors/index.d.mts +1 -1
  98. package/dist/esm/api/errors/index.mjs +1 -1
  99. package/dist/esm/api/resources/context/client/Client.d.mts +112 -0
  100. package/dist/esm/api/resources/context/client/Client.mjs +479 -0
  101. package/dist/esm/api/resources/context/client/index.d.mts +2 -0
  102. package/dist/esm/api/resources/context/client/index.mjs +1 -0
  103. package/dist/esm/api/resources/context/client/requests/CreateContextTemplateRequest.d.mts +16 -0
  104. package/dist/esm/api/resources/context/client/requests/CreateContextTemplateRequest.mjs +4 -0
  105. package/dist/esm/api/resources/context/client/requests/UpdateContextTemplateRequest.d.mts +13 -0
  106. package/dist/esm/api/resources/context/client/requests/UpdateContextTemplateRequest.mjs +4 -0
  107. package/dist/esm/api/resources/context/client/requests/index.d.mts +2 -0
  108. package/dist/esm/api/resources/context/client/requests/index.mjs +1 -0
  109. package/dist/esm/api/resources/context/index.d.mts +1 -0
  110. package/dist/esm/api/resources/context/index.mjs +1 -0
  111. package/dist/esm/api/resources/graph/client/Client.d.mts +9 -2
  112. package/dist/esm/api/resources/graph/client/Client.mjs +9 -2
  113. package/dist/esm/api/resources/graph/client/requests/AddTripleRequest.d.mts +2 -1
  114. package/dist/esm/api/resources/graph/client/requests/GraphListAllRequest.d.mts +4 -1
  115. package/dist/esm/api/resources/graph/client/requests/GraphListEntityTypesRequest.d.mts +4 -1
  116. package/dist/esm/api/resources/graph/resources/episode/client/Client.d.mts +6 -2
  117. package/dist/esm/api/resources/graph/resources/episode/client/Client.mjs +6 -2
  118. package/dist/esm/api/resources/graph/resources/episode/client/requests/EpisodeGetByGraphIdRequest.d.mts +3 -1
  119. package/dist/esm/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.mts +3 -1
  120. package/dist/esm/api/resources/index.d.mts +3 -0
  121. package/dist/esm/api/resources/index.mjs +3 -0
  122. package/dist/esm/api/resources/task/client/Client.d.mts +48 -0
  123. package/dist/esm/api/resources/task/client/Client.mjs +111 -0
  124. package/dist/esm/api/resources/task/client/index.d.mts +1 -0
  125. package/dist/esm/api/resources/task/client/index.mjs +1 -0
  126. package/dist/esm/api/resources/task/index.d.mts +1 -0
  127. package/dist/esm/api/resources/task/index.mjs +1 -0
  128. package/dist/esm/api/resources/thread/client/Client.d.mts +16 -3
  129. package/dist/esm/api/resources/thread/client/Client.mjs +20 -4
  130. package/dist/esm/api/resources/thread/client/requests/ThreadGetRequest.d.mts +5 -1
  131. package/dist/esm/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.mts +10 -2
  132. package/dist/esm/api/resources/thread/client/requests/ThreadListAllRequest.d.mts +6 -1
  133. package/dist/esm/api/resources/user/client/Client.d.mts +7 -2
  134. package/dist/esm/api/resources/user/client/Client.mjs +7 -2
  135. package/dist/esm/api/resources/user/client/requests/UserListOrderedRequest.d.mts +4 -1
  136. package/dist/esm/api/resources/user/client/requests/UserListUserSummaryInstructionsRequest.d.mts +3 -1
  137. package/dist/esm/api/types/AddThreadMessagesResponse.d.mts +1 -0
  138. package/dist/esm/api/types/AddTripleResponse.d.mts +2 -0
  139. package/dist/esm/api/types/CloneGraphResponse.d.mts +2 -0
  140. package/dist/esm/api/types/ContextTemplateResponse.d.mts +11 -0
  141. package/dist/esm/api/types/ContextTemplateResponse.mjs +4 -0
  142. package/dist/esm/api/types/Episode.d.mts +2 -0
  143. package/dist/esm/api/types/GetTaskResponse.d.mts +15 -0
  144. package/dist/esm/api/types/GetTaskResponse.mjs +4 -0
  145. package/dist/esm/api/types/ListContextTemplatesResponse.d.mts +7 -0
  146. package/dist/esm/api/types/ListContextTemplatesResponse.mjs +4 -0
  147. package/dist/esm/api/types/TaskErrorResponse.d.mts +8 -0
  148. package/dist/esm/api/types/TaskErrorResponse.mjs +4 -0
  149. package/dist/esm/api/types/TaskProgress.d.mts +7 -0
  150. package/dist/esm/api/types/TaskProgress.mjs +4 -0
  151. package/dist/esm/api/types/index.d.mts +5 -0
  152. package/dist/esm/api/types/index.mjs +5 -0
  153. package/dist/esm/serialization/resources/context/client/index.d.mts +1 -0
  154. package/dist/esm/serialization/resources/context/client/index.mjs +1 -0
  155. package/dist/esm/serialization/resources/context/client/requests/CreateContextTemplateRequest.d.mts +13 -0
  156. package/dist/esm/serialization/resources/context/client/requests/CreateContextTemplateRequest.mjs +8 -0
  157. package/dist/esm/serialization/resources/context/client/requests/UpdateContextTemplateRequest.d.mts +12 -0
  158. package/dist/esm/serialization/resources/context/client/requests/UpdateContextTemplateRequest.mjs +7 -0
  159. package/dist/esm/serialization/resources/context/client/requests/index.d.mts +2 -0
  160. package/dist/esm/serialization/resources/context/client/requests/index.mjs +2 -0
  161. package/dist/esm/serialization/resources/context/index.d.mts +1 -0
  162. package/dist/esm/serialization/resources/context/index.mjs +1 -0
  163. package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.d.mts +1 -1
  164. package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.mjs +1 -1
  165. package/dist/esm/serialization/resources/index.d.mts +2 -0
  166. package/dist/esm/serialization/resources/index.mjs +2 -0
  167. package/dist/esm/serialization/types/AddThreadMessagesResponse.d.mts +1 -0
  168. package/dist/esm/serialization/types/AddThreadMessagesResponse.mjs +1 -0
  169. package/dist/esm/serialization/types/AddTripleResponse.d.mts +1 -0
  170. package/dist/esm/serialization/types/AddTripleResponse.mjs +1 -0
  171. package/dist/esm/serialization/types/CloneGraphResponse.d.mts +1 -0
  172. package/dist/esm/serialization/types/CloneGraphResponse.mjs +1 -0
  173. package/dist/esm/serialization/types/ContextTemplateResponse.d.mts +14 -0
  174. package/dist/esm/serialization/types/ContextTemplateResponse.mjs +9 -0
  175. package/dist/esm/serialization/types/Episode.d.mts +1 -0
  176. package/dist/esm/serialization/types/Episode.mjs +1 -0
  177. package/dist/esm/serialization/types/GetTaskResponse.d.mts +22 -0
  178. package/dist/esm/serialization/types/GetTaskResponse.mjs +17 -0
  179. package/dist/esm/serialization/types/ListContextTemplatesResponse.d.mts +13 -0
  180. package/dist/esm/serialization/types/ListContextTemplatesResponse.mjs +8 -0
  181. package/dist/esm/serialization/types/TaskErrorResponse.d.mts +14 -0
  182. package/dist/esm/serialization/types/TaskErrorResponse.mjs +9 -0
  183. package/dist/esm/serialization/types/TaskProgress.d.mts +13 -0
  184. package/dist/esm/serialization/types/TaskProgress.mjs +8 -0
  185. package/dist/esm/serialization/types/index.d.mts +5 -0
  186. package/dist/esm/serialization/types/index.mjs +5 -0
  187. package/dist/esm/version.d.mts +1 -1
  188. package/dist/esm/version.mjs +1 -1
  189. package/package.json +1 -1
  190. package/reference.md +425 -9
@@ -39,7 +39,9 @@ export declare class Episode {
39
39
  * @throws {@link Zep.InternalServerError}
40
40
  *
41
41
  * @example
42
- * await client.graph.episode.getByGraphId("graph_id")
42
+ * await client.graph.episode.getByGraphId("graph_id", {
43
+ * lastn: 1
44
+ * })
43
45
  */
44
46
  getByGraphId(graphId: string, request?: Zep.graph.EpisodeGetByGraphIdRequest, requestOptions?: Episode.RequestOptions): core.HttpResponsePromise<Zep.EpisodeResponse>;
45
47
  private __getByGraphId;
@@ -54,7 +56,9 @@ export declare class Episode {
54
56
  * @throws {@link Zep.InternalServerError}
55
57
  *
56
58
  * @example
57
- * await client.graph.episode.getByUserId("user_id")
59
+ * await client.graph.episode.getByUserId("user_id", {
60
+ * lastn: 1
61
+ * })
58
62
  */
59
63
  getByUserId(userId: string, request?: Zep.graph.EpisodeGetByUserIdRequest, requestOptions?: Episode.RequestOptions): core.HttpResponsePromise<Zep.EpisodeResponse>;
60
64
  private __getByUserId;
@@ -31,7 +31,9 @@ export class Episode {
31
31
  * @throws {@link Zep.InternalServerError}
32
32
  *
33
33
  * @example
34
- * await client.graph.episode.getByGraphId("graph_id")
34
+ * await client.graph.episode.getByGraphId("graph_id", {
35
+ * lastn: 1
36
+ * })
35
37
  */
36
38
  getByGraphId(graphId, request = {}, requestOptions) {
37
39
  return core.HttpResponsePromise.fromPromise(this.__getByGraphId(graphId, request, requestOptions));
@@ -119,7 +121,9 @@ export class Episode {
119
121
  * @throws {@link Zep.InternalServerError}
120
122
  *
121
123
  * @example
122
- * await client.graph.episode.getByUserId("user_id")
124
+ * await client.graph.episode.getByUserId("user_id", {
125
+ * lastn: 1
126
+ * })
123
127
  */
124
128
  getByUserId(userId, request = {}, requestOptions) {
125
129
  return core.HttpResponsePromise.fromPromise(this.__getByUserId(userId, request, requestOptions));
@@ -3,7 +3,9 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * lastn: 1
8
+ * }
7
9
  */
8
10
  export interface EpisodeGetByGraphIdRequest {
9
11
  /**
@@ -3,7 +3,9 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * lastn: 1
8
+ * }
7
9
  */
8
10
  export interface EpisodeGetByUserIdRequest {
9
11
  /**
@@ -1,8 +1,11 @@
1
1
  export * as thread from "./thread/index.mjs";
2
2
  export * from "./thread/types/index.mjs";
3
+ export * as context from "./context/index.mjs";
3
4
  export * as graph from "./graph/index.mjs";
4
5
  export * as project from "./project/index.mjs";
6
+ export * as task from "./task/index.mjs";
5
7
  export * as user from "./user/index.mjs";
8
+ export * from "./context/client/requests/index.mjs";
6
9
  export * from "./graph/client/requests/index.mjs";
7
10
  export * from "./thread/client/requests/index.mjs";
8
11
  export * from "./user/client/requests/index.mjs";
@@ -1,8 +1,11 @@
1
1
  export * as thread from "./thread/index.mjs";
2
2
  export * from "./thread/types/index.mjs";
3
+ export * as context from "./context/index.mjs";
3
4
  export * as graph from "./graph/index.mjs";
4
5
  export * as project from "./project/index.mjs";
6
+ export * as task from "./task/index.mjs";
5
7
  export * as user from "./user/index.mjs";
8
+ export * from "./context/client/requests/index.mjs";
6
9
  export * from "./graph/client/requests/index.mjs";
7
10
  export * from "./thread/client/requests/index.mjs";
8
11
  export * from "./user/client/requests/index.mjs";
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments.mjs";
5
+ import * as core from "../../../../core/index.mjs";
6
+ import * as Zep from "../../../index.mjs";
7
+ export declare namespace Task {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ZepEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ apiKey?: core.Supplier<string | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional headers to include in the request. */
25
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
+ }
27
+ }
28
+ export declare class Task {
29
+ protected readonly _options: Task.Options;
30
+ constructor(_options?: Task.Options);
31
+ /**
32
+ * Gets a task by its ID
33
+ *
34
+ * @param {string} taskId - Task ID
35
+ * @param {Task.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link Zep.NotFoundError}
38
+ * @throws {@link Zep.InternalServerError}
39
+ *
40
+ * @example
41
+ * await client.task.get("task_id")
42
+ */
43
+ get(taskId: string, requestOptions?: Task.RequestOptions): core.HttpResponsePromise<Zep.GetTaskResponse>;
44
+ private __get;
45
+ protected _getCustomAuthorizationHeaders(): Promise<{
46
+ Authorization: string;
47
+ }>;
48
+ }
@@ -0,0 +1,111 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import * as environments from "../../../../environments.mjs";
14
+ import * as core from "../../../../core/index.mjs";
15
+ import * as Zep from "../../../index.mjs";
16
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
17
+ import * as serializers from "../../../../serialization/index.mjs";
18
+ import * as errors from "../../../../errors/index.mjs";
19
+ export class Task {
20
+ constructor(_options = {}) {
21
+ this._options = _options;
22
+ }
23
+ /**
24
+ * Gets a task by its ID
25
+ *
26
+ * @param {string} taskId - Task ID
27
+ * @param {Task.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link Zep.NotFoundError}
30
+ * @throws {@link Zep.InternalServerError}
31
+ *
32
+ * @example
33
+ * await client.task.get("task_id")
34
+ */
35
+ get(taskId, requestOptions) {
36
+ return core.HttpResponsePromise.fromPromise(this.__get(taskId, requestOptions));
37
+ }
38
+ __get(taskId, requestOptions) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ var _a, _b, _c, _d;
41
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
42
+ 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, `tasks/${encodeURIComponent(taskId)}`),
43
+ method: "GET",
44
+ headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
45
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
46
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
47
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
48
+ });
49
+ if (_response.ok) {
50
+ return {
51
+ data: serializers.GetTaskResponse.parseOrThrow(_response.body, {
52
+ unrecognizedObjectKeys: "passthrough",
53
+ allowUnrecognizedUnionMembers: true,
54
+ allowUnrecognizedEnumValues: true,
55
+ skipValidation: true,
56
+ breadcrumbsPrefix: ["response"],
57
+ }),
58
+ rawResponse: _response.rawResponse,
59
+ };
60
+ }
61
+ if (_response.error.reason === "status-code") {
62
+ switch (_response.error.statusCode) {
63
+ case 404:
64
+ throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
65
+ unrecognizedObjectKeys: "passthrough",
66
+ allowUnrecognizedUnionMembers: true,
67
+ allowUnrecognizedEnumValues: true,
68
+ skipValidation: true,
69
+ breadcrumbsPrefix: ["response"],
70
+ }), _response.rawResponse);
71
+ case 500:
72
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
73
+ unrecognizedObjectKeys: "passthrough",
74
+ allowUnrecognizedUnionMembers: true,
75
+ allowUnrecognizedEnumValues: true,
76
+ skipValidation: true,
77
+ breadcrumbsPrefix: ["response"],
78
+ }), _response.rawResponse);
79
+ default:
80
+ throw new errors.ZepError({
81
+ statusCode: _response.error.statusCode,
82
+ body: _response.error.body,
83
+ rawResponse: _response.rawResponse,
84
+ });
85
+ }
86
+ }
87
+ switch (_response.error.reason) {
88
+ case "non-json":
89
+ throw new errors.ZepError({
90
+ statusCode: _response.error.statusCode,
91
+ body: _response.error.rawBody,
92
+ rawResponse: _response.rawResponse,
93
+ });
94
+ case "timeout":
95
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /tasks/{task_id}.");
96
+ case "unknown":
97
+ throw new errors.ZepError({
98
+ message: _response.error.errorMessage,
99
+ rawResponse: _response.rawResponse,
100
+ });
101
+ }
102
+ });
103
+ }
104
+ _getCustomAuthorizationHeaders() {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ var _a;
107
+ 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"];
108
+ return { Authorization: `Api-Key ${apiKeyValue}` };
109
+ });
110
+ }
111
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -41,7 +41,12 @@ export declare class Thread {
41
41
  * @throws {@link Zep.InternalServerError}
42
42
  *
43
43
  * @example
44
- * await client.thread.listAll()
44
+ * await client.thread.listAll({
45
+ * pageNumber: 1,
46
+ * pageSize: 1,
47
+ * orderBy: "order_by",
48
+ * asc: true
49
+ * })
45
50
  */
46
51
  listAll(request?: Zep.ThreadListAllRequest, requestOptions?: Thread.RequestOptions): core.HttpResponsePromise<Zep.ThreadListResponse>;
47
52
  private __listAll;
@@ -87,7 +92,11 @@ export declare class Thread {
87
92
  * @throws {@link Zep.InternalServerError}
88
93
  *
89
94
  * @example
90
- * await client.thread.getUserContext("threadId")
95
+ * await client.thread.getUserContext("threadId", {
96
+ * minRating: 1.1,
97
+ * templateId: "template_id",
98
+ * mode: "basic"
99
+ * })
91
100
  */
92
101
  getUserContext(threadId: string, request?: Zep.ThreadGetUserContextRequest, requestOptions?: Thread.RequestOptions): core.HttpResponsePromise<Zep.ThreadContextResponse>;
93
102
  private __getUserContext;
@@ -102,7 +111,11 @@ export declare class Thread {
102
111
  * @throws {@link Zep.InternalServerError}
103
112
  *
104
113
  * @example
105
- * await client.thread.get("threadId")
114
+ * await client.thread.get("threadId", {
115
+ * limit: 1,
116
+ * cursor: 1,
117
+ * lastn: 1
118
+ * })
106
119
  */
107
120
  get(threadId: string, request?: Zep.ThreadGetRequest, requestOptions?: Thread.RequestOptions): core.HttpResponsePromise<Zep.MessageListResponse>;
108
121
  private __get;
@@ -35,7 +35,12 @@ export class Thread {
35
35
  * @throws {@link Zep.InternalServerError}
36
36
  *
37
37
  * @example
38
- * await client.thread.listAll()
38
+ * await client.thread.listAll({
39
+ * pageNumber: 1,
40
+ * pageSize: 1,
41
+ * orderBy: "order_by",
42
+ * asc: true
43
+ * })
39
44
  */
40
45
  listAll(request = {}, requestOptions) {
41
46
  return core.HttpResponsePromise.fromPromise(this.__listAll(request, requestOptions));
@@ -303,7 +308,11 @@ export class Thread {
303
308
  * @throws {@link Zep.InternalServerError}
304
309
  *
305
310
  * @example
306
- * await client.thread.getUserContext("threadId")
311
+ * await client.thread.getUserContext("threadId", {
312
+ * minRating: 1.1,
313
+ * templateId: "template_id",
314
+ * mode: "basic"
315
+ * })
307
316
  */
308
317
  getUserContext(threadId, request = {}, requestOptions) {
309
318
  return core.HttpResponsePromise.fromPromise(this.__getUserContext(threadId, request, requestOptions));
@@ -311,11 +320,14 @@ export class Thread {
311
320
  __getUserContext(threadId_1) {
312
321
  return __awaiter(this, arguments, void 0, function* (threadId, request = {}, requestOptions) {
313
322
  var _a, _b, _c, _d;
314
- const { minRating, mode } = request;
323
+ const { minRating, templateId, mode } = request;
315
324
  const _queryParams = {};
316
325
  if (minRating != null) {
317
326
  _queryParams["minRating"] = minRating.toString();
318
327
  }
328
+ if (templateId != null) {
329
+ _queryParams["template_id"] = templateId;
330
+ }
319
331
  if (mode != null) {
320
332
  _queryParams["mode"] = serializers.ThreadGetUserContextRequestMode.jsonOrThrow(mode, {
321
333
  unrecognizedObjectKeys: "strip",
@@ -397,7 +409,11 @@ export class Thread {
397
409
  * @throws {@link Zep.InternalServerError}
398
410
  *
399
411
  * @example
400
- * await client.thread.get("threadId")
412
+ * await client.thread.get("threadId", {
413
+ * limit: 1,
414
+ * cursor: 1,
415
+ * lastn: 1
416
+ * })
401
417
  */
402
418
  get(threadId, request = {}, requestOptions) {
403
419
  return core.HttpResponsePromise.fromPromise(this.__get(threadId, request, requestOptions));
@@ -3,7 +3,11 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * limit: 1,
8
+ * cursor: 1,
9
+ * lastn: 1
10
+ * }
7
11
  */
8
12
  export interface ThreadGetRequest {
9
13
  /**
@@ -4,7 +4,11 @@
4
4
  import * as Zep from "../../../../index.mjs";
5
5
  /**
6
6
  * @example
7
- * {}
7
+ * {
8
+ * minRating: 1.1,
9
+ * templateId: "template_id",
10
+ * mode: "basic"
11
+ * }
8
12
  */
9
13
  export interface ThreadGetUserContextRequest {
10
14
  /**
@@ -12,7 +16,11 @@ export interface ThreadGetUserContextRequest {
12
16
  */
13
17
  minRating?: number;
14
18
  /**
15
- * Defaults to summary mode. Use basic for lower latency
19
+ * Optional template ID to use for custom context rendering.
20
+ */
21
+ templateId?: string;
22
+ /**
23
+ * Deprecated, this field will be removed in a future release. Defaults to summary mode. Use basic for lower latency
16
24
  */
17
25
  mode?: Zep.ThreadGetUserContextRequestMode;
18
26
  }
@@ -3,7 +3,12 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * pageNumber: 1,
8
+ * pageSize: 1,
9
+ * orderBy: "order_by",
10
+ * asc: true
11
+ * }
7
12
  */
8
13
  export interface ThreadListAllRequest {
9
14
  /**
@@ -38,7 +38,9 @@ export declare class User {
38
38
  * @throws {@link Zep.InternalServerError}
39
39
  *
40
40
  * @example
41
- * await client.user.listUserSummaryInstructions()
41
+ * await client.user.listUserSummaryInstructions({
42
+ * userId: "user_id"
43
+ * })
42
44
  */
43
45
  listUserSummaryInstructions(request?: Zep.UserListUserSummaryInstructionsRequest, requestOptions?: User.RequestOptions): core.HttpResponsePromise<Zep.ListUserInstructionsResponse>;
44
46
  private __listUserSummaryInstructions;
@@ -101,7 +103,10 @@ export declare class User {
101
103
  * @throws {@link Zep.InternalServerError}
102
104
  *
103
105
  * @example
104
- * await client.user.listOrdered()
106
+ * await client.user.listOrdered({
107
+ * pageNumber: 1,
108
+ * pageSize: 1
109
+ * })
105
110
  */
106
111
  listOrdered(request?: Zep.UserListOrderedRequest, requestOptions?: User.RequestOptions): core.HttpResponsePromise<Zep.UserListResponse>;
107
112
  private __listOrdered;
@@ -30,7 +30,9 @@ export class User {
30
30
  * @throws {@link Zep.InternalServerError}
31
31
  *
32
32
  * @example
33
- * await client.user.listUserSummaryInstructions()
33
+ * await client.user.listUserSummaryInstructions({
34
+ * userId: "user_id"
35
+ * })
34
36
  */
35
37
  listUserSummaryInstructions(request = {}, requestOptions) {
36
38
  return core.HttpResponsePromise.fromPromise(this.__listUserSummaryInstructions(request, requestOptions));
@@ -385,7 +387,10 @@ export class User {
385
387
  * @throws {@link Zep.InternalServerError}
386
388
  *
387
389
  * @example
388
- * await client.user.listOrdered()
390
+ * await client.user.listOrdered({
391
+ * pageNumber: 1,
392
+ * pageSize: 1
393
+ * })
389
394
  */
390
395
  listOrdered(request = {}, requestOptions) {
391
396
  return core.HttpResponsePromise.fromPromise(this.__listOrdered(request, requestOptions));
@@ -3,7 +3,10 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * pageNumber: 1,
8
+ * pageSize: 1
9
+ * }
7
10
  */
8
11
  export interface UserListOrderedRequest {
9
12
  /**
@@ -3,7 +3,9 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * userId: "user_id"
8
+ * }
7
9
  */
8
10
  export interface UserListUserSummaryInstructionsRequest {
9
11
  /**
@@ -4,4 +4,5 @@
4
4
  export interface AddThreadMessagesResponse {
5
5
  context?: string;
6
6
  messageUuids?: string[];
7
+ taskId?: string;
7
8
  }
@@ -6,4 +6,6 @@ export interface AddTripleResponse {
6
6
  edge?: Zep.EntityEdge;
7
7
  sourceNode?: Zep.EntityNode;
8
8
  targetNode?: Zep.EntityNode;
9
+ /** Task ID of the add triple task */
10
+ taskId?: string;
9
11
  }
@@ -4,5 +4,7 @@
4
4
  export interface CloneGraphResponse {
5
5
  /** graph_id is the ID of the cloned graph */
6
6
  graphId?: string;
7
+ /** Task ID of the clone graph task */
8
+ taskId?: string;
7
9
  userId?: string;
8
10
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ContextTemplateResponse {
5
+ /** The template content. */
6
+ template?: string;
7
+ /** Unique identifier for the template (max 100 characters). */
8
+ templateId?: string;
9
+ /** Unique identifier for the template. */
10
+ uuid?: string;
11
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -20,6 +20,8 @@ export interface Episode {
20
20
  score?: number;
21
21
  source?: Zep.GraphDataType;
22
22
  sourceDescription?: string;
23
+ /** Optional task ID to poll episode processing status. Currently only available for batch ingestion. */
24
+ taskId?: string;
23
25
  /** Optional thread ID, will be present if the episode is part of a thread */
24
26
  threadId?: string;
25
27
  uuid: string;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Zep from "../index.mjs";
5
+ export interface GetTaskResponse {
6
+ completedAt?: string;
7
+ createdAt?: string;
8
+ error?: Zep.TaskErrorResponse;
9
+ progress?: Zep.TaskProgress;
10
+ startedAt?: string;
11
+ status?: string;
12
+ taskId?: string;
13
+ type?: string;
14
+ updatedAt?: string;
15
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Zep from "../index.mjs";
5
+ export interface ListContextTemplatesResponse {
6
+ templates?: Zep.ContextTemplateResponse[];
7
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface TaskErrorResponse {
5
+ code?: string;
6
+ details?: Record<string, unknown>;
7
+ message?: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface TaskProgress {
5
+ message?: string;
6
+ stage?: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -2,6 +2,7 @@ export * from "./ApiError.mjs";
2
2
  export * from "./AddThreadMessagesRequest.mjs";
3
3
  export * from "./AddThreadMessagesResponse.mjs";
4
4
  export * from "./CloneGraphResponse.mjs";
5
+ export * from "./ContextTemplateResponse.mjs";
5
6
  export * from "./EdgeType.mjs";
6
7
  export * from "./EntityEdgeSourceTarget.mjs";
7
8
  export * from "./EntityProperty.mjs";
@@ -11,6 +12,7 @@ export * from "./EpisodeData.mjs";
11
12
  export * from "./EpisodeMentions.mjs";
12
13
  export * from "./FactRatingExamples.mjs";
13
14
  export * from "./FactRatingInstruction.mjs";
15
+ export * from "./GetTaskResponse.mjs";
14
16
  export * from "./Graph.mjs";
15
17
  export * from "./GraphEdgesRequest.mjs";
16
18
  export * from "./Episode.mjs";
@@ -18,11 +20,14 @@ export * from "./EpisodeResponse.mjs";
18
20
  export * from "./GraphListResponse.mjs";
19
21
  export * from "./GraphNodesRequest.mjs";
20
22
  export * from "./GraphSearchResults.mjs";
23
+ export * from "./ListContextTemplatesResponse.mjs";
21
24
  export * from "./ListUserInstructionsResponse.mjs";
22
25
  export * from "./ProjectInfo.mjs";
23
26
  export * from "./ProjectInfoResponse.mjs";
24
27
  export * from "./RoleType.mjs";
25
28
  export * from "./SuccessResponse.mjs";
29
+ export * from "./TaskErrorResponse.mjs";
30
+ export * from "./TaskProgress.mjs";
26
31
  export * from "./Thread.mjs";
27
32
  export * from "./ThreadContextResponse.mjs";
28
33
  export * from "./ThreadListResponse.mjs";