@getzep/zep-cloud 1.0.7 → 1.0.9

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 (103) hide show
  1. package/api/resources/document/client/Client.js +13 -13
  2. package/api/resources/memory/client/Client.d.ts +40 -0
  3. package/api/resources/memory/client/Client.js +249 -20
  4. package/api/resources/memory/client/requests/CreateSessionRequest.d.ts +3 -0
  5. package/api/resources/memory/client/requests/MemoryGetRequest.d.ts +4 -0
  6. package/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.d.ts +13 -0
  7. package/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.js +5 -0
  8. package/api/resources/memory/client/requests/MemorySearchPayload.d.ts +1 -0
  9. package/api/resources/memory/client/requests/SessionSearchQuery.d.ts +1 -0
  10. package/api/resources/memory/client/requests/UpdateSessionRequest.d.ts +6 -0
  11. package/api/resources/memory/client/requests/index.d.ts +1 -0
  12. package/api/resources/user/client/Client.js +6 -6
  13. package/api/types/Fact.d.ts +1 -0
  14. package/api/types/FactRatingExamples.d.ts +8 -0
  15. package/api/types/FactRatingExamples.js +5 -0
  16. package/api/types/FactRatingInstruction.d.ts +21 -0
  17. package/api/types/FactRatingInstruction.js +5 -0
  18. package/api/types/FactResponse.d.ts +7 -0
  19. package/api/types/FactResponse.js +5 -0
  20. package/api/types/FactsResponse.d.ts +7 -0
  21. package/api/types/FactsResponse.js +5 -0
  22. package/api/types/Session.d.ts +2 -0
  23. package/api/types/index.d.ts +4 -0
  24. package/api/types/index.js +4 -0
  25. package/dist/api/resources/document/client/Client.js +13 -13
  26. package/dist/api/resources/memory/client/Client.d.ts +40 -0
  27. package/dist/api/resources/memory/client/Client.js +249 -20
  28. package/dist/api/resources/memory/client/requests/CreateSessionRequest.d.ts +3 -0
  29. package/dist/api/resources/memory/client/requests/MemoryGetRequest.d.ts +4 -0
  30. package/dist/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.d.ts +13 -0
  31. package/dist/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.js +5 -0
  32. package/dist/api/resources/memory/client/requests/MemorySearchPayload.d.ts +1 -0
  33. package/dist/api/resources/memory/client/requests/SessionSearchQuery.d.ts +1 -0
  34. package/dist/api/resources/memory/client/requests/UpdateSessionRequest.d.ts +6 -0
  35. package/dist/api/resources/memory/client/requests/index.d.ts +1 -0
  36. package/dist/api/resources/user/client/Client.js +6 -6
  37. package/dist/api/types/Fact.d.ts +1 -0
  38. package/dist/api/types/FactRatingExamples.d.ts +8 -0
  39. package/dist/api/types/FactRatingExamples.js +5 -0
  40. package/dist/api/types/FactRatingInstruction.d.ts +21 -0
  41. package/dist/api/types/FactRatingInstruction.js +5 -0
  42. package/dist/api/types/FactResponse.d.ts +7 -0
  43. package/dist/api/types/FactResponse.js +5 -0
  44. package/dist/api/types/FactsResponse.d.ts +7 -0
  45. package/dist/api/types/FactsResponse.js +5 -0
  46. package/dist/api/types/Session.d.ts +2 -0
  47. package/dist/api/types/index.d.ts +4 -0
  48. package/dist/api/types/index.js +4 -0
  49. package/dist/serialization/resources/memory/client/deleteFact.d.ts +9 -0
  50. package/dist/serialization/resources/memory/client/deleteFact.js +31 -0
  51. package/dist/serialization/resources/memory/client/index.d.ts +1 -0
  52. package/dist/serialization/resources/memory/client/index.js +2 -1
  53. package/dist/serialization/resources/memory/client/requests/CreateSessionRequest.d.ts +2 -0
  54. package/dist/serialization/resources/memory/client/requests/CreateSessionRequest.js +2 -0
  55. package/dist/serialization/resources/memory/client/requests/MemorySearchPayload.d.ts +1 -0
  56. package/dist/serialization/resources/memory/client/requests/MemorySearchPayload.js +1 -0
  57. package/dist/serialization/resources/memory/client/requests/SessionSearchQuery.d.ts +1 -0
  58. package/dist/serialization/resources/memory/client/requests/SessionSearchQuery.js +1 -0
  59. package/dist/serialization/resources/memory/client/requests/UpdateSessionRequest.d.ts +2 -0
  60. package/dist/serialization/resources/memory/client/requests/UpdateSessionRequest.js +2 -0
  61. package/dist/serialization/types/Fact.d.ts +1 -0
  62. package/dist/serialization/types/Fact.js +1 -0
  63. package/dist/serialization/types/FactRatingExamples.d.ts +14 -0
  64. package/dist/serialization/types/FactRatingExamples.js +35 -0
  65. package/dist/serialization/types/FactRatingInstruction.d.ts +14 -0
  66. package/dist/serialization/types/FactRatingInstruction.js +35 -0
  67. package/dist/serialization/types/FactResponse.d.ts +13 -0
  68. package/dist/serialization/types/FactResponse.js +34 -0
  69. package/dist/serialization/types/FactsResponse.d.ts +13 -0
  70. package/dist/serialization/types/FactsResponse.js +34 -0
  71. package/dist/serialization/types/Session.d.ts +2 -0
  72. package/dist/serialization/types/Session.js +2 -0
  73. package/dist/serialization/types/index.d.ts +4 -0
  74. package/dist/serialization/types/index.js +4 -0
  75. package/examples/memory/structured_data_extraction_example.ts +1 -1
  76. package/package.json +5 -8
  77. package/serialization/resources/memory/client/deleteFact.d.ts +9 -0
  78. package/serialization/resources/memory/client/deleteFact.js +31 -0
  79. package/serialization/resources/memory/client/index.d.ts +1 -0
  80. package/serialization/resources/memory/client/index.js +2 -1
  81. package/serialization/resources/memory/client/requests/CreateSessionRequest.d.ts +2 -0
  82. package/serialization/resources/memory/client/requests/CreateSessionRequest.js +2 -0
  83. package/serialization/resources/memory/client/requests/MemorySearchPayload.d.ts +1 -0
  84. package/serialization/resources/memory/client/requests/MemorySearchPayload.js +1 -0
  85. package/serialization/resources/memory/client/requests/SessionSearchQuery.d.ts +1 -0
  86. package/serialization/resources/memory/client/requests/SessionSearchQuery.js +1 -0
  87. package/serialization/resources/memory/client/requests/UpdateSessionRequest.d.ts +2 -0
  88. package/serialization/resources/memory/client/requests/UpdateSessionRequest.js +2 -0
  89. package/serialization/types/Fact.d.ts +1 -0
  90. package/serialization/types/Fact.js +1 -0
  91. package/serialization/types/FactRatingExamples.d.ts +14 -0
  92. package/serialization/types/FactRatingExamples.js +35 -0
  93. package/serialization/types/FactRatingInstruction.d.ts +14 -0
  94. package/serialization/types/FactRatingInstruction.js +35 -0
  95. package/serialization/types/FactResponse.d.ts +13 -0
  96. package/serialization/types/FactResponse.js +34 -0
  97. package/serialization/types/FactsResponse.d.ts +13 -0
  98. package/serialization/types/FactsResponse.js +34 -0
  99. package/serialization/types/Session.d.ts +2 -0
  100. package/serialization/types/Session.js +2 -0
  101. package/serialization/types/index.d.ts +4 -0
  102. package/serialization/types/index.js +4 -0
  103. package/examples/langchain/message_history_anthropic_example.ts +0 -61
