@getzep/zep-cloud 2.3.1 → 2.4.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 +2 -2
- package/api/resources/graph/resources/edge/client/Client.js +4 -4
- package/api/resources/graph/resources/episode/client/Client.d.ts +14 -0
- package/api/resources/graph/resources/episode/client/Client.js +86 -3
- package/api/resources/graph/resources/node/client/Client.js +3 -3
- package/api/resources/group/client/Client.js +5 -5
- package/api/resources/memory/client/Client.js +22 -22
- package/api/resources/user/client/Client.d.ts +13 -0
- package/api/resources/user/client/Client.js +81 -7
- package/api/types/UserNodeResponse.d.ts +7 -0
- package/api/types/UserNodeResponse.js +5 -0
- package/api/types/index.d.ts +1 -0
- package/api/types/index.js +1 -0
- package/dist/api/resources/document/client/Client.js +13 -13
- package/dist/api/resources/graph/client/Client.js +2 -2
- package/dist/api/resources/graph/resources/edge/client/Client.js +4 -4
- package/dist/api/resources/graph/resources/episode/client/Client.d.ts +14 -0
- package/dist/api/resources/graph/resources/episode/client/Client.js +86 -3
- package/dist/api/resources/graph/resources/node/client/Client.js +3 -3
- package/dist/api/resources/group/client/Client.js +5 -5
- package/dist/api/resources/memory/client/Client.js +22 -22
- package/dist/api/resources/user/client/Client.d.ts +13 -0
- package/dist/api/resources/user/client/Client.js +81 -7
- package/dist/api/types/UserNodeResponse.d.ts +7 -0
- package/dist/api/types/UserNodeResponse.js +5 -0
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- package/dist/serialization/types/UserNodeResponse.d.ts +13 -0
- package/dist/serialization/types/UserNodeResponse.js +44 -0
- package/dist/serialization/types/index.d.ts +1 -0
- package/dist/serialization/types/index.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/examples/graph/user_graph_example.ts +13 -0
- package/package.json +1 -1
- package/reference.md +126 -0
- package/serialization/types/UserNodeResponse.d.ts +13 -0
- package/serialization/types/UserNodeResponse.js +44 -0
- package/serialization/types/index.d.ts +1 -0
- package/serialization/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -77,7 +77,7 @@ class User {
|
|
|
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, "users"),
|
|
79
79
|
method: "POST",
|
|
80
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.4.0", "User-Agent": "zep-cloud/2.4.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
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
body: serializers.CreateUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -160,7 +160,7 @@ class User {
|
|
|
160
160
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
161
161
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "users-ordered"),
|
|
162
162
|
method: "GET",
|
|
163
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
163
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.4.0", "User-Agent": "zep-cloud/2.4.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),
|
|
164
164
|
contentType: "application/json",
|
|
165
165
|
queryParameters: _queryParams,
|
|
166
166
|
requestType: "json",
|
|
@@ -235,7 +235,7 @@ class User {
|
|
|
235
235
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
236
236
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}`),
|
|
237
237
|
method: "GET",
|
|
238
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
238
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.4.0", "User-Agent": "zep-cloud/2.4.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),
|
|
239
239
|
contentType: "application/json",
|
|
240
240
|
requestType: "json",
|
|
241
241
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -309,7 +309,7 @@ class User {
|
|
|
309
309
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
310
310
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}`),
|
|
311
311
|
method: "DELETE",
|
|
312
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
312
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.4.0", "User-Agent": "zep-cloud/2.4.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),
|
|
313
313
|
contentType: "application/json",
|
|
314
314
|
requestType: "json",
|
|
315
315
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -385,7 +385,7 @@ class User {
|
|
|
385
385
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
386
386
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}`),
|
|
387
387
|
method: "PATCH",
|
|
388
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
388
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.4.0", "User-Agent": "zep-cloud/2.4.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),
|
|
389
389
|
contentType: "application/json",
|
|
390
390
|
requestType: "json",
|
|
391
391
|
body: serializers.UpdateUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -468,7 +468,7 @@ class User {
|
|
|
468
468
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
469
469
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}/facts`),
|
|
470
470
|
method: "GET",
|
|
471
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
471
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.4.0", "User-Agent": "zep-cloud/2.4.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),
|
|
472
472
|
contentType: "application/json",
|
|
473
473
|
requestType: "json",
|
|
474
474
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -524,6 +524,80 @@ class User {
|
|
|
524
524
|
}
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
|
+
/**
|
|
528
|
+
* Get user node.
|
|
529
|
+
*
|
|
530
|
+
* @param {string} userId - The user_id of the user to get the node for.
|
|
531
|
+
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
532
|
+
*
|
|
533
|
+
* @throws {@link Zep.NotFoundError}
|
|
534
|
+
* @throws {@link Zep.InternalServerError}
|
|
535
|
+
*
|
|
536
|
+
* @example
|
|
537
|
+
* await client.user.getNode("userId")
|
|
538
|
+
*/
|
|
539
|
+
getNode(userId, requestOptions) {
|
|
540
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
541
|
+
var _a, _b;
|
|
542
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
543
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}/node`),
|
|
544
|
+
method: "GET",
|
|
545
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.4.0", "User-Agent": "zep-cloud/2.4.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),
|
|
546
|
+
contentType: "application/json",
|
|
547
|
+
requestType: "json",
|
|
548
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
549
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
550
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
551
|
+
});
|
|
552
|
+
if (_response.ok) {
|
|
553
|
+
return serializers.UserNodeResponse.parseOrThrow(_response.body, {
|
|
554
|
+
unrecognizedObjectKeys: "passthrough",
|
|
555
|
+
allowUnrecognizedUnionMembers: true,
|
|
556
|
+
allowUnrecognizedEnumValues: true,
|
|
557
|
+
skipValidation: true,
|
|
558
|
+
breadcrumbsPrefix: ["response"],
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
if (_response.error.reason === "status-code") {
|
|
562
|
+
switch (_response.error.statusCode) {
|
|
563
|
+
case 404:
|
|
564
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
565
|
+
unrecognizedObjectKeys: "passthrough",
|
|
566
|
+
allowUnrecognizedUnionMembers: true,
|
|
567
|
+
allowUnrecognizedEnumValues: true,
|
|
568
|
+
skipValidation: true,
|
|
569
|
+
breadcrumbsPrefix: ["response"],
|
|
570
|
+
}));
|
|
571
|
+
case 500:
|
|
572
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
573
|
+
unrecognizedObjectKeys: "passthrough",
|
|
574
|
+
allowUnrecognizedUnionMembers: true,
|
|
575
|
+
allowUnrecognizedEnumValues: true,
|
|
576
|
+
skipValidation: true,
|
|
577
|
+
breadcrumbsPrefix: ["response"],
|
|
578
|
+
}));
|
|
579
|
+
default:
|
|
580
|
+
throw new errors.ZepError({
|
|
581
|
+
statusCode: _response.error.statusCode,
|
|
582
|
+
body: _response.error.body,
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
switch (_response.error.reason) {
|
|
587
|
+
case "non-json":
|
|
588
|
+
throw new errors.ZepError({
|
|
589
|
+
statusCode: _response.error.statusCode,
|
|
590
|
+
body: _response.error.rawBody,
|
|
591
|
+
});
|
|
592
|
+
case "timeout":
|
|
593
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /users/{userId}/node.");
|
|
594
|
+
case "unknown":
|
|
595
|
+
throw new errors.ZepError({
|
|
596
|
+
message: _response.error.errorMessage,
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
}
|
|
527
601
|
/**
|
|
528
602
|
* list all sessions for a user by user id
|
|
529
603
|
*
|
|
@@ -541,7 +615,7 @@ class User {
|
|
|
541
615
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
542
616
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}/sessions`),
|
|
543
617
|
method: "GET",
|
|
544
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
618
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.4.0", "User-Agent": "zep-cloud/2.4.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),
|
|
545
619
|
contentType: "application/json",
|
|
546
620
|
requestType: "json",
|
|
547
621
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -31,6 +31,7 @@ export * from "./Summary";
|
|
|
31
31
|
export * from "./SummaryListResponse";
|
|
32
32
|
export * from "./User";
|
|
33
33
|
export * from "./UserListResponse";
|
|
34
|
+
export * from "./UserNodeResponse";
|
|
34
35
|
export * from "./EntityEdge";
|
|
35
36
|
export * from "./EntityNode";
|
|
36
37
|
export * from "./GraphSearchResults";
|
package/dist/api/types/index.js
CHANGED
|
@@ -47,6 +47,7 @@ __exportStar(require("./Summary"), exports);
|
|
|
47
47
|
__exportStar(require("./SummaryListResponse"), exports);
|
|
48
48
|
__exportStar(require("./User"), exports);
|
|
49
49
|
__exportStar(require("./UserListResponse"), exports);
|
|
50
|
+
__exportStar(require("./UserNodeResponse"), exports);
|
|
50
51
|
__exportStar(require("./EntityEdge"), exports);
|
|
51
52
|
__exportStar(require("./EntityNode"), exports);
|
|
52
53
|
__exportStar(require("./GraphSearchResults"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Zep from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { EntityNode } from "./EntityNode";
|
|
8
|
+
export declare const UserNodeResponse: core.serialization.ObjectSchema<serializers.UserNodeResponse.Raw, Zep.UserNodeResponse>;
|
|
9
|
+
export declare namespace UserNodeResponse {
|
|
10
|
+
interface Raw {
|
|
11
|
+
node?: EntityNode.Raw | null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.UserNodeResponse = void 0;
|
|
40
|
+
const core = __importStar(require("../../core"));
|
|
41
|
+
const EntityNode_1 = require("./EntityNode");
|
|
42
|
+
exports.UserNodeResponse = core.serialization.object({
|
|
43
|
+
node: EntityNode_1.EntityNode.optional(),
|
|
44
|
+
});
|
|
@@ -31,6 +31,7 @@ export * from "./Summary";
|
|
|
31
31
|
export * from "./SummaryListResponse";
|
|
32
32
|
export * from "./User";
|
|
33
33
|
export * from "./UserListResponse";
|
|
34
|
+
export * from "./UserNodeResponse";
|
|
34
35
|
export * from "./EntityEdge";
|
|
35
36
|
export * from "./EntityNode";
|
|
36
37
|
export * from "./GraphSearchResults";
|
|
@@ -47,6 +47,7 @@ __exportStar(require("./Summary"), exports);
|
|
|
47
47
|
__exportStar(require("./SummaryListResponse"), exports);
|
|
48
48
|
__exportStar(require("./User"), exports);
|
|
49
49
|
__exportStar(require("./UserListResponse"), exports);
|
|
50
|
+
__exportStar(require("./UserNodeResponse"), exports);
|
|
50
51
|
__exportStar(require("./EntityEdge"), exports);
|
|
51
52
|
__exportStar(require("./EntityNode"), exports);
|
|
52
53
|
__exportStar(require("./GraphSearchResults"), exports);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.4.0";
|
package/dist/version.js
CHANGED
|
@@ -153,6 +153,19 @@ async function main() {
|
|
|
153
153
|
console.log("Getting all user facts");
|
|
154
154
|
const userFacts = await client.user.getFacts(userId);
|
|
155
155
|
console.log(userFacts.facts);
|
|
156
|
+
|
|
157
|
+
const {node: userNode} = await client.user.getNode(userId)
|
|
158
|
+
if (userNode) {
|
|
159
|
+
console.log("User node: ", userNode)
|
|
160
|
+
const userCenteredSearch = await client.graph.search({
|
|
161
|
+
userId,
|
|
162
|
+
query: "User preferences",
|
|
163
|
+
centerNodeUuid: userNode.uuid,
|
|
164
|
+
reranker: "node_distance",
|
|
165
|
+
})
|
|
166
|
+
console.log("User centered search results", userCenteredSearch.edges)
|
|
167
|
+
}
|
|
168
|
+
|
|
156
169
|
}
|
|
157
170
|
|
|
158
171
|
main().catch(console.error);
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -3274,6 +3274,69 @@ await client.user.getFacts("userId");
|
|
|
3274
3274
|
</dl>
|
|
3275
3275
|
</details>
|
|
3276
3276
|
|
|
3277
|
+
<details><summary><code>client.user.<a href="/src/api/resources/user/client/Client.ts">getNode</a>(userId) -> Zep.UserNodeResponse</code></summary>
|
|
3278
|
+
<dl>
|
|
3279
|
+
<dd>
|
|
3280
|
+
|
|
3281
|
+
#### 📝 Description
|
|
3282
|
+
|
|
3283
|
+
<dl>
|
|
3284
|
+
<dd>
|
|
3285
|
+
|
|
3286
|
+
<dl>
|
|
3287
|
+
<dd>
|
|
3288
|
+
|
|
3289
|
+
Get user node.
|
|
3290
|
+
|
|
3291
|
+
</dd>
|
|
3292
|
+
</dl>
|
|
3293
|
+
</dd>
|
|
3294
|
+
</dl>
|
|
3295
|
+
|
|
3296
|
+
#### 🔌 Usage
|
|
3297
|
+
|
|
3298
|
+
<dl>
|
|
3299
|
+
<dd>
|
|
3300
|
+
|
|
3301
|
+
<dl>
|
|
3302
|
+
<dd>
|
|
3303
|
+
|
|
3304
|
+
```typescript
|
|
3305
|
+
await client.user.getNode("userId");
|
|
3306
|
+
```
|
|
3307
|
+
|
|
3308
|
+
</dd>
|
|
3309
|
+
</dl>
|
|
3310
|
+
</dd>
|
|
3311
|
+
</dl>
|
|
3312
|
+
|
|
3313
|
+
#### ⚙️ Parameters
|
|
3314
|
+
|
|
3315
|
+
<dl>
|
|
3316
|
+
<dd>
|
|
3317
|
+
|
|
3318
|
+
<dl>
|
|
3319
|
+
<dd>
|
|
3320
|
+
|
|
3321
|
+
**userId:** `string` — The user_id of the user to get the node for.
|
|
3322
|
+
|
|
3323
|
+
</dd>
|
|
3324
|
+
</dl>
|
|
3325
|
+
|
|
3326
|
+
<dl>
|
|
3327
|
+
<dd>
|
|
3328
|
+
|
|
3329
|
+
**requestOptions:** `User.RequestOptions`
|
|
3330
|
+
|
|
3331
|
+
</dd>
|
|
3332
|
+
</dl>
|
|
3333
|
+
</dd>
|
|
3334
|
+
</dl>
|
|
3335
|
+
|
|
3336
|
+
</dd>
|
|
3337
|
+
</dl>
|
|
3338
|
+
</details>
|
|
3339
|
+
|
|
3277
3340
|
<details><summary><code>client.user.<a href="/src/api/resources/user/client/Client.ts">getSessions</a>(userId) -> Zep.Session[]</code></summary>
|
|
3278
3341
|
<dl>
|
|
3279
3342
|
<dd>
|
|
@@ -3798,6 +3861,69 @@ await client.graph.episode.get("uuid");
|
|
|
3798
3861
|
</dl>
|
|
3799
3862
|
</details>
|
|
3800
3863
|
|
|
3864
|
+
<details><summary><code>client.graph.episode.<a href="/src/api/resources/graph/resources/episode/client/Client.ts">delete</a>(uuid) -> Zep.SuccessResponse</code></summary>
|
|
3865
|
+
<dl>
|
|
3866
|
+
<dd>
|
|
3867
|
+
|
|
3868
|
+
#### 📝 Description
|
|
3869
|
+
|
|
3870
|
+
<dl>
|
|
3871
|
+
<dd>
|
|
3872
|
+
|
|
3873
|
+
<dl>
|
|
3874
|
+
<dd>
|
|
3875
|
+
|
|
3876
|
+
Delete an episode by its UUID
|
|
3877
|
+
|
|
3878
|
+
</dd>
|
|
3879
|
+
</dl>
|
|
3880
|
+
</dd>
|
|
3881
|
+
</dl>
|
|
3882
|
+
|
|
3883
|
+
#### 🔌 Usage
|
|
3884
|
+
|
|
3885
|
+
<dl>
|
|
3886
|
+
<dd>
|
|
3887
|
+
|
|
3888
|
+
<dl>
|
|
3889
|
+
<dd>
|
|
3890
|
+
|
|
3891
|
+
```typescript
|
|
3892
|
+
await client.graph.episode.delete("uuid");
|
|
3893
|
+
```
|
|
3894
|
+
|
|
3895
|
+
</dd>
|
|
3896
|
+
</dl>
|
|
3897
|
+
</dd>
|
|
3898
|
+
</dl>
|
|
3899
|
+
|
|
3900
|
+
#### ⚙️ Parameters
|
|
3901
|
+
|
|
3902
|
+
<dl>
|
|
3903
|
+
<dd>
|
|
3904
|
+
|
|
3905
|
+
<dl>
|
|
3906
|
+
<dd>
|
|
3907
|
+
|
|
3908
|
+
**uuid:** `string` — Episode UUID
|
|
3909
|
+
|
|
3910
|
+
</dd>
|
|
3911
|
+
</dl>
|
|
3912
|
+
|
|
3913
|
+
<dl>
|
|
3914
|
+
<dd>
|
|
3915
|
+
|
|
3916
|
+
**requestOptions:** `Episode.RequestOptions`
|
|
3917
|
+
|
|
3918
|
+
</dd>
|
|
3919
|
+
</dl>
|
|
3920
|
+
</dd>
|
|
3921
|
+
</dl>
|
|
3922
|
+
|
|
3923
|
+
</dd>
|
|
3924
|
+
</dl>
|
|
3925
|
+
</details>
|
|
3926
|
+
|
|
3801
3927
|
## Graph Node
|
|
3802
3928
|
|
|
3803
3929
|
<details><summary><code>client.graph.node.<a href="/src/api/resources/graph/resources/node/client/Client.ts">getByGroupId</a>(groupId) -> Zep.EntityNode[]</code></summary>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Zep from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { EntityNode } from "./EntityNode";
|
|
8
|
+
export declare const UserNodeResponse: core.serialization.ObjectSchema<serializers.UserNodeResponse.Raw, Zep.UserNodeResponse>;
|
|
9
|
+
export declare namespace UserNodeResponse {
|
|
10
|
+
interface Raw {
|
|
11
|
+
node?: EntityNode.Raw | null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.UserNodeResponse = void 0;
|
|
40
|
+
const core = __importStar(require("../../core"));
|
|
41
|
+
const EntityNode_1 = require("./EntityNode");
|
|
42
|
+
exports.UserNodeResponse = core.serialization.object({
|
|
43
|
+
node: EntityNode_1.EntityNode.optional(),
|
|
44
|
+
});
|
|
@@ -31,6 +31,7 @@ export * from "./Summary";
|
|
|
31
31
|
export * from "./SummaryListResponse";
|
|
32
32
|
export * from "./User";
|
|
33
33
|
export * from "./UserListResponse";
|
|
34
|
+
export * from "./UserNodeResponse";
|
|
34
35
|
export * from "./EntityEdge";
|
|
35
36
|
export * from "./EntityNode";
|
|
36
37
|
export * from "./GraphSearchResults";
|
|
@@ -47,6 +47,7 @@ __exportStar(require("./Summary"), exports);
|
|
|
47
47
|
__exportStar(require("./SummaryListResponse"), exports);
|
|
48
48
|
__exportStar(require("./User"), exports);
|
|
49
49
|
__exportStar(require("./UserListResponse"), exports);
|
|
50
|
+
__exportStar(require("./UserNodeResponse"), exports);
|
|
50
51
|
__exportStar(require("./EntityEdge"), exports);
|
|
51
52
|
__exportStar(require("./EntityNode"), exports);
|
|
52
53
|
__exportStar(require("./GraphSearchResults"), exports);
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.4.0";
|
package/version.js
CHANGED