@getzep/zep-cloud 3.9.0 → 3.12.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 (172) hide show
  1. package/dist/cjs/Client.d.ts +3 -0
  2. package/dist/cjs/Client.js +15 -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 +8 -2
  18. package/dist/cjs/api/resources/graph/client/Client.js +8 -2
  19. package/dist/cjs/api/resources/graph/client/requests/GraphListAllRequest.d.ts +4 -1
  20. package/dist/cjs/api/resources/graph/client/requests/GraphListEntityTypesRequest.d.ts +4 -1
  21. package/dist/cjs/api/resources/graph/resources/episode/client/Client.d.ts +6 -2
  22. package/dist/cjs/api/resources/graph/resources/episode/client/Client.js +6 -2
  23. package/dist/cjs/api/resources/graph/resources/episode/client/requests/EpisodeGetByGraphIdRequest.d.ts +3 -1
  24. package/dist/cjs/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.ts +3 -1
  25. package/dist/cjs/api/resources/index.d.ts +2 -0
  26. package/dist/cjs/api/resources/index.js +3 -1
  27. package/dist/cjs/api/resources/thread/client/Client.d.ts +16 -3
  28. package/dist/cjs/api/resources/thread/client/Client.js +20 -4
  29. package/dist/cjs/api/resources/thread/client/requests/ThreadGetRequest.d.ts +5 -1
  30. package/dist/cjs/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.ts +10 -2
  31. package/dist/cjs/api/resources/thread/client/requests/ThreadListAllRequest.d.ts +6 -1
  32. package/dist/cjs/api/resources/user/client/Client.d.ts +53 -1
  33. package/dist/cjs/api/resources/user/client/Client.js +272 -1
  34. package/dist/cjs/api/resources/user/client/requests/AddUserInstructionsRequest.d.ts +19 -0
  35. package/dist/cjs/api/resources/user/client/requests/AddUserInstructionsRequest.js +5 -0
  36. package/dist/cjs/api/resources/user/client/requests/DeleteUserInstructionsRequest.d.ts +13 -0
  37. package/dist/cjs/api/resources/user/client/requests/DeleteUserInstructionsRequest.js +5 -0
  38. package/dist/cjs/api/resources/user/client/requests/UserListOrderedRequest.d.ts +4 -1
  39. package/dist/cjs/api/resources/user/client/requests/UserListUserSummaryInstructionsRequest.d.ts +15 -0
  40. package/dist/cjs/api/resources/user/client/requests/UserListUserSummaryInstructionsRequest.js +5 -0
  41. package/dist/cjs/api/resources/user/client/requests/index.d.ts +3 -0
  42. package/dist/cjs/api/types/ComparisonOperator.d.ts +3 -1
  43. package/dist/cjs/api/types/ComparisonOperator.js +2 -0
  44. package/dist/cjs/api/types/ContextTemplateResponse.d.ts +11 -0
  45. package/dist/cjs/api/types/ContextTemplateResponse.js +5 -0
  46. package/dist/cjs/api/types/ListContextTemplatesResponse.d.ts +7 -0
  47. package/dist/cjs/api/types/ListContextTemplatesResponse.js +5 -0
  48. package/dist/cjs/api/types/ListUserInstructionsResponse.d.ts +7 -0
  49. package/dist/cjs/api/types/ListUserInstructionsResponse.js +5 -0
  50. package/dist/cjs/api/types/UserInstruction.d.ts +7 -0
  51. package/dist/cjs/api/types/UserInstruction.js +5 -0
  52. package/dist/cjs/api/types/index.d.ts +4 -0
  53. package/dist/cjs/api/types/index.js +4 -0
  54. package/dist/cjs/serialization/resources/context/client/index.d.ts +1 -0
  55. package/dist/cjs/serialization/resources/context/client/index.js +17 -0
  56. package/dist/cjs/serialization/resources/context/client/requests/CreateContextTemplateRequest.d.ts +13 -0
  57. package/dist/cjs/serialization/resources/context/client/requests/CreateContextTemplateRequest.js +44 -0
  58. package/dist/cjs/serialization/resources/context/client/requests/UpdateContextTemplateRequest.d.ts +12 -0
  59. package/dist/cjs/serialization/resources/context/client/requests/UpdateContextTemplateRequest.js +43 -0
  60. package/dist/cjs/serialization/resources/context/client/requests/index.d.ts +2 -0
  61. package/dist/cjs/serialization/resources/context/client/requests/index.js +7 -0
  62. package/dist/cjs/serialization/resources/context/index.d.ts +1 -0
  63. package/dist/cjs/serialization/resources/context/index.js +17 -0
  64. package/dist/cjs/serialization/resources/index.d.ts +2 -0
  65. package/dist/cjs/serialization/resources/index.js +3 -1
  66. package/dist/cjs/serialization/resources/user/client/requests/AddUserInstructionsRequest.d.ts +14 -0
  67. package/dist/cjs/serialization/resources/user/client/requests/AddUserInstructionsRequest.js +45 -0
  68. package/dist/cjs/serialization/resources/user/client/requests/DeleteUserInstructionsRequest.d.ts +13 -0
  69. package/dist/cjs/serialization/resources/user/client/requests/DeleteUserInstructionsRequest.js +44 -0
  70. package/dist/cjs/serialization/resources/user/client/requests/index.d.ts +2 -0
  71. package/dist/cjs/serialization/resources/user/client/requests/index.js +5 -1
  72. package/dist/cjs/serialization/types/ComparisonOperator.d.ts +1 -1
  73. package/dist/cjs/serialization/types/ComparisonOperator.js +1 -1
  74. package/dist/cjs/serialization/types/ContextTemplateResponse.d.ts +14 -0
  75. package/dist/cjs/serialization/types/ContextTemplateResponse.js +45 -0
  76. package/dist/cjs/serialization/types/ListContextTemplatesResponse.d.ts +13 -0
  77. package/dist/cjs/serialization/types/ListContextTemplatesResponse.js +44 -0
  78. package/dist/cjs/serialization/types/ListUserInstructionsResponse.d.ts +13 -0
  79. package/dist/cjs/serialization/types/ListUserInstructionsResponse.js +44 -0
  80. package/dist/cjs/serialization/types/UserInstruction.d.ts +13 -0
  81. package/dist/cjs/serialization/types/UserInstruction.js +44 -0
  82. package/dist/cjs/serialization/types/index.d.ts +4 -0
  83. package/dist/cjs/serialization/types/index.js +4 -0
  84. package/dist/cjs/version.d.ts +1 -1
  85. package/dist/cjs/version.js +1 -1
  86. package/dist/esm/Client.d.mts +3 -0
  87. package/dist/esm/Client.mjs +7 -2
  88. package/dist/esm/api/errors/index.d.mts +1 -1
  89. package/dist/esm/api/errors/index.mjs +1 -1
  90. package/dist/esm/api/resources/context/client/Client.d.mts +112 -0
  91. package/dist/esm/api/resources/context/client/Client.mjs +479 -0
  92. package/dist/esm/api/resources/context/client/index.d.mts +2 -0
  93. package/dist/esm/api/resources/context/client/index.mjs +1 -0
  94. package/dist/esm/api/resources/context/client/requests/CreateContextTemplateRequest.d.mts +16 -0
  95. package/dist/esm/api/resources/context/client/requests/CreateContextTemplateRequest.mjs +4 -0
  96. package/dist/esm/api/resources/context/client/requests/UpdateContextTemplateRequest.d.mts +13 -0
  97. package/dist/esm/api/resources/context/client/requests/UpdateContextTemplateRequest.mjs +4 -0
  98. package/dist/esm/api/resources/context/client/requests/index.d.mts +2 -0
  99. package/dist/esm/api/resources/context/client/requests/index.mjs +1 -0
  100. package/dist/esm/api/resources/context/index.d.mts +1 -0
  101. package/dist/esm/api/resources/context/index.mjs +1 -0
  102. package/dist/esm/api/resources/graph/client/Client.d.mts +8 -2
  103. package/dist/esm/api/resources/graph/client/Client.mjs +8 -2
  104. package/dist/esm/api/resources/graph/client/requests/GraphListAllRequest.d.mts +4 -1
  105. package/dist/esm/api/resources/graph/client/requests/GraphListEntityTypesRequest.d.mts +4 -1
  106. package/dist/esm/api/resources/graph/resources/episode/client/Client.d.mts +6 -2
  107. package/dist/esm/api/resources/graph/resources/episode/client/Client.mjs +6 -2
  108. package/dist/esm/api/resources/graph/resources/episode/client/requests/EpisodeGetByGraphIdRequest.d.mts +3 -1
  109. package/dist/esm/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.mts +3 -1
  110. package/dist/esm/api/resources/index.d.mts +2 -0
  111. package/dist/esm/api/resources/index.mjs +2 -0
  112. package/dist/esm/api/resources/thread/client/Client.d.mts +16 -3
  113. package/dist/esm/api/resources/thread/client/Client.mjs +20 -4
  114. package/dist/esm/api/resources/thread/client/requests/ThreadGetRequest.d.mts +5 -1
  115. package/dist/esm/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.mts +10 -2
  116. package/dist/esm/api/resources/thread/client/requests/ThreadListAllRequest.d.mts +6 -1
  117. package/dist/esm/api/resources/user/client/Client.d.mts +53 -1
  118. package/dist/esm/api/resources/user/client/Client.mjs +272 -1
  119. package/dist/esm/api/resources/user/client/requests/AddUserInstructionsRequest.d.mts +19 -0
  120. package/dist/esm/api/resources/user/client/requests/AddUserInstructionsRequest.mjs +4 -0
  121. package/dist/esm/api/resources/user/client/requests/DeleteUserInstructionsRequest.d.mts +13 -0
  122. package/dist/esm/api/resources/user/client/requests/DeleteUserInstructionsRequest.mjs +4 -0
  123. package/dist/esm/api/resources/user/client/requests/UserListOrderedRequest.d.mts +4 -1
  124. package/dist/esm/api/resources/user/client/requests/UserListUserSummaryInstructionsRequest.d.mts +15 -0
  125. package/dist/esm/api/resources/user/client/requests/UserListUserSummaryInstructionsRequest.mjs +4 -0
  126. package/dist/esm/api/resources/user/client/requests/index.d.mts +3 -0
  127. package/dist/esm/api/types/ComparisonOperator.d.mts +3 -1
  128. package/dist/esm/api/types/ComparisonOperator.mjs +2 -0
  129. package/dist/esm/api/types/ContextTemplateResponse.d.mts +11 -0
  130. package/dist/esm/api/types/ContextTemplateResponse.mjs +4 -0
  131. package/dist/esm/api/types/ListContextTemplatesResponse.d.mts +7 -0
  132. package/dist/esm/api/types/ListContextTemplatesResponse.mjs +4 -0
  133. package/dist/esm/api/types/ListUserInstructionsResponse.d.mts +7 -0
  134. package/dist/esm/api/types/ListUserInstructionsResponse.mjs +4 -0
  135. package/dist/esm/api/types/UserInstruction.d.mts +7 -0
  136. package/dist/esm/api/types/UserInstruction.mjs +4 -0
  137. package/dist/esm/api/types/index.d.mts +4 -0
  138. package/dist/esm/api/types/index.mjs +4 -0
  139. package/dist/esm/serialization/resources/context/client/index.d.mts +1 -0
  140. package/dist/esm/serialization/resources/context/client/index.mjs +1 -0
  141. package/dist/esm/serialization/resources/context/client/requests/CreateContextTemplateRequest.d.mts +13 -0
  142. package/dist/esm/serialization/resources/context/client/requests/CreateContextTemplateRequest.mjs +8 -0
  143. package/dist/esm/serialization/resources/context/client/requests/UpdateContextTemplateRequest.d.mts +12 -0
  144. package/dist/esm/serialization/resources/context/client/requests/UpdateContextTemplateRequest.mjs +7 -0
  145. package/dist/esm/serialization/resources/context/client/requests/index.d.mts +2 -0
  146. package/dist/esm/serialization/resources/context/client/requests/index.mjs +2 -0
  147. package/dist/esm/serialization/resources/context/index.d.mts +1 -0
  148. package/dist/esm/serialization/resources/context/index.mjs +1 -0
  149. package/dist/esm/serialization/resources/index.d.mts +2 -0
  150. package/dist/esm/serialization/resources/index.mjs +2 -0
  151. package/dist/esm/serialization/resources/user/client/requests/AddUserInstructionsRequest.d.mts +14 -0
  152. package/dist/esm/serialization/resources/user/client/requests/AddUserInstructionsRequest.mjs +9 -0
  153. package/dist/esm/serialization/resources/user/client/requests/DeleteUserInstructionsRequest.d.mts +13 -0
  154. package/dist/esm/serialization/resources/user/client/requests/DeleteUserInstructionsRequest.mjs +8 -0
  155. package/dist/esm/serialization/resources/user/client/requests/index.d.mts +2 -0
  156. package/dist/esm/serialization/resources/user/client/requests/index.mjs +2 -0
  157. package/dist/esm/serialization/types/ComparisonOperator.d.mts +1 -1
  158. package/dist/esm/serialization/types/ComparisonOperator.mjs +1 -1
  159. package/dist/esm/serialization/types/ContextTemplateResponse.d.mts +14 -0
  160. package/dist/esm/serialization/types/ContextTemplateResponse.mjs +9 -0
  161. package/dist/esm/serialization/types/ListContextTemplatesResponse.d.mts +13 -0
  162. package/dist/esm/serialization/types/ListContextTemplatesResponse.mjs +8 -0
  163. package/dist/esm/serialization/types/ListUserInstructionsResponse.d.mts +13 -0
  164. package/dist/esm/serialization/types/ListUserInstructionsResponse.mjs +8 -0
  165. package/dist/esm/serialization/types/UserInstruction.d.mts +13 -0
  166. package/dist/esm/serialization/types/UserInstruction.mjs +8 -0
  167. package/dist/esm/serialization/types/index.d.mts +4 -0
  168. package/dist/esm/serialization/types/index.mjs +4 -0
  169. package/dist/esm/version.d.mts +1 -1
  170. package/dist/esm/version.mjs +1 -1
  171. package/package.json +1 -1
  172. package/reference.md +554 -8
