@getzep/zep-cloud 1.0.4 → 1.0.6

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 (151) hide show
  1. package/api/index.d.ts +1 -1
  2. package/api/index.js +1 -1
  3. package/api/resources/document/client/Client.js +13 -13
  4. package/api/resources/index.d.ts +1 -2
  5. package/api/resources/index.js +2 -3
  6. package/api/resources/memory/client/Client.d.ts +18 -0
  7. package/api/resources/memory/client/Client.js +104 -17
  8. package/api/resources/memory/client/requests/ExtractDataRequest.d.ts +23 -0
  9. package/api/resources/memory/client/requests/ExtractDataRequest.js +5 -0
  10. package/api/resources/memory/client/requests/MemoryGetRequest.d.ts +1 -1
  11. package/api/resources/memory/client/requests/index.d.ts +1 -0
  12. package/api/resources/memory/index.d.ts +0 -1
  13. package/api/resources/memory/index.js +0 -1
  14. package/api/resources/user/client/Client.js +6 -6
  15. package/api/types/Fact.d.ts +8 -0
  16. package/api/types/Fact.js +5 -0
  17. package/api/{resources/memory/types/MemoryGetRequestMemoryType.d.ts → types/MemoryType.d.ts} +2 -2
  18. package/api/{resources/memory/types/MemoryGetRequestMemoryType.js → types/MemoryType.js} +2 -2
  19. package/api/types/SearchScope.d.ts +2 -1
  20. package/api/types/SearchScope.js +1 -0
  21. package/api/types/Session.d.ts +1 -0
  22. package/api/types/SessionSearchResult.d.ts +1 -0
  23. package/api/types/index.d.ts +2 -0
  24. package/api/types/index.js +2 -0
  25. package/dist/api/index.d.ts +1 -1
  26. package/dist/api/index.js +1 -1
  27. package/dist/api/resources/document/client/Client.js +13 -13
  28. package/dist/api/resources/index.d.ts +1 -2
  29. package/dist/api/resources/index.js +2 -3
  30. package/dist/api/resources/memory/client/Client.d.ts +18 -0
  31. package/dist/api/resources/memory/client/Client.js +104 -17
  32. package/dist/api/resources/memory/client/requests/ExtractDataRequest.d.ts +23 -0
  33. package/dist/api/resources/memory/client/requests/ExtractDataRequest.js +5 -0
  34. package/dist/api/resources/memory/client/requests/MemoryGetRequest.d.ts +1 -1
  35. package/dist/api/resources/memory/client/requests/index.d.ts +1 -0
  36. package/dist/api/resources/memory/index.d.ts +0 -1
  37. package/dist/api/resources/memory/index.js +0 -1
  38. package/dist/api/resources/user/client/Client.js +6 -6
  39. package/dist/api/types/Fact.d.ts +8 -0
  40. package/dist/api/types/Fact.js +5 -0
  41. package/dist/api/{resources/memory/types/MemoryGetRequestMemoryType.d.ts → types/MemoryType.d.ts} +2 -2
  42. package/dist/api/{resources/memory/types/MemoryGetRequestMemoryType.js → types/MemoryType.js} +2 -2
  43. package/dist/api/types/SearchScope.d.ts +2 -1
  44. package/dist/api/types/SearchScope.js +1 -0
  45. package/dist/api/types/Session.d.ts +1 -0
  46. package/dist/api/types/SessionSearchResult.d.ts +1 -0
  47. package/dist/api/types/index.d.ts +2 -0
  48. package/dist/api/types/index.js +2 -0
  49. package/dist/extractor/base.d.ts +22 -0
  50. package/dist/extractor/base.js +20 -0
  51. package/dist/extractor/date.d.ts +24 -0
  52. package/dist/extractor/date.js +29 -0
  53. package/dist/extractor/index.d.ts +281 -0
  54. package/dist/extractor/index.js +31 -0
  55. package/dist/extractor/number.d.ts +27 -0
  56. package/dist/extractor/number.js +37 -0
  57. package/dist/extractor/regex.d.ts +30 -0
  58. package/dist/extractor/regex.js +29 -0
  59. package/dist/extractor/text.d.ts +29 -0
  60. package/dist/extractor/text.js +43 -0
  61. package/dist/index.d.ts +1 -0
  62. package/dist/index.js +3 -1
  63. package/dist/langchain/message_history.d.ts +2 -2
  64. package/dist/serialization/index.d.ts +1 -1
  65. package/dist/serialization/index.js +1 -1
  66. package/dist/serialization/resources/index.d.ts +1 -2
  67. package/dist/serialization/resources/index.js +2 -3
  68. package/dist/serialization/resources/memory/client/extractData.d.ts +9 -0
  69. package/{serialization/resources/memory/types/MemoryGetRequestMemoryType.js → dist/serialization/resources/memory/client/extractData.js} +2 -2
  70. package/dist/serialization/resources/memory/client/index.d.ts +1 -0
  71. package/dist/serialization/resources/memory/client/index.js +2 -1
  72. package/dist/serialization/resources/memory/client/requests/ExtractDataRequest.d.ts +15 -0
  73. package/dist/serialization/resources/memory/client/requests/ExtractDataRequest.js +36 -0
  74. package/dist/serialization/resources/memory/client/requests/index.d.ts +1 -0
  75. package/dist/serialization/resources/memory/client/requests/index.js +3 -1
  76. package/dist/serialization/resources/memory/index.d.ts +0 -1
  77. package/dist/serialization/resources/memory/index.js +0 -1
  78. package/dist/serialization/types/Fact.d.ts +14 -0
  79. package/dist/serialization/types/Fact.js +35 -0
  80. package/dist/serialization/types/MemoryType.d.ts +10 -0
  81. package/dist/serialization/types/MemoryType.js +31 -0
  82. package/dist/serialization/types/SearchScope.d.ts +1 -1
  83. package/dist/serialization/types/SearchScope.js +1 -1
  84. package/dist/serialization/types/Session.d.ts +1 -0
  85. package/dist/serialization/types/Session.js +1 -0
  86. package/dist/serialization/types/SessionSearchResult.d.ts +2 -0
  87. package/dist/serialization/types/SessionSearchResult.js +2 -0
  88. package/dist/serialization/types/index.d.ts +2 -0
  89. package/dist/serialization/types/index.js +2 -0
  90. package/dist/wrapper/index.d.ts +2 -0
  91. package/dist/wrapper/index.js +4 -0
  92. package/dist/wrapper/memory.d.ts +35 -0
  93. package/dist/wrapper/memory.js +59 -0
  94. package/examples/memory/memory_example.ts +27 -8
  95. package/examples/memory/structured_data_extraction_example.ts +34 -0
  96. package/extractor/base.d.ts +22 -0
  97. package/extractor/base.js +20 -0
  98. package/extractor/date.d.ts +24 -0
  99. package/extractor/date.js +29 -0
  100. package/extractor/index.d.ts +281 -0
  101. package/extractor/index.js +31 -0
  102. package/extractor/number.d.ts +27 -0
  103. package/extractor/number.js +37 -0
  104. package/extractor/regex.d.ts +30 -0
  105. package/extractor/regex.js +29 -0
  106. package/extractor/text.d.ts +29 -0
  107. package/extractor/text.js +43 -0
  108. package/index.d.ts +1 -0
  109. package/index.js +3 -1
  110. package/langchain/message_history.d.ts +2 -2
  111. package/package.json +11 -5
  112. package/serialization/index.d.ts +1 -1
  113. package/serialization/index.js +1 -1
  114. package/serialization/resources/index.d.ts +1 -2
  115. package/serialization/resources/index.js +2 -3
  116. package/serialization/resources/memory/client/extractData.d.ts +9 -0
  117. package/{dist/serialization/resources/memory/types/MemoryGetRequestMemoryType.js → serialization/resources/memory/client/extractData.js} +2 -2
  118. package/serialization/resources/memory/client/index.d.ts +1 -0
  119. package/serialization/resources/memory/client/index.js +2 -1
  120. package/serialization/resources/memory/client/requests/ExtractDataRequest.d.ts +15 -0
  121. package/serialization/resources/memory/client/requests/ExtractDataRequest.js +36 -0
  122. package/serialization/resources/memory/client/requests/index.d.ts +1 -0
  123. package/serialization/resources/memory/client/requests/index.js +3 -1
  124. package/serialization/resources/memory/index.d.ts +0 -1
  125. package/serialization/resources/memory/index.js +0 -1
  126. package/serialization/types/Fact.d.ts +14 -0
  127. package/serialization/types/Fact.js +35 -0
  128. package/serialization/types/MemoryType.d.ts +10 -0
  129. package/serialization/types/MemoryType.js +31 -0
  130. package/serialization/types/SearchScope.d.ts +1 -1
  131. package/serialization/types/SearchScope.js +1 -1
  132. package/serialization/types/Session.d.ts +1 -0
  133. package/serialization/types/Session.js +1 -0
  134. package/serialization/types/SessionSearchResult.d.ts +2 -0
  135. package/serialization/types/SessionSearchResult.js +2 -0
  136. package/serialization/types/index.d.ts +2 -0
  137. package/serialization/types/index.js +2 -0
  138. package/wrapper/index.d.ts +2 -0
  139. package/wrapper/index.js +4 -0
  140. package/wrapper/memory.d.ts +35 -0
  141. package/wrapper/memory.js +59 -0
  142. package/api/resources/memory/types/index.d.ts +0 -1
  143. package/api/resources/memory/types/index.js +0 -17
  144. package/dist/api/resources/memory/types/index.d.ts +0 -1
  145. package/dist/api/resources/memory/types/index.js +0 -17
  146. package/dist/serialization/resources/memory/types/MemoryGetRequestMemoryType.d.ts +0 -10
  147. package/dist/serialization/resources/memory/types/index.d.ts +0 -1
  148. package/dist/serialization/resources/memory/types/index.js +0 -17
  149. package/serialization/resources/memory/types/MemoryGetRequestMemoryType.d.ts +0 -10
  150. package/serialization/resources/memory/types/index.d.ts +0 -1
  151. package/serialization/resources/memory/types/index.js +0 -17
