@getzep/zep-cloud 2.6.1 → 2.8.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/Client.d.ts +3 -3
- package/Client.js +6 -6
- package/api/resources/document/client/Client.js +13 -13
- package/api/resources/graph/client/Client.d.ts +30 -0
- package/api/resources/graph/client/Client.js +157 -4
- package/api/resources/graph/client/requests/EntityTypeRequest.d.ts +16 -0
- package/api/resources/graph/client/requests/EntityTypeRequest.js +5 -0
- package/api/resources/graph/client/requests/GraphSearchQuery.d.ts +2 -0
- package/api/resources/graph/client/requests/index.d.ts +1 -0
- package/api/resources/graph/resources/edge/client/Client.js +4 -4
- package/api/resources/graph/resources/episode/client/Client.d.ts +13 -0
- package/api/resources/graph/resources/episode/client/Client.js +78 -4
- package/api/resources/graph/resources/node/client/Client.js +3 -3
- package/api/resources/group/client/Client.js +6 -6
- package/api/resources/index.d.ts +2 -2
- package/api/resources/index.js +3 -3
- package/api/resources/memory/client/Client.js +22 -22
- package/api/resources/user/client/Client.js +8 -8
- package/api/types/EntityProperty.d.ts +9 -0
- package/api/types/EntityProperty.js +5 -0
- package/api/types/EntityPropertyType.d.ts +10 -0
- package/api/types/EntityPropertyType.js +12 -0
- package/api/types/EntityType.d.ts +9 -0
- package/api/types/EntityType.js +5 -0
- package/api/types/EntityTypeResponse.d.ts +7 -0
- package/api/types/EntityTypeResponse.js +5 -0
- package/api/types/index.d.ts +4 -0
- package/api/types/index.js +4 -0
- package/dist/Client.d.ts +3 -3
- package/dist/Client.js +6 -6
- package/dist/api/resources/document/client/Client.js +13 -13
- package/dist/api/resources/graph/client/Client.d.ts +30 -0
- package/dist/api/resources/graph/client/Client.js +157 -4
- package/dist/api/resources/graph/client/requests/EntityTypeRequest.d.ts +16 -0
- package/dist/api/resources/graph/client/requests/EntityTypeRequest.js +5 -0
- package/dist/api/resources/graph/client/requests/GraphSearchQuery.d.ts +2 -0
- package/dist/api/resources/graph/client/requests/index.d.ts +1 -0
- package/dist/api/resources/graph/resources/edge/client/Client.js +4 -4
- package/dist/api/resources/graph/resources/episode/client/Client.d.ts +13 -0
- package/dist/api/resources/graph/resources/episode/client/Client.js +78 -4
- package/dist/api/resources/graph/resources/node/client/Client.js +3 -3
- package/dist/api/resources/group/client/Client.js +6 -6
- package/dist/api/resources/index.d.ts +2 -2
- package/dist/api/resources/index.js +3 -3
- package/dist/api/resources/memory/client/Client.js +22 -22
- package/dist/api/resources/user/client/Client.js +8 -8
- package/dist/api/types/EntityProperty.d.ts +9 -0
- package/dist/api/types/EntityProperty.js +5 -0
- package/dist/api/types/EntityPropertyType.d.ts +10 -0
- package/dist/api/types/EntityPropertyType.js +12 -0
- package/dist/api/types/EntityType.d.ts +9 -0
- package/dist/api/types/EntityType.js +5 -0
- package/dist/api/types/EntityTypeResponse.d.ts +7 -0
- package/dist/api/types/EntityTypeResponse.js +5 -0
- package/dist/api/types/index.d.ts +4 -0
- package/dist/api/types/index.js +4 -0
- package/dist/serialization/resources/graph/client/requests/EntityTypeRequest.d.ts +13 -0
- package/dist/serialization/resources/graph/client/requests/EntityTypeRequest.js +44 -0
- package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.d.ts +1 -0
- package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.js +1 -0
- package/dist/serialization/resources/graph/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/graph/client/requests/index.js +3 -1
- package/dist/serialization/resources/index.d.ts +1 -1
- package/dist/serialization/resources/index.js +1 -1
- package/dist/serialization/types/EntityProperty.d.ts +15 -0
- package/dist/serialization/types/EntityProperty.js +46 -0
- package/dist/serialization/types/EntityPropertyType.d.ts +10 -0
- package/dist/serialization/types/EntityPropertyType.js +41 -0
- package/dist/serialization/types/EntityType.d.ts +15 -0
- package/dist/serialization/types/EntityType.js +46 -0
- package/dist/serialization/types/EntityTypeResponse.d.ts +13 -0
- package/dist/serialization/types/EntityTypeResponse.js +44 -0
- package/dist/serialization/types/index.d.ts +4 -0
- package/dist/serialization/types/index.js +4 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/graph.d.ts +6 -0
- package/dist/wrapper/graph.js +29 -0
- package/dist/wrapper/index.d.ts +2 -0
- package/dist/wrapper/index.js +4 -0
- package/dist/wrapper/ontology.d.ts +312 -0
- package/dist/wrapper/ontology.js +80 -0
- package/examples/graph/entity_type_example.ts +40 -0
- package/package.json +1 -1
- package/reference.md +385 -197
- package/serialization/resources/graph/client/requests/EntityTypeRequest.d.ts +13 -0
- package/serialization/resources/graph/client/requests/EntityTypeRequest.js +44 -0
- package/serialization/resources/graph/client/requests/GraphSearchQuery.d.ts +1 -0
- package/serialization/resources/graph/client/requests/GraphSearchQuery.js +1 -0
- package/serialization/resources/graph/client/requests/index.d.ts +1 -0
- package/serialization/resources/graph/client/requests/index.js +3 -1
- package/serialization/resources/index.d.ts +1 -1
- package/serialization/resources/index.js +1 -1
- package/serialization/types/EntityProperty.d.ts +15 -0
- package/serialization/types/EntityProperty.js +46 -0
- package/serialization/types/EntityPropertyType.d.ts +10 -0
- package/serialization/types/EntityPropertyType.js +41 -0
- package/serialization/types/EntityType.d.ts +15 -0
- package/serialization/types/EntityType.js +46 -0
- package/serialization/types/EntityTypeResponse.d.ts +13 -0
- package/serialization/types/EntityTypeResponse.js +44 -0
- package/serialization/types/index.d.ts +4 -0
- package/serialization/types/index.js +4 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/graph.d.ts +6 -0
- package/wrapper/graph.js +29 -0
- package/wrapper/index.d.ts +2 -0
- package/wrapper/index.js +4 -0
- package/wrapper/ontology.d.ts +312 -0
- package/wrapper/ontology.js +80 -0
package/Client.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import * as environments from "./environments";
|
|
5
5
|
import * as core from "./core";
|
|
6
6
|
import { Document } from "./api/resources/document/client/Client";
|
|
7
|
-
import { Memory } from "./api/resources/memory/client/Client";
|
|
8
7
|
import { Graph } from "./api/resources/graph/client/Client";
|
|
8
|
+
import { Memory } from "./api/resources/memory/client/Client";
|
|
9
9
|
import { Group } from "./api/resources/group/client/Client";
|
|
10
10
|
import { User } from "./api/resources/user/client/Client";
|
|
11
11
|
export declare namespace ZepClient {
|
|
@@ -28,14 +28,14 @@ export declare namespace ZepClient {
|
|
|
28
28
|
export declare class ZepClient {
|
|
29
29
|
protected readonly _options: ZepClient.Options;
|
|
30
30
|
protected _document: Document | undefined;
|
|
31
|
-
protected _memory: Memory | undefined;
|
|
32
31
|
protected _graph: Graph | undefined;
|
|
32
|
+
protected _memory: Memory | undefined;
|
|
33
33
|
protected _group: Group | undefined;
|
|
34
34
|
protected _user: User | undefined;
|
|
35
35
|
constructor(_options?: ZepClient.Options);
|
|
36
36
|
get document(): Document;
|
|
37
|
-
get memory(): Memory;
|
|
38
37
|
get graph(): Graph;
|
|
38
|
+
get memory(): Memory;
|
|
39
39
|
get group(): Group;
|
|
40
40
|
get user(): User;
|
|
41
41
|
}
|
package/Client.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ZepClient = void 0;
|
|
7
7
|
const Client_1 = require("./api/resources/document/client/Client");
|
|
8
|
-
const Client_2 = require("./api/resources/
|
|
9
|
-
const Client_3 = require("./api/resources/
|
|
8
|
+
const Client_2 = require("./api/resources/graph/client/Client");
|
|
9
|
+
const Client_3 = require("./api/resources/memory/client/Client");
|
|
10
10
|
const Client_4 = require("./api/resources/group/client/Client");
|
|
11
11
|
const Client_5 = require("./api/resources/user/client/Client");
|
|
12
12
|
class ZepClient {
|
|
@@ -17,13 +17,13 @@ class ZepClient {
|
|
|
17
17
|
var _a;
|
|
18
18
|
return ((_a = this._document) !== null && _a !== void 0 ? _a : (this._document = new Client_1.Document(this._options)));
|
|
19
19
|
}
|
|
20
|
-
get
|
|
20
|
+
get graph() {
|
|
21
21
|
var _a;
|
|
22
|
-
return ((_a = this.
|
|
22
|
+
return ((_a = this._graph) !== null && _a !== void 0 ? _a : (this._graph = new Client_2.Graph(this._options)));
|
|
23
23
|
}
|
|
24
|
-
get
|
|
24
|
+
get memory() {
|
|
25
25
|
var _a;
|
|
26
|
-
return ((_a = this.
|
|
26
|
+
return ((_a = this._memory) !== null && _a !== void 0 ? _a : (this._memory = new Client_3.Memory(this._options)));
|
|
27
27
|
}
|
|
28
28
|
get group() {
|
|
29
29
|
var _a;
|
|
@@ -87,7 +87,7 @@ class Document {
|
|
|
87
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
88
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "collections"),
|
|
89
89
|
method: "GET",
|
|
90
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
90
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
91
91
|
contentType: "application/json",
|
|
92
92
|
requestType: "json",
|
|
93
93
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -163,7 +163,7 @@ class Document {
|
|
|
163
163
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
164
164
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
165
165
|
method: "GET",
|
|
166
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
166
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
167
167
|
contentType: "application/json",
|
|
168
168
|
requestType: "json",
|
|
169
169
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -256,7 +256,7 @@ class Document {
|
|
|
256
256
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
257
257
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
258
258
|
method: "POST",
|
|
259
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
259
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
260
260
|
contentType: "application/json",
|
|
261
261
|
requestType: "json",
|
|
262
262
|
body: serializers.CreateDocumentCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -349,7 +349,7 @@ class Document {
|
|
|
349
349
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
350
350
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
351
351
|
method: "DELETE",
|
|
352
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
352
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
353
353
|
contentType: "application/json",
|
|
354
354
|
requestType: "json",
|
|
355
355
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -442,7 +442,7 @@ class Document {
|
|
|
442
442
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
443
443
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
444
444
|
method: "PATCH",
|
|
445
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
445
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
446
446
|
contentType: "application/json",
|
|
447
447
|
requestType: "json",
|
|
448
448
|
body: serializers.UpdateDocumentCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -537,7 +537,7 @@ class Document {
|
|
|
537
537
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
538
538
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents`),
|
|
539
539
|
method: "POST",
|
|
540
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
540
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
541
541
|
contentType: "application/json",
|
|
542
542
|
requestType: "json",
|
|
543
543
|
body: serializers.document.addDocuments.Request.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -622,7 +622,7 @@ class Document {
|
|
|
622
622
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
623
623
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchDelete`),
|
|
624
624
|
method: "POST",
|
|
625
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
625
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
626
626
|
contentType: "application/json",
|
|
627
627
|
requestType: "json",
|
|
628
628
|
body: serializers.document.batchDeleteDocuments.Request.jsonOrThrow(request, {
|
|
@@ -709,7 +709,7 @@ class Document {
|
|
|
709
709
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
710
710
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchGet`),
|
|
711
711
|
method: "POST",
|
|
712
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
712
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
713
713
|
contentType: "application/json",
|
|
714
714
|
requestType: "json",
|
|
715
715
|
body: serializers.GetDocumentListRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -796,7 +796,7 @@ class Document {
|
|
|
796
796
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
797
797
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchUpdate`),
|
|
798
798
|
method: "PATCH",
|
|
799
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
799
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
800
800
|
contentType: "application/json",
|
|
801
801
|
requestType: "json",
|
|
802
802
|
body: serializers.document.batchUpdateDocuments.Request.jsonOrThrow(request, {
|
|
@@ -883,7 +883,7 @@ class Document {
|
|
|
883
883
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
884
884
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
|
|
885
885
|
method: "GET",
|
|
886
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
886
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
887
887
|
contentType: "application/json",
|
|
888
888
|
requestType: "json",
|
|
889
889
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -968,7 +968,7 @@ class Document {
|
|
|
968
968
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
969
969
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
|
|
970
970
|
method: "DELETE",
|
|
971
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
971
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
972
972
|
contentType: "application/json",
|
|
973
973
|
requestType: "json",
|
|
974
974
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1062,7 +1062,7 @@ class Document {
|
|
|
1062
1062
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1063
1063
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
|
|
1064
1064
|
method: "PATCH",
|
|
1065
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
1065
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
1066
1066
|
contentType: "application/json",
|
|
1067
1067
|
requestType: "json",
|
|
1068
1068
|
body: serializers.UpdateDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1160,7 +1160,7 @@ class Document {
|
|
|
1160
1160
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1161
1161
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/search`),
|
|
1162
1162
|
method: "POST",
|
|
1163
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
1163
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
1164
1164
|
contentType: "application/json",
|
|
1165
1165
|
queryParameters: _queryParams,
|
|
1166
1166
|
requestType: "json",
|
|
@@ -33,6 +33,36 @@ export declare class Graph {
|
|
|
33
33
|
get edge(): Edge;
|
|
34
34
|
get episode(): Episode;
|
|
35
35
|
get node(): Node;
|
|
36
|
+
/**
|
|
37
|
+
* Returns all entity types for a project.
|
|
38
|
+
*
|
|
39
|
+
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
41
|
+
* @throws {@link Zep.NotFoundError}
|
|
42
|
+
* @throws {@link Zep.InternalServerError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.graph.listEntityTypes()
|
|
46
|
+
*/
|
|
47
|
+
listEntityTypes(requestOptions?: Graph.RequestOptions): Promise<Zep.EntityTypeResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Sets the entity types for a project, replacing any existing ones.
|
|
50
|
+
*
|
|
51
|
+
* @param {Zep.EntityTypeRequest} request
|
|
52
|
+
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link Zep.BadRequestError}
|
|
55
|
+
* @throws {@link Zep.InternalServerError}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await client.graph.setEntityTypesInternal({
|
|
59
|
+
* entityTypes: [{
|
|
60
|
+
* description: "description",
|
|
61
|
+
* name: "name"
|
|
62
|
+
* }]
|
|
63
|
+
* })
|
|
64
|
+
*/
|
|
65
|
+
setEntityTypesInternal(request: Zep.EntityTypeRequest, requestOptions?: Graph.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
36
66
|
/**
|
|
37
67
|
* Add data to the graph. Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
|
|
38
68
|
*
|
|
@@ -52,8 +52,8 @@ exports.Graph = 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 serializers = __importStar(require("../../../../serialization/index"));
|
|
56
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
57
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
58
|
const Client_1 = require("../resources/edge/client/Client");
|
|
59
59
|
const Client_2 = require("../resources/episode/client/Client");
|
|
@@ -74,6 +74,159 @@ class Graph {
|
|
|
74
74
|
var _a;
|
|
75
75
|
return ((_a = this._node) !== null && _a !== void 0 ? _a : (this._node = new Client_3.Node(this._options)));
|
|
76
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Returns all entity types for a project.
|
|
79
|
+
*
|
|
80
|
+
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link Zep.NotFoundError}
|
|
83
|
+
* @throws {@link Zep.InternalServerError}
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* await client.graph.listEntityTypes()
|
|
87
|
+
*/
|
|
88
|
+
listEntityTypes(requestOptions) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
92
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "entity-types"),
|
|
93
|
+
method: "GET",
|
|
94
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
95
|
+
contentType: "application/json",
|
|
96
|
+
requestType: "json",
|
|
97
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
98
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
99
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
100
|
+
});
|
|
101
|
+
if (_response.ok) {
|
|
102
|
+
return serializers.EntityTypeResponse.parseOrThrow(_response.body, {
|
|
103
|
+
unrecognizedObjectKeys: "passthrough",
|
|
104
|
+
allowUnrecognizedUnionMembers: true,
|
|
105
|
+
allowUnrecognizedEnumValues: true,
|
|
106
|
+
skipValidation: true,
|
|
107
|
+
breadcrumbsPrefix: ["response"],
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
if (_response.error.reason === "status-code") {
|
|
111
|
+
switch (_response.error.statusCode) {
|
|
112
|
+
case 404:
|
|
113
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
114
|
+
unrecognizedObjectKeys: "passthrough",
|
|
115
|
+
allowUnrecognizedUnionMembers: true,
|
|
116
|
+
allowUnrecognizedEnumValues: true,
|
|
117
|
+
skipValidation: true,
|
|
118
|
+
breadcrumbsPrefix: ["response"],
|
|
119
|
+
}));
|
|
120
|
+
case 500:
|
|
121
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
122
|
+
unrecognizedObjectKeys: "passthrough",
|
|
123
|
+
allowUnrecognizedUnionMembers: true,
|
|
124
|
+
allowUnrecognizedEnumValues: true,
|
|
125
|
+
skipValidation: true,
|
|
126
|
+
breadcrumbsPrefix: ["response"],
|
|
127
|
+
}));
|
|
128
|
+
default:
|
|
129
|
+
throw new errors.ZepError({
|
|
130
|
+
statusCode: _response.error.statusCode,
|
|
131
|
+
body: _response.error.body,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
switch (_response.error.reason) {
|
|
136
|
+
case "non-json":
|
|
137
|
+
throw new errors.ZepError({
|
|
138
|
+
statusCode: _response.error.statusCode,
|
|
139
|
+
body: _response.error.rawBody,
|
|
140
|
+
});
|
|
141
|
+
case "timeout":
|
|
142
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /entity-types.");
|
|
143
|
+
case "unknown":
|
|
144
|
+
throw new errors.ZepError({
|
|
145
|
+
message: _response.error.errorMessage,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Sets the entity types for a project, replacing any existing ones.
|
|
152
|
+
*
|
|
153
|
+
* @param {Zep.EntityTypeRequest} request
|
|
154
|
+
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
155
|
+
*
|
|
156
|
+
* @throws {@link Zep.BadRequestError}
|
|
157
|
+
* @throws {@link Zep.InternalServerError}
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* await client.graph.setEntityTypesInternal({
|
|
161
|
+
* entityTypes: [{
|
|
162
|
+
* description: "description",
|
|
163
|
+
* name: "name"
|
|
164
|
+
* }]
|
|
165
|
+
* })
|
|
166
|
+
*/
|
|
167
|
+
setEntityTypesInternal(request, requestOptions) {
|
|
168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
var _a, _b;
|
|
170
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
171
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "entity-types"),
|
|
172
|
+
method: "PUT",
|
|
173
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
174
|
+
contentType: "application/json",
|
|
175
|
+
requestType: "json",
|
|
176
|
+
body: serializers.EntityTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
177
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
178
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
179
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
180
|
+
});
|
|
181
|
+
if (_response.ok) {
|
|
182
|
+
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
183
|
+
unrecognizedObjectKeys: "passthrough",
|
|
184
|
+
allowUnrecognizedUnionMembers: true,
|
|
185
|
+
allowUnrecognizedEnumValues: true,
|
|
186
|
+
skipValidation: true,
|
|
187
|
+
breadcrumbsPrefix: ["response"],
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
if (_response.error.reason === "status-code") {
|
|
191
|
+
switch (_response.error.statusCode) {
|
|
192
|
+
case 400:
|
|
193
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
194
|
+
unrecognizedObjectKeys: "passthrough",
|
|
195
|
+
allowUnrecognizedUnionMembers: true,
|
|
196
|
+
allowUnrecognizedEnumValues: true,
|
|
197
|
+
skipValidation: true,
|
|
198
|
+
breadcrumbsPrefix: ["response"],
|
|
199
|
+
}));
|
|
200
|
+
case 500:
|
|
201
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
202
|
+
unrecognizedObjectKeys: "passthrough",
|
|
203
|
+
allowUnrecognizedUnionMembers: true,
|
|
204
|
+
allowUnrecognizedEnumValues: true,
|
|
205
|
+
skipValidation: true,
|
|
206
|
+
breadcrumbsPrefix: ["response"],
|
|
207
|
+
}));
|
|
208
|
+
default:
|
|
209
|
+
throw new errors.ZepError({
|
|
210
|
+
statusCode: _response.error.statusCode,
|
|
211
|
+
body: _response.error.body,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
switch (_response.error.reason) {
|
|
216
|
+
case "non-json":
|
|
217
|
+
throw new errors.ZepError({
|
|
218
|
+
statusCode: _response.error.statusCode,
|
|
219
|
+
body: _response.error.rawBody,
|
|
220
|
+
});
|
|
221
|
+
case "timeout":
|
|
222
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling PUT /entity-types.");
|
|
223
|
+
case "unknown":
|
|
224
|
+
throw new errors.ZepError({
|
|
225
|
+
message: _response.error.errorMessage,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}
|
|
77
230
|
/**
|
|
78
231
|
* Add data to the graph. Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
|
|
79
232
|
*
|
|
@@ -92,7 +245,7 @@ class Graph {
|
|
|
92
245
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
93
246
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "graph"),
|
|
94
247
|
method: "POST",
|
|
95
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
248
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
96
249
|
contentType: "application/json",
|
|
97
250
|
requestType: "json",
|
|
98
251
|
body: serializers.AddDataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -171,7 +324,7 @@ class Graph {
|
|
|
171
324
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
172
325
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "graph/add-fact-triple"),
|
|
173
326
|
method: "POST",
|
|
174
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
327
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
175
328
|
contentType: "application/json",
|
|
176
329
|
requestType: "json",
|
|
177
330
|
body: serializers.AddTripleRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -248,7 +401,7 @@ class Graph {
|
|
|
248
401
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
249
402
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "graph/search"),
|
|
250
403
|
method: "POST",
|
|
251
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
404
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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),
|
|
252
405
|
contentType: "application/json",
|
|
253
406
|
requestType: "json",
|
|
254
407
|
body: serializers.GraphSearchQuery.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Zep from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* entityTypes: [{
|
|
9
|
+
* description: "description",
|
|
10
|
+
* name: "name"
|
|
11
|
+
* }]
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface EntityTypeRequest {
|
|
15
|
+
entityTypes: Zep.EntityType[];
|
|
16
|
+
}
|
|
@@ -15,6 +15,8 @@ export interface GraphSearchQuery {
|
|
|
15
15
|
groupId?: string;
|
|
16
16
|
/** The maximum number of facts to retrieve. Defaults to 10. Limited to 50. */
|
|
17
17
|
limit?: number;
|
|
18
|
+
/** The minimum rating by which to filter relevant facts */
|
|
19
|
+
minFactRating?: number;
|
|
18
20
|
/** Deprecated */
|
|
19
21
|
minScore?: number;
|
|
20
22
|
/** weighting for maximal marginal relevance */
|
|
@@ -77,7 +77,7 @@ class Edge {
|
|
|
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, `graph/edge/group/${encodeURIComponent(groupId)}`),
|
|
79
79
|
method: "GET",
|
|
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.8.0", "User-Agent": "zep-cloud/2.8.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
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -151,7 +151,7 @@ class Edge {
|
|
|
151
151
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
152
152
|
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
153
|
method: "GET",
|
|
154
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
154
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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
155
|
contentType: "application/json",
|
|
156
156
|
requestType: "json",
|
|
157
157
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -226,7 +226,7 @@ class Edge {
|
|
|
226
226
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
227
227
|
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
228
|
method: "GET",
|
|
229
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
229
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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
230
|
contentType: "application/json",
|
|
231
231
|
requestType: "json",
|
|
232
232
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -308,7 +308,7 @@ class Edge {
|
|
|
308
308
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
309
309
|
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
310
|
method: "DELETE",
|
|
311
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.
|
|
311
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.8.0", "User-Agent": "zep-cloud/2.8.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
312
|
contentType: "application/json",
|
|
313
313
|
requestType: "json",
|
|
314
314
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -79,6 +79,19 @@ export declare class Episode {
|
|
|
79
79
|
* await client.graph.episode.delete("uuid")
|
|
80
80
|
*/
|
|
81
81
|
delete(uuid: string, requestOptions?: Episode.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* Returns nodes and edges mentioned in an episode
|
|
84
|
+
*
|
|
85
|
+
* @param {string} uuid - Episode uuid
|
|
86
|
+
* @param {Episode.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link Zep.BadRequestError}
|
|
89
|
+
* @throws {@link Zep.InternalServerError}
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* await client.graph.episode.getNodesAndEdges("uuid")
|
|
93
|
+
*/
|
|
94
|
+
getNodesAndEdges(uuid: string, requestOptions?: Episode.RequestOptions): Promise<Zep.GraphSearchResults>;
|
|
82
95
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
83
96
|
Authorization: string;
|
|
84
97
|
}>;
|