@@ -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 GraphListAllRequest {
9
12
  /**
@@ -3,7 +3,10 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * userId: "user_id",
8
+ * graphId: "graph_id"
9
+ * }
7
10
  */
8
11
  export interface GraphListEntityTypesRequest {
9
12
  /**
@@ -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;
@@ -67,7 +67,9 @@ class Episode {
67
67
  * @throws {@link Zep.InternalServerError}
68
68
  *
69
69
  * @example
70
- * await client.graph.episode.getByGraphId("graph_id")
70
+ * await client.graph.episode.getByGraphId("graph_id", {
71
+ * lastn: 1
72
+ * })
71
73
  */
72
74
  getByGraphId(graphId, request = {}, requestOptions) {
73
75
  return core.HttpResponsePromise.fromPromise(this.__getByGraphId(graphId, request, requestOptions));
@@ -155,7 +157,9 @@ class Episode {
155
157
  * @throws {@link Zep.InternalServerError}
156
158
  *
157
159
  * @example
158
- * await client.graph.episode.getByUserId("user_id")
160
+ * await client.graph.episode.getByUserId("user_id", {
161
+ * lastn: 1
162
+ * })
159
163
  */
160
164
  getByUserId(userId, request = {}, requestOptions) {
161
165
  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,10 @@
1
1
  export * as thread from "./thread/index.js";
2
2
  export * from "./thread/types/index.js";
3
+ export * as context from "./context/index.js";
3
4
  export * as graph from "./graph/index.js";
4
5
  export * as project from "./project/index.js";
5
6
  export * as user from "./user/index.js";
7
+ export * from "./context/client/requests/index.js";
6
8
  export * from "./graph/client/requests/index.js";
7
9
  export * from "./thread/client/requests/index.js";
8
10
  export * from "./user/client/requests/index.js";
@@ -36,12 +36,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.user = exports.project = exports.graph = exports.thread = void 0;
39
+ exports.user = exports.project = exports.graph = exports.context = exports.thread = void 0;
40
40
  exports.thread = __importStar(require("./thread/index.js"));
41
41
  __exportStar(require("./thread/types/index.js"), exports);
42
+ exports.context = __importStar(require("./context/index.js"));
42
43
  exports.graph = __importStar(require("./graph/index.js"));
43
44
  exports.project = __importStar(require("./project/index.js"));
44
45
  exports.user = __importStar(require("./user/index.js"));
46
+ __exportStar(require("./context/client/requests/index.js"), exports);
45
47
  __exportStar(require("./graph/client/requests/index.js"), exports);
46
48
  __exportStar(require("./thread/client/requests/index.js"), exports);
47
49
  __exportStar(require("./user/client/requests/index.js"), exports);
@@ -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;
@@ -71,7 +71,12 @@ class Thread {
71
71
  * @throws {@link Zep.InternalServerError}
72
72
  *
73
73
  * @example
74
- * await client.thread.listAll()
74
+ * await client.thread.listAll({
75
+ * pageNumber: 1,
76
+ * pageSize: 1,
77
+ * orderBy: "order_by",
78
+ * asc: true
79
+ * })
75
80
  */
76
81
  listAll(request = {}, requestOptions) {
77
82
  return core.HttpResponsePromise.fromPromise(this.__listAll(request, requestOptions));
@@ -339,7 +344,11 @@ class Thread {
339
344
  * @throws {@link Zep.InternalServerError}
340
345
  *
341
346
  * @example
342
- * await client.thread.getUserContext("threadId")
347
+ * await client.thread.getUserContext("threadId", {
348
+ * minRating: 1.1,
349
+ * templateId: "template_id",
350
+ * mode: "basic"
351
+ * })
343
352
  */
344
353
  getUserContext(threadId, request = {}, requestOptions) {
345
354
  return core.HttpResponsePromise.fromPromise(this.__getUserContext(threadId, request, requestOptions));
@@ -347,11 +356,14 @@ class Thread {
347
356
  __getUserContext(threadId_1) {
348
357
  return __awaiter(this, arguments, void 0, function* (threadId, request = {}, requestOptions) {
349
358
  var _a, _b, _c, _d;
350
- const { minRating, mode } = request;
359
+ const { minRating, templateId, mode } = request;
351
360
  const _queryParams = {};
352
361
  if (minRating != null) {
353
362
  _queryParams["minRating"] = minRating.toString();
354
363
  }
364
+ if (templateId != null) {
365
+ _queryParams["template_id"] = templateId;
366
+ }
355
367
  if (mode != null) {
356
368
  _queryParams["mode"] = serializers.ThreadGetUserContextRequestMode.jsonOrThrow(mode, {
357
369
  unrecognizedObjectKeys: "strip",
@@ -433,7 +445,11 @@ class Thread {
433
445
  * @throws {@link Zep.InternalServerError}
434
446
  *
435
447
  * @example
436
- * await client.thread.get("threadId")
448
+ * await client.thread.get("threadId", {
449
+ * limit: 1,
450
+ * cursor: 1,
451
+ * lastn: 1
452
+ * })
437
453
  */
438
454
  get(threadId, request = {}, requestOptions) {
439
455
  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.js";
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
  /**
@@ -28,6 +28,55 @@ export declare namespace User {
28
28
  export declare class User {
29
29
  protected readonly _options: User.Options;
30
30
  constructor(_options?: User.Options);
31
+ /**
32
+ * Lists all user summary instructions for a project, user.
33
+ *
34
+ * @param {Zep.UserListUserSummaryInstructionsRequest} request
35
+ * @param {User.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link Zep.BadRequestError}
38
+ * @throws {@link Zep.InternalServerError}
39
+ *
40
+ * @example
41
+ * await client.user.listUserSummaryInstructions({
42
+ * userId: "user_id"
43
+ * })
44
+ */
45
+ listUserSummaryInstructions(request?: Zep.UserListUserSummaryInstructionsRequest, requestOptions?: User.RequestOptions): core.HttpResponsePromise<Zep.ListUserInstructionsResponse>;
46
+ private __listUserSummaryInstructions;
47
+ /**
48
+ * Adds new summary instructions for users graphs without removing existing ones. If user_ids is empty, adds to project-wide default instructions.
49
+ *
50
+ * @param {Zep.AddUserInstructionsRequest} request
51
+ * @param {User.RequestOptions} requestOptions - Request-specific configuration.
52
+ *
53
+ * @throws {@link Zep.BadRequestError}
54
+ * @throws {@link Zep.InternalServerError}
55
+ *
56
+ * @example
57
+ * await client.user.addUserSummaryInstructions({
58
+ * instructions: [{
59
+ * name: "name",
60
+ * text: "text"
61
+ * }]
62
+ * })
63
+ */
64
+ addUserSummaryInstructions(request: Zep.AddUserInstructionsRequest, requestOptions?: User.RequestOptions): core.HttpResponsePromise<Zep.SuccessResponse>;
65
+ private __addUserSummaryInstructions;
66
+ /**
67
+ * Deletes user summary/instructions for users or project wide defaults.
68
+ *
69
+ * @param {Zep.DeleteUserInstructionsRequest} request
70
+ * @param {User.RequestOptions} requestOptions - Request-specific configuration.
71
+ *
72
+ * @throws {@link Zep.BadRequestError}
73
+ * @throws {@link Zep.InternalServerError}
74
+ *
75
+ * @example
76
+ * await client.user.deleteUserSummaryInstructions()
77
+ */
78
+ deleteUserSummaryInstructions(request?: Zep.DeleteUserInstructionsRequest, requestOptions?: User.RequestOptions): core.HttpResponsePromise<Zep.SuccessResponse>;
79
+ private __deleteUserSummaryInstructions;
31
80
  /**
32
81
  * Adds a user.
33
82
  *
@@ -54,7 +103,10 @@ export declare class User {
54
103
  * @throws {@link Zep.InternalServerError}
55
104
  *
56
105
  * @example
57
- * await client.user.listOrdered()
106
+ * await client.user.listOrdered({
107
+ * pageNumber: 1,
108
+ * pageSize: 1
109
+ * })
58
110
  */
59
111
  listOrdered(request?: Zep.UserListOrderedRequest, requestOptions?: User.RequestOptions): core.HttpResponsePromise<Zep.UserListResponse>;
60
112
  private __listOrdered;
@@ -56,6 +56,274 @@ class User {
56
56
  constructor(_options = {}) {
57
57
  this._options = _options;
58
58
  }
59
+ /**
60
+ * Lists all user summary instructions for a project, user.
61
+ *
62
+ * @param {Zep.UserListUserSummaryInstructionsRequest} request
63
+ * @param {User.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link Zep.BadRequestError}
66
+ * @throws {@link Zep.InternalServerError}
67
+ *
68
+ * @example
69
+ * await client.user.listUserSummaryInstructions({
70
+ * userId: "user_id"
71
+ * })
72
+ */
73
+ listUserSummaryInstructions(request = {}, requestOptions) {
74
+ return core.HttpResponsePromise.fromPromise(this.__listUserSummaryInstructions(request, requestOptions));
75
+ }
76
+ __listUserSummaryInstructions() {
77
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
78
+ var _a, _b, _c, _d;
79
+ const { userId } = request;
80
+ const _queryParams = {};
81
+ if (userId != null) {
82
+ _queryParams["user_id"] = userId;
83
+ }
84
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
+ 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, "user-summary-instructions"),
86
+ method: "GET",
87
+ 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),
88
+ queryParameters: _queryParams,
89
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
90
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
91
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
92
+ });
93
+ if (_response.ok) {
94
+ return {
95
+ data: serializers.ListUserInstructionsResponse.parseOrThrow(_response.body, {
96
+ unrecognizedObjectKeys: "passthrough",
97
+ allowUnrecognizedUnionMembers: true,
98
+ allowUnrecognizedEnumValues: true,
99
+ skipValidation: true,
100
+ breadcrumbsPrefix: ["response"],
101
+ }),
102
+ rawResponse: _response.rawResponse,
103
+ };
104
+ }
105
+ if (_response.error.reason === "status-code") {
106
+ switch (_response.error.statusCode) {
107
+ case 400:
108
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
109
+ unrecognizedObjectKeys: "passthrough",
110
+ allowUnrecognizedUnionMembers: true,
111
+ allowUnrecognizedEnumValues: true,
112
+ skipValidation: true,
113
+ breadcrumbsPrefix: ["response"],
114
+ }), _response.rawResponse);
115
+ case 500:
116
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
117
+ unrecognizedObjectKeys: "passthrough",
118
+ allowUnrecognizedUnionMembers: true,
119
+ allowUnrecognizedEnumValues: true,
120
+ skipValidation: true,
121
+ breadcrumbsPrefix: ["response"],
122
+ }), _response.rawResponse);
123
+ default:
124
+ throw new errors.ZepError({
125
+ statusCode: _response.error.statusCode,
126
+ body: _response.error.body,
127
+ rawResponse: _response.rawResponse,
128
+ });
129
+ }
130
+ }
131
+ switch (_response.error.reason) {
132
+ case "non-json":
133
+ throw new errors.ZepError({
134
+ statusCode: _response.error.statusCode,
135
+ body: _response.error.rawBody,
136
+ rawResponse: _response.rawResponse,
137
+ });
138
+ case "timeout":
139
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /user-summary-instructions.");
140
+ case "unknown":
141
+ throw new errors.ZepError({
142
+ message: _response.error.errorMessage,
143
+ rawResponse: _response.rawResponse,
144
+ });
145
+ }
146
+ });
147
+ }
148
+ /**
149
+ * Adds new summary instructions for users graphs without removing existing ones. If user_ids is empty, adds to project-wide default instructions.
150
+ *
151
+ * @param {Zep.AddUserInstructionsRequest} request
152
+ * @param {User.RequestOptions} requestOptions - Request-specific configuration.
153
+ *
154
+ * @throws {@link Zep.BadRequestError}
155
+ * @throws {@link Zep.InternalServerError}
156
+ *
157
+ * @example
158
+ * await client.user.addUserSummaryInstructions({
159
+ * instructions: [{
160
+ * name: "name",
161
+ * text: "text"
162
+ * }]
163
+ * })
164
+ */
165
+ addUserSummaryInstructions(request, requestOptions) {
166
+ return core.HttpResponsePromise.fromPromise(this.__addUserSummaryInstructions(request, requestOptions));
167
+ }
168
+ __addUserSummaryInstructions(request, requestOptions) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ var _a, _b, _c, _d;
171
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
172
+ 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, "user-summary-instructions"),
173
+ method: "POST",
174
+ 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),
175
+ contentType: "application/json",
176
+ requestType: "json",
177
+ body: serializers.AddUserInstructionsRequest.jsonOrThrow(request, {
178
+ unrecognizedObjectKeys: "strip",
179
+ omitUndefined: true,
180
+ }),
181
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
182
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
183
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
184
+ });
185
+ if (_response.ok) {
186
+ return {
187
+ data: serializers.SuccessResponse.parseOrThrow(_response.body, {
188
+ unrecognizedObjectKeys: "passthrough",
189
+ allowUnrecognizedUnionMembers: true,
190
+ allowUnrecognizedEnumValues: true,
191
+ skipValidation: true,
192
+ breadcrumbsPrefix: ["response"],
193
+ }),
194
+ rawResponse: _response.rawResponse,
195
+ };
196
+ }
197
+ if (_response.error.reason === "status-code") {
198
+ switch (_response.error.statusCode) {
199
+ case 400:
200
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
201
+ unrecognizedObjectKeys: "passthrough",
202
+ allowUnrecognizedUnionMembers: true,
203
+ allowUnrecognizedEnumValues: true,
204
+ skipValidation: true,
205
+ breadcrumbsPrefix: ["response"],
206
+ }), _response.rawResponse);
207
+ case 500:
208
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
209
+ unrecognizedObjectKeys: "passthrough",
210
+ allowUnrecognizedUnionMembers: true,
211
+ allowUnrecognizedEnumValues: true,
212
+ skipValidation: true,
213
+ breadcrumbsPrefix: ["response"],
214
+ }), _response.rawResponse);
215
+ default:
216
+ throw new errors.ZepError({
217
+ statusCode: _response.error.statusCode,
218
+ body: _response.error.body,
219
+ rawResponse: _response.rawResponse,
220
+ });
221
+ }
222
+ }
223
+ switch (_response.error.reason) {
224
+ case "non-json":
225
+ throw new errors.ZepError({
226
+ statusCode: _response.error.statusCode,
227
+ body: _response.error.rawBody,
228
+ rawResponse: _response.rawResponse,
229
+ });
230
+ case "timeout":
231
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /user-summary-instructions.");
232
+ case "unknown":
233
+ throw new errors.ZepError({
234
+ message: _response.error.errorMessage,
235
+ rawResponse: _response.rawResponse,
236
+ });
237
+ }
238
+ });
239
+ }
240
+ /**
241
+ * Deletes user summary/instructions for users or project wide defaults.
242
+ *
243
+ * @param {Zep.DeleteUserInstructionsRequest} request
244
+ * @param {User.RequestOptions} requestOptions - Request-specific configuration.
245
+ *
246
+ * @throws {@link Zep.BadRequestError}
247
+ * @throws {@link Zep.InternalServerError}
248
+ *
249
+ * @example
250
+ * await client.user.deleteUserSummaryInstructions()
251
+ */
252
+ deleteUserSummaryInstructions(request = {}, requestOptions) {
253
+ return core.HttpResponsePromise.fromPromise(this.__deleteUserSummaryInstructions(request, requestOptions));
254
+ }
255
+ __deleteUserSummaryInstructions() {
256
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
257
+ var _a, _b, _c, _d;
258
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
259
+ 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, "user-summary-instructions"),
260
+ method: "DELETE",
261
+ 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),
262
+ contentType: "application/json",
263
+ requestType: "json",
264
+ body: serializers.DeleteUserInstructionsRequest.jsonOrThrow(request, {
265
+ unrecognizedObjectKeys: "strip",
266
+ omitUndefined: true,
267
+ }),
268
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
269
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
270
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
271
+ });
272
+ if (_response.ok) {
273
+ return {
274
+ data: serializers.SuccessResponse.parseOrThrow(_response.body, {
275
+ unrecognizedObjectKeys: "passthrough",
276
+ allowUnrecognizedUnionMembers: true,
277
+ allowUnrecognizedEnumValues: true,
278
+ skipValidation: true,
279
+ breadcrumbsPrefix: ["response"],
280
+ }),
281
+ rawResponse: _response.rawResponse,
282
+ };
283
+ }
284
+ if (_response.error.reason === "status-code") {
285
+ switch (_response.error.statusCode) {
286
+ case 400:
287
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
288
+ unrecognizedObjectKeys: "passthrough",
289
+ allowUnrecognizedUnionMembers: true,
290
+ allowUnrecognizedEnumValues: true,
291
+ skipValidation: true,
292
+ breadcrumbsPrefix: ["response"],
293
+ }), _response.rawResponse);
294
+ case 500:
295
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
296
+ unrecognizedObjectKeys: "passthrough",
297
+ allowUnrecognizedUnionMembers: true,
298
+ allowUnrecognizedEnumValues: true,
299
+ skipValidation: true,
300
+ breadcrumbsPrefix: ["response"],
301
+ }), _response.rawResponse);
302
+ default:
303
+ throw new errors.ZepError({
304
+ statusCode: _response.error.statusCode,
305
+ body: _response.error.body,
306
+ rawResponse: _response.rawResponse,
307
+ });
308
+ }
309
+ }
310
+ switch (_response.error.reason) {
311
+ case "non-json":
312
+ throw new errors.ZepError({
313
+ statusCode: _response.error.statusCode,
314
+ body: _response.error.rawBody,
315
+ rawResponse: _response.rawResponse,
316
+ });
317
+ case "timeout":
318
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /user-summary-instructions.");
319
+ case "unknown":
320
+ throw new errors.ZepError({
321
+ message: _response.error.errorMessage,
322
+ rawResponse: _response.rawResponse,
323
+ });
324
+ }
325
+ });
326
+ }
59
327
  /**
60
328
  * Adds a user.
61
329
  *
@@ -155,7 +423,10 @@ class User {
155
423
  * @throws {@link Zep.InternalServerError}
156
424
  *
157
425
  * @example
158
- * await client.user.listOrdered()
426
+ * await client.user.listOrdered({
427
+ * pageNumber: 1,
428
+ * pageSize: 1
429
+ * })
159
430
  */
160
431
  listOrdered(request = {}, requestOptions) {
161
432
  return core.HttpResponsePromise.fromPromise(this.__listOrdered(request, requestOptions));
@@ -0,0 +1,19 @@
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
+ * instructions: [{
9
+ * name: "name",
10
+ * text: "text"
11
+ * }]
12
+ * }
13
+ */
14
+ export interface AddUserInstructionsRequest {
15
+ /** Instructions to add to the user summary generation. */
16
+ instructions: Zep.UserInstruction[];
17
+ /** User IDs to add the instructions to. If empty, the instructions are added to the project-wide default. */
18
+ userIds?: string[];
19
+ }
@@ -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 });