@getzep/zep-cloud 2.8.0 → 2.10.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.
- package/api/resources/document/client/Client.js +13 -13
- package/api/resources/graph/client/Client.js +5 -5
- package/api/resources/graph/resources/edge/client/Client.d.ts +6 -4
- package/api/resources/graph/resources/edge/client/Client.js +17 -13
- package/api/resources/graph/resources/episode/client/Client.js +5 -5
- package/api/resources/graph/resources/node/client/Client.d.ts +6 -4
- package/api/resources/graph/resources/node/client/Client.js +16 -12
- package/api/resources/group/client/Client.js +6 -6
- package/api/resources/memory/client/Client.js +22 -22
- package/api/resources/user/client/Client.js +8 -8
- package/api/types/Episode.d.ts +1 -0
- package/api/types/GraphEdgesRequest.d.ts +9 -0
- package/api/types/GraphEdgesRequest.js +5 -0
- package/api/types/GraphNodesRequest.d.ts +9 -0
- package/api/types/GraphNodesRequest.js +5 -0
- package/api/types/Message.d.ts +2 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/api/resources/document/client/Client.js +13 -13
- package/dist/api/resources/graph/client/Client.js +5 -5
- package/dist/api/resources/graph/resources/edge/client/Client.d.ts +6 -4
- package/dist/api/resources/graph/resources/edge/client/Client.js +17 -13
- package/dist/api/resources/graph/resources/episode/client/Client.js +5 -5
- package/dist/api/resources/graph/resources/node/client/Client.d.ts +6 -4
- package/dist/api/resources/graph/resources/node/client/Client.js +16 -12
- package/dist/api/resources/group/client/Client.js +6 -6
- package/dist/api/resources/memory/client/Client.js +22 -22
- package/dist/api/resources/user/client/Client.js +8 -8
- package/dist/api/types/Episode.d.ts +1 -0
- package/dist/api/types/GraphEdgesRequest.d.ts +9 -0
- package/dist/api/types/GraphEdgesRequest.js +5 -0
- package/dist/api/types/GraphNodesRequest.d.ts +9 -0
- package/dist/api/types/GraphNodesRequest.js +5 -0
- package/dist/api/types/Message.d.ts +2 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/serialization/types/Episode.d.ts +1 -0
- package/dist/serialization/types/Episode.js +1 -0
- package/dist/serialization/types/GraphEdgesRequest.d.ts +13 -0
- package/dist/serialization/types/GraphEdgesRequest.js +44 -0
- package/dist/serialization/types/GraphNodesRequest.d.ts +13 -0
- package/dist/serialization/types/GraphNodesRequest.js +44 -0
- package/dist/serialization/types/Message.d.ts +1 -0
- package/dist/serialization/types/Message.js +1 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +40 -8
- package/serialization/types/Episode.d.ts +1 -0
- package/serialization/types/Episode.js +1 -0
- package/serialization/types/GraphEdgesRequest.d.ts +13 -0
- package/serialization/types/GraphEdgesRequest.js +44 -0
- package/serialization/types/GraphNodesRequest.d.ts +13 -0
- package/serialization/types/GraphNodesRequest.js +44 -0
- package/serialization/types/Message.d.ts +1 -0
- package/serialization/types/Message.js +1 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -28,28 +28,30 @@ export declare class Edge {
|
|
|
28
28
|
* Returns all edges for a group.
|
|
29
29
|
*
|
|
30
30
|
* @param {string} groupId - Group ID
|
|
31
|
+
* @param {Zep.GraphEdgesRequest} request
|
|
31
32
|
* @param {Edge.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
33
|
*
|
|
33
34
|
* @throws {@link Zep.BadRequestError}
|
|
34
35
|
* @throws {@link Zep.InternalServerError}
|
|
35
36
|
*
|
|
36
37
|
* @example
|
|
37
|
-
* await client.graph.edge.getByGroupId("group_id")
|
|
38
|
+
* await client.graph.edge.getByGroupId("group_id", {})
|
|
38
39
|
*/
|
|
39
|
-
getByGroupId(groupId: string, requestOptions?: Edge.RequestOptions): Promise<Zep.EntityEdge[]>;
|
|
40
|
+
getByGroupId(groupId: string, request: Zep.GraphEdgesRequest, requestOptions?: Edge.RequestOptions): Promise<Zep.EntityEdge[]>;
|
|
40
41
|
/**
|
|
41
42
|
* Returns all edges for a user.
|
|
42
43
|
*
|
|
43
44
|
* @param {string} userId - User ID
|
|
45
|
+
* @param {Zep.GraphEdgesRequest} request
|
|
44
46
|
* @param {Edge.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
47
|
*
|
|
46
48
|
* @throws {@link Zep.BadRequestError}
|
|
47
49
|
* @throws {@link Zep.InternalServerError}
|
|
48
50
|
*
|
|
49
51
|
* @example
|
|
50
|
-
* await client.graph.edge.getByUserId("user_id")
|
|
52
|
+
* await client.graph.edge.getByUserId("user_id", {})
|
|
51
53
|
*/
|
|
52
|
-
getByUserId(userId: string, requestOptions?: Edge.RequestOptions): Promise<Zep.EntityEdge[]>;
|
|
54
|
+
getByUserId(userId: string, request: Zep.GraphEdgesRequest, requestOptions?: Edge.RequestOptions): Promise<Zep.EntityEdge[]>;
|
|
53
55
|
/**
|
|
54
56
|
* Returns a specific edge by its UUID.
|
|
55
57
|
*
|
|
@@ -52,8 +52,8 @@ exports.Edge = void 0;
|
|
|
52
52
|
const environments = __importStar(require("../../../../../../environments"));
|
|
53
53
|
const core = __importStar(require("../../../../../../core"));
|
|
54
54
|
const Zep = __importStar(require("../../../../../index"));
|
|
55
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
56
55
|
const serializers = __importStar(require("../../../../../../serialization/index"));
|
|
56
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
57
57
|
const errors = __importStar(require("../../../../../../errors/index"));
|
|
58
58
|
class Edge {
|
|
59
59
|
constructor(_options = {}) {
|
|
@@ -63,23 +63,25 @@ class Edge {
|
|
|
63
63
|
* Returns all edges for a group.
|
|
64
64
|
*
|
|
65
65
|
* @param {string} groupId - Group ID
|
|
66
|
+
* @param {Zep.GraphEdgesRequest} request
|
|
66
67
|
* @param {Edge.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
68
|
*
|
|
68
69
|
* @throws {@link Zep.BadRequestError}
|
|
69
70
|
* @throws {@link Zep.InternalServerError}
|
|
70
71
|
*
|
|
71
72
|
* @example
|
|
72
|
-
* await client.graph.edge.getByGroupId("group_id")
|
|
73
|
+
* await client.graph.edge.getByGroupId("group_id", {})
|
|
73
74
|
*/
|
|
74
|
-
getByGroupId(groupId, requestOptions) {
|
|
75
|
+
getByGroupId(groupId, request, requestOptions) {
|
|
75
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
77
|
var _a, _b;
|
|
77
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
79
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/edge/group/${encodeURIComponent(groupId)}`),
|
|
79
|
-
method: "
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
80
|
+
method: "POST",
|
|
81
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
82
|
contentType: "application/json",
|
|
82
83
|
requestType: "json",
|
|
84
|
+
body: serializers.GraphEdgesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
83
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
84
86
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
85
87
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -125,7 +127,7 @@ class Edge {
|
|
|
125
127
|
body: _response.error.rawBody,
|
|
126
128
|
});
|
|
127
129
|
case "timeout":
|
|
128
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling
|
|
130
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/edge/group/{group_id}.");
|
|
129
131
|
case "unknown":
|
|
130
132
|
throw new errors.ZepError({
|
|
131
133
|
message: _response.error.errorMessage,
|
|
@@ -137,23 +139,25 @@ class Edge {
|
|
|
137
139
|
* Returns all edges for a user.
|
|
138
140
|
*
|
|
139
141
|
* @param {string} userId - User ID
|
|
142
|
+
* @param {Zep.GraphEdgesRequest} request
|
|
140
143
|
* @param {Edge.RequestOptions} requestOptions - Request-specific configuration.
|
|
141
144
|
*
|
|
142
145
|
* @throws {@link Zep.BadRequestError}
|
|
143
146
|
* @throws {@link Zep.InternalServerError}
|
|
144
147
|
*
|
|
145
148
|
* @example
|
|
146
|
-
* await client.graph.edge.getByUserId("user_id")
|
|
149
|
+
* await client.graph.edge.getByUserId("user_id", {})
|
|
147
150
|
*/
|
|
148
|
-
getByUserId(userId, requestOptions) {
|
|
151
|
+
getByUserId(userId, request, requestOptions) {
|
|
149
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
153
|
var _a, _b;
|
|
151
154
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
152
155
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/edge/user/${encodeURIComponent(userId)}`),
|
|
153
|
-
method: "
|
|
154
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
156
|
+
method: "POST",
|
|
157
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
155
158
|
contentType: "application/json",
|
|
156
159
|
requestType: "json",
|
|
160
|
+
body: serializers.GraphEdgesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
157
161
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
158
162
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
159
163
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -199,7 +203,7 @@ class Edge {
|
|
|
199
203
|
body: _response.error.rawBody,
|
|
200
204
|
});
|
|
201
205
|
case "timeout":
|
|
202
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling
|
|
206
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/edge/user/{user_id}.");
|
|
203
207
|
case "unknown":
|
|
204
208
|
throw new errors.ZepError({
|
|
205
209
|
message: _response.error.errorMessage,
|
|
@@ -226,7 +230,7 @@ class Edge {
|
|
|
226
230
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
227
231
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/edge/${encodeURIComponent(uuid)}`),
|
|
228
232
|
method: "GET",
|
|
229
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
233
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
230
234
|
contentType: "application/json",
|
|
231
235
|
requestType: "json",
|
|
232
236
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -308,7 +312,7 @@ class Edge {
|
|
|
308
312
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
309
313
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/edge/${encodeURIComponent(uuid)}`),
|
|
310
314
|
method: "DELETE",
|
|
311
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
315
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
312
316
|
contentType: "application/json",
|
|
313
317
|
requestType: "json",
|
|
314
318
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -83,7 +83,7 @@ class Episode {
|
|
|
83
83
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
84
84
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/group/${encodeURIComponent(groupId)}`),
|
|
85
85
|
method: "GET",
|
|
86
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
86
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
queryParameters: _queryParams,
|
|
89
89
|
requestType: "json",
|
|
@@ -164,7 +164,7 @@ class Episode {
|
|
|
164
164
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
165
165
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/user/${encodeURIComponent(userId)}`),
|
|
166
166
|
method: "GET",
|
|
167
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
167
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
168
168
|
contentType: "application/json",
|
|
169
169
|
queryParameters: _queryParams,
|
|
170
170
|
requestType: "json",
|
|
@@ -239,7 +239,7 @@ class Episode {
|
|
|
239
239
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
240
240
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/${encodeURIComponent(uuid)}`),
|
|
241
241
|
method: "GET",
|
|
242
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
242
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
243
243
|
contentType: "application/json",
|
|
244
244
|
requestType: "json",
|
|
245
245
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -314,7 +314,7 @@ class Episode {
|
|
|
314
314
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
315
315
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/${encodeURIComponent(uuid)}`),
|
|
316
316
|
method: "DELETE",
|
|
317
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
317
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
318
318
|
contentType: "application/json",
|
|
319
319
|
requestType: "json",
|
|
320
320
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -396,7 +396,7 @@ class Episode {
|
|
|
396
396
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
397
397
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/${encodeURIComponent(uuid)}/mentions`),
|
|
398
398
|
method: "GET",
|
|
399
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
399
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
400
400
|
contentType: "application/json",
|
|
401
401
|
requestType: "json",
|
|
402
402
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -28,28 +28,30 @@ export declare class Node {
|
|
|
28
28
|
* Returns all nodes for a group.
|
|
29
29
|
*
|
|
30
30
|
* @param {string} groupId - Group ID
|
|
31
|
+
* @param {Zep.GraphNodesRequest} request
|
|
31
32
|
* @param {Node.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
33
|
*
|
|
33
34
|
* @throws {@link Zep.BadRequestError}
|
|
34
35
|
* @throws {@link Zep.InternalServerError}
|
|
35
36
|
*
|
|
36
37
|
* @example
|
|
37
|
-
* await client.graph.node.getByGroupId("group_id")
|
|
38
|
+
* await client.graph.node.getByGroupId("group_id", {})
|
|
38
39
|
*/
|
|
39
|
-
getByGroupId(groupId: string, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode[]>;
|
|
40
|
+
getByGroupId(groupId: string, request: Zep.GraphNodesRequest, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode[]>;
|
|
40
41
|
/**
|
|
41
42
|
* Returns all nodes for a user
|
|
42
43
|
*
|
|
43
44
|
* @param {string} userId - User ID
|
|
45
|
+
* @param {Zep.GraphNodesRequest} request
|
|
44
46
|
* @param {Node.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
47
|
*
|
|
46
48
|
* @throws {@link Zep.BadRequestError}
|
|
47
49
|
* @throws {@link Zep.InternalServerError}
|
|
48
50
|
*
|
|
49
51
|
* @example
|
|
50
|
-
* await client.graph.node.getByUserId("user_id")
|
|
52
|
+
* await client.graph.node.getByUserId("user_id", {})
|
|
51
53
|
*/
|
|
52
|
-
getByUserId(userId: string, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode[]>;
|
|
54
|
+
getByUserId(userId: string, request: Zep.GraphNodesRequest, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode[]>;
|
|
53
55
|
/**
|
|
54
56
|
* Returns a specific node by its UUID.
|
|
55
57
|
*
|
|
@@ -52,8 +52,8 @@ exports.Node = void 0;
|
|
|
52
52
|
const environments = __importStar(require("../../../../../../environments"));
|
|
53
53
|
const core = __importStar(require("../../../../../../core"));
|
|
54
54
|
const Zep = __importStar(require("../../../../../index"));
|
|
55
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
56
55
|
const serializers = __importStar(require("../../../../../../serialization/index"));
|
|
56
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
57
57
|
const errors = __importStar(require("../../../../../../errors/index"));
|
|
58
58
|
class Node {
|
|
59
59
|
constructor(_options = {}) {
|
|
@@ -63,23 +63,25 @@ class Node {
|
|
|
63
63
|
* Returns all nodes for a group.
|
|
64
64
|
*
|
|
65
65
|
* @param {string} groupId - Group ID
|
|
66
|
+
* @param {Zep.GraphNodesRequest} request
|
|
66
67
|
* @param {Node.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
68
|
*
|
|
68
69
|
* @throws {@link Zep.BadRequestError}
|
|
69
70
|
* @throws {@link Zep.InternalServerError}
|
|
70
71
|
*
|
|
71
72
|
* @example
|
|
72
|
-
* await client.graph.node.getByGroupId("group_id")
|
|
73
|
+
* await client.graph.node.getByGroupId("group_id", {})
|
|
73
74
|
*/
|
|
74
|
-
getByGroupId(groupId, requestOptions) {
|
|
75
|
+
getByGroupId(groupId, request, requestOptions) {
|
|
75
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
77
|
var _a, _b;
|
|
77
78
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
79
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/node/group/${encodeURIComponent(groupId)}`),
|
|
79
|
-
method: "
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
80
|
+
method: "POST",
|
|
81
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
82
|
contentType: "application/json",
|
|
82
83
|
requestType: "json",
|
|
84
|
+
body: serializers.GraphNodesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
83
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
84
86
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
85
87
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -125,7 +127,7 @@ class Node {
|
|
|
125
127
|
body: _response.error.rawBody,
|
|
126
128
|
});
|
|
127
129
|
case "timeout":
|
|
128
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling
|
|
130
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/node/group/{group_id}.");
|
|
129
131
|
case "unknown":
|
|
130
132
|
throw new errors.ZepError({
|
|
131
133
|
message: _response.error.errorMessage,
|
|
@@ -137,23 +139,25 @@ class Node {
|
|
|
137
139
|
* Returns all nodes for a user
|
|
138
140
|
*
|
|
139
141
|
* @param {string} userId - User ID
|
|
142
|
+
* @param {Zep.GraphNodesRequest} request
|
|
140
143
|
* @param {Node.RequestOptions} requestOptions - Request-specific configuration.
|
|
141
144
|
*
|
|
142
145
|
* @throws {@link Zep.BadRequestError}
|
|
143
146
|
* @throws {@link Zep.InternalServerError}
|
|
144
147
|
*
|
|
145
148
|
* @example
|
|
146
|
-
* await client.graph.node.getByUserId("user_id")
|
|
149
|
+
* await client.graph.node.getByUserId("user_id", {})
|
|
147
150
|
*/
|
|
148
|
-
getByUserId(userId, requestOptions) {
|
|
151
|
+
getByUserId(userId, request, requestOptions) {
|
|
149
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
153
|
var _a, _b;
|
|
151
154
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
152
155
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/node/user/${encodeURIComponent(userId)}`),
|
|
153
|
-
method: "
|
|
154
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
156
|
+
method: "POST",
|
|
157
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
155
158
|
contentType: "application/json",
|
|
156
159
|
requestType: "json",
|
|
160
|
+
body: serializers.GraphNodesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
157
161
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
158
162
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
159
163
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -199,7 +203,7 @@ class Node {
|
|
|
199
203
|
body: _response.error.rawBody,
|
|
200
204
|
});
|
|
201
205
|
case "timeout":
|
|
202
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling
|
|
206
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/node/user/{user_id}.");
|
|
203
207
|
case "unknown":
|
|
204
208
|
throw new errors.ZepError({
|
|
205
209
|
message: _response.error.errorMessage,
|
|
@@ -226,7 +230,7 @@ class Node {
|
|
|
226
230
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
227
231
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/node/${encodeURIComponent(uuid)}`),
|
|
228
232
|
method: "GET",
|
|
229
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
233
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
230
234
|
contentType: "application/json",
|
|
231
235
|
requestType: "json",
|
|
232
236
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -79,7 +79,7 @@ class Group {
|
|
|
79
79
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
80
80
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "groups"),
|
|
81
81
|
method: "POST",
|
|
82
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
82
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
requestType: "json",
|
|
85
85
|
body: serializers.CreateGroupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -162,7 +162,7 @@ class Group {
|
|
|
162
162
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
163
163
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "groups-ordered"),
|
|
164
164
|
method: "GET",
|
|
165
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
165
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
166
166
|
contentType: "application/json",
|
|
167
167
|
queryParameters: _queryParams,
|
|
168
168
|
requestType: "json",
|
|
@@ -237,7 +237,7 @@ class Group {
|
|
|
237
237
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
238
238
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}`),
|
|
239
239
|
method: "GET",
|
|
240
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
240
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
241
241
|
contentType: "application/json",
|
|
242
242
|
requestType: "json",
|
|
243
243
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -312,7 +312,7 @@ class Group {
|
|
|
312
312
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
313
313
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}`),
|
|
314
314
|
method: "DELETE",
|
|
315
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
315
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
316
316
|
contentType: "application/json",
|
|
317
317
|
requestType: "json",
|
|
318
318
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -396,7 +396,7 @@ class Group {
|
|
|
396
396
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
397
397
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}`),
|
|
398
398
|
method: "PATCH",
|
|
399
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
399
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
400
400
|
contentType: "application/json",
|
|
401
401
|
requestType: "json",
|
|
402
402
|
body: serializers.UpdateGroupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -479,7 +479,7 @@ class Group {
|
|
|
479
479
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
480
480
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}/facts`),
|
|
481
481
|
method: "GET",
|
|
482
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
482
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.10.0", "User-Agent": "zep-cloud/2.10.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
483
483
|
contentType: "application/json",
|
|
484
484
|
requestType: "json",
|
|
485
485
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|