@getzep/zep-cloud 3.13.0 → 3.14.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/README.md +3 -3
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/graph/client/Client.d.ts +1 -3
- package/dist/cjs/api/resources/graph/client/Client.js +1 -3
- package/dist/cjs/api/resources/graph/client/requests/AddTripleRequest.d.ts +18 -5
- package/dist/cjs/api/resources/graph/resources/node/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/graph/resources/node/client/Client.js +81 -0
- package/dist/cjs/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.ts +1 -1
- package/dist/cjs/api/resources/user/client/requests/CreateUserRequest.d.ts +1 -1
- package/dist/cjs/api/resources/user/client/requests/UpdateUserRequest.d.ts +1 -1
- package/dist/cjs/api/types/DateFilter.d.ts +5 -2
- package/dist/cjs/api/types/PropertyFilter.d.ts +16 -0
- package/dist/cjs/api/types/PropertyFilter.js +5 -0
- package/dist/cjs/api/types/SearchFilters.d.ts +4 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +5 -2
- package/dist/cjs/serialization/resources/graph/client/requests/AddTripleRequest.js +5 -2
- package/dist/cjs/serialization/types/DateFilter.d.ts +1 -1
- package/dist/cjs/serialization/types/DateFilter.js +1 -1
- package/dist/cjs/serialization/types/PropertyFilter.d.ts +15 -0
- package/dist/cjs/serialization/types/PropertyFilter.js +46 -0
- package/dist/cjs/serialization/types/SearchFilters.d.ts +3 -0
- package/dist/cjs/serialization/types/SearchFilters.js +3 -0
- package/dist/cjs/serialization/types/index.d.ts +1 -0
- package/dist/cjs/serialization/types/index.js +1 -0
- 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 +1 -3
- package/dist/esm/api/resources/graph/client/Client.mjs +1 -3
- package/dist/esm/api/resources/graph/client/requests/AddTripleRequest.d.mts +18 -5
- package/dist/esm/api/resources/graph/resources/node/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/graph/resources/node/client/Client.mjs +81 -0
- package/dist/esm/api/resources/thread/client/requests/ThreadGetUserContextRequest.d.mts +1 -1
- package/dist/esm/api/resources/user/client/requests/CreateUserRequest.d.mts +1 -1
- package/dist/esm/api/resources/user/client/requests/UpdateUserRequest.d.mts +1 -1
- package/dist/esm/api/types/DateFilter.d.mts +5 -2
- package/dist/esm/api/types/PropertyFilter.d.mts +16 -0
- package/dist/esm/api/types/PropertyFilter.mjs +4 -0
- package/dist/esm/api/types/SearchFilters.d.mts +4 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.d.mts +5 -2
- package/dist/esm/serialization/resources/graph/client/requests/AddTripleRequest.mjs +5 -2
- package/dist/esm/serialization/types/DateFilter.d.mts +1 -1
- package/dist/esm/serialization/types/DateFilter.mjs +1 -1
- package/dist/esm/serialization/types/PropertyFilter.d.mts +15 -0
- package/dist/esm/serialization/types/PropertyFilter.mjs +10 -0
- package/dist/esm/serialization/types/SearchFilters.d.mts +3 -0
- package/dist/esm/serialization/types/SearchFilters.mjs +3 -0
- package/dist/esm/serialization/types/index.d.mts +1 -0
- package/dist/esm/serialization/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +63 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<h1 align="center">
|
|
11
|
-
Zep:
|
|
11
|
+
Zep: Context Engineering for AI Assistants.
|
|
12
12
|
</h1>
|
|
13
13
|
<h2 align="center">Recall, understand, and extract data from chat histories. Power personalized AI experiences.</h2>
|
|
14
14
|
<br />
|
|
@@ -21,7 +21,7 @@ Zep: Long-Term Memory for AI Assistants.
|
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
23
|
## What is Zep? 💬
|
|
24
|
-
Zep is a
|
|
24
|
+
Zep is a context engineering platform for AI Assistant apps. With Zep, you can provide AI assistants with the right context from past conversations, no matter how distant, while also reducing hallucinations, latency, and cost.
|
|
25
25
|
|
|
26
26
|
### Cloud Installation
|
|
27
27
|
You can install the Zep Cloud SDK by running:
|
|
@@ -50,7 +50,7 @@ npm install @getzep/zep-js@^0.10.0
|
|
|
50
50
|
|
|
51
51
|
Zep persists and recalls chat histories, and automatically generates summaries and other artifacts from these chat histories. It also embeds messages and summaries, enabling you to search Zep for relevant context from past conversations. Zep does all of this asynchronously, ensuring these operations don't impact your user's chat experience. Data is persisted to database, allowing you to scale out when growth demands.
|
|
52
52
|
|
|
53
|
-
Zep also provides a simple, easy to use abstraction for document vector search called Document Collections. This is designed to complement Zep's core
|
|
53
|
+
Zep also provides a simple, easy to use abstraction for document vector search called Document Collections. This is designed to complement Zep's core context features, but is not designed to be a general purpose vector database.
|
|
54
54
|
|
|
55
55
|
Zep allows you to be more intentional about constructing your prompt:
|
|
56
56
|
1. automatically adding a few recent messages, with the number customized for your app;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -50,8 +50,8 @@ class ZepClient {
|
|
|
50
50
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
51
51
|
"X-Fern-Language": "JavaScript",
|
|
52
52
|
"X-Fern-SDK-Name": "zep-cloud",
|
|
53
|
-
"X-Fern-SDK-Version": "3.
|
|
54
|
-
"User-Agent": "zep-cloud/3.
|
|
53
|
+
"X-Fern-SDK-Version": "3.14.0",
|
|
54
|
+
"User-Agent": "zep-cloud/3.14.0",
|
|
55
55
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
56
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
57
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -117,9 +117,7 @@ export declare class Graph {
|
|
|
117
117
|
* @example
|
|
118
118
|
* await client.graph.addFactTriple({
|
|
119
119
|
* fact: "fact",
|
|
120
|
-
* factName: "fact_name"
|
|
121
|
-
* sourceNodeName: "source_node_name",
|
|
122
|
-
* targetNodeName: "target_node_name"
|
|
120
|
+
* factName: "fact_name"
|
|
123
121
|
* })
|
|
124
122
|
*/
|
|
125
123
|
addFactTriple(request: Zep.AddTripleRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.AddTripleResponse>;
|
|
@@ -454,9 +454,7 @@ class Graph {
|
|
|
454
454
|
* @example
|
|
455
455
|
* await client.graph.addFactTriple({
|
|
456
456
|
* fact: "fact",
|
|
457
|
-
* factName: "fact_name"
|
|
458
|
-
* sourceNodeName: "source_node_name",
|
|
459
|
-
* targetNodeName: "target_node_name"
|
|
457
|
+
* factName: "fact_name"
|
|
460
458
|
* })
|
|
461
459
|
*/
|
|
462
460
|
addFactTriple(request, requestOptions) {
|
|
@@ -5,14 +5,17 @@
|
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
7
|
* fact: "fact",
|
|
8
|
-
* factName: "fact_name"
|
|
9
|
-
* sourceNodeName: "source_node_name",
|
|
10
|
-
* targetNodeName: "target_node_name"
|
|
8
|
+
* factName: "fact_name"
|
|
11
9
|
* }
|
|
12
10
|
*/
|
|
13
11
|
export interface AddTripleRequest {
|
|
14
12
|
/** The timestamp of the message */
|
|
15
13
|
createdAt?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Additional attributes of the edge. Values must be scalar types (string, number, boolean, or null).
|
|
16
|
+
* Nested objects and arrays are not allowed.
|
|
17
|
+
*/
|
|
18
|
+
edgeAttributes?: Record<string, unknown>;
|
|
16
19
|
/** The time (if any) at which the edge expires */
|
|
17
20
|
expiredAt?: string;
|
|
18
21
|
/** The fact relating the two nodes that this edge represents */
|
|
@@ -24,14 +27,24 @@ export interface AddTripleRequest {
|
|
|
24
27
|
graphId?: string;
|
|
25
28
|
/** The time (if any) at which the fact stops being true */
|
|
26
29
|
invalidAt?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Additional attributes of the source node. Values must be scalar types (string, number, boolean, or null).
|
|
32
|
+
* Nested objects and arrays are not allowed.
|
|
33
|
+
*/
|
|
34
|
+
sourceNodeAttributes?: Record<string, unknown>;
|
|
27
35
|
/** The name of the source node to add */
|
|
28
|
-
sourceNodeName
|
|
36
|
+
sourceNodeName?: string;
|
|
29
37
|
/** The summary of the source node to add */
|
|
30
38
|
sourceNodeSummary?: string;
|
|
31
39
|
/** The source node uuid */
|
|
32
40
|
sourceNodeUuid?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Additional attributes of the target node. Values must be scalar types (string, number, boolean, or null).
|
|
43
|
+
* Nested objects and arrays are not allowed.
|
|
44
|
+
*/
|
|
45
|
+
targetNodeAttributes?: Record<string, unknown>;
|
|
33
46
|
/** The name of the target node to add */
|
|
34
|
-
targetNodeName
|
|
47
|
+
targetNodeName?: string;
|
|
35
48
|
/** The summary of the target node to add */
|
|
36
49
|
targetNodeSummary?: string;
|
|
37
50
|
/** The target node uuid */
|
|
@@ -101,6 +101,20 @@ export declare class Node {
|
|
|
101
101
|
*/
|
|
102
102
|
get(uuid: string, requestOptions?: Node.RequestOptions): core.HttpResponsePromise<Zep.EntityNode>;
|
|
103
103
|
private __get;
|
|
104
|
+
/**
|
|
105
|
+
* Deletes a node by UUID.
|
|
106
|
+
*
|
|
107
|
+
* @param {string} uuid - Node UUID
|
|
108
|
+
* @param {Node.RequestOptions} requestOptions - Request-specific configuration.
|
|
109
|
+
*
|
|
110
|
+
* @throws {@link Zep.BadRequestError}
|
|
111
|
+
* @throws {@link Zep.InternalServerError}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* await client.graph.node.delete("uuid")
|
|
115
|
+
*/
|
|
116
|
+
delete(uuid: string, requestOptions?: Node.RequestOptions): core.HttpResponsePromise<Zep.SuccessResponse>;
|
|
117
|
+
private __delete;
|
|
104
118
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
105
119
|
Authorization: string;
|
|
106
120
|
}>;
|
|
@@ -484,6 +484,87 @@ class Node {
|
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
|
+
/**
|
|
488
|
+
* Deletes a node by UUID.
|
|
489
|
+
*
|
|
490
|
+
* @param {string} uuid - Node UUID
|
|
491
|
+
* @param {Node.RequestOptions} requestOptions - Request-specific configuration.
|
|
492
|
+
*
|
|
493
|
+
* @throws {@link Zep.BadRequestError}
|
|
494
|
+
* @throws {@link Zep.InternalServerError}
|
|
495
|
+
*
|
|
496
|
+
* @example
|
|
497
|
+
* await client.graph.node.delete("uuid")
|
|
498
|
+
*/
|
|
499
|
+
delete(uuid, requestOptions) {
|
|
500
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(uuid, requestOptions));
|
|
501
|
+
}
|
|
502
|
+
__delete(uuid, requestOptions) {
|
|
503
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
504
|
+
var _a, _b, _c, _d;
|
|
505
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
506
|
+
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/node/${encodeURIComponent(uuid)}`),
|
|
507
|
+
method: "DELETE",
|
|
508
|
+
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),
|
|
509
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
510
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
511
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
512
|
+
});
|
|
513
|
+
if (_response.ok) {
|
|
514
|
+
return {
|
|
515
|
+
data: serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
516
|
+
unrecognizedObjectKeys: "passthrough",
|
|
517
|
+
allowUnrecognizedUnionMembers: true,
|
|
518
|
+
allowUnrecognizedEnumValues: true,
|
|
519
|
+
skipValidation: true,
|
|
520
|
+
breadcrumbsPrefix: ["response"],
|
|
521
|
+
}),
|
|
522
|
+
rawResponse: _response.rawResponse,
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
if (_response.error.reason === "status-code") {
|
|
526
|
+
switch (_response.error.statusCode) {
|
|
527
|
+
case 400:
|
|
528
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
529
|
+
unrecognizedObjectKeys: "passthrough",
|
|
530
|
+
allowUnrecognizedUnionMembers: true,
|
|
531
|
+
allowUnrecognizedEnumValues: true,
|
|
532
|
+
skipValidation: true,
|
|
533
|
+
breadcrumbsPrefix: ["response"],
|
|
534
|
+
}), _response.rawResponse);
|
|
535
|
+
case 500:
|
|
536
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
537
|
+
unrecognizedObjectKeys: "passthrough",
|
|
538
|
+
allowUnrecognizedUnionMembers: true,
|
|
539
|
+
allowUnrecognizedEnumValues: true,
|
|
540
|
+
skipValidation: true,
|
|
541
|
+
breadcrumbsPrefix: ["response"],
|
|
542
|
+
}), _response.rawResponse);
|
|
543
|
+
default:
|
|
544
|
+
throw new errors.ZepError({
|
|
545
|
+
statusCode: _response.error.statusCode,
|
|
546
|
+
body: _response.error.body,
|
|
547
|
+
rawResponse: _response.rawResponse,
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
switch (_response.error.reason) {
|
|
552
|
+
case "non-json":
|
|
553
|
+
throw new errors.ZepError({
|
|
554
|
+
statusCode: _response.error.statusCode,
|
|
555
|
+
body: _response.error.rawBody,
|
|
556
|
+
rawResponse: _response.rawResponse,
|
|
557
|
+
});
|
|
558
|
+
case "timeout":
|
|
559
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /graph/node/{uuid}.");
|
|
560
|
+
case "unknown":
|
|
561
|
+
throw new errors.ZepError({
|
|
562
|
+
message: _response.error.errorMessage,
|
|
563
|
+
rawResponse: _response.rawResponse,
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
}
|
|
487
568
|
_getCustomAuthorizationHeaders() {
|
|
488
569
|
return __awaiter(this, void 0, void 0, function* () {
|
|
489
570
|
var _a;
|
|
@@ -12,7 +12,7 @@ import * as Zep from "../../../../index.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export interface ThreadGetUserContextRequest {
|
|
14
14
|
/**
|
|
15
|
-
* The minimum rating by which to filter relevant facts.
|
|
15
|
+
* Deprecated, this field will be removed in a future release. The minimum rating by which to filter relevant facts.
|
|
16
16
|
*/
|
|
17
17
|
minRating?: number;
|
|
18
18
|
/**
|
|
@@ -13,7 +13,7 @@ export interface CreateUserRequest {
|
|
|
13
13
|
disableDefaultOntology?: boolean;
|
|
14
14
|
/** The email address of the user. */
|
|
15
15
|
email?: string;
|
|
16
|
-
/** Optional instruction to use for fact rating. */
|
|
16
|
+
/** Deprecated: this field will be removed in a future release. Optional instruction to use for fact rating. */
|
|
17
17
|
factRatingInstruction?: Zep.FactRatingInstruction;
|
|
18
18
|
/** The first name of the user. */
|
|
19
19
|
firstName?: string;
|
|
@@ -11,7 +11,7 @@ export interface UpdateUserRequest {
|
|
|
11
11
|
disableDefaultOntology?: boolean;
|
|
12
12
|
/** The email address of the user. */
|
|
13
13
|
email?: string;
|
|
14
|
-
/** Optional instruction to use for fact rating. */
|
|
14
|
+
/** Deprecated: this field will be removed in a future release. Optional instruction to use for fact rating. */
|
|
15
15
|
factRatingInstruction?: Zep.FactRatingInstruction;
|
|
16
16
|
/** The first name of the user. */
|
|
17
17
|
firstName?: string;
|
|
@@ -5,6 +5,9 @@ import * as Zep from "../index.js";
|
|
|
5
5
|
export interface DateFilter {
|
|
6
6
|
/** Comparison operator for date filter */
|
|
7
7
|
comparisonOperator: Zep.ComparisonOperator;
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Date to filter on. Required for non-null operators (=, <>, >, <, >=, <=).
|
|
10
|
+
* Should be omitted for IS NULL and IS NOT NULL operators.
|
|
11
|
+
*/
|
|
12
|
+
date?: string;
|
|
10
13
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Zep from "../index.js";
|
|
5
|
+
export interface PropertyFilter {
|
|
6
|
+
/** Comparison operator for property filter */
|
|
7
|
+
comparisonOperator: Zep.ComparisonOperator;
|
|
8
|
+
/** Property name to filter on */
|
|
9
|
+
propertyName: string;
|
|
10
|
+
/**
|
|
11
|
+
* Property value to match on. Accepted types: string, int, float64, bool, or nil.
|
|
12
|
+
* Invalid types (e.g., arrays, objects) will be rejected by validation.
|
|
13
|
+
* Must be non-nil for non-null operators (=, <>, >, <, >=, <=).
|
|
14
|
+
*/
|
|
15
|
+
propertyValue?: unknown;
|
|
16
|
+
}
|
|
@@ -13,6 +13,8 @@ export interface SearchFilters {
|
|
|
13
13
|
createdAt?: Zep.DateFilter[][];
|
|
14
14
|
/** List of edge types to filter on */
|
|
15
15
|
edgeTypes?: string[];
|
|
16
|
+
/** List of edge UUIDs to filter on */
|
|
17
|
+
edgeUuids?: string[];
|
|
16
18
|
/** List of edge types to exclude from results */
|
|
17
19
|
excludeEdgeTypes?: string[];
|
|
18
20
|
/** List of node labels to exclude from results */
|
|
@@ -35,6 +37,8 @@ export interface SearchFilters {
|
|
|
35
37
|
invalidAt?: Zep.DateFilter[][];
|
|
36
38
|
/** List of node labels to filter on */
|
|
37
39
|
nodeLabels?: string[];
|
|
40
|
+
/** List of property filters to apply to nodes and edges */
|
|
41
|
+
propertyFilters?: Zep.PropertyFilter[];
|
|
38
42
|
/**
|
|
39
43
|
* 2D array of date filters for the valid_at field.
|
|
40
44
|
* The outer array elements are combined with OR logic.
|
|
@@ -43,6 +43,7 @@ export * from "./DateFilter.js";
|
|
|
43
43
|
export * from "./EntityEdge.js";
|
|
44
44
|
export * from "./EntityNode.js";
|
|
45
45
|
export * from "./GraphSearchScope.js";
|
|
46
|
+
export * from "./PropertyFilter.js";
|
|
46
47
|
export * from "./Reranker.js";
|
|
47
48
|
export * from "./SearchFilters.js";
|
|
48
49
|
export * from "./EntityPropertyType.js";
|
|
@@ -59,6 +59,7 @@ __exportStar(require("./DateFilter.js"), exports);
|
|
|
59
59
|
__exportStar(require("./EntityEdge.js"), exports);
|
|
60
60
|
__exportStar(require("./EntityNode.js"), exports);
|
|
61
61
|
__exportStar(require("./GraphSearchScope.js"), exports);
|
|
62
|
+
__exportStar(require("./PropertyFilter.js"), exports);
|
|
62
63
|
__exportStar(require("./Reranker.js"), exports);
|
|
63
64
|
__exportStar(require("./SearchFilters.js"), exports);
|
|
64
65
|
__exportStar(require("./EntityPropertyType.js"), exports);
|
|
@@ -8,16 +8,19 @@ export declare const AddTripleRequest: core.serialization.Schema<serializers.Add
|
|
|
8
8
|
export declare namespace AddTripleRequest {
|
|
9
9
|
interface Raw {
|
|
10
10
|
created_at?: string | null;
|
|
11
|
+
edge_attributes?: Record<string, unknown> | null;
|
|
11
12
|
expired_at?: string | null;
|
|
12
13
|
fact: string;
|
|
13
14
|
fact_name: string;
|
|
14
15
|
fact_uuid?: string | null;
|
|
15
16
|
graph_id?: string | null;
|
|
16
17
|
invalid_at?: string | null;
|
|
17
|
-
|
|
18
|
+
source_node_attributes?: Record<string, unknown> | null;
|
|
19
|
+
source_node_name?: string | null;
|
|
18
20
|
source_node_summary?: string | null;
|
|
19
21
|
source_node_uuid?: string | null;
|
|
20
|
-
|
|
22
|
+
target_node_attributes?: Record<string, unknown> | null;
|
|
23
|
+
target_node_name?: string | null;
|
|
21
24
|
target_node_summary?: string | null;
|
|
22
25
|
target_node_uuid?: string | null;
|
|
23
26
|
user_id?: string | null;
|
|
@@ -40,16 +40,19 @@ exports.AddTripleRequest = void 0;
|
|
|
40
40
|
const core = __importStar(require("../../../../../core/index.js"));
|
|
41
41
|
exports.AddTripleRequest = core.serialization.object({
|
|
42
42
|
createdAt: core.serialization.property("created_at", core.serialization.string().optional()),
|
|
43
|
+
edgeAttributes: core.serialization.property("edge_attributes", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()),
|
|
43
44
|
expiredAt: core.serialization.property("expired_at", core.serialization.string().optional()),
|
|
44
45
|
fact: core.serialization.string(),
|
|
45
46
|
factName: core.serialization.property("fact_name", core.serialization.string()),
|
|
46
47
|
factUuid: core.serialization.property("fact_uuid", core.serialization.string().optional()),
|
|
47
48
|
graphId: core.serialization.property("graph_id", core.serialization.string().optional()),
|
|
48
49
|
invalidAt: core.serialization.property("invalid_at", core.serialization.string().optional()),
|
|
49
|
-
|
|
50
|
+
sourceNodeAttributes: core.serialization.property("source_node_attributes", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()),
|
|
51
|
+
sourceNodeName: core.serialization.property("source_node_name", core.serialization.string().optional()),
|
|
50
52
|
sourceNodeSummary: core.serialization.property("source_node_summary", core.serialization.string().optional()),
|
|
51
53
|
sourceNodeUuid: core.serialization.property("source_node_uuid", core.serialization.string().optional()),
|
|
52
|
-
|
|
54
|
+
targetNodeAttributes: core.serialization.property("target_node_attributes", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()),
|
|
55
|
+
targetNodeName: core.serialization.property("target_node_name", core.serialization.string().optional()),
|
|
53
56
|
targetNodeSummary: core.serialization.property("target_node_summary", core.serialization.string().optional()),
|
|
54
57
|
targetNodeUuid: core.serialization.property("target_node_uuid", core.serialization.string().optional()),
|
|
55
58
|
userId: core.serialization.property("user_id", core.serialization.string().optional()),
|
|
@@ -41,5 +41,5 @@ const core = __importStar(require("../../core/index.js"));
|
|
|
41
41
|
const ComparisonOperator_js_1 = require("./ComparisonOperator.js");
|
|
42
42
|
exports.DateFilter = core.serialization.object({
|
|
43
43
|
comparisonOperator: core.serialization.property("comparison_operator", ComparisonOperator_js_1.ComparisonOperator),
|
|
44
|
-
date: core.serialization.string(),
|
|
44
|
+
date: core.serialization.string().optional(),
|
|
45
45
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index.js";
|
|
5
|
+
import * as Zep from "../../api/index.js";
|
|
6
|
+
import * as core from "../../core/index.js";
|
|
7
|
+
import { ComparisonOperator } from "./ComparisonOperator.js";
|
|
8
|
+
export declare const PropertyFilter: core.serialization.ObjectSchema<serializers.PropertyFilter.Raw, Zep.PropertyFilter>;
|
|
9
|
+
export declare namespace PropertyFilter {
|
|
10
|
+
interface Raw {
|
|
11
|
+
comparison_operator: ComparisonOperator.Raw;
|
|
12
|
+
property_name: string;
|
|
13
|
+
property_value?: unknown | null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.PropertyFilter = void 0;
|
|
40
|
+
const core = __importStar(require("../../core/index.js"));
|
|
41
|
+
const ComparisonOperator_js_1 = require("./ComparisonOperator.js");
|
|
42
|
+
exports.PropertyFilter = core.serialization.object({
|
|
43
|
+
comparisonOperator: core.serialization.property("comparison_operator", ComparisonOperator_js_1.ComparisonOperator),
|
|
44
|
+
propertyName: core.serialization.property("property_name", core.serialization.string()),
|
|
45
|
+
propertyValue: core.serialization.property("property_value", core.serialization.unknown().optional()),
|
|
46
|
+
});
|
|
@@ -5,16 +5,19 @@ import * as serializers from "../index.js";
|
|
|
5
5
|
import * as Zep from "../../api/index.js";
|
|
6
6
|
import * as core from "../../core/index.js";
|
|
7
7
|
import { DateFilter } from "./DateFilter.js";
|
|
8
|
+
import { PropertyFilter } from "./PropertyFilter.js";
|
|
8
9
|
export declare const SearchFilters: core.serialization.ObjectSchema<serializers.SearchFilters.Raw, Zep.SearchFilters>;
|
|
9
10
|
export declare namespace SearchFilters {
|
|
10
11
|
interface Raw {
|
|
11
12
|
created_at?: DateFilter.Raw[][] | null;
|
|
12
13
|
edge_types?: string[] | null;
|
|
14
|
+
edge_uuids?: string[] | null;
|
|
13
15
|
exclude_edge_types?: string[] | null;
|
|
14
16
|
exclude_node_labels?: string[] | null;
|
|
15
17
|
expired_at?: DateFilter.Raw[][] | null;
|
|
16
18
|
invalid_at?: DateFilter.Raw[][] | null;
|
|
17
19
|
node_labels?: string[] | null;
|
|
20
|
+
property_filters?: PropertyFilter.Raw[] | null;
|
|
18
21
|
valid_at?: DateFilter.Raw[][] | null;
|
|
19
22
|
}
|
|
20
23
|
}
|
|
@@ -39,13 +39,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.SearchFilters = void 0;
|
|
40
40
|
const core = __importStar(require("../../core/index.js"));
|
|
41
41
|
const DateFilter_js_1 = require("./DateFilter.js");
|
|
42
|
+
const PropertyFilter_js_1 = require("./PropertyFilter.js");
|
|
42
43
|
exports.SearchFilters = core.serialization.object({
|
|
43
44
|
createdAt: core.serialization.property("created_at", core.serialization.list(core.serialization.list(DateFilter_js_1.DateFilter)).optional()),
|
|
44
45
|
edgeTypes: core.serialization.property("edge_types", core.serialization.list(core.serialization.string()).optional()),
|
|
46
|
+
edgeUuids: core.serialization.property("edge_uuids", core.serialization.list(core.serialization.string()).optional()),
|
|
45
47
|
excludeEdgeTypes: core.serialization.property("exclude_edge_types", core.serialization.list(core.serialization.string()).optional()),
|
|
46
48
|
excludeNodeLabels: core.serialization.property("exclude_node_labels", core.serialization.list(core.serialization.string()).optional()),
|
|
47
49
|
expiredAt: core.serialization.property("expired_at", core.serialization.list(core.serialization.list(DateFilter_js_1.DateFilter)).optional()),
|
|
48
50
|
invalidAt: core.serialization.property("invalid_at", core.serialization.list(core.serialization.list(DateFilter_js_1.DateFilter)).optional()),
|
|
49
51
|
nodeLabels: core.serialization.property("node_labels", core.serialization.list(core.serialization.string()).optional()),
|
|
52
|
+
propertyFilters: core.serialization.property("property_filters", core.serialization.list(PropertyFilter_js_1.PropertyFilter).optional()),
|
|
50
53
|
validAt: core.serialization.property("valid_at", core.serialization.list(core.serialization.list(DateFilter_js_1.DateFilter)).optional()),
|
|
51
54
|
});
|
|
@@ -43,6 +43,7 @@ export * from "./DateFilter.js";
|
|
|
43
43
|
export * from "./EntityEdge.js";
|
|
44
44
|
export * from "./EntityNode.js";
|
|
45
45
|
export * from "./GraphSearchScope.js";
|
|
46
|
+
export * from "./PropertyFilter.js";
|
|
46
47
|
export * from "./Reranker.js";
|
|
47
48
|
export * from "./SearchFilters.js";
|
|
48
49
|
export * from "./EntityPropertyType.js";
|
|
@@ -59,6 +59,7 @@ __exportStar(require("./DateFilter.js"), exports);
|
|
|
59
59
|
__exportStar(require("./EntityEdge.js"), exports);
|
|
60
60
|
__exportStar(require("./EntityNode.js"), exports);
|
|
61
61
|
__exportStar(require("./GraphSearchScope.js"), exports);
|
|
62
|
+
__exportStar(require("./PropertyFilter.js"), exports);
|
|
62
63
|
__exportStar(require("./Reranker.js"), exports);
|
|
63
64
|
__exportStar(require("./SearchFilters.js"), exports);
|
|
64
65
|
__exportStar(require("./EntityPropertyType.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.
|
|
1
|
+
export declare const SDK_VERSION = "3.14.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -14,8 +14,8 @@ export class ZepClient {
|
|
|
14
14
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
15
15
|
"X-Fern-Language": "JavaScript",
|
|
16
16
|
"X-Fern-SDK-Name": "zep-cloud",
|
|
17
|
-
"X-Fern-SDK-Version": "3.
|
|
18
|
-
"User-Agent": "zep-cloud/3.
|
|
17
|
+
"X-Fern-SDK-Version": "3.14.0",
|
|
18
|
+
"User-Agent": "zep-cloud/3.14.0",
|
|
19
19
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
20
20
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
21
21
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -117,9 +117,7 @@ export declare class Graph {
|
|
|
117
117
|
* @example
|
|
118
118
|
* await client.graph.addFactTriple({
|
|
119
119
|
* fact: "fact",
|
|
120
|
-
* factName: "fact_name"
|
|
121
|
-
* sourceNodeName: "source_node_name",
|
|
122
|
-
* targetNodeName: "target_node_name"
|
|
120
|
+
* factName: "fact_name"
|
|
123
121
|
* })
|
|
124
122
|
*/
|
|
125
123
|
addFactTriple(request: Zep.AddTripleRequest, requestOptions?: Graph.RequestOptions): core.HttpResponsePromise<Zep.AddTripleResponse>;
|
|
@@ -418,9 +418,7 @@ export class Graph {
|
|
|
418
418
|
* @example
|
|
419
419
|
* await client.graph.addFactTriple({
|
|
420
420
|
* fact: "fact",
|
|
421
|
-
* factName: "fact_name"
|
|
422
|
-
* sourceNodeName: "source_node_name",
|
|
423
|
-
* targetNodeName: "target_node_name"
|
|
421
|
+
* factName: "fact_name"
|
|
424
422
|
* })
|
|
425
423
|
*/
|
|
426
424
|
addFactTriple(request, requestOptions) {
|
|
@@ -5,14 +5,17 @@
|
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
7
|
* fact: "fact",
|
|
8
|
-
* factName: "fact_name"
|
|
9
|
-
* sourceNodeName: "source_node_name",
|
|
10
|
-
* targetNodeName: "target_node_name"
|
|
8
|
+
* factName: "fact_name"
|
|
11
9
|
* }
|
|
12
10
|
*/
|
|
13
11
|
export interface AddTripleRequest {
|
|
14
12
|
/** The timestamp of the message */
|
|
15
13
|
createdAt?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Additional attributes of the edge. Values must be scalar types (string, number, boolean, or null).
|
|
16
|
+
* Nested objects and arrays are not allowed.
|
|
17
|
+
*/
|
|
18
|
+
edgeAttributes?: Record<string, unknown>;
|
|
16
19
|
/** The time (if any) at which the edge expires */
|
|
17
20
|
expiredAt?: string;
|
|
18
21
|
/** The fact relating the two nodes that this edge represents */
|
|
@@ -24,14 +27,24 @@ export interface AddTripleRequest {
|
|
|
24
27
|
graphId?: string;
|
|
25
28
|
/** The time (if any) at which the fact stops being true */
|
|
26
29
|
invalidAt?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Additional attributes of the source node. Values must be scalar types (string, number, boolean, or null).
|
|
32
|
+
* Nested objects and arrays are not allowed.
|
|
33
|
+
*/
|
|
34
|
+
sourceNodeAttributes?: Record<string, unknown>;
|
|
27
35
|
/** The name of the source node to add */
|
|
28
|
-
sourceNodeName
|
|
36
|
+
sourceNodeName?: string;
|
|
29
37
|
/** The summary of the source node to add */
|
|
30
38
|
sourceNodeSummary?: string;
|
|
31
39
|
/** The source node uuid */
|
|
32
40
|
sourceNodeUuid?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Additional attributes of the target node. Values must be scalar types (string, number, boolean, or null).
|
|
43
|
+
* Nested objects and arrays are not allowed.
|
|
44
|
+
*/
|
|
45
|
+
targetNodeAttributes?: Record<string, unknown>;
|
|
33
46
|
/** The name of the target node to add */
|
|
34
|
-
targetNodeName
|
|
47
|
+
targetNodeName?: string;
|
|
35
48
|
/** The summary of the target node to add */
|
|
36
49
|
targetNodeSummary?: string;
|
|
37
50
|
/** The target node uuid */
|
|
@@ -101,6 +101,20 @@ export declare class Node {
|
|
|
101
101
|
*/
|
|
102
102
|
get(uuid: string, requestOptions?: Node.RequestOptions): core.HttpResponsePromise<Zep.EntityNode>;
|
|
103
103
|
private __get;
|
|
104
|
+
/**
|
|
105
|
+
* Deletes a node by UUID.
|
|
106
|
+
*
|
|
107
|
+
* @param {string} uuid - Node UUID
|
|
108
|
+
* @param {Node.RequestOptions} requestOptions - Request-specific configuration.
|
|
109
|
+
*
|
|
110
|
+
* @throws {@link Zep.BadRequestError}
|
|
111
|
+
* @throws {@link Zep.InternalServerError}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* await client.graph.node.delete("uuid")
|
|
115
|
+
*/
|
|
116
|
+
delete(uuid: string, requestOptions?: Node.RequestOptions): core.HttpResponsePromise<Zep.SuccessResponse>;
|
|
117
|
+
private __delete;
|
|
104
118
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
105
119
|
Authorization: string;
|
|
106
120
|
}>;
|
|
@@ -448,6 +448,87 @@ export class Node {
|
|
|
448
448
|
}
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* Deletes a node by UUID.
|
|
453
|
+
*
|
|
454
|
+
* @param {string} uuid - Node UUID
|
|
455
|
+
* @param {Node.RequestOptions} requestOptions - Request-specific configuration.
|
|
456
|
+
*
|
|
457
|
+
* @throws {@link Zep.BadRequestError}
|
|
458
|
+
* @throws {@link Zep.InternalServerError}
|
|
459
|
+
*
|
|
460
|
+
* @example
|
|
461
|
+
* await client.graph.node.delete("uuid")
|
|
462
|
+
*/
|
|
463
|
+
delete(uuid, requestOptions) {
|
|
464
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(uuid, requestOptions));
|
|
465
|
+
}
|
|
466
|
+
__delete(uuid, requestOptions) {
|
|
467
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
468
|
+
var _a, _b, _c, _d;
|
|
469
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
470
|
+
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/node/${encodeURIComponent(uuid)}`),
|
|
471
|
+
method: "DELETE",
|
|
472
|
+
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),
|
|
473
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
474
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
475
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
476
|
+
});
|
|
477
|
+
if (_response.ok) {
|
|
478
|
+
return {
|
|
479
|
+
data: serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
480
|
+
unrecognizedObjectKeys: "passthrough",
|
|
481
|
+
allowUnrecognizedUnionMembers: true,
|
|
482
|
+
allowUnrecognizedEnumValues: true,
|
|
483
|
+
skipValidation: true,
|
|
484
|
+
breadcrumbsPrefix: ["response"],
|
|
485
|
+
}),
|
|
486
|
+
rawResponse: _response.rawResponse,
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
if (_response.error.reason === "status-code") {
|
|
490
|
+
switch (_response.error.statusCode) {
|
|
491
|
+
case 400:
|
|
492
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
493
|
+
unrecognizedObjectKeys: "passthrough",
|
|
494
|
+
allowUnrecognizedUnionMembers: true,
|
|
495
|
+
allowUnrecognizedEnumValues: true,
|
|
496
|
+
skipValidation: true,
|
|
497
|
+
breadcrumbsPrefix: ["response"],
|
|
498
|
+
}), _response.rawResponse);
|
|
499
|
+
case 500:
|
|
500
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
501
|
+
unrecognizedObjectKeys: "passthrough",
|
|
502
|
+
allowUnrecognizedUnionMembers: true,
|
|
503
|
+
allowUnrecognizedEnumValues: true,
|
|
504
|
+
skipValidation: true,
|
|
505
|
+
breadcrumbsPrefix: ["response"],
|
|
506
|
+
}), _response.rawResponse);
|
|
507
|
+
default:
|
|
508
|
+
throw new errors.ZepError({
|
|
509
|
+
statusCode: _response.error.statusCode,
|
|
510
|
+
body: _response.error.body,
|
|
511
|
+
rawResponse: _response.rawResponse,
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
switch (_response.error.reason) {
|
|
516
|
+
case "non-json":
|
|
517
|
+
throw new errors.ZepError({
|
|
518
|
+
statusCode: _response.error.statusCode,
|
|
519
|
+
body: _response.error.rawBody,
|
|
520
|
+
rawResponse: _response.rawResponse,
|
|
521
|
+
});
|
|
522
|
+
case "timeout":
|
|
523
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /graph/node/{uuid}.");
|
|
524
|
+
case "unknown":
|
|
525
|
+
throw new errors.ZepError({
|
|
526
|
+
message: _response.error.errorMessage,
|
|
527
|
+
rawResponse: _response.rawResponse,
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
}
|
|
451
532
|
_getCustomAuthorizationHeaders() {
|
|
452
533
|
return __awaiter(this, void 0, void 0, function* () {
|
|
453
534
|
var _a;
|
|
@@ -12,7 +12,7 @@ import * as Zep from "../../../../index.mjs";
|
|
|
12
12
|
*/
|
|
13
13
|
export interface ThreadGetUserContextRequest {
|
|
14
14
|
/**
|
|
15
|
-
* The minimum rating by which to filter relevant facts.
|
|
15
|
+
* Deprecated, this field will be removed in a future release. The minimum rating by which to filter relevant facts.
|
|
16
16
|
*/
|
|
17
17
|
minRating?: number;
|
|
18
18
|
/**
|
|
@@ -13,7 +13,7 @@ export interface CreateUserRequest {
|
|
|
13
13
|
disableDefaultOntology?: boolean;
|
|
14
14
|
/** The email address of the user. */
|
|
15
15
|
email?: string;
|
|
16
|
-
/** Optional instruction to use for fact rating. */
|
|
16
|
+
/** Deprecated: this field will be removed in a future release. Optional instruction to use for fact rating. */
|
|
17
17
|
factRatingInstruction?: Zep.FactRatingInstruction;
|
|
18
18
|
/** The first name of the user. */
|
|
19
19
|
firstName?: string;
|
|
@@ -11,7 +11,7 @@ export interface UpdateUserRequest {
|
|
|
11
11
|
disableDefaultOntology?: boolean;
|
|
12
12
|
/** The email address of the user. */
|
|
13
13
|
email?: string;
|
|
14
|
-
/** Optional instruction to use for fact rating. */
|
|
14
|
+
/** Deprecated: this field will be removed in a future release. Optional instruction to use for fact rating. */
|
|
15
15
|
factRatingInstruction?: Zep.FactRatingInstruction;
|
|
16
16
|
/** The first name of the user. */
|
|
17
17
|
firstName?: string;
|
|
@@ -5,6 +5,9 @@ import * as Zep from "../index.mjs";
|
|
|
5
5
|
export interface DateFilter {
|
|
6
6
|
/** Comparison operator for date filter */
|
|
7
7
|
comparisonOperator: Zep.ComparisonOperator;
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Date to filter on. Required for non-null operators (=, <>, >, <, >=, <=).
|
|
10
|
+
* Should be omitted for IS NULL and IS NOT NULL operators.
|
|
11
|
+
*/
|
|
12
|
+
date?: string;
|
|
10
13
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Zep from "../index.mjs";
|
|
5
|
+
export interface PropertyFilter {
|
|
6
|
+
/** Comparison operator for property filter */
|
|
7
|
+
comparisonOperator: Zep.ComparisonOperator;
|
|
8
|
+
/** Property name to filter on */
|
|
9
|
+
propertyName: string;
|
|
10
|
+
/**
|
|
11
|
+
* Property value to match on. Accepted types: string, int, float64, bool, or nil.
|
|
12
|
+
* Invalid types (e.g., arrays, objects) will be rejected by validation.
|
|
13
|
+
* Must be non-nil for non-null operators (=, <>, >, <, >=, <=).
|
|
14
|
+
*/
|
|
15
|
+
propertyValue?: unknown;
|
|
16
|
+
}
|
|
@@ -13,6 +13,8 @@ export interface SearchFilters {
|
|
|
13
13
|
createdAt?: Zep.DateFilter[][];
|
|
14
14
|
/** List of edge types to filter on */
|
|
15
15
|
edgeTypes?: string[];
|
|
16
|
+
/** List of edge UUIDs to filter on */
|
|
17
|
+
edgeUuids?: string[];
|
|
16
18
|
/** List of edge types to exclude from results */
|
|
17
19
|
excludeEdgeTypes?: string[];
|
|
18
20
|
/** List of node labels to exclude from results */
|
|
@@ -35,6 +37,8 @@ export interface SearchFilters {
|
|
|
35
37
|
invalidAt?: Zep.DateFilter[][];
|
|
36
38
|
/** List of node labels to filter on */
|
|
37
39
|
nodeLabels?: string[];
|
|
40
|
+
/** List of property filters to apply to nodes and edges */
|
|
41
|
+
propertyFilters?: Zep.PropertyFilter[];
|
|
38
42
|
/**
|
|
39
43
|
* 2D array of date filters for the valid_at field.
|
|
40
44
|
* The outer array elements are combined with OR logic.
|
|
@@ -43,6 +43,7 @@ export * from "./DateFilter.mjs";
|
|
|
43
43
|
export * from "./EntityEdge.mjs";
|
|
44
44
|
export * from "./EntityNode.mjs";
|
|
45
45
|
export * from "./GraphSearchScope.mjs";
|
|
46
|
+
export * from "./PropertyFilter.mjs";
|
|
46
47
|
export * from "./Reranker.mjs";
|
|
47
48
|
export * from "./SearchFilters.mjs";
|
|
48
49
|
export * from "./EntityPropertyType.mjs";
|
|
@@ -43,6 +43,7 @@ export * from "./DateFilter.mjs";
|
|
|
43
43
|
export * from "./EntityEdge.mjs";
|
|
44
44
|
export * from "./EntityNode.mjs";
|
|
45
45
|
export * from "./GraphSearchScope.mjs";
|
|
46
|
+
export * from "./PropertyFilter.mjs";
|
|
46
47
|
export * from "./Reranker.mjs";
|
|
47
48
|
export * from "./SearchFilters.mjs";
|
|
48
49
|
export * from "./EntityPropertyType.mjs";
|
|
@@ -8,16 +8,19 @@ export declare const AddTripleRequest: core.serialization.Schema<serializers.Add
|
|
|
8
8
|
export declare namespace AddTripleRequest {
|
|
9
9
|
interface Raw {
|
|
10
10
|
created_at?: string | null;
|
|
11
|
+
edge_attributes?: Record<string, unknown> | null;
|
|
11
12
|
expired_at?: string | null;
|
|
12
13
|
fact: string;
|
|
13
14
|
fact_name: string;
|
|
14
15
|
fact_uuid?: string | null;
|
|
15
16
|
graph_id?: string | null;
|
|
16
17
|
invalid_at?: string | null;
|
|
17
|
-
|
|
18
|
+
source_node_attributes?: Record<string, unknown> | null;
|
|
19
|
+
source_node_name?: string | null;
|
|
18
20
|
source_node_summary?: string | null;
|
|
19
21
|
source_node_uuid?: string | null;
|
|
20
|
-
|
|
22
|
+
target_node_attributes?: Record<string, unknown> | null;
|
|
23
|
+
target_node_name?: string | null;
|
|
21
24
|
target_node_summary?: string | null;
|
|
22
25
|
target_node_uuid?: string | null;
|
|
23
26
|
user_id?: string | null;
|
|
@@ -4,16 +4,19 @@
|
|
|
4
4
|
import * as core from "../../../../../core/index.mjs";
|
|
5
5
|
export const AddTripleRequest = core.serialization.object({
|
|
6
6
|
createdAt: core.serialization.property("created_at", core.serialization.string().optional()),
|
|
7
|
+
edgeAttributes: core.serialization.property("edge_attributes", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()),
|
|
7
8
|
expiredAt: core.serialization.property("expired_at", core.serialization.string().optional()),
|
|
8
9
|
fact: core.serialization.string(),
|
|
9
10
|
factName: core.serialization.property("fact_name", core.serialization.string()),
|
|
10
11
|
factUuid: core.serialization.property("fact_uuid", core.serialization.string().optional()),
|
|
11
12
|
graphId: core.serialization.property("graph_id", core.serialization.string().optional()),
|
|
12
13
|
invalidAt: core.serialization.property("invalid_at", core.serialization.string().optional()),
|
|
13
|
-
|
|
14
|
+
sourceNodeAttributes: core.serialization.property("source_node_attributes", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()),
|
|
15
|
+
sourceNodeName: core.serialization.property("source_node_name", core.serialization.string().optional()),
|
|
14
16
|
sourceNodeSummary: core.serialization.property("source_node_summary", core.serialization.string().optional()),
|
|
15
17
|
sourceNodeUuid: core.serialization.property("source_node_uuid", core.serialization.string().optional()),
|
|
16
|
-
|
|
18
|
+
targetNodeAttributes: core.serialization.property("target_node_attributes", core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()),
|
|
19
|
+
targetNodeName: core.serialization.property("target_node_name", core.serialization.string().optional()),
|
|
17
20
|
targetNodeSummary: core.serialization.property("target_node_summary", core.serialization.string().optional()),
|
|
18
21
|
targetNodeUuid: core.serialization.property("target_node_uuid", core.serialization.string().optional()),
|
|
19
22
|
userId: core.serialization.property("user_id", core.serialization.string().optional()),
|
|
@@ -5,5 +5,5 @@ import * as core from "../../core/index.mjs";
|
|
|
5
5
|
import { ComparisonOperator } from "./ComparisonOperator.mjs";
|
|
6
6
|
export const DateFilter = core.serialization.object({
|
|
7
7
|
comparisonOperator: core.serialization.property("comparison_operator", ComparisonOperator),
|
|
8
|
-
date: core.serialization.string(),
|
|
8
|
+
date: core.serialization.string().optional(),
|
|
9
9
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index.mjs";
|
|
5
|
+
import * as Zep from "../../api/index.mjs";
|
|
6
|
+
import * as core from "../../core/index.mjs";
|
|
7
|
+
import { ComparisonOperator } from "./ComparisonOperator.mjs";
|
|
8
|
+
export declare const PropertyFilter: core.serialization.ObjectSchema<serializers.PropertyFilter.Raw, Zep.PropertyFilter>;
|
|
9
|
+
export declare namespace PropertyFilter {
|
|
10
|
+
interface Raw {
|
|
11
|
+
comparison_operator: ComparisonOperator.Raw;
|
|
12
|
+
property_name: string;
|
|
13
|
+
property_value?: unknown | null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../core/index.mjs";
|
|
5
|
+
import { ComparisonOperator } from "./ComparisonOperator.mjs";
|
|
6
|
+
export const PropertyFilter = core.serialization.object({
|
|
7
|
+
comparisonOperator: core.serialization.property("comparison_operator", ComparisonOperator),
|
|
8
|
+
propertyName: core.serialization.property("property_name", core.serialization.string()),
|
|
9
|
+
propertyValue: core.serialization.property("property_value", core.serialization.unknown().optional()),
|
|
10
|
+
});
|
|
@@ -5,16 +5,19 @@ import * as serializers from "../index.mjs";
|
|
|
5
5
|
import * as Zep from "../../api/index.mjs";
|
|
6
6
|
import * as core from "../../core/index.mjs";
|
|
7
7
|
import { DateFilter } from "./DateFilter.mjs";
|
|
8
|
+
import { PropertyFilter } from "./PropertyFilter.mjs";
|
|
8
9
|
export declare const SearchFilters: core.serialization.ObjectSchema<serializers.SearchFilters.Raw, Zep.SearchFilters>;
|
|
9
10
|
export declare namespace SearchFilters {
|
|
10
11
|
interface Raw {
|
|
11
12
|
created_at?: DateFilter.Raw[][] | null;
|
|
12
13
|
edge_types?: string[] | null;
|
|
14
|
+
edge_uuids?: string[] | null;
|
|
13
15
|
exclude_edge_types?: string[] | null;
|
|
14
16
|
exclude_node_labels?: string[] | null;
|
|
15
17
|
expired_at?: DateFilter.Raw[][] | null;
|
|
16
18
|
invalid_at?: DateFilter.Raw[][] | null;
|
|
17
19
|
node_labels?: string[] | null;
|
|
20
|
+
property_filters?: PropertyFilter.Raw[] | null;
|
|
18
21
|
valid_at?: DateFilter.Raw[][] | null;
|
|
19
22
|
}
|
|
20
23
|
}
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as core from "../../core/index.mjs";
|
|
5
5
|
import { DateFilter } from "./DateFilter.mjs";
|
|
6
|
+
import { PropertyFilter } from "./PropertyFilter.mjs";
|
|
6
7
|
export const SearchFilters = core.serialization.object({
|
|
7
8
|
createdAt: core.serialization.property("created_at", core.serialization.list(core.serialization.list(DateFilter)).optional()),
|
|
8
9
|
edgeTypes: core.serialization.property("edge_types", core.serialization.list(core.serialization.string()).optional()),
|
|
10
|
+
edgeUuids: core.serialization.property("edge_uuids", core.serialization.list(core.serialization.string()).optional()),
|
|
9
11
|
excludeEdgeTypes: core.serialization.property("exclude_edge_types", core.serialization.list(core.serialization.string()).optional()),
|
|
10
12
|
excludeNodeLabels: core.serialization.property("exclude_node_labels", core.serialization.list(core.serialization.string()).optional()),
|
|
11
13
|
expiredAt: core.serialization.property("expired_at", core.serialization.list(core.serialization.list(DateFilter)).optional()),
|
|
12
14
|
invalidAt: core.serialization.property("invalid_at", core.serialization.list(core.serialization.list(DateFilter)).optional()),
|
|
13
15
|
nodeLabels: core.serialization.property("node_labels", core.serialization.list(core.serialization.string()).optional()),
|
|
16
|
+
propertyFilters: core.serialization.property("property_filters", core.serialization.list(PropertyFilter).optional()),
|
|
14
17
|
validAt: core.serialization.property("valid_at", core.serialization.list(core.serialization.list(DateFilter)).optional()),
|
|
15
18
|
});
|
|
@@ -43,6 +43,7 @@ export * from "./DateFilter.mjs";
|
|
|
43
43
|
export * from "./EntityEdge.mjs";
|
|
44
44
|
export * from "./EntityNode.mjs";
|
|
45
45
|
export * from "./GraphSearchScope.mjs";
|
|
46
|
+
export * from "./PropertyFilter.mjs";
|
|
46
47
|
export * from "./Reranker.mjs";
|
|
47
48
|
export * from "./SearchFilters.mjs";
|
|
48
49
|
export * from "./EntityPropertyType.mjs";
|
|
@@ -43,6 +43,7 @@ export * from "./DateFilter.mjs";
|
|
|
43
43
|
export * from "./EntityEdge.mjs";
|
|
44
44
|
export * from "./EntityNode.mjs";
|
|
45
45
|
export * from "./GraphSearchScope.mjs";
|
|
46
|
+
export * from "./PropertyFilter.mjs";
|
|
46
47
|
export * from "./Reranker.mjs";
|
|
47
48
|
export * from "./SearchFilters.mjs";
|
|
48
49
|
export * from "./EntityPropertyType.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.
|
|
1
|
+
export declare const SDK_VERSION = "3.14.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "3.
|
|
1
|
+
export const SDK_VERSION = "3.14.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -620,8 +620,6 @@ Add a fact triple for a user or group
|
|
|
620
620
|
await client.graph.addFactTriple({
|
|
621
621
|
fact: "fact",
|
|
622
622
|
factName: "fact_name",
|
|
623
|
-
sourceNodeName: "source_node_name",
|
|
624
|
-
targetNodeName: "target_node_name",
|
|
625
623
|
});
|
|
626
624
|
```
|
|
627
625
|
|
|
@@ -3397,6 +3395,69 @@ await client.graph.node.get("uuid");
|
|
|
3397
3395
|
</dl>
|
|
3398
3396
|
</details>
|
|
3399
3397
|
|
|
3398
|
+
<details><summary><code>client.graph.node.<a href="/src/api/resources/graph/resources/node/client/Client.ts">delete</a>(uuid) -> Zep.SuccessResponse</code></summary>
|
|
3399
|
+
<dl>
|
|
3400
|
+
<dd>
|
|
3401
|
+
|
|
3402
|
+
#### 📝 Description
|
|
3403
|
+
|
|
3404
|
+
<dl>
|
|
3405
|
+
<dd>
|
|
3406
|
+
|
|
3407
|
+
<dl>
|
|
3408
|
+
<dd>
|
|
3409
|
+
|
|
3410
|
+
Deletes a node by UUID.
|
|
3411
|
+
|
|
3412
|
+
</dd>
|
|
3413
|
+
</dl>
|
|
3414
|
+
</dd>
|
|
3415
|
+
</dl>
|
|
3416
|
+
|
|
3417
|
+
#### 🔌 Usage
|
|
3418
|
+
|
|
3419
|
+
<dl>
|
|
3420
|
+
<dd>
|
|
3421
|
+
|
|
3422
|
+
<dl>
|
|
3423
|
+
<dd>
|
|
3424
|
+
|
|
3425
|
+
```typescript
|
|
3426
|
+
await client.graph.node.delete("uuid");
|
|
3427
|
+
```
|
|
3428
|
+
|
|
3429
|
+
</dd>
|
|
3430
|
+
</dl>
|
|
3431
|
+
</dd>
|
|
3432
|
+
</dl>
|
|
3433
|
+
|
|
3434
|
+
#### ⚙️ Parameters
|
|
3435
|
+
|
|
3436
|
+
<dl>
|
|
3437
|
+
<dd>
|
|
3438
|
+
|
|
3439
|
+
<dl>
|
|
3440
|
+
<dd>
|
|
3441
|
+
|
|
3442
|
+
**uuid:** `string` — Node UUID
|
|
3443
|
+
|
|
3444
|
+
</dd>
|
|
3445
|
+
</dl>
|
|
3446
|
+
|
|
3447
|
+
<dl>
|
|
3448
|
+
<dd>
|
|
3449
|
+
|
|
3450
|
+
**requestOptions:** `Node.RequestOptions`
|
|
3451
|
+
|
|
3452
|
+
</dd>
|
|
3453
|
+
</dl>
|
|
3454
|
+
</dd>
|
|
3455
|
+
</dl>
|
|
3456
|
+
|
|
3457
|
+
</dd>
|
|
3458
|
+
</dl>
|
|
3459
|
+
</details>
|
|
3460
|
+
|
|
3400
3461
|
## Thread Message
|
|
3401
3462
|
|
|
3402
3463
|
<details><summary><code>client.thread.message.<a href="/src/api/resources/thread/resources/message/client/Client.ts">update</a>(messageUuid, { ...params }) -> Zep.Message</code></summary>
|