@getzep/zep-cloud 3.5.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/thread/client/Client.d.ts +3 -0
  3. package/dist/cjs/api/resources/thread/client/Client.js +5 -0
  4. package/dist/cjs/api/resources/thread/index.d.ts +1 -0
  5. package/dist/cjs/api/resources/thread/index.js +1 -0
  6. package/dist/cjs/api/resources/thread/resources/index.d.ts +2 -0
  7. package/dist/cjs/api/resources/thread/resources/index.js +41 -0
  8. package/dist/cjs/api/resources/thread/resources/message/client/Client.d.ts +53 -0
  9. package/dist/cjs/api/resources/thread/resources/message/client/Client.js +159 -0
  10. package/dist/cjs/api/resources/thread/resources/message/client/index.d.ts +2 -0
  11. package/dist/cjs/api/resources/thread/resources/message/client/index.js +17 -0
  12. package/dist/cjs/api/resources/thread/resources/message/client/requests/ThreadMessageUpdate.d.ts +14 -0
  13. package/dist/cjs/api/resources/thread/resources/message/client/requests/ThreadMessageUpdate.js +5 -0
  14. package/dist/cjs/api/resources/thread/resources/message/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/thread/resources/message/client/requests/index.js +2 -0
  16. package/dist/cjs/api/resources/thread/resources/message/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/thread/resources/message/index.js +17 -0
  18. package/dist/cjs/api/types/EntityEdge.d.ts +6 -0
  19. package/dist/cjs/api/types/EntityNode.d.ts +6 -0
  20. package/dist/cjs/api/types/Episode.d.ts +9 -1
  21. package/dist/cjs/api/types/Message.d.ts +2 -0
  22. package/dist/cjs/serialization/resources/thread/index.d.ts +1 -0
  23. package/dist/cjs/serialization/resources/thread/index.js +1 -0
  24. package/dist/cjs/serialization/resources/thread/resources/index.d.ts +2 -0
  25. package/dist/cjs/serialization/resources/thread/resources/index.js +41 -0
  26. package/dist/cjs/serialization/resources/thread/resources/message/client/index.d.ts +1 -0
  27. package/dist/cjs/serialization/resources/thread/resources/message/client/index.js +17 -0
  28. package/dist/cjs/serialization/resources/thread/resources/message/client/requests/ThreadMessageUpdate.d.ts +12 -0
  29. package/dist/cjs/serialization/resources/thread/resources/message/client/requests/ThreadMessageUpdate.js +43 -0
  30. package/dist/cjs/serialization/resources/thread/resources/message/client/requests/index.d.ts +1 -0
  31. package/dist/cjs/serialization/resources/thread/resources/message/client/requests/index.js +5 -0
  32. package/dist/cjs/serialization/resources/thread/resources/message/index.d.ts +1 -0
  33. package/dist/cjs/serialization/resources/thread/resources/message/index.js +17 -0
  34. package/dist/cjs/serialization/types/EntityEdge.d.ts +1 -0
  35. package/dist/cjs/serialization/types/EntityEdge.js +1 -0
  36. package/dist/cjs/serialization/types/EntityNode.d.ts +1 -0
  37. package/dist/cjs/serialization/types/EntityNode.js +1 -0
  38. package/dist/cjs/serialization/types/Episode.d.ts +3 -1
  39. package/dist/cjs/serialization/types/Episode.js +3 -1
  40. package/dist/cjs/serialization/types/Message.d.ts +1 -0
  41. package/dist/cjs/serialization/types/Message.js +1 -0
  42. package/dist/cjs/version.d.ts +1 -1
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/esm/Client.mjs +2 -2
  45. package/dist/esm/api/resources/thread/client/Client.d.mts +3 -0
  46. package/dist/esm/api/resources/thread/client/Client.mjs +5 -0
  47. package/dist/esm/api/resources/thread/index.d.mts +1 -0
  48. package/dist/esm/api/resources/thread/index.mjs +1 -0
  49. package/dist/esm/api/resources/thread/resources/index.d.mts +2 -0
  50. package/dist/esm/api/resources/thread/resources/index.mjs +2 -0
  51. package/dist/esm/api/resources/thread/resources/message/client/Client.d.mts +53 -0
  52. package/dist/esm/api/resources/thread/resources/message/client/Client.mjs +122 -0
  53. package/dist/esm/api/resources/thread/resources/message/client/index.d.mts +2 -0
  54. package/dist/esm/api/resources/thread/resources/message/client/index.mjs +1 -0
  55. package/dist/esm/api/resources/thread/resources/message/client/requests/ThreadMessageUpdate.d.mts +14 -0
  56. package/dist/esm/api/resources/thread/resources/message/client/requests/ThreadMessageUpdate.mjs +4 -0
  57. package/dist/esm/api/resources/thread/resources/message/client/requests/index.d.mts +1 -0
  58. package/dist/esm/api/resources/thread/resources/message/client/requests/index.mjs +1 -0
  59. package/dist/esm/api/resources/thread/resources/message/index.d.mts +1 -0
  60. package/dist/esm/api/resources/thread/resources/message/index.mjs +1 -0
  61. package/dist/esm/api/types/EntityEdge.d.mts +6 -0
  62. package/dist/esm/api/types/EntityNode.d.mts +6 -0
  63. package/dist/esm/api/types/Episode.d.mts +9 -1
  64. package/dist/esm/api/types/Message.d.mts +2 -0
  65. package/dist/esm/serialization/resources/thread/index.d.mts +1 -0
  66. package/dist/esm/serialization/resources/thread/index.mjs +1 -0
  67. package/dist/esm/serialization/resources/thread/resources/index.d.mts +2 -0
  68. package/dist/esm/serialization/resources/thread/resources/index.mjs +2 -0
  69. package/dist/esm/serialization/resources/thread/resources/message/client/index.d.mts +1 -0
  70. package/dist/esm/serialization/resources/thread/resources/message/client/index.mjs +1 -0
  71. package/dist/esm/serialization/resources/thread/resources/message/client/requests/ThreadMessageUpdate.d.mts +12 -0
  72. package/dist/esm/serialization/resources/thread/resources/message/client/requests/ThreadMessageUpdate.mjs +7 -0
  73. package/dist/esm/serialization/resources/thread/resources/message/client/requests/index.d.mts +1 -0
  74. package/dist/esm/serialization/resources/thread/resources/message/client/requests/index.mjs +1 -0
  75. package/dist/esm/serialization/resources/thread/resources/message/index.d.mts +1 -0
  76. package/dist/esm/serialization/resources/thread/resources/message/index.mjs +1 -0
  77. package/dist/esm/serialization/types/EntityEdge.d.mts +1 -0
  78. package/dist/esm/serialization/types/EntityEdge.mjs +1 -0
  79. package/dist/esm/serialization/types/EntityNode.d.mts +1 -0
  80. package/dist/esm/serialization/types/EntityNode.mjs +1 -0
  81. package/dist/esm/serialization/types/Episode.d.mts +3 -1
  82. package/dist/esm/serialization/types/Episode.mjs +3 -1
  83. package/dist/esm/serialization/types/Message.d.mts +1 -0
  84. package/dist/esm/serialization/types/Message.mjs +1 -0
  85. package/dist/esm/version.d.mts +1 -1
  86. package/dist/esm/version.mjs +1 -1
  87. package/package.json +1 -1
  88. package/reference.md +77 -0
