Skip to content

Commit cab7d02

Browse files
SDK regeneration
1 parent e6657bd commit cab7d02

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ Add a fact triple for a user or group
620620
await client.graph.addFactTriple({
621621
fact: "fact",
622622
factName: "fact_name",
623+
sourceNodeName: "source_node_name",
623624
targetNodeName: "target_node_name",
624625
});
625626
```

src/api/resources/graph/client/Client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ export class Graph {
534534
* await client.graph.addFactTriple({
535535
* fact: "fact",
536536
* factName: "fact_name",
537+
* sourceNodeName: "source_node_name",
537538
* targetNodeName: "target_node_name"
538539
* })
539540
*/

src/api/resources/graph/client/requests/AddTripleRequest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* {
88
* fact: "fact",
99
* factName: "fact_name",
10+
* sourceNodeName: "source_node_name",
1011
* targetNodeName: "target_node_name"
1112
* }
1213
*/
@@ -25,7 +26,7 @@ export interface AddTripleRequest {
2526
/** The time (if any) at which the fact stops being true */
2627
invalidAt?: string;
2728
/** The name of the source node to add */
28-
sourceNodeName?: string;
29+
sourceNodeName: string;
2930
/** The summary of the source node to add */
3031
sourceNodeSummary?: string;
3132
/** The source node uuid */

src/serialization/resources/graph/client/requests/AddTripleRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const AddTripleRequest: core.serialization.Schema<serializers.AddTripleRe
1515
factUuid: core.serialization.property("fact_uuid", core.serialization.string().optional()),
1616
graphId: core.serialization.property("graph_id", core.serialization.string().optional()),
1717
invalidAt: core.serialization.property("invalid_at", core.serialization.string().optional()),
18-
sourceNodeName: core.serialization.property("source_node_name", core.serialization.string().optional()),
18+
sourceNodeName: core.serialization.property("source_node_name", core.serialization.string()),
1919
sourceNodeSummary: core.serialization.property("source_node_summary", core.serialization.string().optional()),
2020
sourceNodeUuid: core.serialization.property("source_node_uuid", core.serialization.string().optional()),
2121
targetNodeName: core.serialization.property("target_node_name", core.serialization.string()),
@@ -34,7 +34,7 @@ export declare namespace AddTripleRequest {
3434
fact_uuid?: string | null;
3535
graph_id?: string | null;
3636
invalid_at?: string | null;
37-
source_node_name?: string | null;
37+
source_node_name: string;
3838
source_node_summary?: string | null;
3939
source_node_uuid?: string | null;
4040
target_node_name: string;

tests/wire/graph.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,12 @@ describe("Graph", () => {
197197
test("add_fact_triple", async () => {
198198
const server = mockServerPool.createServer();
199199
const client = new ZepClient({ apiKey: "test", environment: server.baseUrl });
200-
const rawRequestBody = { fact: "fact", fact_name: "fact_name", target_node_name: "target_node_name" };
200+
const rawRequestBody = {
201+
fact: "fact",
202+
fact_name: "fact_name",
203+
source_node_name: "source_node_name",
204+
target_node_name: "target_node_name",
205+
};
201206
const rawResponseBody = {
202207
edge: {
203208
attributes: { key: "value" },
@@ -248,6 +253,7 @@ describe("Graph", () => {
248253
const response = await client.graph.addFactTriple({
249254
fact: "fact",
250255
factName: "fact_name",
256+
sourceNodeName: "source_node_name",
251257
targetNodeName: "target_node_name",
252258
});
253259
expect(response).toEqual({

0 commit comments

Comments
 (0)