@@ -3,8 +3,8 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.MemoryGetRequestMemoryType = void 0;
7
- exports.MemoryGetRequestMemoryType = {
6
+ exports.MemoryType = void 0;
7
+ exports.MemoryType = {
8
8
  Perpetual: "perpetual",
9
9
  SummaryRetriever: "summary_retriever",
10
10
  MessageWindow: "message_window",
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export declare type SearchScope = "messages" | "summary";
4
+ export declare type SearchScope = "messages" | "summary" | "facts";
5
5
  export declare const SearchScope: {
6
6
  readonly Messages: "messages";
7
7
  readonly Summary: "summary";
8
+ readonly Facts: "facts";
8
9
  };
@@ -7,4 +7,5 @@ exports.SearchScope = void 0;
7
7
  exports.SearchScope = {
8
8
  Messages: "messages",
9
9
  Summary: "summary",
10
+ Facts: "facts",
10
11
  };
@@ -6,6 +6,7 @@ export interface Session {
6
6
  createdAt?: string;
7
7
  deletedAt?: string;
8
8
  endedAt?: string;
9
+ factVersionUuid?: string;
9
10
  facts?: string[];
10
11
  id?: number;
11
12
  metadata?: Record<string, unknown>;
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Zep from "../index";
5
5
  export interface SessionSearchResult {
6
+ fact?: Zep.Fact;
6
7
  message?: Zep.Message;
7
8
  score?: number;
8
9
  sessionId?: string;
@@ -8,6 +8,7 @@ export * from "./DocumentSearchResult";
8
8
  export * from "./DocumentSearchResultPage";
9
9
  export * from "./EndSessionResponse";
10
10
  export * from "./EndSessionsResponse";
11
+ export * from "./Fact";
11
12
  export * from "./Memory";
12
13
  export * from "./MemorySearchResult";
13
14
  export * from "./Message";
@@ -26,3 +27,4 @@ export * from "./SummaryListResponse";
26
27
  export * from "./UpdateDocumentListRequest";
27
28
  export * from "./User";
28
29
  export * from "./UserListResponse";
30
+ export * from "./MemoryType";
@@ -24,6 +24,7 @@ __exportStar(require("./DocumentSearchResult"), exports);
24
24
  __exportStar(require("./DocumentSearchResultPage"), exports);
25
25
  __exportStar(require("./EndSessionResponse"), exports);
26
26
  __exportStar(require("./EndSessionsResponse"), exports);
27
+ __exportStar(require("./Fact"), exports);
27
28
  __exportStar(require("./Memory"), exports);
28
29
  __exportStar(require("./MemorySearchResult"), exports);
29
30
  __exportStar(require("./Message"), exports);
@@ -42,3 +43,4 @@ __exportStar(require("./SummaryListResponse"), exports);
42
43
  __exportStar(require("./UpdateDocumentListRequest"), exports);
43
44
  __exportStar(require("./User"), exports);
44
45
  __exportStar(require("./UserListResponse"), exports);
46
+ __exportStar(require("./MemoryType"), exports);
@@ -1,3 +1,3 @@
1
- export * from "./resources";
2
1
  export * from "./types";
3
2
  export * from "./errors";
3
+ export * from "./resources";
package/dist/api/index.js CHANGED
@@ -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"), exports);
18
17
  __exportStar(require("./types"), exports);
19
18
  __exportStar(require("./errors"), exports);
19
+ __exportStar(require("./resources"), exports);
@@ -77,7 +77,7 @@ class Document {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "collections"),
79
79
  method: "GET",
80
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
80
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
81
81
  contentType: "application/json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
83
83
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -152,7 +152,7 @@ class Document {
152
152
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
153
153
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
154
154
  method: "GET",
155
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
155
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
156
156
  contentType: "application/json",
157
157
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
158
158
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -244,7 +244,7 @@ class Document {
244
244
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
245
245
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
246
246
  method: "POST",
247
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
247
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
248
248
  contentType: "application/json",
249
249
  body: yield serializers.CreateDocumentCollectionRequest.jsonOrThrow(request, {
250
250
  unrecognizedObjectKeys: "strip",
@@ -338,7 +338,7 @@ class Document {
338
338
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
339
339
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
340
340
  method: "DELETE",
341
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
341
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
342
342
  contentType: "application/json",
343
343
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
344
344
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -430,7 +430,7 @@ class Document {
430
430
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
431
431
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
432
432
  method: "PATCH",
433
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
433
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
434
434
  contentType: "application/json",
435
435
  body: yield serializers.UpdateDocumentCollectionRequest.jsonOrThrow(request, {
436
436
  unrecognizedObjectKeys: "strip",
@@ -526,7 +526,7 @@ class Document {
526
526
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
527
527
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents`),
528
528
  method: "POST",
529
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
529
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
530
530
  contentType: "application/json",
531
531
  body: yield serializers.document.addDocuments.Request.jsonOrThrow(request, {
532
532
  unrecognizedObjectKeys: "strip",
@@ -612,7 +612,7 @@ class Document {
612
612
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
613
613
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchDelete`),
614
614
  method: "POST",
615
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
615
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
616
616
  contentType: "application/json",
617
617
  body: yield serializers.document.batchDeleteDocuments.Request.jsonOrThrow(request, {
618
618
  unrecognizedObjectKeys: "strip",
@@ -698,7 +698,7 @@ class Document {
698
698
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
699
699
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchGet`),
700
700
  method: "POST",
701
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
701
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
702
702
  contentType: "application/json",
703
703
  body: yield serializers.GetDocumentListRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
704
704
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -784,7 +784,7 @@ class Document {
784
784
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
785
785
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchUpdate`),
786
786
  method: "PATCH",
787
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
787
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
788
788
  contentType: "application/json",
789
789
  body: yield serializers.document.batchUpdateDocuments.Request.jsonOrThrow(request, {
790
790
  unrecognizedObjectKeys: "strip",
@@ -870,7 +870,7 @@ class Document {
870
870
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
871
871
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
872
872
  method: "GET",
873
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
873
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
874
874
  contentType: "application/json",
875
875
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
876
876
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -954,7 +954,7 @@ class Document {
954
954
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
955
955
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
956
956
  method: "DELETE",
957
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
957
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
958
958
  contentType: "application/json",
959
959
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
960
960
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -1047,7 +1047,7 @@ class Document {
1047
1047
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1048
1048
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
1049
1049
  method: "PATCH",
1050
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1050
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1051
1051
  contentType: "application/json",
1052
1052
  body: yield serializers.UpdateDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1053
1053
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1144,7 +1144,7 @@ class Document {
1144
1144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1145
1145
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/search`),
1146
1146
  method: "POST",
1147
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1147
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1148
1148
  contentType: "application/json",
1149
1149
  queryParameters: _queryParams,
1150
1150
  body: yield serializers.DocumentSearchPayload.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1,6 +1,5 @@
1
- export * as memory from "./memory";
2
- export * from "./memory/types";
3
1
  export * as document from "./document";
2
+ export * as memory from "./memory";
4
3
  export * as user from "./user";
5
4
  export * from "./document/client/requests";
6
5
  export * from "./memory/client/requests";
@@ -26,10 +26,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.user = exports.document = exports.memory = void 0;
30
- exports.memory = __importStar(require("./memory"));
31
- __exportStar(require("./memory/types"), exports);
29
+ exports.user = exports.memory = exports.document = void 0;
32
30
  exports.document = __importStar(require("./document"));
31
+ exports.memory = __importStar(require("./memory"));
33
32
  exports.user = __importStar(require("./user"));
34
33
  __exportStar(require("./document/client/requests"), exports);
35
34
  __exportStar(require("./memory/client/requests"), exports);
@@ -138,6 +138,24 @@ export declare class Memory {
138
138
  * await zep.memory.endSession("sessionId")
139
139
  */
140
140
  endSession(sessionId: string, request?: Zep.EndSessionRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.EndSessionResponse>;
141
+ /**
142
+ * extract data from a session by session id
143
+ *
144
+ * @param {string} sessionId - Session ID
145
+ * @param {Zep.ExtractDataRequest} request
146
+ * @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
147
+ *
148
+ * @throws {@link Zep.BadRequestError}
149
+ * @throws {@link Zep.NotFoundError}
150
+ * @throws {@link Zep.InternalServerError}
151
+ *
152
+ * @example
153
+ * await zep.memory.extractData("sessionId", {
154
+ * lastN: 1,
155
+ * modelSchema: "model_schema"
156
+ * })
157
+ */
158
+ extractData(sessionId: string, request: Zep.ExtractDataRequest, requestOptions?: Memory.RequestOptions): Promise<Record<string, string>>;
141
159
  /**
142
160
  * Returns a memory (latest summary, list of messages and facts for models.MemoryTypePerpetual) for a given session
143
161
  *
@@ -80,7 +80,7 @@ class Memory {
80
80
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
81
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions"),
82
82
  method: "POST",
83
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
83
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
84
84
  contentType: "application/json",
85
85
  body: yield serializers.CreateSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
86
86
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -168,7 +168,7 @@ class Memory {
168
168
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
169
169
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions-ordered"),
170
170
  method: "GET",
171
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
171
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
172
172
  contentType: "application/json",
173
173
  queryParameters: _queryParams,
174
174
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -245,7 +245,7 @@ class Memory {
245
245
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
246
246
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions/end"),
247
247
  method: "POST",
248
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
248
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
249
249
  contentType: "application/json",
250
250
  body: yield serializers.EndSessionsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
251
251
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -331,7 +331,7 @@ class Memory {
331
331
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
332
332
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions/search"),
333
333
  method: "POST",
334
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
334
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
335
335
  contentType: "application/json",
336
336
  queryParameters: _queryParams,
337
337
  body: yield serializers.SessionSearchQuery.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -398,7 +398,7 @@ class Memory {
398
398
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
399
399
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}`),
400
400
  method: "GET",
401
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
401
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
402
402
  contentType: "application/json",
403
403
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
404
404
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -476,7 +476,7 @@ class Memory {
476
476
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
477
477
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}`),
478
478
  method: "PATCH",
479
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
479
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
480
480
  contentType: "application/json",
481
481
  body: yield serializers.UpdateSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
482
482
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -570,7 +570,7 @@ class Memory {
570
570
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
571
571
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/classify`),
572
572
  method: "POST",
573
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
573
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
574
574
  contentType: "application/json",
575
575
  body: yield serializers.ClassifySessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
576
576
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -646,7 +646,7 @@ class Memory {
646
646
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
647
647
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/end`),
648
648
  method: "POST",
649
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
649
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
650
650
  contentType: "application/json",
651
651
  body: yield serializers.EndSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
652
652
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -710,6 +710,93 @@ class Memory {
710
710
  }
711
711
  });
712
712
  }
713
+ /**
714
+ * extract data from a session by session id
715
+ *
716
+ * @param {string} sessionId - Session ID
717
+ * @param {Zep.ExtractDataRequest} request
718
+ * @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
719
+ *
720
+ * @throws {@link Zep.BadRequestError}
721
+ * @throws {@link Zep.NotFoundError}
722
+ * @throws {@link Zep.InternalServerError}
723
+ *
724
+ * @example
725
+ * await zep.memory.extractData("sessionId", {
726
+ * lastN: 1,
727
+ * modelSchema: "model_schema"
728
+ * })
729
+ */
730
+ extractData(sessionId, request, requestOptions) {
731
+ var _a, _b;
732
+ return __awaiter(this, void 0, void 0, function* () {
733
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
734
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/extract`),
735
+ method: "POST",
736
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
737
+ contentType: "application/json",
738
+ body: yield serializers.ExtractDataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
739
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
740
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
741
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
742
+ });
743
+ if (_response.ok) {
744
+ return yield serializers.memory.extractData.Response.parseOrThrow(_response.body, {
745
+ unrecognizedObjectKeys: "passthrough",
746
+ allowUnrecognizedUnionMembers: true,
747
+ allowUnrecognizedEnumValues: true,
748
+ skipValidation: true,
749
+ breadcrumbsPrefix: ["response"],
750
+ });
751
+ }
752
+ if (_response.error.reason === "status-code") {
753
+ switch (_response.error.statusCode) {
754
+ case 400:
755
+ throw new Zep.BadRequestError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
756
+ unrecognizedObjectKeys: "passthrough",
757
+ allowUnrecognizedUnionMembers: true,
758
+ allowUnrecognizedEnumValues: true,
759
+ skipValidation: true,
760
+ breadcrumbsPrefix: ["response"],
761
+ }));
762
+ case 404:
763
+ throw new Zep.NotFoundError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
764
+ unrecognizedObjectKeys: "passthrough",
765
+ allowUnrecognizedUnionMembers: true,
766
+ allowUnrecognizedEnumValues: true,
767
+ skipValidation: true,
768
+ breadcrumbsPrefix: ["response"],
769
+ }));
770
+ case 500:
771
+ throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
772
+ unrecognizedObjectKeys: "passthrough",
773
+ allowUnrecognizedUnionMembers: true,
774
+ allowUnrecognizedEnumValues: true,
775
+ skipValidation: true,
776
+ breadcrumbsPrefix: ["response"],
777
+ }));
778
+ default:
779
+ throw new errors.ZepError({
780
+ statusCode: _response.error.statusCode,
781
+ body: _response.error.body,
782
+ });
783
+ }
784
+ }
785
+ switch (_response.error.reason) {
786
+ case "non-json":
787
+ throw new errors.ZepError({
788
+ statusCode: _response.error.statusCode,
789
+ body: _response.error.rawBody,
790
+ });
791
+ case "timeout":
792
+ throw new errors.ZepTimeoutError();
793
+ case "unknown":
794
+ throw new errors.ZepError({
795
+ message: _response.error.errorMessage,
796
+ });
797
+ }
798
+ });
799
+ }
713
800
  /**
714
801
  * Returns a memory (latest summary, list of messages and facts for models.MemoryTypePerpetual) for a given session
715
802
  *
@@ -737,7 +824,7 @@ class Memory {
737
824
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
738
825
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/memory`),
739
826
  method: "GET",
740
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
827
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
741
828
  contentType: "application/json",
742
829
  queryParameters: _queryParams,
743
830
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -813,7 +900,7 @@ class Memory {
813
900
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
814
901
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/memory`),
815
902
  method: "POST",
816
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
903
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
817
904
  contentType: "application/json",
818
905
  body: yield serializers.AddMemoryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
819
906
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -879,7 +966,7 @@ class Memory {
879
966
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
880
967
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/memory`),
881
968
  method: "DELETE",
882
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
969
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
883
970
  contentType: "application/json",
884
971
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
885
972
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -961,7 +1048,7 @@ class Memory {
961
1048
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
962
1049
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/messages`),
963
1050
  method: "GET",
964
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1051
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
965
1052
  contentType: "application/json",
966
1053
  queryParameters: _queryParams,
967
1054
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1036,7 +1123,7 @@ class Memory {
1036
1123
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1037
1124
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/messages/${encodeURIComponent(messageUuid)}`),
1038
1125
  method: "GET",
1039
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1126
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1040
1127
  contentType: "application/json",
1041
1128
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1042
1129
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -1113,7 +1200,7 @@ class Memory {
1113
1200
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1114
1201
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/messages/${encodeURIComponent(messageUuid)}`),
1115
1202
  method: "PATCH",
1116
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1203
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1117
1204
  contentType: "application/json",
1118
1205
  body: yield serializers.ModelsMessageMetadataUpdate.jsonOrThrow(request, {
1119
1206
  unrecognizedObjectKeys: "strip",
@@ -1195,7 +1282,7 @@ class Memory {
1195
1282
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1196
1283
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/search`),
1197
1284
  method: "POST",
1198
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1285
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1199
1286
  contentType: "application/json",
1200
1287
  queryParameters: _queryParams,
1201
1288
  body: yield serializers.MemorySearchPayload.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1270,7 +1357,7 @@ class Memory {
1270
1357
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1271
1358
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/summary`),
1272
1359
  method: "GET",
1273
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1360
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1274
1361
  contentType: "application/json",
1275
1362
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1276
1363
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -1349,7 +1436,7 @@ class Memory {
1349
1436
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1350
1437
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/synthesize_question`),
1351
1438
  method: "GET",
1352
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1439
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1353
1440
  contentType: "application/json",
1354
1441
  queryParameters: _queryParams,
1355
1442
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * lastN: 1,
8
+ * modelSchema: "model_schema"
9
+ * }
10
+ */
11
+ export interface ExtractDataRequest {
12
+ /** Your current date and time in ISO 8601 format including timezone. This is used for determining relative dates. */
13
+ currentDateTime?: string;
14
+ /** The number of messages in the chat history from which to extract data */
15
+ lastN: number;
16
+ /** The schema describing the data to be extracted. See Zep's SDKs for more details. */
17
+ modelSchema: string;
18
+ /**
19
+ * Validate that the extracted data is present in the dialog and correct per the field description.
20
+ * Mitigates hallucination, but is slower and may result in false negatives.
21
+ */
22
+ validate?: boolean;
23
+ }
@@ -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 });
@@ -10,7 +10,7 @@ export interface MemoryGetRequest {
10
10
  /**
11
11
  * The type of memory to retrieve: perpetual, summary_retriever, or message_window. Defaults to perpetual.
12
12
  */
13
- memoryType?: Zep.MemoryGetRequestMemoryType;
13
+ memoryType?: Zep.MemoryType;
14
14
  /**
15
15
  * The number of most recent memory entries to retrieve.
16
16
  */
@@ -4,6 +4,7 @@ export { type EndSessionsRequest } from "./EndSessionsRequest";
4
4
  export { type SessionSearchQuery } from "./SessionSearchQuery";
5
5
  export { type UpdateSessionRequest } from "./UpdateSessionRequest";
6
6
  export { type EndSessionRequest } from "./EndSessionRequest";
7
+ export { type ExtractDataRequest } from "./ExtractDataRequest";
7
8
  export { type MemoryGetRequest } from "./MemoryGetRequest";
8
9
  export { type AddMemoryRequest } from "./AddMemoryRequest";
9
10
  export { type MemoryGetSessionMessagesRequest } from "./MemoryGetSessionMessagesRequest";
@@ -1,2 +1 @@
1
- export * from "./types";
2
1
  export * from "./client";
@@ -14,5 +14,4 @@ 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("./types"), exports);
18
17
  __exportStar(require("./client"), exports);