@@ -47,8 +47,8 @@ class ZepClient {
47
47
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
48
48
  "X-Fern-Language": "JavaScript",
49
49
  "X-Fern-SDK-Name": "zep-cloud",
50
- "X-Fern-SDK-Version": "3.5.0",
51
- "User-Agent": "zep-cloud/3.5.0",
50
+ "X-Fern-SDK-Version": "3.7.0",
51
+ "User-Agent": "zep-cloud/3.7.0",
52
52
  "X-Fern-Runtime": core.RUNTIME.type,
53
53
  "X-Fern-Runtime-Version": core.RUNTIME.version,
54
54
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -4,6 +4,7 @@
4
4
  import * as environments from "../../../../environments.js";
5
5
  import * as core from "../../../../core/index.js";
6
6
  import * as Zep from "../../../index.js";
7
+ import { Message } from "../resources/message/client/Client.js";
7
8
  export declare namespace Thread {
8
9
  interface Options {
9
10
  environment?: core.Supplier<environments.ZepEnvironment | string>;
@@ -27,7 +28,9 @@ export declare namespace Thread {
27
28
  }
28
29
  export declare class Thread {
29
30
  protected readonly _options: Thread.Options;
31
+ protected _message: Message | undefined;
30
32
  constructor(_options?: Thread.Options);
33
+ get message(): Message;
31
34
  /**
32
35
  * Returns all threads.
33
36
  *
@@ -52,10 +52,15 @@ const Zep = __importStar(require("../../../index.js"));
52
52
  const headers_js_1 = require("../../../../core/headers.js");
53
53
  const serializers = __importStar(require("../../../../serialization/index.js"));
54
54
  const errors = __importStar(require("../../../../errors/index.js"));
55
+ const Client_js_1 = require("../resources/message/client/Client.js");
55
56
  class Thread {
56
57
  constructor(_options = {}) {
57
58
  this._options = _options;
58
59
  }
60
+ get message() {
61
+ var _a;
62
+ return ((_a = this._message) !== null && _a !== void 0 ? _a : (this._message = new Client_js_1.Message(this._options)));
63
+ }
59
64
  /**
60
65
  * Returns all threads.
61
66
  *
@@ -1,2 +1,3 @@
1
1
  export * from "./types/index.js";
2
2
  export * from "./client/index.js";
3
+ export * from "./resources/index.js";
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./types/index.js"), exports);
18
18
  __exportStar(require("./client/index.js"), exports);
19
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * as message from "./message/index.js";
2
+ export * from "./message/client/requests/index.js";
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.message = void 0;
40
+ exports.message = __importStar(require("./message/index.js"));
41
+ __exportStar(require("./message/client/requests/index.js"), exports);
@@ -0,0 +1,53 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.js";
5
+ import * as core from "../../../../../../core/index.js";
6
+ import * as Zep from "../../../../../index.js";
7
+ export declare namespace Message {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ZepEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ apiKey?: core.Supplier<string | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional headers to include in the request. */
25
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
+ }
27
+ }
28
+ export declare class Message {
29
+ protected readonly _options: Message.Options;
30
+ constructor(_options?: Message.Options);
31
+ /**
32
+ * Updates a message.
33
+ *
34
+ * @param {string} messageUuid - The UUID of the message.
35
+ * @param {Zep.thread.ThreadMessageUpdate} request
36
+ * @param {Message.RequestOptions} requestOptions - Request-specific configuration.
37
+ *
38
+ * @throws {@link Zep.NotFoundError}
39
+ * @throws {@link Zep.InternalServerError}
40
+ *
41
+ * @example
42
+ * await client.thread.message.update("messageUUID", {
43
+ * metadata: {
44
+ * "key": "value"
45
+ * }
46
+ * })
47
+ */
48
+ update(messageUuid: string, request: Zep.thread.ThreadMessageUpdate, requestOptions?: Message.RequestOptions): core.HttpResponsePromise<Zep.Message>;
49
+ private __update;
50
+ protected _getCustomAuthorizationHeaders(): Promise<{
51
+ Authorization: string;
52
+ }>;
53
+ }
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.Message = void 0;
49
+ const environments = __importStar(require("../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../core/index.js"));
51
+ const Zep = __importStar(require("../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../core/headers.js");
53
+ const serializers = __importStar(require("../../../../../../serialization/index.js"));
54
+ const errors = __importStar(require("../../../../../../errors/index.js"));
55
+ class Message {
56
+ constructor(_options = {}) {
57
+ this._options = _options;
58
+ }
59
+ /**
60
+ * Updates a message.
61
+ *
62
+ * @param {string} messageUuid - The UUID of the message.
63
+ * @param {Zep.thread.ThreadMessageUpdate} request
64
+ * @param {Message.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @throws {@link Zep.NotFoundError}
67
+ * @throws {@link Zep.InternalServerError}
68
+ *
69
+ * @example
70
+ * await client.thread.message.update("messageUUID", {
71
+ * metadata: {
72
+ * "key": "value"
73
+ * }
74
+ * })
75
+ */
76
+ update(messageUuid, request, requestOptions) {
77
+ return core.HttpResponsePromise.fromPromise(this.__update(messageUuid, request, requestOptions));
78
+ }
79
+ __update(messageUuid, request, requestOptions) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ var _a, _b, _c, _d;
82
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
83
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `messages/${encodeURIComponent(messageUuid)}`),
84
+ method: "PATCH",
85
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
86
+ contentType: "application/json",
87
+ requestType: "json",
88
+ body: serializers.thread.ThreadMessageUpdate.jsonOrThrow(request, {
89
+ unrecognizedObjectKeys: "strip",
90
+ omitUndefined: true,
91
+ }),
92
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
93
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
94
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
+ });
96
+ if (_response.ok) {
97
+ return {
98
+ data: serializers.Message.parseOrThrow(_response.body, {
99
+ unrecognizedObjectKeys: "passthrough",
100
+ allowUnrecognizedUnionMembers: true,
101
+ allowUnrecognizedEnumValues: true,
102
+ skipValidation: true,
103
+ breadcrumbsPrefix: ["response"],
104
+ }),
105
+ rawResponse: _response.rawResponse,
106
+ };
107
+ }
108
+ if (_response.error.reason === "status-code") {
109
+ switch (_response.error.statusCode) {
110
+ case 404:
111
+ throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
112
+ unrecognizedObjectKeys: "passthrough",
113
+ allowUnrecognizedUnionMembers: true,
114
+ allowUnrecognizedEnumValues: true,
115
+ skipValidation: true,
116
+ breadcrumbsPrefix: ["response"],
117
+ }), _response.rawResponse);
118
+ case 500:
119
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
120
+ unrecognizedObjectKeys: "passthrough",
121
+ allowUnrecognizedUnionMembers: true,
122
+ allowUnrecognizedEnumValues: true,
123
+ skipValidation: true,
124
+ breadcrumbsPrefix: ["response"],
125
+ }), _response.rawResponse);
126
+ default:
127
+ throw new errors.ZepError({
128
+ statusCode: _response.error.statusCode,
129
+ body: _response.error.body,
130
+ rawResponse: _response.rawResponse,
131
+ });
132
+ }
133
+ }
134
+ switch (_response.error.reason) {
135
+ case "non-json":
136
+ throw new errors.ZepError({
137
+ statusCode: _response.error.statusCode,
138
+ body: _response.error.rawBody,
139
+ rawResponse: _response.rawResponse,
140
+ });
141
+ case "timeout":
142
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /messages/{messageUUID}.");
143
+ case "unknown":
144
+ throw new errors.ZepError({
145
+ message: _response.error.errorMessage,
146
+ rawResponse: _response.rawResponse,
147
+ });
148
+ }
149
+ });
150
+ }
151
+ _getCustomAuthorizationHeaders() {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ var _a;
154
+ const apiKeyValue = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["ZEP_API_KEY"];
155
+ return { Authorization: `Api-Key ${apiKeyValue}` };
156
+ });
157
+ }
158
+ }
159
+ exports.Message = Message;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * metadata: {
8
+ * "key": "value"
9
+ * }
10
+ * }
11
+ */
12
+ export interface ThreadMessageUpdate {
13
+ metadata: Record<string, unknown>;
14
+ }
@@ -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 });
@@ -0,0 +1 @@
1
+ export { type ThreadMessageUpdate } from "./ThreadMessageUpdate.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -16,6 +16,12 @@ export interface EntityEdge {
16
16
  invalidAt?: string;
