@getzep/zep-cloud 3.0.4 → 3.0.5
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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/graph/client/Client.d.ts +16 -16
- package/dist/cjs/api/resources/graph/client/Client.js +56 -56
- package/dist/cjs/api/resources/graph/client/requests/index.d.ts +1 -1
- package/dist/cjs/serialization/resources/graph/client/requests/index.d.ts +1 -1
- package/dist/cjs/serialization/resources/graph/client/requests/index.js +3 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/graph/client/Client.d.mts +16 -16
- package/dist/esm/api/resources/graph/client/Client.mjs +56 -56
- package/dist/esm/api/resources/graph/client/requests/index.d.mts +1 -1
- package/dist/esm/serialization/resources/graph/client/requests/index.d.mts +1 -1
- package/dist/esm/serialization/resources/graph/client/requests/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +15 -15
package/dist/cjs/Client.js
CHANGED
|
@@ -47,8 +47,8 @@ class ZepClient {
|
|
|
47
47
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
48
48
|
"X-Fern-Language": "JavaScript",
|
|
49
49
|
"X-Fern-SDK-Name": "zep-cloud",
|
|
50
|
-
"X-Fern-SDK-Version": "3.0.
|
|
51
|
-
"User-Agent": "zep-cloud/3.0.
|
|
50
|
+
"X-Fern-SDK-Version": "3.0.5",
|
|
51
|
+
"User-Agent": "zep-cloud/3.0.5",
|
|
52
52
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
53
53
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
54
54
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -132,22 +132,6 @@ export declare class Graph {
|
|
|
132
132
|
*/
|
|
133
133
|
clone(request?: Zep.CloneGraphRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.CloneGraphResponse>;
|
|
134
134
|
private __clone;
|
|
135
|
-
/**
|
|
136
|
-
* Perform a graph search query.
|
|
137
|
-
*
|
|
138
|
-
* @param {Zep.GraphSearchQuery} request
|
|
139
|
-
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
140
|
-
*
|
|
141
|
-
* @throws {@link Zep.BadRequestError}
|
|
142
|
-
* @throws {@link Zep.InternalServerError}
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
* await client.graph.search({
|
|
146
|
-
* query: "query"
|
|
147
|
-
* })
|
|
148
|
-
*/
|
|
149
|
-
search(request: Zep.GraphSearchQuery, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.GraphSearchResults>;
|
|
150
|
-
private __search;
|
|
151
135
|
/**
|
|
152
136
|
* Creates a new graph.
|
|
153
137
|
*
|
|
@@ -178,6 +162,22 @@ export declare class Graph {
|
|
|
178
162
|
*/
|
|
179
163
|
listAll(request?: Zep.GraphListAllRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.GraphListResponse>;
|
|
180
164
|
private __listAll;
|
|
165
|
+
/**
|
|
166
|
+
* Perform a graph search query.
|
|
167
|
+
*
|
|
168
|
+
* @param {Zep.GraphSearchQuery} request
|
|
169
|
+
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
170
|
+
*
|
|
171
|
+
* @throws {@link Zep.BadRequestError}
|
|
172
|
+
* @throws {@link Zep.InternalServerError}
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* await client.graph.search({
|
|
176
|
+
* query: "query"
|
|
177
|
+
* })
|
|
178
|
+
*/
|
|
179
|
+
search(request: Zep.GraphSearchQuery, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.GraphSearchResults>;
|
|
180
|
+
private __search;
|
|
181
181
|
/**
|
|
182
182
|
* Returns a graph.
|
|
183
183
|
*
|
|
@@ -599,32 +599,32 @@ class Graph {
|
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
601
|
/**
|
|
602
|
-
*
|
|
602
|
+
* Creates a new graph.
|
|
603
603
|
*
|
|
604
|
-
* @param {Zep.
|
|
604
|
+
* @param {Zep.CreateGraphRequest} request
|
|
605
605
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
606
606
|
*
|
|
607
607
|
* @throws {@link Zep.BadRequestError}
|
|
608
608
|
* @throws {@link Zep.InternalServerError}
|
|
609
609
|
*
|
|
610
610
|
* @example
|
|
611
|
-
* await client.graph.
|
|
612
|
-
*
|
|
611
|
+
* await client.graph.create({
|
|
612
|
+
* graphId: "graph_id"
|
|
613
613
|
* })
|
|
614
614
|
*/
|
|
615
|
-
|
|
616
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
615
|
+
create(request, requestOptions) {
|
|
616
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
617
617
|
}
|
|
618
|
-
|
|
618
|
+
__create(request, requestOptions) {
|
|
619
619
|
return __awaiter(this, void 0, void 0, function* () {
|
|
620
620
|
var _a, _b, _c, _d;
|
|
621
621
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
622
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/
|
|
622
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/create"),
|
|
623
623
|
method: "POST",
|
|
624
624
|
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
625
625
|
contentType: "application/json",
|
|
626
626
|
requestType: "json",
|
|
627
|
-
body: serializers.
|
|
627
|
+
body: serializers.CreateGraphRequest.jsonOrThrow(request, {
|
|
628
628
|
unrecognizedObjectKeys: "strip",
|
|
629
629
|
omitUndefined: true,
|
|
630
630
|
}),
|
|
@@ -634,7 +634,7 @@ class Graph {
|
|
|
634
634
|
});
|
|
635
635
|
if (_response.ok) {
|
|
636
636
|
return {
|
|
637
|
-
data: serializers.
|
|
637
|
+
data: serializers.Graph.parseOrThrow(_response.body, {
|
|
638
638
|
unrecognizedObjectKeys: "passthrough",
|
|
639
639
|
allowUnrecognizedUnionMembers: true,
|
|
640
640
|
allowUnrecognizedEnumValues: true,
|
|
@@ -678,7 +678,7 @@ class Graph {
|
|
|
678
678
|
rawResponse: _response.rawResponse,
|
|
679
679
|
});
|
|
680
680
|
case "timeout":
|
|
681
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/
|
|
681
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/create.");
|
|
682
682
|
case "unknown":
|
|
683
683
|
throw new errors.ZepError({
|
|
684
684
|
message: _response.error.errorMessage,
|
|
@@ -688,42 +688,43 @@ class Graph {
|
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
690
|
/**
|
|
691
|
-
*
|
|
691
|
+
* Returns all graphs.
|
|
692
692
|
*
|
|
693
|
-
* @param {Zep.
|
|
693
|
+
* @param {Zep.GraphListAllRequest} request
|
|
694
694
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
695
695
|
*
|
|
696
696
|
* @throws {@link Zep.BadRequestError}
|
|
697
697
|
* @throws {@link Zep.InternalServerError}
|
|
698
698
|
*
|
|
699
699
|
* @example
|
|
700
|
-
* await client.graph.
|
|
701
|
-
* graphId: "graph_id"
|
|
702
|
-
* })
|
|
700
|
+
* await client.graph.listAll()
|
|
703
701
|
*/
|
|
704
|
-
|
|
705
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
702
|
+
listAll(request = {}, requestOptions) {
|
|
703
|
+
return core.HttpResponsePromise.fromPromise(this.__listAll(request, requestOptions));
|
|
706
704
|
}
|
|
707
|
-
|
|
708
|
-
return __awaiter(this,
|
|
705
|
+
__listAll() {
|
|
706
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
709
707
|
var _a, _b, _c, _d;
|
|
708
|
+
const { pageNumber, pageSize } = request;
|
|
709
|
+
const _queryParams = {};
|
|
710
|
+
if (pageNumber != null) {
|
|
711
|
+
_queryParams["pageNumber"] = pageNumber.toString();
|
|
712
|
+
}
|
|
713
|
+
if (pageSize != null) {
|
|
714
|
+
_queryParams["pageSize"] = pageSize.toString();
|
|
715
|
+
}
|
|
710
716
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
711
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "
|
|
712
|
-
method: "
|
|
717
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/list-all"),
|
|
718
|
+
method: "GET",
|
|
713
719
|
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
714
|
-
|
|
715
|
-
requestType: "json",
|
|
716
|
-
body: serializers.CreateGraphRequest.jsonOrThrow(request, {
|
|
717
|
-
unrecognizedObjectKeys: "strip",
|
|
718
|
-
omitUndefined: true,
|
|
719
|
-
}),
|
|
720
|
+
queryParameters: _queryParams,
|
|
720
721
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
721
722
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
722
723
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
723
724
|
});
|
|
724
725
|
if (_response.ok) {
|
|
725
726
|
return {
|
|
726
|
-
data: serializers.
|
|
727
|
+
data: serializers.GraphListResponse.parseOrThrow(_response.body, {
|
|
727
728
|
unrecognizedObjectKeys: "passthrough",
|
|
728
729
|
allowUnrecognizedUnionMembers: true,
|
|
729
730
|
allowUnrecognizedEnumValues: true,
|
|
@@ -767,7 +768,7 @@ class Graph {
|
|
|
767
768
|
rawResponse: _response.rawResponse,
|
|
768
769
|
});
|
|
769
770
|
case "timeout":
|
|
770
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling
|
|
771
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/list-all.");
|
|
771
772
|
case "unknown":
|
|
772
773
|
throw new errors.ZepError({
|
|
773
774
|
message: _response.error.errorMessage,
|
|
@@ -777,43 +778,42 @@ class Graph {
|
|
|
777
778
|
});
|
|
778
779
|
}
|
|
779
780
|
/**
|
|
780
|
-
*
|
|
781
|
+
* Perform a graph search query.
|
|
781
782
|
*
|
|
782
|
-
* @param {Zep.
|
|
783
|
+
* @param {Zep.GraphSearchQuery} request
|
|
783
784
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
784
785
|
*
|
|
785
786
|
* @throws {@link Zep.BadRequestError}
|
|
786
787
|
* @throws {@link Zep.InternalServerError}
|
|
787
788
|
*
|
|
788
789
|
* @example
|
|
789
|
-
* await client.graph.
|
|
790
|
+
* await client.graph.search({
|
|
791
|
+
* query: "query"
|
|
792
|
+
* })
|
|
790
793
|
*/
|
|
791
|
-
|
|
792
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
794
|
+
search(request, requestOptions) {
|
|
795
|
+
return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
|
|
793
796
|
}
|
|
794
|
-
|
|
795
|
-
return __awaiter(this,
|
|
797
|
+
__search(request, requestOptions) {
|
|
798
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
796
799
|
var _a, _b, _c, _d;
|
|
797
|
-
const { pageNumber, pageSize } = request;
|
|
798
|
-
const _queryParams = {};
|
|
799
|
-
if (pageNumber != null) {
|
|
800
|
-
_queryParams["pageNumber"] = pageNumber.toString();
|
|
801
|
-
}
|
|
802
|
-
if (pageSize != null) {
|
|
803
|
-
_queryParams["pageSize"] = pageSize.toString();
|
|
804
|
-
}
|
|
805
800
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
806
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "
|
|
807
|
-
method: "
|
|
801
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/search"),
|
|
802
|
+
method: "POST",
|
|
808
803
|
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
809
|
-
|
|
804
|
+
contentType: "application/json",
|
|
805
|
+
requestType: "json",
|
|
806
|
+
body: serializers.GraphSearchQuery.jsonOrThrow(request, {
|
|
807
|
+
unrecognizedObjectKeys: "strip",
|
|
808
|
+
omitUndefined: true,
|
|
809
|
+
}),
|
|
810
810
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
811
811
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
812
812
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
813
813
|
});
|
|
814
814
|
if (_response.ok) {
|
|
815
815
|
return {
|
|
816
|
-
data: serializers.
|
|
816
|
+
data: serializers.GraphSearchResults.parseOrThrow(_response.body, {
|
|
817
817
|
unrecognizedObjectKeys: "passthrough",
|
|
818
818
|
allowUnrecognizedUnionMembers: true,
|
|
819
819
|
allowUnrecognizedEnumValues: true,
|
|
@@ -857,7 +857,7 @@ class Graph {
|
|
|
857
857
|
rawResponse: _response.rawResponse,
|
|
858
858
|
});
|
|
859
859
|
case "timeout":
|
|
860
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling
|
|
860
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/search.");
|
|
861
861
|
case "unknown":
|
|
862
862
|
throw new errors.ZepError({
|
|
863
863
|
message: _response.error.errorMessage,
|
|
@@ -885,7 +885,7 @@ class Graph {
|
|
|
885
885
|
return __awaiter(this, void 0, void 0, function* () {
|
|
886
886
|
var _a, _b, _c, _d;
|
|
887
887
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
888
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `
|
|
888
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `graph/${encodeURIComponent(graphId)}`),
|
|
889
889
|
method: "GET",
|
|
890
890
|
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
891
891
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -938,7 +938,7 @@ class Graph {
|
|
|
938
938
|
rawResponse: _response.rawResponse,
|
|
939
939
|
});
|
|
940
940
|
case "timeout":
|
|
941
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /
|
|
941
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/{graphId}.");
|
|
942
942
|
case "unknown":
|
|
943
943
|
throw new errors.ZepError({
|
|
944
944
|
message: _response.error.errorMessage,
|
|
@@ -967,7 +967,7 @@ class Graph {
|
|
|
967
967
|
return __awaiter(this, void 0, void 0, function* () {
|
|
968
968
|
var _a, _b, _c, _d;
|
|
969
969
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
970
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `
|
|
970
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `graph/${encodeURIComponent(graphId)}`),
|
|
971
971
|
method: "DELETE",
|
|
972
972
|
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
973
973
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1028,7 +1028,7 @@ class Graph {
|
|
|
1028
1028
|
rawResponse: _response.rawResponse,
|
|
1029
1029
|
});
|
|
1030
1030
|
case "timeout":
|
|
1031
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /
|
|
1031
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /graph/{graphId}.");
|
|
1032
1032
|
case "unknown":
|
|
1033
1033
|
throw new errors.ZepError({
|
|
1034
1034
|
message: _response.error.errorMessage,
|
|
@@ -1058,7 +1058,7 @@ class Graph {
|
|
|
1058
1058
|
return __awaiter(this, arguments, void 0, function* (graphId, request = {}, requestOptions) {
|
|
1059
1059
|
var _a, _b, _c, _d;
|
|
1060
1060
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1061
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `
|
|
1061
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `graph/${encodeURIComponent(graphId)}`),
|
|
1062
1062
|
method: "PATCH",
|
|
1063
1063
|
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1064
1064
|
contentType: "application/json",
|
|
@@ -1125,7 +1125,7 @@ class Graph {
|
|
|
1125
1125
|
rawResponse: _response.rawResponse,
|
|
1126
1126
|
});
|
|
1127
1127
|
case "timeout":
|
|
1128
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /
|
|
1128
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /graph/{graphId}.");
|
|
1129
1129
|
case "unknown":
|
|
1130
1130
|
throw new errors.ZepError({
|
|
1131
1131
|
message: _response.error.errorMessage,
|
|
@@ -3,7 +3,7 @@ export { type AddDataRequest } from "./AddDataRequest.js";
|
|
|
3
3
|
export { type AddDataBatchRequest } from "./AddDataBatchRequest.js";
|
|
4
4
|
export { type AddTripleRequest } from "./AddTripleRequest.js";
|
|
5
5
|
export { type CloneGraphRequest } from "./CloneGraphRequest.js";
|
|
6
|
-
export { type GraphSearchQuery } from "./GraphSearchQuery.js";
|
|
7
6
|
export { type CreateGraphRequest } from "./CreateGraphRequest.js";
|
|
8
7
|
export { type GraphListAllRequest } from "./GraphListAllRequest.js";
|
|
8
|
+
export { type GraphSearchQuery } from "./GraphSearchQuery.js";
|
|
9
9
|
export { type UpdateGraphRequest } from "./UpdateGraphRequest.js";
|
|
@@ -3,6 +3,6 @@ export { AddDataRequest } from "./AddDataRequest.js";
|
|
|
3
3
|
export { AddDataBatchRequest } from "./AddDataBatchRequest.js";
|
|
4
4
|
export { AddTripleRequest } from "./AddTripleRequest.js";
|
|
5
5
|
export { CloneGraphRequest } from "./CloneGraphRequest.js";
|
|
6
|
-
export { GraphSearchQuery } from "./GraphSearchQuery.js";
|
|
7
6
|
export { CreateGraphRequest } from "./CreateGraphRequest.js";
|
|
7
|
+
export { GraphSearchQuery } from "./GraphSearchQuery.js";
|
|
8
8
|
export { UpdateGraphRequest } from "./UpdateGraphRequest.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateGraphRequest = exports.
|
|
3
|
+
exports.UpdateGraphRequest = exports.GraphSearchQuery = exports.CreateGraphRequest = exports.CloneGraphRequest = exports.AddTripleRequest = exports.AddDataBatchRequest = exports.AddDataRequest = exports.EntityTypeRequest = void 0;
|
|
4
4
|
var EntityTypeRequest_js_1 = require("./EntityTypeRequest.js");
|
|
5
5
|
Object.defineProperty(exports, "EntityTypeRequest", { enumerable: true, get: function () { return EntityTypeRequest_js_1.EntityTypeRequest; } });
|
|
6
6
|
var AddDataRequest_js_1 = require("./AddDataRequest.js");
|
|
@@ -11,9 +11,9 @@ var AddTripleRequest_js_1 = require("./AddTripleRequest.js");
|
|
|
11
11
|
Object.defineProperty(exports, "AddTripleRequest", { enumerable: true, get: function () { return AddTripleRequest_js_1.AddTripleRequest; } });
|
|
12
12
|
var CloneGraphRequest_js_1 = require("./CloneGraphRequest.js");
|
|
13
13
|
Object.defineProperty(exports, "CloneGraphRequest", { enumerable: true, get: function () { return CloneGraphRequest_js_1.CloneGraphRequest; } });
|
|
14
|
-
var GraphSearchQuery_js_1 = require("./GraphSearchQuery.js");
|
|
15
|
-
Object.defineProperty(exports, "GraphSearchQuery", { enumerable: true, get: function () { return GraphSearchQuery_js_1.GraphSearchQuery; } });
|
|
16
14
|
var CreateGraphRequest_js_1 = require("./CreateGraphRequest.js");
|
|
17
15
|
Object.defineProperty(exports, "CreateGraphRequest", { enumerable: true, get: function () { return CreateGraphRequest_js_1.CreateGraphRequest; } });
|
|
16
|
+
var GraphSearchQuery_js_1 = require("./GraphSearchQuery.js");
|
|
17
|
+
Object.defineProperty(exports, "GraphSearchQuery", { enumerable: true, get: function () { return GraphSearchQuery_js_1.GraphSearchQuery; } });
|
|
18
18
|
var UpdateGraphRequest_js_1 = require("./UpdateGraphRequest.js");
|
|
19
19
|
Object.defineProperty(exports, "UpdateGraphRequest", { enumerable: true, get: function () { return UpdateGraphRequest_js_1.UpdateGraphRequest; } });
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.0.
|
|
1
|
+
export declare const SDK_VERSION = "3.0.5";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -11,8 +11,8 @@ export class ZepClient {
|
|
|
11
11
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
12
12
|
"X-Fern-Language": "JavaScript",
|
|
13
13
|
"X-Fern-SDK-Name": "zep-cloud",
|
|
14
|
-
"X-Fern-SDK-Version": "3.0.
|
|
15
|
-
"User-Agent": "zep-cloud/3.0.
|
|
14
|
+
"X-Fern-SDK-Version": "3.0.5",
|
|
15
|
+
"User-Agent": "zep-cloud/3.0.5",
|
|
16
16
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
17
17
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
18
18
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -132,22 +132,6 @@ export declare class Graph {
|
|
|
132
132
|
*/
|
|
133
133
|
clone(request?: Zep.CloneGraphRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.CloneGraphResponse>;
|
|
134
134
|
private __clone;
|
|
135
|
-
/**
|
|
136
|
-
* Perform a graph search query.
|
|
137
|
-
*
|
|
138
|
-
* @param {Zep.GraphSearchQuery} request
|
|
139
|
-
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
140
|
-
*
|
|
141
|
-
* @throws {@link Zep.BadRequestError}
|
|
142
|
-
* @throws {@link Zep.InternalServerError}
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
* await client.graph.search({
|
|
146
|
-
* query: "query"
|
|
147
|
-
* })
|
|
148
|
-
*/
|
|
149
|
-
search(request: Zep.GraphSearchQuery, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.GraphSearchResults>;
|
|
150
|
-
private __search;
|
|
151
135
|
/**
|
|
152
136
|
* Creates a new graph.
|
|
153
137
|
*
|
|
@@ -178,6 +162,22 @@ export declare class Graph {
|
|
|
178
162
|
*/
|
|
179
163
|
listAll(request?: Zep.GraphListAllRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.GraphListResponse>;
|
|
180
164
|
private __listAll;
|
|
165
|
+
/**
|
|
166
|
+
* Perform a graph search query.
|
|
167
|
+
*
|
|
168
|
+
* @param {Zep.GraphSearchQuery} request
|
|
169
|
+
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
170
|
+
*
|
|
171
|
+
* @throws {@link Zep.BadRequestError}
|
|
172
|
+
* @throws {@link Zep.InternalServerError}
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* await client.graph.search({
|
|
176
|
+
* query: "query"
|
|
177
|
+
* })
|
|
178
|
+
*/
|
|
179
|
+
search(request: Zep.GraphSearchQuery, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.GraphSearchResults>;
|
|
180
|
+
private __search;
|
|
181
181
|
/**
|
|
182
182
|
* Returns a graph.
|
|
183
183
|
*
|
|
@@ -563,32 +563,32 @@ export class Graph {
|
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
565
|
/**
|
|
566
|
-
*
|
|
566
|
+
* Creates a new graph.
|
|
567
567
|
*
|
|
568
|
-
* @param {Zep.
|
|
568
|
+
* @param {Zep.CreateGraphRequest} request
|
|
569
569
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
570
570
|
*
|
|
571
571
|
* @throws {@link Zep.BadRequestError}
|
|
572
572
|
* @throws {@link Zep.InternalServerError}
|
|
573
573
|
*
|
|
574
574
|
* @example
|
|
575
|
-
* await client.graph.
|
|
576
|
-
*
|
|
575
|
+
* await client.graph.create({
|
|
576
|
+
* graphId: "graph_id"
|
|
577
577
|
* })
|
|
578
578
|
*/
|
|
579
|
-
|
|
580
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
579
|
+
create(request, requestOptions) {
|
|
580
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
581
581
|
}
|
|
582
|
-
|
|
582
|
+
__create(request, requestOptions) {
|
|
583
583
|
return __awaiter(this, void 0, void 0, function* () {
|
|
584
584
|
var _a, _b, _c, _d;
|
|
585
585
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
586
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/
|
|
586
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/create"),
|
|
587
587
|
method: "POST",
|
|
588
588
|
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
589
589
|
contentType: "application/json",
|
|
590
590
|
requestType: "json",
|
|
591
|
-
body: serializers.
|
|
591
|
+
body: serializers.CreateGraphRequest.jsonOrThrow(request, {
|
|
592
592
|
unrecognizedObjectKeys: "strip",
|
|
593
593
|
omitUndefined: true,
|
|
594
594
|
}),
|
|
@@ -598,7 +598,7 @@ export class Graph {
|
|
|
598
598
|
});
|
|
599
599
|
if (_response.ok) {
|
|
600
600
|
return {
|
|
601
|
-
data: serializers.
|
|
601
|
+
data: serializers.Graph.parseOrThrow(_response.body, {
|
|
602
602
|
unrecognizedObjectKeys: "passthrough",
|
|
603
603
|
allowUnrecognizedUnionMembers: true,
|
|
604
604
|
allowUnrecognizedEnumValues: true,
|
|
@@ -642,7 +642,7 @@ export class Graph {
|
|
|
642
642
|
rawResponse: _response.rawResponse,
|
|
643
643
|
});
|
|
644
644
|
case "timeout":
|
|
645
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/
|
|
645
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/create.");
|
|
646
646
|
case "unknown":
|
|
647
647
|
throw new errors.ZepError({
|
|
648
648
|
message: _response.error.errorMessage,
|
|
@@ -652,42 +652,43 @@ export class Graph {
|
|
|
652
652
|
});
|
|
653
653
|
}
|
|
654
654
|
/**
|
|
655
|
-
*
|
|
655
|
+
* Returns all graphs.
|
|
656
656
|
*
|
|
657
|
-
* @param {Zep.
|
|
657
|
+
* @param {Zep.GraphListAllRequest} request
|
|
658
658
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
659
659
|
*
|
|
660
660
|
* @throws {@link Zep.BadRequestError}
|
|
661
661
|
* @throws {@link Zep.InternalServerError}
|
|
662
662
|
*
|
|
663
663
|
* @example
|
|
664
|
-
* await client.graph.
|
|
665
|
-
* graphId: "graph_id"
|
|
666
|
-
* })
|
|
664
|
+
* await client.graph.listAll()
|
|
667
665
|
*/
|
|
668
|
-
|
|
669
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
666
|
+
listAll(request = {}, requestOptions) {
|
|
667
|
+
return core.HttpResponsePromise.fromPromise(this.__listAll(request, requestOptions));
|
|
670
668
|
}
|
|
671
|
-
|
|
672
|
-
return __awaiter(this,
|
|
669
|
+
__listAll() {
|
|
670
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
673
671
|
var _a, _b, _c, _d;
|
|
672
|
+
const { pageNumber, pageSize } = request;
|
|
673
|
+
const _queryParams = {};
|
|
674
|
+
if (pageNumber != null) {
|
|
675
|
+
_queryParams["pageNumber"] = pageNumber.toString();
|
|
676
|
+
}
|
|
677
|
+
if (pageSize != null) {
|
|
678
|
+
_queryParams["pageSize"] = pageSize.toString();
|
|
679
|
+
}
|
|
674
680
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
675
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "
|
|
676
|
-
method: "
|
|
681
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/list-all"),
|
|
682
|
+
method: "GET",
|
|
677
683
|
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
678
|
-
|
|
679
|
-
requestType: "json",
|
|
680
|
-
body: serializers.CreateGraphRequest.jsonOrThrow(request, {
|
|
681
|
-
unrecognizedObjectKeys: "strip",
|
|
682
|
-
omitUndefined: true,
|
|
683
|
-
}),
|
|
684
|
+
queryParameters: _queryParams,
|
|
684
685
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
685
686
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
686
687
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
687
688
|
});
|
|
688
689
|
if (_response.ok) {
|
|
689
690
|
return {
|
|
690
|
-
data: serializers.
|
|
691
|
+
data: serializers.GraphListResponse.parseOrThrow(_response.body, {
|
|
691
692
|
unrecognizedObjectKeys: "passthrough",
|
|
692
693
|
allowUnrecognizedUnionMembers: true,
|
|
693
694
|
allowUnrecognizedEnumValues: true,
|
|
@@ -731,7 +732,7 @@ export class Graph {
|
|
|
731
732
|
rawResponse: _response.rawResponse,
|
|
732
733
|
});
|
|
733
734
|
case "timeout":
|
|
734
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling
|
|
735
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/list-all.");
|
|
735
736
|
case "unknown":
|
|
736
737
|
throw new errors.ZepError({
|
|
737
738
|
message: _response.error.errorMessage,
|
|
@@ -741,43 +742,42 @@ export class Graph {
|
|
|
741
742
|
});
|
|
742
743
|
}
|
|
743
744
|
/**
|
|
744
|
-
*
|
|
745
|
+
* Perform a graph search query.
|
|
745
746
|
*
|
|
746
|
-
* @param {Zep.
|
|
747
|
+
* @param {Zep.GraphSearchQuery} request
|
|
747
748
|
* @param {Graph.RequestOptions} requestOptions - Request-specific configuration.
|
|
748
749
|
*
|
|
749
750
|
* @throws {@link Zep.BadRequestError}
|
|
750
751
|
* @throws {@link Zep.InternalServerError}
|
|
751
752
|
*
|
|
752
753
|
* @example
|
|
753
|
-
* await client.graph.
|
|
754
|
+
* await client.graph.search({
|
|
755
|
+
* query: "query"
|
|
756
|
+
* })
|
|
754
757
|
*/
|
|
755
|
-
|
|
756
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
758
|
+
search(request, requestOptions) {
|
|
759
|
+
return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
|
|
757
760
|
}
|
|
758
|
-
|
|
759
|
-
return __awaiter(this,
|
|
761
|
+
__search(request, requestOptions) {
|
|
762
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
760
763
|
var _a, _b, _c, _d;
|
|
761
|
-
const { pageNumber, pageSize } = request;
|
|
762
|
-
const _queryParams = {};
|
|
763
|
-
if (pageNumber != null) {
|
|
764
|
-
_queryParams["pageNumber"] = pageNumber.toString();
|
|
765
|
-
}
|
|
766
|
-
if (pageSize != null) {
|
|
767
|
-
_queryParams["pageSize"] = pageSize.toString();
|
|
768
|
-
}
|
|
769
764
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
770
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "
|
|
771
|
-
method: "
|
|
765
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, "graph/search"),
|
|
766
|
+
method: "POST",
|
|
772
767
|
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
773
|
-
|
|
768
|
+
contentType: "application/json",
|
|
769
|
+
requestType: "json",
|
|
770
|
+
body: serializers.GraphSearchQuery.jsonOrThrow(request, {
|
|
771
|
+
unrecognizedObjectKeys: "strip",
|
|
772
|
+
omitUndefined: true,
|
|
773
|
+
}),
|
|
774
774
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
775
775
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
776
776
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
777
777
|
});
|
|
778
778
|
if (_response.ok) {
|
|
779
779
|
return {
|
|
780
|
-
data: serializers.
|
|
780
|
+
data: serializers.GraphSearchResults.parseOrThrow(_response.body, {
|
|
781
781
|
unrecognizedObjectKeys: "passthrough",
|
|
782
782
|
allowUnrecognizedUnionMembers: true,
|
|
783
783
|
allowUnrecognizedEnumValues: true,
|
|
@@ -821,7 +821,7 @@ export class Graph {
|
|
|
821
821
|
rawResponse: _response.rawResponse,
|
|
822
822
|
});
|
|
823
823
|
case "timeout":
|
|
824
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling
|
|
824
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/search.");
|
|
825
825
|
case "unknown":
|
|
826
826
|
throw new errors.ZepError({
|
|
827
827
|
message: _response.error.errorMessage,
|
|
@@ -849,7 +849,7 @@ export class Graph {
|
|
|
849
849
|
return __awaiter(this, void 0, void 0, function* () {
|
|
850
850
|
var _a, _b, _c, _d;
|
|
851
851
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
852
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `
|
|
852
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `graph/${encodeURIComponent(graphId)}`),
|
|
853
853
|
method: "GET",
|
|
854
854
|
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
855
855
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -902,7 +902,7 @@ export class Graph {
|
|
|
902
902
|
rawResponse: _response.rawResponse,
|
|
903
903
|
});
|
|
904
904
|
case "timeout":
|
|
905
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /
|
|
905
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/{graphId}.");
|
|
906
906
|
case "unknown":
|
|
907
907
|
throw new errors.ZepError({
|
|
908
908
|
message: _response.error.errorMessage,
|
|
@@ -931,7 +931,7 @@ export class Graph {
|
|
|
931
931
|
return __awaiter(this, void 0, void 0, function* () {
|
|
932
932
|
var _a, _b, _c, _d;
|
|
933
933
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
934
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `
|
|
934
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `graph/${encodeURIComponent(graphId)}`),
|
|
935
935
|
method: "DELETE",
|
|
936
936
|
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
937
937
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -992,7 +992,7 @@ export class Graph {
|
|
|
992
992
|
rawResponse: _response.rawResponse,
|
|
993
993
|
});
|
|
994
994
|
case "timeout":
|
|
995
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /
|
|
995
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /graph/{graphId}.");
|
|
996
996
|
case "unknown":
|
|
997
997
|
throw new errors.ZepError({
|
|
998
998
|
message: _response.error.errorMessage,
|
|
@@ -1022,7 +1022,7 @@ export class Graph {
|
|
|
1022
1022
|
return __awaiter(this, arguments, void 0, function* (graphId, request = {}, requestOptions) {
|
|
1023
1023
|
var _a, _b, _c, _d;
|
|
1024
1024
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1025
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `
|
|
1025
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ZepEnvironment.Default, `graph/${encodeURIComponent(graphId)}`),
|
|
1026
1026
|
method: "PATCH",
|
|
1027
1027
|
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1028
1028
|
contentType: "application/json",
|
|
@@ -1089,7 +1089,7 @@ export class Graph {
|
|
|
1089
1089
|
rawResponse: _response.rawResponse,
|
|
1090
1090
|
});
|
|
1091
1091
|
case "timeout":
|
|
1092
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /
|
|
1092
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /graph/{graphId}.");
|
|
1093
1093
|
case "unknown":
|
|
1094
1094
|
throw new errors.ZepError({
|
|
1095
1095
|
message: _response.error.errorMessage,
|
|
@@ -3,7 +3,7 @@ export { type AddDataRequest } from "./AddDataRequest.mjs";
|
|
|
3
3
|
export { type AddDataBatchRequest } from "./AddDataBatchRequest.mjs";
|
|
4
4
|
export { type AddTripleRequest } from "./AddTripleRequest.mjs";
|
|
5
5
|
export { type CloneGraphRequest } from "./CloneGraphRequest.mjs";
|
|
6
|
-
export { type GraphSearchQuery } from "./GraphSearchQuery.mjs";
|
|
7
6
|
export { type CreateGraphRequest } from "./CreateGraphRequest.mjs";
|
|
8
7
|
export { type GraphListAllRequest } from "./GraphListAllRequest.mjs";
|
|
8
|
+
export { type GraphSearchQuery } from "./GraphSearchQuery.mjs";
|
|
9
9
|
export { type UpdateGraphRequest } from "./UpdateGraphRequest.mjs";
|
|
@@ -3,6 +3,6 @@ export { AddDataRequest } from "./AddDataRequest.mjs";
|
|
|
3
3
|
export { AddDataBatchRequest } from "./AddDataBatchRequest.mjs";
|
|
4
4
|
export { AddTripleRequest } from "./AddTripleRequest.mjs";
|
|
5
5
|
export { CloneGraphRequest } from "./CloneGraphRequest.mjs";
|
|
6
|
-
export { GraphSearchQuery } from "./GraphSearchQuery.mjs";
|
|
7
6
|
export { CreateGraphRequest } from "./CreateGraphRequest.mjs";
|
|
7
|
+
export { GraphSearchQuery } from "./GraphSearchQuery.mjs";
|
|
8
8
|
export { UpdateGraphRequest } from "./UpdateGraphRequest.mjs";
|
|
@@ -3,6 +3,6 @@ export { AddDataRequest } from "./AddDataRequest.mjs";
|
|
|
3
3
|
export { AddDataBatchRequest } from "./AddDataBatchRequest.mjs";
|
|
4
4
|
export { AddTripleRequest } from "./AddTripleRequest.mjs";
|
|
5
5
|
export { CloneGraphRequest } from "./CloneGraphRequest.mjs";
|
|
6
|
-
export { GraphSearchQuery } from "./GraphSearchQuery.mjs";
|
|
7
6
|
export { CreateGraphRequest } from "./CreateGraphRequest.mjs";
|
|
7
|
+
export { GraphSearchQuery } from "./GraphSearchQuery.mjs";
|
|
8
8
|
export { UpdateGraphRequest } from "./UpdateGraphRequest.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.0.
|
|
1
|
+
export declare const SDK_VERSION = "3.0.5";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "3.0.
|
|
1
|
+
export const SDK_VERSION = "3.0.5";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -386,7 +386,7 @@ await client.graph.clone();
|
|
|
386
386
|
</dl>
|
|
387
387
|
</details>
|
|
388
388
|
|
|
389
|
-
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">
|
|
389
|
+
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">create</a>({ ...params }) -> Zep.Graph</code></summary>
|
|
390
390
|
<dl>
|
|
391
391
|
<dd>
|
|
392
392
|
|
|
@@ -398,7 +398,7 @@ await client.graph.clone();
|
|
|
398
398
|
<dl>
|
|
399
399
|
<dd>
|
|
400
400
|
|
|
401
|
-
|
|
401
|
+
Creates a new graph.
|
|
402
402
|
|
|
403
403
|
</dd>
|
|
404
404
|
</dl>
|
|
@@ -414,8 +414,8 @@ Perform a graph search query.
|
|
|
414
414
|
<dd>
|
|
415
415
|
|
|
416
416
|
```typescript
|
|
417
|
-
await client.graph.
|
|
418
|
-
|
|
417
|
+
await client.graph.create({
|
|
418
|
+
graphId: "graph_id",
|
|
419
419
|
});
|
|
420
420
|
```
|
|
421
421
|
|
|
@@ -432,7 +432,7 @@ await client.graph.search({
|
|
|
432
432
|
<dl>
|
|
433
433
|
<dd>
|
|
434
434
|
|
|
435
|
-
**request:** `Zep.
|
|
435
|
+
**request:** `Zep.CreateGraphRequest`
|
|
436
436
|
|
|
437
437
|
</dd>
|
|
438
438
|
</dl>
|
|
@@ -451,7 +451,7 @@ await client.graph.search({
|
|
|
451
451
|
</dl>
|
|
452
452
|
</details>
|
|
453
453
|
|
|
454
|
-
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">
|
|
454
|
+
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">listAll</a>({ ...params }) -> Zep.GraphListResponse</code></summary>
|
|
455
455
|
<dl>
|
|
456
456
|
<dd>
|
|
457
457
|
|
|
@@ -463,7 +463,7 @@ await client.graph.search({
|
|
|
463
463
|
<dl>
|
|
464
464
|
<dd>
|
|
465
465
|
|
|
466
|
-
|
|
466
|
+
Returns all graphs.
|
|
467
467
|
|
|
468
468
|
</dd>
|
|
469
469
|
</dl>
|
|
@@ -479,9 +479,7 @@ Creates a new graph.
|
|
|
479
479
|
<dd>
|
|
480
480
|
|
|
481
481
|
```typescript
|
|
482
|
-
await client.graph.
|
|
483
|
-
graphId: "graph_id",
|
|
484
|
-
});
|
|
482
|
+
await client.graph.listAll();
|
|
485
483
|
```
|
|
486
484
|
|
|
487
485
|
</dd>
|
|
@@ -497,7 +495,7 @@ await client.graph.create({
|
|
|
497
495
|
<dl>
|
|
498
496
|
<dd>
|
|
499
497
|
|
|
500
|
-
**request:** `Zep.
|
|
498
|
+
**request:** `Zep.GraphListAllRequest`
|
|
501
499
|
|
|
502
500
|
</dd>
|
|
503
501
|
</dl>
|
|
@@ -516,7 +514,7 @@ await client.graph.create({
|
|
|
516
514
|
</dl>
|
|
517
515
|
</details>
|
|
518
516
|
|
|
519
|
-
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">
|
|
517
|
+
<details><summary><code>client.graph.<a href="/src/api/resources/graph/client/Client.ts">search</a>({ ...params }) -> Zep.GraphSearchResults</code></summary>
|
|
520
518
|
<dl>
|
|
521
519
|
<dd>
|
|
522
520
|
|
|
@@ -528,7 +526,7 @@ await client.graph.create({
|
|
|
528
526
|
<dl>
|
|
529
527
|
<dd>
|
|
530
528
|
|
|
531
|
-
|
|
529
|
+
Perform a graph search query.
|
|
532
530
|
|
|
533
531
|
</dd>
|
|
534
532
|
</dl>
|
|
@@ -544,7 +542,9 @@ Returns all graphs.
|
|
|
544
542
|
<dd>
|
|
545
543
|
|
|
546
544
|
```typescript
|
|
547
|
-
await client.graph.
|
|
545
|
+
await client.graph.search({
|
|
546
|
+
query: "query",
|
|
547
|
+
});
|
|
548
548
|
```
|
|
549
549
|
|
|
550
550
|
</dd>
|
|
@@ -560,7 +560,7 @@ await client.graph.listAll();
|
|
|
560
560
|
<dl>
|
|
561
561
|
<dd>
|
|
562
562
|
|
|
563
|
-
**request:** `Zep.
|
|
563
|
+
**request:** `Zep.GraphSearchQuery`
|
|
564
564
|
|
|
565
565
|
</dd>
|
|
566
566
|
</dl>
|