@@ -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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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.7", "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.8", "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" }),
@@ -19,6 +19,32 @@ export declare namespace Memory {
19
19
  export declare class Memory {
20
20
  protected readonly _options: Memory.Options;
21
21
  constructor(_options?: Memory.Options);
22
+ /**
23
+ * get fact by uuid
24
+ *
25
+ * @param {string} factUuid - Fact UUID
26
+ * @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Zep.NotFoundError}
29
+ * @throws {@link Zep.InternalServerError}
30
+ *
31
+ * @example
32
+ * await zep.memory.getFact("factUUID")
33
+ */
34
+ getFact(factUuid: string, requestOptions?: Memory.RequestOptions): Promise<Zep.FactResponse>;
35
+ /**
36
+ * delete a fact
37
+ *
38
+ * @param {string} factUuid - Fact UUID
39
+ * @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
40
+ *
41
+ * @throws {@link Zep.NotFoundError}
42
+ * @throws {@link Zep.InternalServerError}
43
+ *
44
+ * @example
45
+ * await zep.memory.deleteFact("factUUID")
46
+ */
47
+ deleteFact(factUuid: string, requestOptions?: Memory.RequestOptions): Promise<string>;
22
48
  /**
23
49
  * Create New Session
24
50
  *
@@ -156,6 +182,20 @@ export declare class Memory {
156
182
  * })
157
183
  */
158
184
  extractData(sessionId: string, request: Zep.ExtractDataRequest, requestOptions?: Memory.RequestOptions): Promise<Record<string, string>>;
185
+ /**
186
+ * get facts for a session
187
+ *
188
+ * @param {string} sessionId - Session ID
189
+ * @param {Zep.MemoryGetSessionFactsRequest} request
190
+ * @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
191
+ *
192
+ * @throws {@link Zep.NotFoundError}
193
+ * @throws {@link Zep.InternalServerError}
194
+ *
195
+ * @example
196
+ * await zep.memory.getSessionFacts("sessionId")
197
+ */
198
+ getSessionFacts(sessionId: string, request?: Zep.MemoryGetSessionFactsRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.FactsResponse>;
159
199
  /**
160
200
  * Returns a memory (latest summary, list of messages and facts for models.MemoryTypePerpetual) for a given session
161
201
  *
@@ -53,13 +53,159 @@ exports.Memory = void 0;
53
53
  const environments = __importStar(require("../../../../environments"));
54
54
  const core = __importStar(require("../../../../core"));
55
55
  const Zep = __importStar(require("../../../index"));
56
- const serializers = __importStar(require("../../../../serialization/index"));
57
56
  const url_join_1 = __importDefault(require("url-join"));
57
+ const serializers = __importStar(require("../../../../serialization/index"));
58
58
  const errors = __importStar(require("../../../../errors/index"));
59
59
  class Memory {
60
60
  constructor(_options = {}) {
61
61
  this._options = _options;
62
62
  }
63
+ /**
64
+ * get fact by uuid
65
+ *
66
+ * @param {string} factUuid - Fact UUID
67
+ * @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link Zep.NotFoundError}
70
+ * @throws {@link Zep.InternalServerError}
71
+ *
72
+ * @example
73
+ * await zep.memory.getFact("factUUID")
74
+ */
75
+ getFact(factUuid, requestOptions) {
76
+ var _a, _b;
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
79
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `facts/${encodeURIComponent(factUuid)}`),
80
+ method: "GET",
81
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
+ contentType: "application/json",
83
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
84
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
85
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
86
+ });
87
+ if (_response.ok) {
88
+ return yield serializers.FactResponse.parseOrThrow(_response.body, {
89
+ unrecognizedObjectKeys: "passthrough",
90
+ allowUnrecognizedUnionMembers: true,
91
+ allowUnrecognizedEnumValues: true,
92
+ skipValidation: true,
93
+ breadcrumbsPrefix: ["response"],
94
+ });
95
+ }
96
+ if (_response.error.reason === "status-code") {
97
+ switch (_response.error.statusCode) {
98
+ case 404:
99
+ throw new Zep.NotFoundError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
100
+ unrecognizedObjectKeys: "passthrough",
101
+ allowUnrecognizedUnionMembers: true,
102
+ allowUnrecognizedEnumValues: true,
103
+ skipValidation: true,
104
+ breadcrumbsPrefix: ["response"],
105
+ }));
106
+ case 500:
107
+ throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
108
+ unrecognizedObjectKeys: "passthrough",
109
+ allowUnrecognizedUnionMembers: true,
110
+ allowUnrecognizedEnumValues: true,
111
+ skipValidation: true,
112
+ breadcrumbsPrefix: ["response"],
113
+ }));
114
+ default:
115
+ throw new errors.ZepError({
116
+ statusCode: _response.error.statusCode,
117
+ body: _response.error.body,
118
+ });
119
+ }
120
+ }
121
+ switch (_response.error.reason) {
122
+ case "non-json":
123
+ throw new errors.ZepError({
124
+ statusCode: _response.error.statusCode,
125
+ body: _response.error.rawBody,
126
+ });
127
+ case "timeout":
128
+ throw new errors.ZepTimeoutError();
129
+ case "unknown":
130
+ throw new errors.ZepError({
131
+ message: _response.error.errorMessage,
132
+ });
133
+ }
134
+ });
135
+ }
136
+ /**
137
+ * delete a fact
138
+ *
139
+ * @param {string} factUuid - Fact UUID
140
+ * @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
141
+ *
142
+ * @throws {@link Zep.NotFoundError}
143
+ * @throws {@link Zep.InternalServerError}
144
+ *
145
+ * @example
146
+ * await zep.memory.deleteFact("factUUID")
147
+ */
148
+ deleteFact(factUuid, requestOptions) {
149
+ var _a, _b;
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
152
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `facts/${encodeURIComponent(factUuid)}`),
153
+ method: "DELETE",
154
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
155
+ contentType: "application/json",
156
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
157
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
158
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
159
+ });
160
+ if (_response.ok) {
161
+ return yield serializers.memory.deleteFact.Response.parseOrThrow(_response.body, {
162
+ unrecognizedObjectKeys: "passthrough",
163
+ allowUnrecognizedUnionMembers: true,
164
+ allowUnrecognizedEnumValues: true,
165
+ skipValidation: true,
166
+ breadcrumbsPrefix: ["response"],
167
+ });
168
+ }
169
+ if (_response.error.reason === "status-code") {
170
+ switch (_response.error.statusCode) {
171
+ case 404:
172
+ throw new Zep.NotFoundError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
173
+ unrecognizedObjectKeys: "passthrough",
174
+ allowUnrecognizedUnionMembers: true,
175
+ allowUnrecognizedEnumValues: true,
176
+ skipValidation: true,
177
+ breadcrumbsPrefix: ["response"],
178
+ }));
179
+ case 500:
180
+ throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
181
+ unrecognizedObjectKeys: "passthrough",
182
+ allowUnrecognizedUnionMembers: true,
183
+ allowUnrecognizedEnumValues: true,
184
+ skipValidation: true,
185
+ breadcrumbsPrefix: ["response"],
186
+ }));
187
+ default:
188
+ throw new errors.ZepError({
189
+ statusCode: _response.error.statusCode,
190
+ body: _response.error.body,
191
+ });
192
+ }
193
+ }
194
+ switch (_response.error.reason) {
195
+ case "non-json":
196
+ throw new errors.ZepError({
197
+ statusCode: _response.error.statusCode,
198
+ body: _response.error.rawBody,
199
+ });
200
+ case "timeout":
201
+ throw new errors.ZepTimeoutError();
202
+ case "unknown":
203
+ throw new errors.ZepError({
204
+ message: _response.error.errorMessage,
205
+ });
206
+ }
207
+ });
208
+ }
63
209
  /**
64
210
  * Create New Session
65
211
  *
@@ -80,7 +226,7 @@ class Memory {
80
226
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
81
227
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "sessions"),
82
228
  method: "POST",
83
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
229
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
84
230
  contentType: "application/json",
85
231
  body: yield serializers.CreateSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
86
232
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -168,7 +314,7 @@ class Memory {
168
314
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
169
315
  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
316
  method: "GET",
171
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
317
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
172
318
  contentType: "application/json",
173
319
  queryParameters: _queryParams,
174
320
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -245,7 +391,7 @@ class Memory {
245
391
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
246
392
  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
393
  method: "POST",
248
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
394
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
249
395
  contentType: "application/json",
250
396
  body: yield serializers.EndSessionsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
251
397
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -331,7 +477,7 @@ class Memory {
331
477
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
332
478
  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
479
  method: "POST",
334
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
480
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
335
481
  contentType: "application/json",
336
482
  queryParameters: _queryParams,
337
483
  body: yield serializers.SessionSearchQuery.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -398,7 +544,7 @@ class Memory {
398
544
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
399
545
  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
546
  method: "GET",
401
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
547
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
402
548
  contentType: "application/json",
403
549
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
404
550
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -476,7 +622,7 @@ class Memory {
476
622
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
477
623
  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
624
  method: "PATCH",
479
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
625
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
480
626
  contentType: "application/json",
481
627
  body: yield serializers.UpdateSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
482
628
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -570,7 +716,7 @@ class Memory {
570
716
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
571
717
  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
718
  method: "POST",
573
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
719
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
574
720
  contentType: "application/json",
575
721
  body: yield serializers.ClassifySessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
576
722
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -646,7 +792,7 @@ class Memory {
646
792
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
647
793
  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
794
  method: "POST",
649
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
795
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
650
796
  contentType: "application/json",
651
797
  body: yield serializers.EndSessionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
652
798
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -733,7 +879,7 @@ class Memory {
733
879
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
734
880
  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
881
  method: "POST",
736
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
882
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
737
883
  contentType: "application/json",
738
884
  body: yield serializers.ExtractDataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
739
885
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -797,6 +943,86 @@ class Memory {
797
943
  }
798
944
  });
799
945
  }
946
+ /**
947
+ * get facts for a session
948
+ *
949
+ * @param {string} sessionId - Session ID
950
+ * @param {Zep.MemoryGetSessionFactsRequest} request
951
+ * @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
952
+ *
953
+ * @throws {@link Zep.NotFoundError}
954
+ * @throws {@link Zep.InternalServerError}
955
+ *
956
+ * @example
957
+ * await zep.memory.getSessionFacts("sessionId")
958
+ */
959
+ getSessionFacts(sessionId, request = {}, requestOptions) {
960
+ var _a, _b;
961
+ return __awaiter(this, void 0, void 0, function* () {
962
+ const { minRating } = request;
963
+ const _queryParams = {};
964
+ if (minRating != null) {
965
+ _queryParams["minRating"] = minRating.toString();
966
+ }
967
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
968
+ 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)}/facts`),
969
+ method: "GET",
970
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
971
+ contentType: "application/json",
972
+ queryParameters: _queryParams,
973
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
974
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
975
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
976
+ });
977
+ if (_response.ok) {
978
+ return yield serializers.FactsResponse.parseOrThrow(_response.body, {
979
+ unrecognizedObjectKeys: "passthrough",
980
+ allowUnrecognizedUnionMembers: true,
981
+ allowUnrecognizedEnumValues: true,
982
+ skipValidation: true,
983
+ breadcrumbsPrefix: ["response"],
984
+ });
985
+ }
986
+ if (_response.error.reason === "status-code") {
987
+ switch (_response.error.statusCode) {
988
+ case 404:
989
+ throw new Zep.NotFoundError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
990
+ unrecognizedObjectKeys: "passthrough",
991
+ allowUnrecognizedUnionMembers: true,
992
+ allowUnrecognizedEnumValues: true,
993
+ skipValidation: true,
994
+ breadcrumbsPrefix: ["response"],
995
+ }));
996
+ case 500:
997
+ throw new Zep.InternalServerError(yield serializers.ApiError.parseOrThrow(_response.error.body, {
998
+ unrecognizedObjectKeys: "passthrough",
999
+ allowUnrecognizedUnionMembers: true,
1000
+ allowUnrecognizedEnumValues: true,
1001
+ skipValidation: true,
1002
+ breadcrumbsPrefix: ["response"],
1003
+ }));
1004
+ default:
1005
+ throw new errors.ZepError({
1006
+ statusCode: _response.error.statusCode,
1007
+ body: _response.error.body,
1008
+ });
1009
+ }
1010
+ }
1011
+ switch (_response.error.reason) {
1012
+ case "non-json":
1013
+ throw new errors.ZepError({
1014
+ statusCode: _response.error.statusCode,
1015
+ body: _response.error.rawBody,
1016
+ });
1017
+ case "timeout":
1018
+ throw new errors.ZepTimeoutError();
1019
+ case "unknown":
1020
+ throw new errors.ZepError({
1021
+ message: _response.error.errorMessage,
1022
+ });
1023
+ }
1024
+ });
1025
+ }
800
1026
  /**
801
1027
  * Returns a memory (latest summary, list of messages and facts for models.MemoryTypePerpetual) for a given session
802
1028
  *
@@ -813,7 +1039,7 @@ class Memory {
813
1039
  get(sessionId, request = {}, requestOptions) {
814
1040
  var _a, _b;
815
1041
  return __awaiter(this, void 0, void 0, function* () {
816
- const { memoryType, lastn } = request;
1042
+ const { memoryType, lastn, minRating } = request;
817
1043
  const _queryParams = {};
818
1044
  if (memoryType != null) {
819
1045
  _queryParams["memoryType"] = memoryType;
@@ -821,10 +1047,13 @@ class Memory {
821
1047
  if (lastn != null) {
822
1048
  _queryParams["lastn"] = lastn.toString();
823
1049
  }
1050
+ if (minRating != null) {
1051
+ _queryParams["minRating"] = minRating.toString();
1052
+ }
824
1053
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
825
1054
  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`),