17
17
  /** Name of the edge, relation name */
18
18
  name: string;
19
+ /**
20
+ * Relevance is an experimental rank-aligned score in [0,1] derived from Score via logit transformation.
21
+ * Only populated when using cross_encoder reranker; omitted for other reranker types (e.g., RRF).
22
+ */
23
+ relevance?: number;
24
+ /** Score is the reranker output: sigmoid-distributed logits [0,1] when using cross_encoder reranker, or RRF ordinal rank when using rrf reranker */
19
25
  score?: number;
20
26
  /** UUID of the source node */
21
27
  sourceNodeUuid: string;
@@ -10,6 +10,12 @@ export interface EntityNode {
10
10
  labels?: string[];
11
11
  /** Name of the node */
12
12
  name: string;
13
+ /**
14
+ * Relevance is an experimental rank-aligned score in [0,1] derived from Score via logit transformation.
15
+ * Only populated when using cross_encoder reranker; omitted for other reranker types (e.g., RRF).
16
+ */
17
+ relevance?: number;
18
+ /** Score is the reranker output: sigmoid-distributed logits [0,1] when using cross_encoder reranker, or RRF ordinal rank when using rrf reranker */
13
19
  score?: number;
14
20
  /** Regional summary of surrounding edges */
15
21
  summary: string;
@@ -5,14 +5,22 @@ import * as Zep from "../index.js";
5
5
  export interface Episode {
6
6
  content: string;
7
7
  createdAt: string;
8
+ metadata?: Record<string, unknown>;
8
9
  processed?: boolean;
10
+ /**
11
+ * Relevance is an experimental rank-aligned score in [0,1] derived from Score via logit transformation.
12
+ * Only populated when using cross_encoder reranker; omitted for other reranker types (e.g., RRF).
13
+ */
14
+ relevance?: number;
9
15
  /** Optional role, will only be present if the episode was created using memory.add API */
10
16
  role?: string;
11
17
  /** Optional role_type, will only be present if the episode was created using memory.add API */
12
18
  roleType?: Zep.RoleType;
19
+ /** Score is the reranker output: sigmoid-distributed logits [0,1] when using cross_encoder reranker, or RRF ordinal rank when using rrf reranker */
13
20
  score?: number;
14
- sessionId?: string;
15
21
  source?: Zep.GraphDataType;
16
22
  sourceDescription?: string;
23
+ /** Optional thread ID, will be present if the episode is part of a thread */
24
+ threadId?: string;
17
25
  uuid: string;
18
26
  }
@@ -7,6 +7,8 @@ export interface Message {
7
7
  content: string;
8
8
  /** The timestamp of when the message was created. */
9
9
  createdAt?: string;
10
+ /** The metadata associated with the message. */
11
+ metadata?: Record<string, unknown>;
10
12
  /** Customizable name of the sender of the message (e.g., "john", "sales_agent"). */
11
13
  name?: string;
12
14
  /** Whether the message has been processed. */
@@ -1,2 +1,3 @@
1
1
  export * from "./types/index.js";
2
2
  export * from "./client/index.js";
3
+ export * from "./resources/index.js";
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./types/index.js"), exports);
18
18
  __exportStar(require("./client/index.js"), exports);
19
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * as message from "./message/index.js";
2
+ export * from "./message/client/requests/index.js";
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.message = void 0;
40
+ exports.message = __importStar(require("./message/index.js"));
41
+ __exportStar(require("./message/client/requests/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../../../../index.js";
5
+ import * as Zep from "../../../../../../../api/index.js";
6
+ import * as core from "../../../../../../../core/index.js";
7
+ export declare const ThreadMessageUpdate: core.serialization.Schema<serializers.thread.ThreadMessageUpdate.Raw, Zep.thread.ThreadMessageUpdate>;
8
+ export declare namespace ThreadMessageUpdate {
9
+ interface Raw {
10
+ metadata: Record<string, unknown>;
11
+ }
12
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.ThreadMessageUpdate = void 0;
40
+ const core = __importStar(require("../../../../../../../core/index.js"));
41
+ exports.ThreadMessageUpdate = core.serialization.object({
42
+ metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()),
43
+ });
@@ -0,0 +1 @@
1
+ export { ThreadMessageUpdate } from "./ThreadMessageUpdate.js";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ThreadMessageUpdate = void 0;
4
+ var ThreadMessageUpdate_js_1 = require("./ThreadMessageUpdate.js");
5
+ Object.defineProperty(exports, "ThreadMessageUpdate", { enumerable: true, get: function () { return ThreadMessageUpdate_js_1.ThreadMessageUpdate; } });
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -14,6 +14,7 @@ export declare namespace EntityEdge {
14
14
  fact: string;
15
15
  invalid_at?: string | null;
16
16
  name: string;
17
+ relevance?: number | null;
17
18
  score?: number | null;
18
19
  source_node_uuid: string;
19
20
  target_node_uuid: string;
@@ -46,6 +46,7 @@ exports.EntityEdge = core.serialization.object({
46
46
  fact: core.serialization.string(),
47
47
  invalidAt: core.serialization.property("invalid_at", core.serialization.string().optional()),
48
48
  name: core.serialization.string(),
49
+ relevance: core.serialization.number().optional(),
49
50
  score: core.serialization.number().optional(),
50
51
  sourceNodeUuid: core.serialization.property("source_node_uuid", core.serialization.string()),
51
52
  targetNodeUuid: core.serialization.property("target_node_uuid", core.serialization.string()),