826
1055
  method: "GET",
827
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1056
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
828
1057
  contentType: "application/json",
829
1058
  queryParameters: _queryParams,
830
1059
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -900,7 +1129,7 @@ class Memory {
900
1129
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
901
1130
  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`),
902
1131
  method: "POST",
903
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1132
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
904
1133
  contentType: "application/json",
905
1134
  body: yield serializers.AddMemoryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
906
1135
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -966,7 +1195,7 @@ class Memory {
966
1195
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
967
1196
  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`),
968
1197
  method: "DELETE",
969
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1198
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
970
1199
  contentType: "application/json",
971
1200
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
972
1201
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -1048,7 +1277,7 @@ class Memory {
1048
1277
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1049
1278
  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`),
1050
1279
  method: "GET",
1051
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1280
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1052
1281
  contentType: "application/json",
1053
1282
  queryParameters: _queryParams,
1054
1283
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1123,7 +1352,7 @@ class Memory {
1123
1352
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1124
1353
  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)}`),
1125
1354
  method: "GET",
1126
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1355
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1127
1356
  contentType: "application/json",
1128
1357
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1129
1358
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -1200,7 +1429,7 @@ class Memory {
1200
1429
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1201
1430
  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)}`),
1202
1431
  method: "PATCH",
1203
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1432
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1204
1433
  contentType: "application/json",
1205
1434
  body: yield serializers.ModelsMessageMetadataUpdate.jsonOrThrow(request, {
1206
1435
  unrecognizedObjectKeys: "strip",
@@ -1282,7 +1511,7 @@ class Memory {
1282
1511
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1283
1512
  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`),
1284
1513
  method: "POST",
1285
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1514
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1286
1515
  contentType: "application/json",
1287
1516
  queryParameters: _queryParams,
1288
1517
  body: yield serializers.MemorySearchPayload.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1357,7 +1586,7 @@ class Memory {
1357
1586
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1358
1587
  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`),
1359
1588
  method: "GET",
1360
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1589
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1361
1590
  contentType: "application/json",
1362
1591
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1363
1592
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -1436,7 +1665,7 @@ class Memory {
1436
1665
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1437
1666
  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`),
1438
1667
  method: "GET",
1439
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1668
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1440
1669
  contentType: "application/json",
1441
1670
  queryParameters: _queryParams,
1442
1671
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,